Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

z_map decompiled #1032

Merged
merged 56 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
31f40ad
First batch of functions
mzxrules Jun 23, 2022
7769846
more ok
mzxrules Jul 5, 2022
0b99719
Merge remote-tracking branch 'upstream/master' into z_map_
mzxrules Jul 5, 2022
30465e1
z_map_data OK
mzxrules Jul 5, 2022
2ac9fe4
More OKs, MinimapList ZAPD breaking change
mzxrules Jul 9, 2022
bbdf16e
func_80103A58 improvements, more OK
mzxrules Jul 19, 2022
4ae7b95
Merge remote-tracking branch 'upstream/master' into z_map_
mzxrules Jul 23, 2022
90d82ee
func_80106D5C and func_801091F0 decomped
mzxrules Jul 27, 2022
5c616b9
func_801031D0 decomped and some fixes
mzxrules Aug 2, 2022
723c82c
house cleaning, more OKs more decomp
mzxrules Aug 3, 2022
e5c6aac
Merge remote-tracking branch 'upstream/master' into z_map_
mzxrules Aug 3, 2022
cdabbfd
Even more OKs
mzxrules Aug 4, 2022
5ece255
func_80105C40 almost OK, more OKs
mzxrules Aug 5, 2022
7879695
func_80108AF8 OK and more
mzxrules Aug 10, 2022
e71c8e6
All functions attempted
mzxrules Aug 11, 2022
30b83c1
func_8010534C OK
mzxrules Aug 11, 2022
64bced7
Start documentation, rename DoorCtx
mzxrules Aug 17, 2022
1da0fa1
More OKs, split map_data.data, more doc
mzxrules Aug 18, 2022
a65750c
incremental clean-up, more function names
mzxrules Aug 20, 2022
b78ac55
more function names
mzxrules Sep 8, 2022
49492b6
Merge remote-tracking branch 'origin/master' into z_map_
mzxrules Sep 10, 2022
0a8d285
Merge remote-tracking branch 'origin/master' into z_map_
mzxrules Oct 3, 2022
88a9eb5
Merge remote-tracking branch 'origin/master' into z_map_
mzxrules Jan 2, 2023
98c44d5
func_801068FC OK
mzxrules Jan 3, 2023
b8af4ef
Merge remote-tracking branch 'origin/master' into z_map_
mzxrules May 28, 2023
91a12ce
Merge remote-tracking branch 'origin/master' into z_map_
mzxrules Jun 19, 2023
7630165
old uncommitted changes
mzxrules Oct 5, 2023
de4f30d
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules Oct 6, 2023
413d778
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules Oct 13, 2023
fffc9d0
minor tweaks
mzxrules Oct 13, 2023
9282fed
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules Oct 13, 2023
3444cdb
implement easy fixes
mzxrules Oct 13, 2023
f605759
more fixes
mzxrules Oct 14, 2023
0e374ca
z_map_disp OK, implement more suggestions
mzxrules Oct 16, 2023
6c438d0
delete utility program
mzxrules Oct 16, 2023
9d3a447
migrate data
mzxrules Oct 16, 2023
396379a
TransiActor ->TransitionActor
mzxrules Oct 16, 2023
b89b64d
Major documentation pass
mzxrules Oct 25, 2023
1d0257c
first pass of changes
mzxrules Oct 31, 2023
88b8340
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules Nov 5, 2023
651c120
warning fix attempt, revert ZFile.cpp
mzxrules Nov 5, 2023
f6495ce
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules Feb 23, 2024
c73dfb2
Fix FAKE match
mzxrules Feb 23, 2024
eb411c4
Easy fixes
mzxrules Feb 23, 2024
2c33644
implement gDPLoadTextureBlock_Runtime
mzxrules May 9, 2024
72e98a8
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules May 9, 2024
e4f2865
z_demo bss patch
mzxrules May 10, 2024
2488d3b
Extract white square texture
mzxrules May 15, 2024
5db5048
Implement more suggestions
mzxrules May 17, 2024
2df69d3
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules May 18, 2024
b32db23
rework MapIndex/DungeonIndex
mzxrules May 23, 2024
4534bba
revert dungeonSceneIndex -> mapIndex in some spots, implement suggest…
mzxrules Jun 18, 2024
d7528dc
Merge remote-tracking branch 'origin/main' into z_map_
mzxrules Jun 18, 2024
7b464e1
more suggestions
mzxrules Jun 18, 2024
b69772a
minor nits
mzxrules Jun 20, 2024
40ccffa
fix #include
mzxrules Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions assets/xml/code/z_map_disp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Root>
<File Name="code" OutName="z_map_disp" BaseAddress="0x800A5AC0" RangeStart="0x119078" RangeEnd="0x1190F8" >
<Texture Name="sWhiteSquareTex" OutName="white_square" Format="i4" Width="16" Height="16" Offset="0x119078"/>
</File>
</Root>
6 changes: 5 additions & 1 deletion assets/xml/objects/gameplay_dangeon_keep.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<Texture Name="gDoorLockTex" OutName="door_lock" Format="rgba16" Width="32" Height="32" Offset="0x2C0" />
<Texture Name="gBossDoorLockTex" OutName="boss_door_lock" Format="rgba16" Width="32" Height="32" Offset="0xAC0" />
<Texture Name="gDoorChainTex" OutName="door_chain" Format="rgba16" Width="16" Height="128" Offset="0x12C0" />
<Blob Name="gameplay_dangeon_keep_Blob_0022C0" Size="0x5000" Offset="0x22C0" />
<Texture Name="gameplay_dangeon_keep_Tex_0022C8" OutName="tex_0022C8" Format="i4" Width="96" Height="85" Offset="0x22C8" />
<Texture Name="gameplay_dangeon_keep_Tex_0032C8" OutName="tex_0032C8" Format="i4" Width="96" Height="85" Offset="0x32C8" />
<Texture Name="gameplay_dangeon_keep_Tex_0042C8" OutName="tex_0042C8" Format="i4" Width="96" Height="85" Offset="0x42C8" />
<Texture Name="gameplay_dangeon_keep_Tex_0052C8" OutName="tex_0052C8" Format="i4" Width="96" Height="85" Offset="0x52C8" />
<Texture Name="gameplay_dangeon_keep_Tex_0062C8" OutName="tex_0062C8" Format="i4" Width="96" Height="85" Offset="0x62C8" />
<DList Name="gameplay_dangeon_keep_DL_007300" Offset="0x7300" />
<Collision Name="gameplay_dangeon_keep_Colheader_007498" Offset="0x7498" />
<DList Name="gameplay_dangeon_keep_DL_007650" Offset="0x7650" />
Expand Down
8 changes: 4 additions & 4 deletions assets/xml/objects/gameplay_keep.xml
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@
<!-- Bombchu -->
<Texture Name="gBombchuBodyTex" OutName="bombchu_body" Format="rgba16" Width="8" Height="8" Offset="0x16060" />
<DList Name="gBombchuDL" Offset="0x16360" />

