mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Major documentation pass
This commit is contained in:
@@ -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" />
|
||||
@@ -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" />
|
||||
@@ -1290,7 +1290,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" />
|
||||
@@ -1306,7 +1306,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" />
|
||||
@@ -1315,12 +1315,12 @@
|
||||
<Texture Name="gameplay_keep_Tex_066BD0" OutName="tex_066BD0" Format="rgba16" Width="64" Height="32" Offset="0x66BD0" />
|
||||
<Texture Name="gameplay_keep_Tex_067BD0" OutName="tex_067BD0" Format="rgba16" Width="32" Height="32" Offset="0x67BD0" />
|
||||
<Texture Name="gameplay_keep_Tex_0683D0" OutName="tex_0683D0" Format="rgba16" Width="32" Height="32" Offset="0x683D0" />
|
||||
|
||||
|
||||
<Texture Name="gSignRectangularSideTex" OutName="sign_rectangular_side" Format="rgba16" Width="32" Height="16" Offset="0x68BD0" />
|
||||
<Texture Name="gSignRectangularFrontTex" OutName="sign_rectangular_front" Format="rgba16" Width="32" Height="16" Offset="0x68FD0" />
|
||||
<Texture Name="gSignPostWoodTex" OutName="sign_post_wood" Format="rgba16" Width="64" Height="8" Offset="0x693D0" />
|
||||
<Texture Name="gSignLetteringTex" OutName="sign_lettering" Format="rgba16" Width="64" Height="32" Offset="0x697D0" />
|
||||
|
||||
|
||||
<DList Name="gameplay_keep_DL_06A800" Offset="0x6A800" />
|
||||
<Texture Name="gameplay_keep_Tex_06A880" OutName="tex_06A880" Format="i8" Width="16" Height="16" Offset="0x6A880" />
|
||||
<DList Name="gameplay_keep_DL_06AB30" Offset="0x6AB30" />
|
||||
@@ -1403,7 +1403,7 @@
|
||||
<Texture Name="gSunEvening1Tex" OutName="sun_evening_1" Format="i4" Width="64" Height="31" Offset="0x7A310" />
|
||||
<Texture Name="gSunEvening2Tex" OutName="sun_evening_2" Format="i4" Width="64" Height="16" Offset="0x7A6F0" />
|
||||
<Texture Name="gSunEvening3Tex" OutName="sun_evening_3" Format="i4" Width="64" Height="17" Offset="0x7A8F0" />
|
||||
|
||||
|
||||
<DList Name="gSunSparkleMaterialDL" Offset="0x7AB10" /> <!-- sun (sparkles when small) displaylist -->
|
||||
<DList Name="gSunSparkleModelDL" Offset="0x7AB58" />
|
||||
<DList Name="gSunDL" Offset="0x7AB70" />
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ extern RegEditor* gRegEditor;
|
||||
#define R_MOON_CRASH_TIMER_X XREG(81)
|
||||
#define R_PAUSE_OWLWARP_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_TRANS_FADE_FLASH_ALPHA_STEP iREG(50) // Set to a negative number to start the flash
|
||||
|
||||
@@ -1610,13 +1610,6 @@ extern SaveContext gSaveContext;
|
||||
// extern UNK_TYPE1 D_801F4F68;
|
||||
// extern UNK_TYPE1 D_801F4F6A;
|
||||
// extern LightsBuffer sLightsBuffer;
|
||||
// extern UNK_TYPE1 D_801F5130;
|
||||
// extern UNK_TYPE1 D_801F5270;
|
||||
// extern UNK_TYPE1 D_801F53B0;
|
||||
// extern UNK_TYPE1 D_801F56B0;
|
||||
// extern UNK_TYPE1 D_801F5730;
|
||||
// extern UNK_TYPE1 D_801F57B4;
|
||||
// extern UNK_TYPE1 D_801F5834;
|
||||
|
||||
// extern UNK_TYPE1 sSkyboxDrawMatrix;
|
||||
// extern UNK_TYPE1 D_801F6AF0;
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ typedef struct PauseContext {
|
||||
/* 0x238 */ s16 cursorPoint[5];
|
||||
/* 0x242 */ s16 cursorXIndex[5];
|
||||
/* 0x24C */ s16 cursorYIndex[5];
|
||||
/* 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;
|
||||
|
||||
+51
-87
@@ -6,23 +6,24 @@
|
||||
struct PlayState;
|
||||
|
||||
/*
|
||||
Handles L-minimap and pause screen dungeon minimap system.
|
||||
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 L-minimap data from gameplay_dangeon_keep
|
||||
0x005-0x039 fetches dungeon minimap data from map_i_static
|
||||
0x100-0x161 fetches L-minimap data from map_grand_static
|
||||
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 minimap data from map_i_static
|
||||
0x03A-0x09B fetches L-minimap data from map_grand_static
|
||||
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
|
||||
|
||||
/* z_map_data */
|
||||
#define MAPDATA_MAP_I_MAX 0x3A
|
||||
@@ -43,41 +44,19 @@ mapCompactId
|
||||
#define MAPDATA_DRAW_2 2
|
||||
#define MAPDATA_DRAW_3 3
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 texWidth;
|
||||
/* 0x1 */ u8 texHeight;
|
||||
/* 0x2 */ s16 offsetX;
|
||||
/* 0x4 */ s16 offsetY;
|
||||
/* 0x6 */ u8 drawType;
|
||||
/* 0x7 */ u8 colorIndex;
|
||||
/* 0x8 */ s16 scale;
|
||||
} MapSpriteInfo; // size = 0xA
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ TexturePtr lmapTex; //minimap texture
|
||||
/* 0x4 */ u8 width;
|
||||
/* 0x5 */ u8 height;
|
||||
/* 0x6 */ u8 offsetX;
|
||||
/* 0x7 */ u8 offsetY;
|
||||
/* 0x8 */ u8 drawType;
|
||||
/* 0x9 */ u8 colorIndex;
|
||||
/* 0xA */ s16 scale;
|
||||
} MapSpriteInfo2; // size = 0xC
|
||||
|
||||
/* z_map_disp */
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MinimapList* minimapList;
|
||||
/* 0x00 */ MapDataScene* mapDataScene;
|
||||
/* 0x04 */ s32 curRoom;
|
||||
/* 0x08 */ s16 unk8;
|
||||
/* 0x0A */ s16 unkA;
|
||||
/* 0x0C */ s16 unkC;
|
||||
/* 0x0E */ s16 unkE;
|
||||
/* 0x10 */ TexturePtr lMapCurTex; // gameplay cur minimap room
|
||||
/* 0x08 */ s16 minimapBaseX;
|
||||
/* 0x0A */ s16 minimapBaseY;
|
||||
/* 0x0C */ s16 minimapCurX;
|
||||
/* 0x0E */ s16 minimapCurY;
|
||||
/* 0x10 */ TexturePtr minimapCurTex; // gameplay cur minimap room
|
||||
/* 0x14 */ s32 prevRoom;
|
||||
/* 0x18 */ TexturePtr lMapPrevTex;
|
||||
/* 0x1C */ s16 unk1C; //same as 0C
|
||||
/* 0x1E */ s16 unk1E; //same as 0E
|
||||
/* 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;
|
||||
@@ -88,62 +67,47 @@ typedef struct {
|
||||
/* 0x36 */ s16 sceneHeight; //scene boundsWidth.z
|
||||
/* 0x38 */ s16 sceneMidX; //scene boundsMidpoint.x
|
||||
/* 0x3A */ s16 sceneMidZ; //scene boundsMidpoint.z
|
||||
/* 0x3C */ s16* unk3C;
|
||||
/* 0x40 */ s16 unk40;
|
||||
/* 0x42 */ s16 unk42;
|
||||
/* 0x44 */ s16 lowestFloor;
|
||||
/* 0x48 */ s16* unk48;
|
||||
/* 0x4C */ s16 unk4C;
|
||||
/* 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 */ MinimapChest* unk54;
|
||||
/* 0x58 */ s16 unk58;
|
||||
/* 0x54 */ MapDataChest* mapDataChests;
|
||||
/* 0x58 */ s16 bossRoomStorey;
|
||||
/* 0x5A */ s16 unk5A;
|
||||
} struct_801BEBB8; // size = 0x5C
|
||||
} MapDisp; // size = 0x5C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 sceneId;
|
||||
/* 0x2 */ s16 lowestFloor;
|
||||
} MapCustomLowestFloor; // size = 0x4
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk0[5];
|
||||
} struct_801BEC70; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 sceneId;
|
||||
/* 0x4 */ s32 unk4;
|
||||
/* 0x8 */ s32 unk8;
|
||||
} struct_801BED24; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s32 rooms;
|
||||
/* 0x004 */ s32 unk4[32];
|
||||
/* 0x084 */ void* unk84[32];
|
||||
/* 0x104 */ void* unk104[32];
|
||||
/* 0x184 */ s32 unk184;
|
||||
} struct_801F56B0; // size = 0x188
|
||||
/* 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 param_1);
|
||||
void func_80102ED0(u32 param_1);
|
||||
s32 func_80102EF0(struct PlayState* play);
|
||||
s32 MapDisp_CurRoomHasMapI(struct PlayState* play);
|
||||
void MapDisp_Init(struct PlayState* play);
|
||||
s32 func_80105294(void);
|
||||
s16 func_80105318(void);
|
||||
void func_8010549C(struct PlayState* play, void* segmentAddress);
|
||||
void func_8010565C(struct PlayState* play, s32 num, void* segmentAddress);
|
||||
void func_80105818(struct PlayState* play, s32 num, TransitionActorEntry* transitionActorList);
|
||||
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 func_80105B34(struct PlayState* play);
|
||||
void MapDisp_Update(struct PlayState* play);
|
||||
void MapDisp_SwapRooms(s16 nextRoom);
|
||||
s32 func_80106530(struct PlayState* play);
|
||||
void func_80106644(struct PlayState* play, s32 x, s32 z, s32 rot);
|
||||
void* func_801068FC(struct PlayState* play, void* heap);
|
||||
void func_80108AF8(struct PlayState* play);
|
||||
s32 func_801090B0(s32 arg0);
|
||||
s32 func_80109124(s16 arg0);
|
||||
void func_801091F0(struct PlayState* play);
|
||||
void func_80109428(struct PlayState* play);
|
||||
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);
|
||||
@@ -153,7 +117,7 @@ s32 MapData_MID_GetType(s32);
|
||||
s32 MapData_CPID_GetSizeOfMapTex(s32);
|
||||
void MapData_GetDrawType(s32, s32*);
|
||||
s32 MapData_GetMapColorIndex(s32);
|
||||
s32 MapDisp_GetSizeOfMapITex(s32);
|
||||
s32 MapDisp_GetSizeOfMapITex(s32 mapCompactId);
|
||||
s32 MapData_GetMapIId(s32);
|
||||
s32 MapData_GetSizeOfMapGrandTex(s32 mapId);
|
||||
void MapData_GetMapTexDim(s32 mapId, s32* width, s32* height);
|
||||
@@ -166,13 +130,13 @@ s16 MapData_CPID_GetMapScale(s32 mapCompactId);
|
||||
/* z_map_exp */
|
||||
s32 Map_GetDungeonOrBossAreaIndex(struct PlayState* play);
|
||||
s32 Map_IsInDungeonOrBossArea(struct PlayState* play);
|
||||
s32 func_8010A0A4(struct PlayState* play);
|
||||
s32 Map_IsInBossArea(struct PlayState* play);
|
||||
void Minimap_SavePlayerRoomInitInfo(struct PlayState* play);
|
||||
s32 MapExp_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 Minimap_Draw(struct PlayState* play);
|
||||
void Map_DrawMinimap(struct PlayState* play);
|
||||
void Map_Update(struct PlayState* play);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -495,6 +495,12 @@ typedef enum {
|
||||
#define CHECK_DUNGEON_ITEM_ALT(item, dungeonIndex) (gSaveContext.save.saveInfo.inventory.dungeonItems[dungeonIndex] & gBitFlags[item])
|
||||
#define SET_DUNGEON_ITEM(item, dungeonIndex) (gSaveContext.save.saveInfo.inventory.dungeonItems[(void)0, dungeonIndex] |= (u8)gBitFlags[item])
|
||||
#define DUNGEON_KEY_COUNT(dungeonIndex) (gSaveContext.save.saveInfo.inventory.dungeonKeys[(void)0, dungeonIndex])
|
||||
#define GET_DUNGEON_FLOOR_VISITED(sceneId, floor) (gSaveContext.save.saveInfo.permanentSceneFlags[(sceneId)].unk_14 & gBitFlags[floor])
|
||||
#define SET_DUNGEON_FLOOR_VISITED(sceneId, floor) (gSaveContext.save.saveInfo.permanentSceneFlags[(sceneId)].unk_14 |= gBitFlags[floor])
|
||||
#define GET_ROOM_VISITED(sceneId, room) (((void)0, gSaveContext.save.saveInfo.permanentSceneFlags[(sceneId)].rooms) & (1 << (room)))
|
||||
#define SET_ROOM_VISITED(sceneId, room) (gSaveContext.save.saveInfo.permanentSceneFlags[(sceneId)].rooms |= gBitFlags[room])
|
||||
#define GET_CYCLE_CHEST_OPENED(sceneId, chestFlagId) ((void)0, gSaveContext.cycleSceneFlags[(sceneId)].chest) & (1 << (chestFlagId));
|
||||
|
||||
|
||||
#define GET_CUR_FORM_BTN_ITEM(btn) ((u8)((btn) == EQUIP_SLOT_B ? BUTTON_ITEM_EQUIP(CUR_FORM, btn) : BUTTON_ITEM_EQUIP(0, btn)))
|
||||
#define GET_CUR_FORM_BTN_SLOT(btn) ((u8)((btn) == EQUIP_SLOT_B ? C_SLOT_EQUIP(CUR_FORM, btn) : C_SLOT_EQUIP(0, btn)))
|
||||
|
||||
+31
-19
@@ -9,6 +9,9 @@
|
||||
struct GameState;
|
||||
struct PlayState;
|
||||
|
||||
#define ROOM_MAX 32 // maximum number of rooms in a scene
|
||||
#define ROOM_TRANSITION_MAX 48 // maximum number of transition actors in a scene
|
||||
|
||||
#define SPAWN_ROT_FLAGS(rotation, flags) (((rotation) << 7) | (flags))
|
||||
|
||||
typedef struct {
|
||||
@@ -213,13 +216,13 @@ typedef struct {
|
||||
/* 0x0 */ u8 code;
|
||||
/* 0x1 */ u8 data1;
|
||||
/* 0x4 */ void* segment;
|
||||
} SCmdMinimapSettings; // size = 0x8
|
||||
} SCmdMapData; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 code;
|
||||
/* 0x1 */ u8 num;
|
||||
/* 0x4 */ void* segment;
|
||||
} SCmdMinimapChests; // size = 0x8
|
||||
} SCmdMapDataChests; // size = 0x8
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ROOM_SHAPE_TYPE_NORMAL,
|
||||
@@ -497,25 +500,34 @@ typedef struct {
|
||||
} Path; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 mapId;
|
||||
/* 0x02 */ s16 unk2;
|
||||
/* 0x04 */ s16 unk4;
|
||||
/* 0x06 */ s16 unk6;
|
||||
/* 0x08 */ u16 unk8; // flags; 1 = mirror x? 2 = mirror y?
|
||||
} MinimapEntry; // size = 0xA
|
||||
/* 0x0 */ u16 mapId;
|
||||
/* 0x2 */ s16 centerX;
|
||||
/* 0x4 */ s16 floorY;
|
||||
/* 0x6 */ s16 centerZ;
|
||||
/* 0x8 */ u16 flags; // 1 = mirror x, 2 = mirror y
|
||||
} MapDataRoom; // size = 0xA
|
||||
|
||||
#define MAP_DATA_ROOM_GET_EXTRA_STOREYS(e) ((((e)->flags) >> 2) & 7)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MinimapEntry* entry;
|
||||
/* 0x04 */ s16 scale;
|
||||
} MinimapList; // size = 0x8
|
||||
/* 0x0 */ MapDataRoom* rooms;
|
||||
/* 0x4 */ s16 scale;
|
||||
} MapDataScene; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE2 unk0;
|
||||
/* 0x02 */ UNK_TYPE2 unk2;
|
||||
/* 0x04 */ UNK_TYPE2 unk4;
|
||||
/* 0x06 */ UNK_TYPE2 unk6;
|
||||
/* 0x08 */ UNK_TYPE2 unk8;
|
||||
} MinimapChest; // size = 0xA
|
||||
/* 0x0 */ s16 room;
|
||||
/* 0x2 */ s16 chestFlagId;
|
||||
/* 0x4 */ s16 x;
|
||||
/* 0x6 */ s16 y;
|
||||
/* 0x8 */ s16 z;
|
||||
} MapDataChest; // size = 0xA
|
||||
|
||||
// TODO: ZAPD updates
|
||||
#define SCmdMinimapSettings SCmdMapData
|
||||
#define SCmdMinimapChests SCmdMapDataChests
|
||||
#define MinimapEntry MapDataRoom
|
||||
#define MinimapList MapDataScene
|
||||
#define MinimapChest MapDataChest
|
||||
|
||||
// TODO: consider merging with bgCamInfo?
|
||||
typedef struct {
|
||||
@@ -556,9 +568,9 @@ typedef union {
|
||||
/* Command: 0x19 */ SCmdRegionVisited regionVisited;
|
||||
/* Command: 0x1A */ SCmdTextureAnimations textureAnimations;
|
||||
/* Command: 0x1B */ SCmdCutsceneList cutsceneList;
|
||||
/* Command: 0x1C */ SCmdMinimapSettings minimapSettings;
|
||||
/* Command: 0x1C */ SCmdMapData mapData;
|
||||
/* Command: 0x1D */ // Unused
|
||||
/* Command: 0x1E */ SCmdMinimapChests minimapChests;
|
||||
/* Command: 0x1E */ SCmdMapDataChests mapDataChests;
|
||||
} SceneCmd; // size = 0x8
|
||||
|
||||
// Sets cursor point options on the world map
|
||||
|
||||
@@ -30,7 +30,7 @@ void Setup_SetRegs(void) {
|
||||
XREG(90) = 0x1C2;
|
||||
|
||||
R_STORY_FILL_SCREEN_ALPHA = 0;
|
||||
R_REVERSE_FLOOR_INDEX = 0;
|
||||
R_PLAYER_FLOOR_REVERSE_INDEX = 0;
|
||||
R_MINIMAP_DISABLED = false;
|
||||
|
||||
R_PICTO_FOCUS_BORDER_TOPLEFT_X = 80;
|
||||
|
||||
@@ -142,18 +142,18 @@ void KaleidoSetup_Init(PlayState* play) {
|
||||
pauseCtx->unk_20C = 936.0f;
|
||||
pauseCtx->roll = -314.0f;
|
||||
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = R_PLAYER_FLOOR_REVERSE_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
|
||||
|
||||
pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_RIGHT;
|
||||
pauseCtx->pageSwitchInputTimer = 0;
|
||||
|
||||
pauseCtx->cursorItem[PAUSE_ITEM] = PAUSE_ITEM_NONE;
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = R_PLAYER_FLOOR_REVERSE_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
|
||||
pauseCtx->cursorItem[PAUSE_QUEST] = PAUSE_ITEM_NONE;
|
||||
pauseCtx->cursorItem[PAUSE_MASK] = PAUSE_ITEM_NONE;
|
||||
|
||||
pauseCtx->cursorSlot[PAUSE_ITEM] = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_PLAYER_FLOOR_REVERSE_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
|
||||
|
||||
pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
|
||||
pauseCtx->ocarinaSongIndex = -1;
|
||||
|
||||
+25
-4
@@ -2,6 +2,27 @@
|
||||
#include "z64map.h"
|
||||
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 texWidth;
|
||||
/* 0x1 */ u8 texHeight;
|
||||
/* 0x2 */ s16 offsetX;
|
||||
/* 0x4 */ s16 offsetY;
|
||||
/* 0x6 */ u8 drawType;
|
||||
/* 0x7 */ u8 colorIndex;
|
||||
/* 0x8 */ s16 scale;
|
||||
} MapSpriteInfo; // size = 0xA
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ TexturePtr spriteTex;
|
||||
/* 0x4 */ u8 width;
|
||||
/* 0x5 */ u8 height;
|
||||
/* 0x6 */ u8 offsetX;
|
||||
/* 0x7 */ u8 offsetY;
|
||||
/* 0x8 */ u8 drawType;
|
||||
/* 0x9 */ u8 colorIndex;
|
||||
/* 0xA */ s16 scale;
|
||||
} MapSpriteInfo2; // size = 0xC
|
||||
|
||||
static Color_RGBA8 sMapColorTable[] = {
|
||||
{ 255, 255, 255, 255 },
|
||||
{ 0, 255, 255, 160 }, // Blue
|
||||
@@ -209,7 +230,7 @@ static s32 sMapIForMapGrand[98] = {
|
||||
MAPDATA_MAP_I_MAX,
|
||||
};
|
||||
|
||||
s32 MapDisp_GetSizeOfMapITex(s32 mapId);
|
||||
s32 MapDisp_GetSizeOfMapITex(s32 mapCompactId);
|
||||
|
||||
void MapData_GetMapColor(s32 colorIndex, Color_RGBA8* color) {
|
||||
*color = sMapColorTable[colorIndex];
|
||||
@@ -238,7 +259,7 @@ s16 MapData_GetMapGameplayDangeonKeepScale(s32 mapId) {
|
||||
}
|
||||
|
||||
TexturePtr MapData_GetMapTexGameplayDangeonKeep(s32 mapId) {
|
||||
return sGameplayDangeonKeepInfo[mapId].lmapTex;
|
||||
return sGameplayDangeonKeepInfo[mapId].spriteTex;
|
||||
}
|
||||
|
||||
void MapData_GetMapTexGameplayDangeonKeepDim(s32 mapId, s32* width, s32* height) {
|
||||
@@ -404,8 +425,8 @@ s32 MapData_MapITexSizeTest(s32 mapId) {
|
||||
return size;
|
||||
}
|
||||
|
||||
s32 MapDisp_GetSizeOfMapITex(s32 mapId) {
|
||||
return (sMapIStaticInfo[mapId].texWidth * sMapIStaticInfo[mapId].texHeight) / 2;
|
||||
s32 MapDisp_GetSizeOfMapITex(s32 mapCompactId) {
|
||||
return (sMapIStaticInfo[mapCompactId].texWidth * sMapIStaticInfo[mapCompactId].texHeight) / 2;
|
||||
}
|
||||
|
||||
s32 MapData_GetMapIId(s32 mapId) {
|
||||
|
||||
+883
-756
File diff suppressed because it is too large
Load Diff
+77
-65
@@ -1,20 +1,23 @@
|
||||
#include "global.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
s16 sMinimapInitPosX = 0;
|
||||
s16 sMinimapInitPosZ = 0;
|
||||
s16 sMinimapInitDir = 0;
|
||||
|
||||
s32 sDungeonAndBossSceneIds[] = {
|
||||
SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R,
|
||||
SCENE_MITURIN_BS, SCENE_HAKUGIN_BS, SCENE_SEA_BS, SCENE_INISIE_BS,
|
||||
};
|
||||
s16 sPlayerInitPosX = 0;
|
||||
s16 sPlayerInitPosZ = 0;
|
||||
s16 sPlayerInitDir = 0;
|
||||
|
||||
/**
|
||||
* If the current scene is a dungeon or boss scene, this function returns an index
|
||||
* indicating which one it is. Otherwise, it returns -1.
|
||||
* Gets the mapIndex for the current dungeon or boss scene
|
||||
* @return the current scene's mapIndex, or -1 if it isn't a dungeon or boss scene.
|
||||
*/
|
||||
s32 Map_GetDungeonOrBossAreaIndex(PlayState* play) {
|
||||
static s32 sDungeonAndBossSceneIds[] = {
|
||||
SCENE_MITURIN, // DUNGEON_INDEX_WOODFALL_TEMPLE
|
||||
SCENE_HAKUGIN, // DUNGEON_INDEX_SNOWHEAD_TEMPLE
|
||||
SCENE_SEA, // DUNGEON_INDEX_GREAT_BAY_TEMPLE
|
||||
SCENE_INISIE_N, // DUNGEON_INDEX_STONE_TOWER_TEMPLE
|
||||
SCENE_INISIE_R, // DUNGEON_INDEX_STONE_TOWER_TEMPLE
|
||||
SCENE_MITURIN_BS, SCENE_HAKUGIN_BS, SCENE_SEA_BS, SCENE_INISIE_BS,
|
||||
};
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonAndBossSceneIds); i++) {
|
||||
@@ -27,7 +30,8 @@ s32 Map_GetDungeonOrBossAreaIndex(PlayState* play) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current scene is a dungeon or boss scene, false otherwise.
|
||||
* Tests if the current scene is in a dungeon or boss scene.
|
||||
* @return true if the current scene is a dungeon or boss scene, false otherwise.
|
||||
*/
|
||||
s32 Map_IsInDungeonOrBossArea(PlayState* play) {
|
||||
if (Map_GetDungeonOrBossAreaIndex(play) == -1) {
|
||||
@@ -37,23 +41,26 @@ s32 Map_IsInDungeonOrBossArea(PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_8010A0A4(PlayState* play) {
|
||||
if ((Map_GetDungeonOrBossAreaIndex(play) == -1) || !func_80102EF0(play)) {
|
||||
s32 MapExp_CurRoomHasMapI(PlayState* play) {
|
||||
if ((Map_GetDungeonOrBossAreaIndex(play) == -1) || !MapDisp_CurRoomHasMapI(play)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 sDungeonSceneIds[] = {
|
||||
SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R,
|
||||
};
|
||||
|
||||
/**
|
||||
* If the current scene is a dungeon scene, this function returns an index
|
||||
* indicating which one it is. Otherwise, it returns -1.
|
||||
* Tests if the current scene is a dungeon scene, excluding boss scenes.
|
||||
* @return -1 if not a dungeon scene, else returns the dungeonIndex of the dungeon scene
|
||||
*/
|
||||
s32 Map_GetDungeonAreaIndex(PlayState* play) {
|
||||
static s32 sDungeonSceneIds[] = {
|
||||
SCENE_MITURIN, // DUNGEON_INDEX_WOODFALL_TEMPLE
|
||||
SCENE_HAKUGIN, // DUNGEON_INDEX_SNOWHEAD_TEMPLE
|
||||
SCENE_SEA, // DUNGEON_INDEX_GREAT_BAY_TEMPLE
|
||||
SCENE_INISIE_N, // DUNGEON_INDEX_STONE_TOWER_TEMPLE
|
||||
SCENE_INISIE_R, // DUNGEON_INDEX_STONE_TOWER_TEMPLE
|
||||
};
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonSceneIds); i++) {
|
||||
@@ -66,9 +73,10 @@ s32 Map_GetDungeonAreaIndex(PlayState* play) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current scene is a dungeon scene, false otherwise.
|
||||
* Test if the current scene is a dungeon scene, excluding boss rooms
|
||||
* @return true if the current scene is a dungeon scene, false otherwise.
|
||||
*/
|
||||
s32 Map_IsInDungeonArea(PlayState* play) {
|
||||
s32 Map_IsInDungeonScene(PlayState* play) {
|
||||
if (Map_GetDungeonAreaIndex(play) == -1) {
|
||||
return false;
|
||||
}
|
||||
@@ -76,18 +84,17 @@ s32 Map_IsInDungeonArea(PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 sBossSceneIds[] = {
|
||||
SCENE_MITURIN_BS, // DUNGEON_INDEX_WOODFALL_TEMPLE
|
||||
SCENE_HAKUGIN_BS, // DUNGEON_INDEX_SNOWHEAD_TEMPLE
|
||||
SCENE_SEA_BS, // DUNGEON_INDEX_GREAT_BAY_TEMPLE
|
||||
SCENE_INISIE_BS, // DUNGEON_INDEX_STONE_TOWER_TEMPLE
|
||||
};
|
||||
|
||||
/**
|
||||
* If the current scene is a boss scene, this function returns an index
|
||||
* indicating which one it is. Otherwise, it returns -1.
|
||||
* Tests if the current scene is a boss scene.
|
||||
* @return -1 if not a boss scene, else returns the dungeonIndex of the boss scene
|
||||
*/
|
||||
s32 Map_GetBossAreaIndex(PlayState* play) {
|
||||
static s32 sBossSceneIds[] = {
|
||||
SCENE_MITURIN_BS, // DUNGEON_INDEX_WOODFALL_TEMPLE
|
||||
SCENE_HAKUGIN_BS, // DUNGEON_INDEX_SNOWHEAD_TEMPLE
|
||||
SCENE_SEA_BS, // DUNGEON_INDEX_GREAT_BAY_TEMPLE
|
||||
SCENE_INISIE_BS, // DUNGEON_INDEX_STONE_TOWER_TEMPLE
|
||||
};
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sBossSceneIds); i++) {
|
||||
@@ -100,9 +107,10 @@ s32 Map_GetBossAreaIndex(PlayState* play) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current scene is a boss scene, false otherwise.
|
||||
* Checks if the current scene is a boss scene.
|
||||
* @return true if the current scene is a boss scene, false otherwise.
|
||||
*/
|
||||
s32 Map_IsInBossArea(PlayState* play) {
|
||||
s32 Map_IsInBossScene(PlayState* play) {
|
||||
if (Map_GetBossAreaIndex(play) == -1) {
|
||||
return false;
|
||||
}
|
||||
@@ -110,13 +118,16 @@ s32 Map_IsInBossArea(PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 D_801BF5A4[] = {
|
||||
SCENE_22DEKUCITY,
|
||||
SCENE_KOEPONARACE,
|
||||
SCENE_F01,
|
||||
};
|
||||
|
||||
s32 func_8010A238(PlayState* play) {
|
||||
/**
|
||||
* Test if the current scene is in a set of overworld scenes.
|
||||
* @return -1 if not in the set, else returns the mapIndex of the overworld scene
|
||||
*/
|
||||
s32 Map_GetUnkOverworldAreaIndex(PlayState* play) {
|
||||
static s32 D_801BF5A4[] = {
|
||||
SCENE_22DEKUCITY,
|
||||
SCENE_KOEPONARACE,
|
||||
SCENE_F01,
|
||||
};
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_801BF5A4); i++) {
|
||||
@@ -128,8 +139,12 @@ s32 func_8010A238(PlayState* play) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 func_8010A2AC(PlayState* play) {
|
||||
if (func_8010A238(play) == -1) {
|
||||
/**
|
||||
* Checks if the current scene is in a set of overworld scenes.
|
||||
* @return true if the current scene is in the set, false otherwise.
|
||||
*/
|
||||
s32 Map_IsInUnkOverworldArea(PlayState* play) {
|
||||
if (Map_GetUnkOverworldAreaIndex(play) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -137,15 +152,15 @@ s32 func_8010A2AC(PlayState* play) {
|
||||
}
|
||||
|
||||
/**
|
||||
* When a room is loaded, this function is used to save the player's position and rotation
|
||||
* so that the red arrow on the minimap can be drawn correctly.
|
||||
* Sets the position and rotation of where the player has entered the area.
|
||||
* Used to draw the red marker on the minimap.
|
||||
*/
|
||||
void Minimap_SavePlayerRoomInitInfo(PlayState* play) {
|
||||
void Map_SetAreaEntrypoint(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
sMinimapInitPosX = player->actor.world.pos.x;
|
||||
sMinimapInitPosZ = player->actor.world.pos.z;
|
||||
sMinimapInitDir = (0x7FFF - player->actor.shape.rot.y) / 0x400;
|
||||
sPlayerInitPosX = player->actor.world.pos.x;
|
||||
sPlayerInitPosZ = player->actor.world.pos.z;
|
||||
sPlayerInitDir = (0x7FFF - player->actor.shape.rot.y) / 0x400;
|
||||
}
|
||||
|
||||
void Map_InitRoomData(PlayState* play, s16 room) {
|
||||
@@ -156,8 +171,7 @@ void Map_InitRoomData(PlayState* play, s16 room) {
|
||||
|
||||
if (room >= 0) {
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
gSaveContext.save.saveInfo.permanentSceneFlags[Play_GetOriginalSceneId(play->sceneId)].rooms |=
|
||||
gBitFlags[room];
|
||||
SET_ROOM_VISITED(Play_GetOriginalSceneId(play->sceneId), room);
|
||||
interfaceCtx->mapRoomNum = room;
|
||||
interfaceCtx->dungeonOrBossAreaMapIndex = mapIndex;
|
||||
}
|
||||
@@ -182,14 +196,13 @@ void Map_Init(PlayState* play) {
|
||||
interfaceCtx->unk_278 = -1;
|
||||
interfaceCtx->dungeonOrBossAreaMapIndex = -1;
|
||||
interfaceCtx->mapSegment = THA_AllocTailAlign16(&play->state.tha, 0x1000);
|
||||
if (func_8010A2AC(play)) {
|
||||
gSaveContext.mapIndex = func_8010A238(play);
|
||||
if (Map_IsInUnkOverworldArea(play)) {
|
||||
gSaveContext.mapIndex = Map_GetUnkOverworldAreaIndex(play);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
dungeonIndex = Map_GetDungeonOrBossAreaIndex(play);
|
||||
gSaveContext.mapIndex = dungeonIndex;
|
||||
gSaveContext.mapIndex = dungeonIndex = Map_GetDungeonOrBossAreaIndex(play);
|
||||
switch (play->sceneId) {
|
||||
case SCENE_MITURIN_BS:
|
||||
dungeonIndex = DUNGEON_INDEX_WOODFALL_TEMPLE;
|
||||
@@ -213,8 +226,8 @@ void Map_Init(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void Minimap_Draw(PlayState* play) {
|
||||
func_80106644(play, sMinimapInitPosX, sMinimapInitPosZ, sMinimapInitDir);
|
||||
void Map_DrawMinimap(PlayState* play) {
|
||||
MapDisp_DrawMinimap(play, sPlayerInitPosX, sPlayerInitPosZ, sPlayerInitDir);
|
||||
}
|
||||
|
||||
s16 sLastRoomNum = 99;
|
||||
@@ -228,7 +241,7 @@ void Map_Update(PlayState* play) {
|
||||
s32 pad2;
|
||||
|
||||
if ((play->pauseCtx.state <= PAUSE_STATE_OPENING_2) && (CHECK_BTN_ALL(controller->press.button, BTN_L)) &&
|
||||
!Play_InCsMode(play) && !func_80106530(play)) {
|
||||
!Play_InCsMode(play) && !MapDisp_IsMinimapToggleBlocked(play)) {
|
||||
if (!R_MINIMAP_DISABLED) {
|
||||
Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_UP);
|
||||
} else {
|
||||
@@ -238,22 +251,21 @@ void Map_Update(PlayState* play) {
|
||||
R_MINIMAP_DISABLED ^= 1;
|
||||
}
|
||||
|
||||
func_80105B34(play);
|
||||
MapDisp_Update(play);
|
||||
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (Map_IsInDungeonArea(play)) {
|
||||
floor = func_80109124(player->actor.world.pos.y);
|
||||
if (Map_IsInDungeonScene(play)) {
|
||||
floor = MapDisp_GetPlayerStorey(player->actor.world.pos.y);
|
||||
if (floor != -1) {
|
||||
gSaveContext.save.saveInfo.permanentSceneFlags[Play_GetOriginalSceneId(play->sceneId)].unk_14 |=
|
||||
gBitFlags[FLOOR_INDEX_MAX - floor];
|
||||
R_REVERSE_FLOOR_INDEX = FLOOR_INDEX_MAX - floor;
|
||||
SET_DUNGEON_FLOOR_VISITED(Play_GetOriginalSceneId(play->sceneId), FLOOR_INDEX_MAX - floor);
|
||||
R_PLAYER_FLOOR_REVERSE_INDEX = FLOOR_INDEX_MAX - floor;
|
||||
if (interfaceCtx->mapRoomNum != sLastRoomNum) {
|
||||
sLastRoomNum = interfaceCtx->mapRoomNum;
|
||||
}
|
||||
}
|
||||
} else if (Map_IsInBossArea(play)) {
|
||||
func_80105294();
|
||||
R_REVERSE_FLOOR_INDEX = FLOOR_INDEX_MAX - func_80105318();
|
||||
} else if (Map_IsInBossScene(play)) {
|
||||
MapDisp_GetBossIconY();
|
||||
R_PLAYER_FLOOR_REVERSE_INDEX = FLOOR_INDEX_MAX - MapDisp_GetBossRoomStorey();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2118,7 +2118,7 @@ void Message_LoadOwlWarpText(PlayState* play, s32* offset, f32* arg2, s16* decod
|
||||
s16 owlWarpId;
|
||||
s16 i;
|
||||
|
||||
if (func_8010A0A4(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
if (MapExp_CurRoomHasMapI(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
owlWarpId = OWL_WARP_ENTRANCE;
|
||||
} else {
|
||||
owlWarpId = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
@@ -5679,7 +5679,7 @@ void Message_Update(PlayState* play) {
|
||||
|
||||
if (sLastPlayedSong == OCARINA_SONG_SOARING) {
|
||||
if (interfaceCtx->restrictions.songOfSoaring == 0) {
|
||||
if (func_8010A0A4(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
if (MapExp_CurRoomHasMapI(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
Message_StartTextbox(play, 0x1B93, NULL);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_1B;
|
||||
sLastPlayedSong = 0xFF;
|
||||
|
||||
@@ -280,7 +280,7 @@ void Message_LoadOwlWarpTextNES(PlayState* play, s32* offset, f32* arg2, s16* de
|
||||
s16 owlWarpId;
|
||||
s16 stringLimit;
|
||||
|
||||
if (func_8010A0A4(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
if (MapExp_CurRoomHasMapI(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
owlWarpId = OWL_WARP_ENTRANCE;
|
||||
} else {
|
||||
owlWarpId = play->pauseCtx.cursorPoint[PAUSE_WORLD_MAP];
|
||||
|
||||
@@ -6398,7 +6398,7 @@ void Interface_Draw(PlayState* play) {
|
||||
}
|
||||
|
||||
Magic_DrawMeter(play);
|
||||
Minimap_Draw(play);
|
||||
Map_DrawMinimap(play);
|
||||
|
||||
if ((R_PAUSE_BG_PRERENDER_STATE != 2) && (R_PAUSE_BG_PRERENDER_STATE != 3)) {
|
||||
Target_Draw(&play->actorCtx.targetCtx, play);
|
||||
|
||||
+1
-1
@@ -618,7 +618,7 @@ void func_8012EBF8(PlayState* play, RoomContext* roomCtx) {
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
if (roomCtx->curRoom.num > -1) {
|
||||
Map_InitRoomData(play, roomCtx->curRoom.num);
|
||||
Minimap_SavePlayerRoomInitInfo(play);
|
||||
Map_SetAreaEntrypoint(play);
|
||||
}
|
||||
func_801A3CD8(play->roomCtx.curRoom.echo);
|
||||
}
|
||||
|
||||
+5
-5
@@ -336,7 +336,7 @@ void Scene_CommandPathList(PlayState* play, SceneCmd* cmd) {
|
||||
void Scene_CommandTransitionActorList(PlayState* play, SceneCmd* cmd) {
|
||||
play->transitionActors.count = cmd->transitionActorList.num;
|
||||
play->transitionActors.list = Lib_SegmentedToVirtual(cmd->transitionActorList.segment);
|
||||
func_80105818(play, play->transitionActors.count, play->transitionActors.list);
|
||||
MapDisp_InitTransitionActorData(play, play->transitionActors.count, play->transitionActors.list);
|
||||
}
|
||||
|
||||
// Init function for the transition system.
|
||||
@@ -494,19 +494,19 @@ void Scene_CommandCutsceneList(PlayState* play, SceneCmd* cmd) {
|
||||
CutsceneManager_Init(play, Lib_SegmentedToVirtual(cmd->cutsceneList.segment), cmd->cutsceneList.num);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x1C: Mini Maps
|
||||
// SceneTableEntry Header Command 0x1C: Map Data
|
||||
void Scene_CommandMiniMap(PlayState* play, SceneCmd* cmd) {
|
||||
MapDisp_Init(play);
|
||||
func_8010549C(play, cmd->minimapSettings.segment);
|
||||
MapDisp_InitMapData(play, cmd->mapData.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x1D: Undefined
|
||||
void Scene_Command1D(PlayState* play, SceneCmd* cmd) {
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x1E: Minimap Compass Icon Info
|
||||
// SceneTableEntry Header Command 0x1E: Map Data Chests
|
||||
void Scene_CommandMiniMapCompassInfo(PlayState* play, SceneCmd* cmd) {
|
||||
func_8010565C(play, cmd->minimapChests.num, cmd->minimapChests.segment);
|
||||
MapDisp_InitChestData(play, cmd->mapDataChests.num, cmd->mapDataChests.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x19: Sets Region Visited Flag
|
||||
|
||||
@@ -10876,7 +10876,7 @@ void Player_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Minimap_SavePlayerRoomInitInfo(play);
|
||||
Map_SetAreaEntrypoint(play);
|
||||
func_80841A50(play, this);
|
||||
this->unk_3CF = 0;
|
||||
R_PLAY_FILL_SCREEN_ON = 0;
|
||||
@@ -13719,7 +13719,7 @@ void Player_Action_1(Player* this, PlayState* play) {
|
||||
} else if (this->actionVar2 < 0) {
|
||||
if (Room_StartRoomTransition(play, &play->roomCtx, this->actionVar1)) {
|
||||
Map_InitRoomData(play, play->roomCtx.curRoom.num);
|
||||
Minimap_SavePlayerRoomInitInfo(play);
|
||||
Map_SetAreaEntrypoint(play);
|
||||
this->actionVar2 = 5;
|
||||
}
|
||||
} else if (this->actionVar2 > 0) {
|
||||
@@ -15248,7 +15248,7 @@ void Player_Action_35(Player* this, PlayState* play) {
|
||||
(Play_GetCamera(play, CAM_ID_MAIN)->stateFlags & CAM_STATE_4))) {
|
||||
if (this->unk_397 == 4) {
|
||||
Map_InitRoomData(play, play->roomCtx.curRoom.num);
|
||||
Minimap_SavePlayerRoomInitInfo(play);
|
||||
Map_SetAreaEntrypoint(play);
|
||||
}
|
||||
|
||||
R_PLAY_FILL_SCREEN_ON = 0;
|
||||
|
||||
@@ -268,7 +268,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
func_80108AF8(play);
|
||||
MapDisp_DrawDungeonFloorSelect(play);
|
||||
|
||||
if ((pauseCtx->pageIndex == PAUSE_MAP) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE)) {
|
||||
// If (pauseCtx->state == PAUSE_STATE_MAIN), then the other conditions are redundant and always return
|
||||
@@ -283,12 +283,13 @@ void KaleidoScope_DrawDungeonMap(PlayState* play) {
|
||||
// Draw Player's face next to the dungeon floor icon currently in.
|
||||
POLY_OPA_DISP =
|
||||
Gfx_DrawTexRectRGBA16(POLY_OPA_DISP, gQuestIconLinkHumanFaceTex, 16, 16, 62,
|
||||
sDungeonMapFloorIconPosY[R_REVERSE_FLOOR_INDEX], 16, 16, 1 << 10, 1 << 10);
|
||||
sDungeonMapFloorIconPosY[R_PLAYER_FLOOR_REVERSE_INDEX], 16, 16, 1 << 10, 1 << 10);
|
||||
|
||||
// Draw skull face next to the dungeon floor icon the boss is located at.
|
||||
if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, gSaveContext.dungeonIndex)) {
|
||||
POLY_OPA_DISP = Gfx_DrawTexRectRGBA16(POLY_OPA_DISP, gDungeonMapSkullTex, 16, 16, 108,
|
||||
sDungeonMapFloorIconPosY[FLOOR_INDEX_MAX - func_80105318()], 16,
|
||||
16, 1 << 10, 1 << 10);
|
||||
POLY_OPA_DISP = Gfx_DrawTexRectRGBA16(
|
||||
POLY_OPA_DISP, gDungeonMapSkullTex, 16, 16, 108,
|
||||
sDungeonMapFloorIconPosY[FLOOR_INDEX_MAX - MapDisp_GetBossRoomStorey()], 16, 16, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
@@ -320,8 +321,8 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
KaleidoScope_MoveCursorFromSpecialPos(play);
|
||||
pauseCtx->cursorXIndex[PAUSE_MAP] = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->unk_256;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->unk_256;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem;
|
||||
} else if (pauseCtx->cursorSpecialPos == 0) {
|
||||
if (pauseCtx->cursorXIndex[PAUSE_MAP] == 0) {
|
||||
pauseCtx->cursorXIndex[PAUSE_MAP] = 1;
|
||||
@@ -366,8 +367,8 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||
} else if (pauseCtx->cursorPoint[PAUSE_MAP] == DUNGEON_STRAY_FAIRIES) {
|
||||
pauseCtx->cursorXIndex[PAUSE_MAP] = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->unk_256;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->unk_256;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem;
|
||||
} else {
|
||||
while (true) {
|
||||
pauseCtx->cursorPoint[PAUSE_MAP]--;
|
||||
@@ -385,9 +386,8 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
|
||||
} else if ((pauseCtx->cursorSpecialPos == 0) && (pauseCtx->stickAdjY > 30)) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] >= DUNGEON_FLOOR_INDEX_4) {
|
||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - (DUNGEON_FLOOR_INDEX_4 + 1); i >= 0; i--) {
|
||||
if ((gSaveContext.save.saveInfo.permanentSceneFlags[(void)0, gSaveContext.dungeonIndex].unk_14 &
|
||||
gBitFlags[i]) ||
|
||||
func_801090B0(FLOOR_INDEX_MAX - i)) {
|
||||
if (GET_DUNGEON_FLOOR_VISITED(((void)0, gSaveContext.dungeonIndex), i) ||
|
||||
MapDisp_IsValidStorey(FLOOR_INDEX_MAX - i)) {
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = i + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorShrinkRate = 4.0f;
|
||||
break;
|
||||
@@ -395,8 +395,8 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
|
||||
}
|
||||
} else if (pauseCtx->cursorPoint[PAUSE_MAP] == DUNGEON_STRAY_FAIRIES) {
|
||||
pauseCtx->cursorXIndex[PAUSE_MAP] = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->unk_256;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->unk_256;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem;
|
||||
} else {
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = DUNGEON_STRAY_FAIRIES;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = DUNGEON_STRAY_FAIRIES;
|
||||
@@ -406,9 +406,8 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
|
||||
(pauseCtx->cursorPoint[PAUSE_MAP] <= DUNGEON_FLOOR_INDEX_1)) {
|
||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - (DUNGEON_FLOOR_INDEX_4 - 1); i <= DUNGEON_FLOOR_INDEX_0;
|
||||
i++) {
|
||||
if ((gSaveContext.save.saveInfo.permanentSceneFlags[(void)0, gSaveContext.dungeonIndex].unk_14 &
|
||||
gBitFlags[i]) ||
|
||||
func_801090B0(FLOOR_INDEX_MAX - i)) {
|
||||
if (GET_DUNGEON_FLOOR_VISITED(((void)0, gSaveContext.dungeonIndex), i) ||
|
||||
MapDisp_IsValidStorey(FLOOR_INDEX_MAX - i)) {
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = i + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorShrinkRate = 4.0f;
|
||||
break;
|
||||
@@ -448,7 +447,7 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
|
||||
}
|
||||
|
||||
if ((pauseCtx->cursorXIndex[PAUSE_MAP] == 0) && (pauseCtx->cursorSpecialPos == 0)) {
|
||||
pauseCtx->unk_256 = pauseCtx->cursorPoint[PAUSE_MAP];
|
||||
pauseCtx->cursorMapDungeonItem = pauseCtx->cursorPoint[PAUSE_MAP];
|
||||
}
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
|
||||
@@ -561,7 +561,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
KaleidoScope_DrawDungeonMap(play);
|
||||
Gfx_SetupDL42_Opa(gfxCtx);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
func_801091F0(play);
|
||||
MapDisp_DrawDungeonMap(play);
|
||||
} else {
|
||||
KaleidoScope_DrawWorldMap(play);
|
||||
}
|
||||
@@ -658,7 +658,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
func_801091F0(play);
|
||||
MapDisp_DrawDungeonMap(play);
|
||||
} else {
|
||||
Matrix_RotateYF(R_PAUSE_WORLD_MAP_YAW / 1000.0f, MTXMODE_NEW);
|
||||
|
||||
@@ -2833,7 +2833,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
s16 stepA;
|
||||
s16 stickAdjX = input->rel.stick_x;
|
||||
|
||||
func_80109428(play);
|
||||
MapDisp_UpdateDungeonMap(play);
|
||||
|
||||
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||
@@ -2850,8 +2850,9 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
sUnpausedButtonStatus[EQUIP_SLOT_A] = gSaveContext.buttonStatus[EQUIP_SLOT_A];
|
||||
|
||||
pauseCtx->cursorXIndex[PAUSE_MAP] = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->unk_256 = R_REVERSE_FLOOR_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_PLAYER_FLOOR_REVERSE_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem =
|
||||
R_PLAYER_FLOOR_REVERSE_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
|
||||
sPauseCursorLeftX = -175;
|
||||
sPauseCursorRightX = 155;
|
||||
@@ -2875,12 +2876,12 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
size1);
|
||||
|
||||
pauseCtx->iconItemAltSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItem24Segment + size1);
|
||||
if (func_8010A0A4(play)) {
|
||||
if (MapExp_CurRoomHasMapI(play)) {
|
||||
size_t size = SEGMENT_ROM_SIZE(icon_item_dungeon_static);
|
||||
|
||||
DmaMgr_SendRequest0(pauseCtx->iconItemAltSegment, SEGMENT_ROM_START(icon_item_dungeon_static), size);
|
||||
iconItemLangSegment =
|
||||
func_801068FC(play, (void*)ALIGN16((uintptr_t)pauseCtx->iconItemAltSegment + size));
|
||||
MapDisp_AllocDungeonMap(play, (void*)ALIGN16((uintptr_t)pauseCtx->iconItemAltSegment + size));
|
||||
sInDungeonScene = true;
|
||||
} else {
|
||||
size_t size;
|
||||
@@ -3178,8 +3179,8 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
break;
|
||||
|
||||
case PAUSE_STATE_GAMEOVER_2:
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_PLAYER_FLOOR_REVERSE_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = R_PLAYER_FLOOR_REVERSE_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
sPauseCursorLeftX = -175;
|
||||
sPauseCursorRightX = 155;
|
||||
pauseCtx->roll = -434.0f;
|
||||
@@ -3428,8 +3429,9 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
sUnpausedButtonStatus[EQUIP_SLOT_A] = gSaveContext.buttonStatus[EQUIP_SLOT_A];
|
||||
|
||||
pauseCtx->cursorXIndex[PAUSE_MAP] = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->unk_256 = R_REVERSE_FLOOR_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = R_PLAYER_FLOOR_REVERSE_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->cursorMapDungeonItem =
|
||||
R_PLAYER_FLOOR_REVERSE_INDEX + DUNGEON_FLOOR_INDEX_4;
|
||||
|
||||
sPauseCursorLeftX = -175;
|
||||
sPauseCursorRightX = 155;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user