<Texture Name="gEffBombExplosion1Tex" OutName="eff_bomb_explosion_1" Format="ia16" Width="32" Height="32" Offset="0x164D0" />
<Texture Name="gEffBombExplosion2Tex" OutName="eff_bomb_explosion_2" Format="ia16" Width="32" Height="32" Offset="0x16CD0" />
<Texture Name="gEffBombExplosion3Tex" OutName="eff_bomb_explosion_3" Format="ia16" Width="32" Height="32" Offset="0x174D0" />
Expand Down Expand Up @@ -908,7 +908,7 @@
<Texture Name="gElegyShellBeltAndTunicTex" OutName="elegy_shell_human_belt_and_tunic" Format="rgba16" Width="32" Height="16" Offset="0x1E6F8" />
<Texture Name="gElegyShellHumanHairTex" OutName="elegy_shell_human_hair" Format="rgba16" Width="16" Height="16" Offset="0x1EAF8" />

<DList Name="gameplay_keep_DL_01ED00" Offset="0x1ED00" />
<DList Name="gCompassArrowDL" Offset="0x1ED00" />
<DList Name="gameplay_keep_DL_01ED90" Offset="0x1ED90" />
<DList Name="gZTargetArrowDL" Offset="0x1F0F0" />
<Texture Name="gameplay_keep_Tex_01F200" OutName="tex_01F200" Format="i8" Width="8" Height="8" Offset="0x1F200" />
Expand Down Expand Up @@ -1296,7 +1296,7 @@
<Texture Name="gDropDekuNutTex" OutName="drop_deku_nut" Format="rgba16" Width="32" Height="32" Offset="0x607C0" />
<Texture Name="gDropDekuStickTex" OutName="drop_deku_stick" Format="rgba16" Width="32" Height="32" Offset="0x60FC0" />
<Texture Name="gDropMagicLargeTex" OutName="drop_magic_large" Format="rgba16" Width="32" Height="32" Offset="0x617C0" />

<!-- Rupees -->
<Texture Name="gRupeeGreenTex" OutName="rupee_green" Format="rgba16" Width="4" Height="4" Offset="0x61FC0" />
<Texture Name="gRupeeBlueTex" OutName="rupee_blue" Format="rgba16" Width="4" Height="4" Offset="0x61FE0" />
Expand All @@ -1312,7 +1312,7 @@
<Texture Name="gRupeeLightRedTex" OutName="rupee_light_red" Format="rgba16" Width="4" Height="4" Offset="0x63B90" />
<Texture Name="gRupeeLightBlueTex" OutName="rupee_light_blue" Format="rgba16" Width="4" Height="4" Offset="0x63BB0" />
<Texture Name="gHeartContainerTex" OutName="heart_container" Format="rgba16" Width="32" Height="32" Offset="0x63BD0" />

<Texture Name="gameplay_keep_Tex_0643D0" OutName="tex_0643D0" Format="rgba16" Width="32" Height="32" Offset="0x643D0" />
<Texture Name="gameplay_keep_Tex_064BD0" OutName="tex_064BD0" Format="rgba16" Width="32" Height="32" Offset="0x64BD0" />
<Texture Name="gameplay_keep_Tex_0653D0" OutName="tex_0653D0" Format="rgba16" Width="32" Height="32" Offset="0x653D0" />
Expand Down
2 changes: 1 addition & 1 deletion assets/xml/overlays/ovl_En_Mm2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Root>
<File Name="ovl_En_Mm2" BaseAddress="0x809A2030" RangeStart="0x240" RangeEnd="0xAD0">
<Texture Name="sEnMm2EnvelopeTex" OutName="mm2_envelope" Format="i8" Width="32" Height="32" Offset="0x240"/>
<Texture Name="sEnMm2LetterTex" OutName="mm2_letter" Format="i8" Width="16" Height="16" Offset="0x640"/>
<Texture Name="sEnMm2LetterTex" OutName="mm2_letter" Format="rgba16" Width="16" Height="16" Offset="0x640"/>
<Array Name="sEnMm21Vtx" Count="10" Offset="0x840">
<Vtx/>
</Array>
Expand Down
2 changes: 1 addition & 1 deletion assets/xml/overlays/ovl_Oceff_Wipe7.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Root>
<File Name="ovl_Oceff_Wipe7" BaseAddress="0x80BCDCB0" RangeStart="0x330" RangeEnd="0xDB8">
<Texture Name="sSongofHealingEffectTex" OutName="song_of_healing_effect" Format="i8" Width="32" Height="32" Offset="0x330"/>
<Texture Name="sSongofHealingEffectTex" OutName="song_of_healing_effect" Format="i8" Width="32" Height="64" Offset="0x330"/>
<TextureAnimation Name="sSongofHealingEffectTexAnim" Offset="0xB38" />
<Array Name="sSongofHealingEffectFrustrumVtx" Count="22" Offset="0xB40">
<Vtx/>
Expand Down
108 changes: 0 additions & 108 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,114 +226,6 @@ void GetItem_Draw(PlayState* play, s16 drawId);

u16 QuestHint_GetTatlTextId(PlayState* play);

// void func_80102E40(void);
// void func_80102E90(void);
// void func_80102EA4(void);
void func_80102EB4(u32 param_1);
void func_80102ED0(u32 param_1);
s32 func_80102EF0(PlayState* play);
// void func_80102F9C(void);
// void func_80103090(void);
// void func_801030B4(void);
// void func_801030F4(void);
// void func_801031D0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_801039EC(void);
// void func_80103A10(void);
// void func_80103A58(void);
// void func_8010439C(void);
// void func_801045AC(void);
// void func_80104AE8(void);
// void func_80104C80(void);
void func_80104CF4(PlayState* play);
// void func_80104F34(void);
s32 func_80105294(void);
s16 func_80105318(void);
// void func_80105328(void);
// void func_8010534C(void);
void func_8010549C(PlayState* play, void* segmentAddress);
void func_8010565C(PlayState* play, u8 num, void* segmentAddress);
void func_80105818(PlayState* play, u32 uParm2, TransitionActorEntry* puParm3);
void func_80105A40(PlayState* play);
void func_80105B34(PlayState* play);
void func_80105C40(s16 arg0);
// void func_80105FE0(void);
// void func_80106408(void);
// void func_80106450(void);
// void func_801064CC(void);
s32 func_80106530(PlayState* play);
// void func_8010657C(void);
void func_80106644(PlayState* play, s16 arg1, s16 arg2, s16 arg3);
// void func_8010683C(void);
// void func_801068B4(void);
// void func_801068D8(void);
void* func_801068FC(PlayState* play, void* arg1, size_t size);
// void func_80106BEC(void);
// void func_80106D08(void);
// void func_80106D5C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_80107B78(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_80108124(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_80108558(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_80108A10(void);
// void func_80108A64(void);
void func_80108AF8(PlayState* play);
s32 func_801090B0(s32 arg0);
s32 func_80109124(s16 arg0);
void func_801091F0(PlayState* play);
void func_80109428(PlayState* play);
// void func_801094A0(void);
// void func_801094C8(void);
// void func_801094F8(void);
// void func_80109528(void);
// void func_8010954C(void);
// void func_8010956C(void);
// void func_8010958C(void);
// void func_801095AC(void);
// void func_801095DC(void);
// void func_8010960C(void);
// void func_80109630(void);
// void func_80109650(void);
// void func_80109670(void);
// void func_801096D4(void);
// void func_80109714(void);
// void func_80109754(void);
// void func_801097C8(void);
// void func_8010983C(void);
// void func_801098A0(void);
// void func_80109908(void);
// UNK_TYPE4 func_80109964(s32 param_1);
// void func_8010997C(void);
// void func_801099AC(void);
// void func_801099DC(void);
// void func_80109A00(void);
// void func_80109A20(void);
// void func_80109A40(void);
// void func_80109A98(void);
// void func_80109AD8(void);
// void func_80109B38(void);
// void func_80109BA0(void);
// void func_80109BF4(void);
// void func_80109C38(void);
// void func_80109CBC(void);
// void func_80109D40(void);
// void func_80109DD8(void);
// void func_80109E70(void);
// void func_80109EF8(void);
// void func_80109F78(void);
s32 Map_GetDungeonOrBossAreaIndex(PlayState* play);
s32 Map_IsInDungeonOrBossArea(PlayState* play);
s32 func_8010A0A4(PlayState* play);
// void Map_GetDungeonAreaIndex(PlayState* play);
// void Map_IsInDungeonArea(PlayState* play);
// void Map_GetBossAreaIndex(PlayState* play);
// void Map_IsInBossArea(PlayState* play);
// void func_8010A238(PlayState* play);
// void func_8010A2AC(PlayState* play);
void Minimap_SavePlayerRoomInitInfo(PlayState* play);
void Map_InitRoomData(PlayState* play, s16 room);
void Map_Destroy(PlayState* play);
void Map_Init(PlayState* play);
void Minimap_Draw(PlayState* play);
void Map_Update(PlayState* play);
f32 OLib_Vec3fDist(Vec3f* a, Vec3f* b);
f32 OLib_Vec3fDistOutDiff(Vec3f* a, Vec3f* b, Vec3f* dest);
f32 OLib_Vec3fDistXZ(Vec3f* a, Vec3f* b);
Expand Down
2 changes: 1 addition & 1 deletion include/regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ extern RegEditor* gRegEditor;
#define R_MOON_CRASH_TIMER_X XREG(81)
#define R_PAUSE_OWL_WARP_ALPHA XREG(87)
#define R_STORY_FILL_SCREEN_ALPHA XREG(91)
#define R_REVERSE_FLOOR_INDEX XREG(94)
#define R_PLAYER_FLOOR_REVERSE_INDEX XREG(94) // stores what floor the player is on
#define R_MINIMAP_DISABLED XREG(95)

#define R_ENV_LIGHT1_DIR(i) cREG(3 + (i))
Expand Down
2 changes: 1 addition & 1 deletion include/z64.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ typedef struct PlayState {
/* 0x17104 */ AnimationContext animationCtx;
/* 0x17D88 */ ObjectContext objectCtx;
/* 0x186E0 */ RoomContext roomCtx;
/* 0x18760 */ DoorContext doorCtx;
/* 0x18760 */ TransitionActorList transitionActors;
/* 0x18768 */ void (*playerInit)(Player* player, struct PlayState* play, FlexSkeletonHeader* skelHeader);
/* 0x1876C */ void (*playerUpdate)(Player* player, struct PlayState* play, Input* input);
/* 0x18770 */ void (*unk_18770)(struct PlayState* play, Player* player);
Expand Down
2 changes: 1 addition & 1 deletion include/z64interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ typedef struct {
/* 0x274 */ s16 minimapAlpha;
/* 0x276 */ s16 startAlpha;
/* 0x278 */ s16 unk_278;
/* 0x27A */ s16 dungeonOrBossAreaMapIndex;
/* 0x27A */ s16 dungeonSceneIndex;
/* 0x27C */ s16 mapRoomNum;
/* 0x27E */ u8 unk_27E;
/* 0x27F */ u8 unk_27F;
Expand Down
137 changes: 137 additions & 0 deletions include/z64map.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,143 @@
#ifndef Z64MAP_H
#define Z64MAP_H
#include "ultra64.h"
#include "z64scene.h"

struct PlayState;

/*
Handles the minimap and pause screen dungeon map system.

z_map_data.c stores MapSpriteInfo and helper functions to "simplify" accessing this data

Two separate Id systems are used to access data

mapId
0x000-0x004 fetches minimap sprite data from gameplay_dangeon_keep
0x005-0x039 fetches dungeon map sprite data from map_i_static
0x100-0x161 fetches minimap sprite data from map_grand_static

mapCompactId
0x000-0x039 fetches dungeon map sprite data from map_i_static
0x03A-0x09B fetches minimap sprite data from map_grand_static
*/

#define FLOOR_INDEX_MAX 4
#define FLOOR_MIN_Y -32767
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nicer

Suggested change
#define FLOOR_MIN_Y -32767
#define FLOOR_MIN_Y -0x7FFF

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer keep coordinates stored in decimal, to stay consistent with e.g. z64bgcheck.h


/* z_map_data */
#define MAPDATA_GAMEPLAY_DANGEON_KEEP_MAX 5
#define MAPDATA_MAP_I_MAX 0x3A
#define MAPDATA_MAP_GRAND 0x100
#define MAPDATA_MAP_GRAND_MAX 0x162
#define MAPDATA_GET_MAP_GRAND_ID_FROM_COMPACT_ID(id) ((id) + (MAPDATA_MAP_GRAND - MAPDATA_MAP_I_MAX))
#define MAPDATA_GET_MAP_GRAND_ID_FROM_MAP_ID(mapId) ((mapId) - MAPDATA_MAP_GRAND)

#define MAPDATA_MID_GAMEPLAY_DANGEON_KEEP 0
#define MAPDATA_MID_MAP_GRAND_STATIC 1
#define MAPDATA_MID_MAP_I_STATIC 2

#define MAPDATA_CPID_MAP_GRAND_STATIC 0
#define MAPDATA_CPID_MAP_I_STATIC 1
#define MAPDATA_CPID_2 2

#define MAPDATA_DRAW_0 0
#define MAPDATA_DRAW_1 1
#define MAPDATA_DRAW_2 2
#define MAPDATA_DRAW_3 3

/* z_map_disp */
typedef struct {
/* 0x00 */ MapDataScene* mapDataScene;
/* 0x04 */ s32 curRoom;
/* 0x08 */ s16 minimapBaseX;
/* 0x0A */ s16 minimapBaseY;
/* 0x0C */ s16 minimapCurX;
/* 0x0E */ s16 minimapCurY;
/* 0x10 */ TexturePtr minimapCurTex; // gameplay cur minimap room
/* 0x14 */ s32 prevRoom;
/* 0x18 */ TexturePtr minimapPrevTex;
/* 0x1C */ s16 minimapPrevX; // for room swap animation
/* 0x1E */ s16 minimapPrevY; // for room swap animation
/* 0x20 */ s32 unk20;
/* 0x24 */ s32 swapAnimTimer;
/* 0x28 */ void* texBuff0;
/* 0x2C */ void* texBuff1;
/* 0x30 */ s16 sceneMinX; //scene minBounds.x
/* 0x32 */ s16 sceneMinZ; //scene minBounds.z
/* 0x34 */ s16 sceneWidth; //scene boundsWidth.x
/* 0x36 */ s16 sceneHeight; //scene boundsWidth.z
/* 0x38 */ s16 sceneMidX; //scene boundsMidpoint.x
/* 0x3A */ s16 sceneMidZ; //scene boundsMidpoint.z
/* 0x3C */ s16* roomStoreyList; // list of lowest storey each room crosses
/* 0x40 */ s16 numStoreys; // number of distinct storeys
/* 0x42 */ s16 pauseMapCurStorey;
/* 0x44 */ s16 bottomStorey; // configures what storey 0 is displayed as
/* 0x48 */ s16* storeyYList; // list of min Ys for each storey
/* 0x4C */ s16 timer;
/* 0x50 */ s32 numChests;
/* 0x54 */ MapDataChest* mapDataChests;
/* 0x58 */ s16 bossRoomStorey;
/* 0x5A */ s16 unk5A;
} MapDisp; // size = 0x5C

typedef struct {
/* 0x000 */ s32 textureCount;
/* 0x004 */ s32 mapI_mapCompactId[ROOM_MAX];
/* 0x084 */ void* mapI_roomTextures[ROOM_MAX];
/* 0x104 */ void* roomSprite[ROOM_MAX];
/* 0x184 */ s32 animTimer;
} PauseDungeonMap; // size = 0x188

/* z_map_disp */
void func_80102EB4(u32 flag);
void func_80102ED0(u32 flag);
s32 MapDisp_CurRoomHasMapI(struct PlayState* play);
void MapDisp_Init(struct PlayState* play);
s32 MapDisp_GetBossIconY(void);
s16 MapDisp_GetBossRoomStorey(void);
void MapDisp_InitMapData(struct PlayState* play, void* segmentAddress);
void MapDisp_InitChestData(struct PlayState* play, s32 num, void* segmentAddress);
void MapDisp_InitTransitionActorData(struct PlayState* play, s32 num, TransitionActorEntry* transitionActorList);
void MapDisp_Destroy(struct PlayState* play);
void MapDisp_Update(struct PlayState* play);
void MapDisp_SwapRooms(s16 nextRoom);
s32 MapDisp_IsMinimapToggleBlocked(struct PlayState* play);
void MapDisp_DrawMinimap(struct PlayState* play, s32 playerInitX, s32 playerInitZ, s32 playerInitDir);
void* MapDisp_AllocDungeonMap(struct PlayState* play, void* heap);
void MapDisp_DrawDungeonFloorSelect(struct PlayState* play);
s32 MapDisp_IsValidStorey(s32 storey);
s32 MapDisp_GetPlayerStorey(s16 checkY);
void MapDisp_DrawDungeonMap(struct PlayState* play);
void MapDisp_UpdateDungeonMap(struct PlayState* play);

/* z_map_data */
void MapData_GetMapColor(s32 colorIndex, Color_RGBA8* color);
TexturePtr MapData_GetMapTexGameplayDangeonKeep(s32);
s32 MapData_GetMapCompactId(s32);
s32 MapData_MID_GetType(s32);
s32 MapData_CPID_GetSizeOfMapTex(s32);
void MapData_GetDrawType(s32, s32*);
s32 MapData_GetMapColorIndex(s32);
s32 MapDisp_GetSizeOfMapITex(s32 mapCompactId);
s32 MapData_GetMapIId(s32);
s32 MapData_GetSizeOfMapGrandTex(s32 mapId);
void MapData_GetMapTexDim(s32 mapId, s32* width, s32* height);
void MapData_GetMapTexOffset(s32 mapId, s32* offsetX, s32* offsetY);
void MapData_GetMapScale(s32 mapId, s32 *scale);
void MapData_CPID_GetTexDim(s32 mapCompactId, s32* width, s32* height);
void MapData_CPID_GetTexOffset(s32 mapCompactId, s32* offsetX, s32* offsetY);
s16 MapData_CPID_GetMapScale(s32 mapCompactId);

/* z_map_exp */
s32 Map_IsInDungeonOrBossScene(struct PlayState* play);
s32 Map_CurRoomHasMapI(struct PlayState* play);
s32 Map_IsInBossScene(struct PlayState* play);
void Map_SetAreaEntrypoint(struct PlayState* play);
void Map_InitRoomData(struct PlayState* play, s16 room);
void Map_Destroy(struct PlayState* play);
void Map_Init(struct PlayState* play);
void Map_DrawMinimap(struct PlayState* play);
void Map_Update(struct PlayState* play);

#endif
2 changes: 1 addition & 1 deletion include/z64pause_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ typedef struct PauseContext {
/* 0x238 */ s16 cursorPoint[PAUSE_PAGE_MAX]; // indexed by PauseMenuPage enum
/* 0x242 */ s16 cursorXIndex[PAUSE_PAGE_MAX]; // indexed by PauseMenuPage enum
/* 0x24C */ s16 cursorYIndex[PAUSE_PAGE_MAX]; // indexed by PauseMenuPage enum
/* 0x256 */ s16 unk_256; // Uses DungeonItem enum
/* 0x256 */ s16 cursorMapDungeonItem; // Uses DungeonItem enum
/* 0x258 */ s16 cursorSpecialPos;
/* 0x25A */ s16 pageSwitchInputTimer; // Used to introduce a delay before switching page when arriving on the "scroll left/right" positions while holding stick left/right.
/* 0x25C */ u16 namedItem;
Expand Down
Loading