mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
z_map_exp OK and somewhat documented (#877)
* z_map_exp OK * some names * Some more docs * Update prototypes in functions.h * Use reg name * namefixer * Respond to review * Respond to review * Respond to review * Add some blank lines after breaks, whoops * Respond to review * Respond to Engineer's review, pt 2 * Respond to Engineer's review, Pt 3 * Add newline char to end of z64map.h * Respond to engineer's review, Pt 4 * Respond to multiple reviews
This commit is contained in:
+23
-23
@@ -1679,7 +1679,7 @@ u8 ZeldaArena_IsInitialized();
|
||||
// void func_80102EA4(void);
|
||||
void func_80102EB4(u32 param_1);
|
||||
void func_80102ED0(u32 param_1);
|
||||
// void func_80102EF0(void);
|
||||
s32 func_80102EF0(PlayState* play);
|
||||
// void func_80102F9C(void);
|
||||
// void func_80103090(void);
|
||||
// void func_801030B4(void);
|
||||
@@ -1694,23 +1694,23 @@ void func_80102ED0(u32 param_1);
|
||||
// void func_80104C80(void);
|
||||
void func_80104CF4(PlayState* play);
|
||||
// void func_80104F34(void);
|
||||
// void func_80105294(void);
|
||||
// void func_80105318(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(void);
|
||||
// void func_80105B34(void);
|
||||
// void func_80105C40(void);
|
||||
void func_80105A40(void);
|
||||
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);
|
||||
// void func_80106530(void);
|
||||
s32 func_80106530(PlayState* play);
|
||||
// void func_8010657C(void);
|
||||
// void func_80106644(void);
|
||||
void func_80106644(PlayState* play, s16 arg1, s16 arg2, s16 arg3);
|
||||
// void func_8010683C(void);
|
||||
// void func_801068B4(void);
|
||||
// void func_801068D8(void);
|
||||
@@ -1725,7 +1725,7 @@ void func_80105818(PlayState* play, u32 uParm2, TransitionActorEntry* puParm3);
|
||||
// void func_80108A64(void);
|
||||
// void func_80108AF8(void);
|
||||
// void func_801090B0(void);
|
||||
// void func_80109124(void);
|
||||
s32 func_80109124(s16 arg0);
|
||||
// void func_801091F0(void);
|
||||
// void func_80109428(void);
|
||||
// void func_801094A0(void);
|
||||
@@ -1767,21 +1767,21 @@ void func_80105818(PlayState* play, u32 uParm2, TransitionActorEntry* puParm3);
|
||||
// void func_80109E70(void);
|
||||
// void func_80109EF8(void);
|
||||
// void func_80109F78(void);
|
||||
s32 func_8010A000(PlayState* play);
|
||||
s32 func_8010A074(PlayState* play);
|
||||
s32 Map_GetDungeonOrBossAreaIndex(PlayState* play);
|
||||
s32 Map_IsInDungeonOrBossArea(PlayState* play);
|
||||
s32 func_8010A0A4(PlayState* play);
|
||||
// void func_8010A0F0(void);
|
||||
// void func_8010A164(void);
|
||||
// void func_8010A194(void);
|
||||
// void func_8010A208(void);
|
||||
// void func_8010A238(void);
|
||||
// void func_8010A2AC(void);
|
||||
void func_8010A2DC(PlayState* play);
|
||||
void func_8010A33C(PlayState* play, s16 param_2);
|
||||
// void func_8010A410(void);
|
||||
// void func_8010A430(void);
|
||||
// void func_8010A54C(void);
|
||||
// void func_8010A580(void);
|
||||
// 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(void);
|
||||
// void Map_Init(PlayState* play);
|
||||
// void Minimap_Draw(PlayState* play);
|
||||
// void Map_Update(PlayState* play);
|
||||
// void func_8010A760(void);
|
||||
// void func_8010A7CC(void);
|
||||
// void func_8010A814(void);
|
||||
|
||||
+1
-1
@@ -74,10 +74,10 @@
|
||||
#define R_MAGIC_BAR_X XREG(49)
|
||||
#define R_MAGIC_BAR_LARGE_Y XREG(50)
|
||||
#define R_MAGIC_FILL_X XREG(51)
|
||||
#define R_MINIMAP_DISABLED XREG(95)
|
||||
#define R_B_LABEL_DD WREG(0)
|
||||
#define R_OW_MINIMAP_X WREG(29)
|
||||
#define R_OW_MINIMAP_Y WREG(30)
|
||||
#define R_MINIMAP_TOGGLED WREG(31)
|
||||
#define R_B_LABEL_X(i) WREG(40 + i)
|
||||
#define R_B_LABEL_Y(i) WREG(43 + i)
|
||||
#define R_DGN_MINIMAP_X WREG(68)
|
||||
|
||||
+2
-1
@@ -36,6 +36,7 @@
|
||||
#include "z64effect.h"
|
||||
#include "z64item.h"
|
||||
#include "z64light.h"
|
||||
#include "z64map.h"
|
||||
#include "z64math.h"
|
||||
#include "z64object.h"
|
||||
#include "z64ocarina.h"
|
||||
@@ -587,7 +588,7 @@ typedef struct {
|
||||
/* 0x274 */ s16 minimapAlpha;
|
||||
/* 0x276 */ s16 startAlpha;
|
||||
/* 0x278 */ s16 unk_278;
|
||||
/* 0x27A */ s16 unk_27A;
|
||||
/* 0x27A */ s16 dungeonOrBossAreaMapIndex;
|
||||
/* 0x27C */ s16 mapRoomNum;
|
||||
/* 0x27E */ u8 unk_27E;
|
||||
/* 0x27F */ u8 unk_27F;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef Z64MAP_H
|
||||
#define Z64MAP_H
|
||||
|
||||
#define FLOOR_INDEX_MAX 4
|
||||
|
||||
#endif
|
||||
+10
-3
@@ -78,8 +78,8 @@ typedef struct PermanentSceneFlags {
|
||||
/* 0x08 */ u32 switch1;
|
||||
/* 0x0C */ u32 clearedRoom;
|
||||
/* 0x10 */ u32 collectible;
|
||||
/* 0x14 */ u32 unk_14;
|
||||
/* 0x18 */ u32 unk_18;
|
||||
/* 0x14 */ u32 unk_14; // varies based on scene. For dungeons, floors visited.
|
||||
/* 0x18 */ u32 rooms;
|
||||
} PermanentSceneFlags; // size = 0x1C
|
||||
|
||||
typedef struct CycleSceneFlags {
|
||||
@@ -257,7 +257,7 @@ typedef struct SaveContext {
|
||||
/* 0x3F60 */ u8 screenScaleFlag; // "framescale_flag"
|
||||
/* 0x3F64 */ f32 screenScale; // "framescale_scale"
|
||||
/* 0x3F68 */ CycleSceneFlags cycleSceneFlags[120]; // Scene flags that are temporarily stored over the duration of a single 3-day cycle
|
||||
/* 0x48C8 */ u16 unk_48C8; // "scene_id_mix"
|
||||
/* 0x48C8 */ u16 dungeonIndex; // "scene_id_mix"
|
||||
/* 0x48CA */ u8 maskMaskBit[27]; // "mask_mask_bit", masks given away on the Moon
|
||||
} SaveContext; // size = 0x48C8
|
||||
|
||||
@@ -273,6 +273,13 @@ typedef enum SunsSongState {
|
||||
/* 3 */ SUNSSONG_SPECIAL // time does not advance, but signals the song was played. used for freezing redeads
|
||||
} SunsSongState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ DUNGEON_INDEX_WOODFALL_TEMPLE,
|
||||
/* 1 */ DUNGEON_INDEX_SNOWHEAD_TEMPLE,
|
||||
/* 2 */ DUNGEON_INDEX_GREAT_BAY_TEMPLE,
|
||||
/* 3 */ DUNGEON_INDEX_STONE_TOWER_TEMPLE, // Also applies to Inverted Stone Tower Temple
|
||||
} DungeonIndex;
|
||||
|
||||
void Sram_ActivateOwl(u8 owlId);
|
||||
void Sram_ClearFlagsAtDawnOfTheFirstDay(void);
|
||||
void Sram_SaveEndOfCycle(struct PlayState* play);
|
||||
|
||||
@@ -493,7 +493,6 @@ beginseg
|
||||
include "build/data/code/z_map_disp.bss.o"
|
||||
include "build/src/code/z_map_data.o"
|
||||
include "build/src/code/z_map_exp.o"
|
||||
include "build/data/code/z_map_exp.data.o"
|
||||
include "build/src/code/z_msgevent.o"
|
||||
include "build/data/code/z_msgevent.data.o"
|
||||
include "build/src/code/z_nmi_buff.o"
|
||||
|
||||
+241
-15
@@ -1,31 +1,257 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A000.s")
|
||||
s16 sMinimapInitPosX = 0;
|
||||
s16 sMinimapInitPosZ = 0;
|
||||
s16 sMinimapInitDir = 0;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A074.s")
|
||||
s32 sDungeonAndBossScenes[] = {
|
||||
SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R,
|
||||
SCENE_MITURIN_BS, SCENE_HAKUGIN_BS, SCENE_SEA_BS, SCENE_INISIE_BS,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A0A4.s")
|
||||
/**
|
||||
* If the current scene is a dungeon or boss scene, this function returns an index
|
||||
* indicating which one it is. Otherwise, it returns -1.
|
||||
*/
|
||||
s32 Map_GetDungeonOrBossAreaIndex(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A0F0.s")
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonAndBossScenes); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == sDungeonAndBossScenes[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A164.s")
|
||||
return -1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A194.s")
|
||||
/**
|
||||
* Returns true if the current scene is a dungeon or boss scene, false otherwise.
|
||||
*/
|
||||
s32 Map_IsInDungeonOrBossArea(PlayState* play) {
|
||||
if (Map_GetDungeonOrBossAreaIndex(play) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A208.s")
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A238.s")
|
||||
s32 func_8010A0A4(PlayState* play) {
|
||||
if ((Map_GetDungeonOrBossAreaIndex(play) == -1) || !func_80102EF0(play)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A2AC.s")
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A2DC.s")
|
||||
s32 sDungeonScenes[] = {
|
||||
SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A33C.s")
|
||||
/**
|
||||
* If the current scene is a dungeon scene, this function returns an index
|
||||
* indicating which one it is. Otherwise, it returns -1.
|
||||
*/
|
||||
s32 Map_GetDungeonAreaIndex(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A410.s")
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonScenes); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == sDungeonScenes[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A430.s")
|
||||
return -1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A54C.s")
|
||||
/**
|
||||
* Returns true if the current scene is a dungeon scene, false otherwise.
|
||||
*/
|
||||
s32 Map_IsInDungeonArea(PlayState* play) {
|
||||
if (Map_GetDungeonAreaIndex(play) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/func_8010A580.s")
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 sBossScenes[] = {
|
||||
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.
|
||||
*/
|
||||
s32 Map_GetBossAreaIndex(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sBossScenes); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == sBossScenes[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current scene is a boss scene, false otherwise.
|
||||
*/
|
||||
s32 Map_IsInBossArea(PlayState* play) {
|
||||
if (Map_GetBossAreaIndex(play) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 D_801BF5A4[] = {
|
||||
SCENE_22DEKUCITY,
|
||||
SCENE_KOEPONARACE,
|
||||
SCENE_F01,
|
||||
};
|
||||
|
||||
s32 func_8010A238(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_801BF5A4); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == D_801BF5A4[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 func_8010A2AC(PlayState* play) {
|
||||
if (func_8010A238(play) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
void Minimap_SavePlayerRoomInitInfo(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;
|
||||
}
|
||||
|
||||
void Map_InitRoomData(PlayState* play, s16 room) {
|
||||
s32 mapIndex = gSaveContext.mapIndex;
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
func_80105C40(room);
|
||||
|
||||
if (room >= 0) {
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)].rooms |= gBitFlags[room];
|
||||
interfaceCtx->mapRoomNum = room;
|
||||
interfaceCtx->dungeonOrBossAreaMapIndex = mapIndex;
|
||||
}
|
||||
} else {
|
||||
interfaceCtx->mapRoomNum = 0;
|
||||
}
|
||||
|
||||
if (gSaveContext.sunsSongState != SUNSSONG_SPEED_TIME) {
|
||||
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
void Map_Destroy(void) {
|
||||
func_80105A40();
|
||||
}
|
||||
|
||||
void Map_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s32 dungeonIndex;
|
||||
|
||||
func_80105C40(play->roomCtx.currRoom.num);
|
||||
interfaceCtx->unk_278 = -1;
|
||||
interfaceCtx->dungeonOrBossAreaMapIndex = -1;
|
||||
interfaceCtx->mapSegment = THA_AllocEndAlign16(&play->state.heap, 0x1000);
|
||||
if (func_8010A2AC(play)) {
|
||||
gSaveContext.mapIndex = func_8010A238(play);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
dungeonIndex = Map_GetDungeonOrBossAreaIndex(play);
|
||||
gSaveContext.mapIndex = dungeonIndex;
|
||||
switch (play->sceneNum) {
|
||||
case SCENE_MITURIN_BS:
|
||||
dungeonIndex = DUNGEON_INDEX_WOODFALL_TEMPLE;
|
||||
break;
|
||||
|
||||
case SCENE_HAKUGIN_BS:
|
||||
dungeonIndex = DUNGEON_INDEX_SNOWHEAD_TEMPLE;
|
||||
break;
|
||||
|
||||
case SCENE_SEA_BS:
|
||||
dungeonIndex = DUNGEON_INDEX_GREAT_BAY_TEMPLE;
|
||||
break;
|
||||
|
||||
case SCENE_INISIE_BS:
|
||||
dungeonIndex = DUNGEON_INDEX_STONE_TOWER_TEMPLE;
|
||||
break;
|
||||
}
|
||||
|
||||
gSaveContext.dungeonIndex = dungeonIndex;
|
||||
Map_InitRoomData(play, play->roomCtx.currRoom.num);
|
||||
}
|
||||
}
|
||||
|
||||
void Minimap_Draw(PlayState* play) {
|
||||
func_80106644(play, sMinimapInitPosX, sMinimapInitPosZ, sMinimapInitDir);
|
||||
}
|
||||
|
||||
s16 sLastRoomNum = 99;
|
||||
|
||||
void Map_Update(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
Player* player = GET_PLAYER(play);
|
||||
Input* controller = CONTROLLER1(&play->state);
|
||||
s32 pad1;
|
||||
s16 floor;
|
||||
s32 pad2;
|
||||
|
||||
if ((play->pauseCtx.state < 4) && (CHECK_BTN_ALL(controller->press.button, BTN_L)) && (!Play_InCsMode(play)) &&
|
||||
(!func_80106530(play))) {
|
||||
if (!R_MINIMAP_DISABLED) {
|
||||
play_sound(NA_SE_SY_CAMERA_ZOOM_UP);
|
||||
} else {
|
||||
play_sound(NA_SE_SY_CAMERA_ZOOM_DOWN);
|
||||
}
|
||||
|
||||
R_MINIMAP_DISABLED ^= 1;
|
||||
}
|
||||
|
||||
func_80105B34(play);
|
||||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
|
||||
if (Map_IsInDungeonArea(play)) {
|
||||
floor = func_80109124(player->actor.world.pos.y);
|
||||
if (floor != -1) {
|
||||
gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)].unk_14 |=
|
||||
gBitFlags[FLOOR_INDEX_MAX - floor];
|
||||
XREG(94) = FLOOR_INDEX_MAX - floor;
|
||||
if (interfaceCtx->mapRoomNum != sLastRoomNum) {
|
||||
sLastRoomNum = interfaceCtx->mapRoomNum;
|
||||
}
|
||||
}
|
||||
} else if (Map_IsInBossArea(play)) {
|
||||
func_80105294();
|
||||
XREG(94) = FLOOR_INDEX_MAX - func_80105318();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -144,8 +144,8 @@ void func_8012EBF8(PlayState* play, RoomContext* roomCtx) {
|
||||
func_800BA798(play, &play->actorCtx);
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
if (-1 < roomCtx->currRoom.num) {
|
||||
func_8010A33C(play, roomCtx->currRoom.num);
|
||||
func_8010A2DC(play);
|
||||
Map_InitRoomData(play, roomCtx->currRoom.num);
|
||||
Minimap_SavePlayerRoomInitInfo(play);
|
||||
}
|
||||
func_801A3CD8(play->roomCtx.currRoom.echo);
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ void Sram_SaveEndOfCycle(PlayState* play) {
|
||||
((void)0, gSaveContext.cycleSceneFlags[i].collectible) & D_801C5FC0[i][3];
|
||||
gSaveContext.cycleSceneFlags[i].clearedRoom = 0;
|
||||
gSaveContext.save.permanentSceneFlags[i].unk_14 = 0;
|
||||
gSaveContext.save.permanentSceneFlags[i].unk_18 = 0;
|
||||
gSaveContext.save.permanentSceneFlags[i].rooms = 0;
|
||||
}
|
||||
|
||||
for (; i < ARRAY_COUNT(gSaveContext.cycleSceneFlags); i++) {
|
||||
|
||||
@@ -105,11 +105,11 @@ void EnElforg_Init(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (func_8010A074(play)) {
|
||||
this->area = gSaveContext.unk_48C8 + 1;
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
this->area = gSaveContext.dungeonIndex + STRAY_FAIRY_AREA_WOODFALL;
|
||||
} else {
|
||||
// Needs to be thisx in order to match
|
||||
this->area = STRAY_FAIRY_GET_PARAM_1C0(thisx) >> 6;
|
||||
this->area = STRAY_FAIRY_GET_NON_DUNGEON_AREA(thisx);
|
||||
}
|
||||
|
||||
switch (STRAY_FAIRY_TYPE(&this->actor)) {
|
||||
@@ -462,10 +462,10 @@ void EnElforg_FreeFloating(EnElforg* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (func_8010A074(play)) {
|
||||
gSaveContext.save.inventory.strayFairies[gSaveContext.unk_48C8]++;
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
gSaveContext.save.inventory.strayFairies[gSaveContext.dungeonIndex]++;
|
||||
Message_StartTextbox(play, 0x11, NULL);
|
||||
if (gSaveContext.save.inventory.strayFairies[(void)0, gSaveContext.unk_48C8] >= 15) {
|
||||
if (gSaveContext.save.inventory.strayFairies[(void)0, gSaveContext.dungeonIndex] >= 15) {
|
||||
func_801A3098(NA_BGM_GET_ITEM | 0x900);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "global.h"
|
||||
|
||||
#define STRAY_FAIRY_TYPE(thisx) ((thisx)->params & 0xF)
|
||||
#define STRAY_FAIRY_GET_PARAM_1C0(thisx) ((thisx)->params & 0x1C0)
|
||||
#define STRAY_FAIRY_GET_NON_DUNGEON_AREA(thisx) (((thisx)->params & 0x1C0) >> 6)
|
||||
#define STRAY_FAIRY_FLAG(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
|
||||
#define STRAY_FAIRY_FLAG_MOVES_QUICKLY_TO_HOME (1 << 0)
|
||||
|
||||
+12
-12
@@ -1994,21 +1994,21 @@
|
||||
0x80109E70:("func_80109E70",),
|
||||
0x80109EF8:("func_80109EF8",),
|
||||
0x80109F78:("func_80109F78",),
|
||||
0x8010A000:("func_8010A000",),
|
||||
0x8010A074:("func_8010A074",),
|
||||
0x8010A000:("Map_GetDungeonOrBossAreaIndex",),
|
||||
0x8010A074:("Map_IsInDungeonOrBossAreaArea",),
|
||||
0x8010A0A4:("func_8010A0A4",),
|
||||
0x8010A0F0:("func_8010A0F0",),
|
||||
0x8010A164:("func_8010A164",),
|
||||
0x8010A194:("func_8010A194",),
|
||||
0x8010A208:("func_8010A208",),
|
||||
0x8010A0F0:("Map_GetDungeonAreaIndex",),
|
||||
0x8010A164:("Map_IsInDungeonArea",),
|
||||
0x8010A194:("Map_GetBossAreaIndex",),
|
||||
0x8010A208:("Map_IsInBossArea",),
|
||||
0x8010A238:("func_8010A238",),
|
||||
0x8010A2AC:("func_8010A2AC",),
|
||||
0x8010A2DC:("func_8010A2DC",),
|
||||
0x8010A33C:("func_8010A33C",),
|
||||
0x8010A410:("func_8010A410",),
|
||||
0x8010A430:("func_8010A430",),
|
||||
0x8010A54C:("func_8010A54C",),
|
||||
0x8010A580:("func_8010A580",),
|
||||
0x8010A2DC:("Minimap_SavePlayerRoomInitInfo",),
|
||||
0x8010A33C:("Map_InitRoomData",),
|
||||
0x8010A410:("Map_Destroy",),
|
||||
0x8010A430:("Map_Init",),
|
||||
0x8010A54C:("Minimap_Draw",),
|
||||
0x8010A580:("Map_Update",),
|
||||
0x8010A760:("func_8010A760",),
|
||||
0x8010A7CC:("func_8010A7CC",),
|
||||
0x8010A814:("func_8010A814",),
|
||||
|
||||
@@ -551,6 +551,19 @@ wordReplace = {
|
||||
"func_800E8FA4": "Actor_TrackPoint",
|
||||
"func_800E9250": "Actor_TrackPlayer",
|
||||
|
||||
"func_8010A000": "Map_GetDungeonOrBossAreaIndex",
|
||||
"func_8010A074": "Map_IsInDungeonOrBossArea",
|
||||
"func_8010A0F0": "Map_GetDungeonAreaIndex",
|
||||
"func_8010A164": "Map_IsInDungeonArea",
|
||||
"func_8010A194": "Map_GetBossAreaIndex",
|
||||
"func_8010A208": "Map_IsInBossArea",
|
||||
"func_8010A2DC": "Minimap_SavePlayerRoomInitInfo",
|
||||
"func_8010A33C": "Map_InitRoomData",
|
||||
"func_8010A410": "Map_Destroy",
|
||||
"func_8010A430": "Map_Init",
|
||||
"func_8010A54C": "Minimap_Draw",
|
||||
"func_8010A580": "Map_Update",
|
||||
|
||||
# Structs
|
||||
"ActorAnimationEntry": "AnimationInfo",
|
||||
"ActorAnimationEntryS": "AnimationInfoS",
|
||||
@@ -609,6 +622,7 @@ wordReplace = {
|
||||
"gSaveContext.health": "gSaveContext.save.playerData.health",
|
||||
"gSaveContext.unk_1016": "gSaveContext.jinxTimer",
|
||||
"gSaveContext.unk_3F58": "gSaveContext.sunsSongState",
|
||||
"gSaveContext.unk_48C8": "gSaveContext.dungeonIndex",
|
||||
|
||||
"player->unk_A87": "player->exchangeItemId",
|
||||
"player->leftHandActor": "player->heldActor",
|
||||
|
||||
@@ -1508,21 +1508,21 @@ asm/non_matchings/code/z_map_data/func_80109DD8.s,func_80109DD8,0x80109DD8,0x26
|
||||
asm/non_matchings/code/z_map_data/func_80109E70.s,func_80109E70,0x80109E70,0x22
|
||||
asm/non_matchings/code/z_map_data/func_80109EF8.s,func_80109EF8,0x80109EF8,0x20
|
||||
asm/non_matchings/code/z_map_data/func_80109F78.s,func_80109F78,0x80109F78,0x22
|
||||
asm/non_matchings/code/z_map_exp/func_8010A000.s,func_8010A000,0x8010A000,0x1D
|
||||
asm/non_matchings/code/z_map_exp/func_8010A074.s,func_8010A074,0x8010A074,0xC
|
||||
asm/non_matchings/code/z_map_exp/Map_GetDungeonOrBossAreaIndex.s,Map_GetDungeonOrBossAreaIndex,0x8010A000,0x1D
|
||||
asm/non_matchings/code/z_map_exp/Map_IsInDungeonOrBossArea.s,Map_IsInDungeonOrBossArea,0x8010A074,0xC
|
||||
asm/non_matchings/code/z_map_exp/func_8010A0A4.s,func_8010A0A4,0x8010A0A4,0x13
|
||||
asm/non_matchings/code/z_map_exp/func_8010A0F0.s,func_8010A0F0,0x8010A0F0,0x1D
|
||||
asm/non_matchings/code/z_map_exp/func_8010A164.s,func_8010A164,0x8010A164,0xC
|
||||
asm/non_matchings/code/z_map_exp/func_8010A194.s,func_8010A194,0x8010A194,0x1D
|
||||
asm/non_matchings/code/z_map_exp/func_8010A208.s,func_8010A208,0x8010A208,0xC
|
||||
asm/non_matchings/code/z_map_exp/Map_GetDungeonAreaIndex.s,Map_GetDungeonAreaIndex,0x8010A0F0,0x1D
|
||||
asm/non_matchings/code/z_map_exp/Map_IsInDungeonArea.s,Map_IsInDungeonArea,0x8010A164,0xC
|
||||
asm/non_matchings/code/z_map_exp/Map_GetBossAreaIndex.s,Map_GetBossAreaIndex,0x8010A194,0x1D
|
||||
asm/non_matchings/code/z_map_exp/Map_IsInBossArea.s,Map_IsInBossArea,0x8010A208,0xC
|
||||
asm/non_matchings/code/z_map_exp/func_8010A238.s,func_8010A238,0x8010A238,0x1D
|
||||
asm/non_matchings/code/z_map_exp/func_8010A2AC.s,func_8010A2AC,0x8010A2AC,0xC
|
||||
asm/non_matchings/code/z_map_exp/func_8010A2DC.s,func_8010A2DC,0x8010A2DC,0x18
|
||||
asm/non_matchings/code/z_map_exp/func_8010A33C.s,func_8010A33C,0x8010A33C,0x35
|
||||
asm/non_matchings/code/z_map_exp/func_8010A410.s,func_8010A410,0x8010A410,0x8
|
||||
asm/non_matchings/code/z_map_exp/func_8010A430.s,func_8010A430,0x8010A430,0x47
|
||||
asm/non_matchings/code/z_map_exp/func_8010A54C.s,func_8010A54C,0x8010A54C,0xD
|
||||
asm/non_matchings/code/z_map_exp/func_8010A580.s,func_8010A580,0x8010A580,0x78
|
||||
asm/non_matchings/code/z_map_exp/Minimap_SavePlayerRoomInitInfo.s,Minimap_SavePlayerRoomInitInfo,0x8010A2DC,0x18
|
||||
asm/non_matchings/code/z_map_exp/Map_InitRoomData.s,Map_InitRoomData,0x8010A33C,0x35
|
||||
asm/non_matchings/code/z_map_exp/Map_Destroy.s,Map_Destroy,0x8010A410,0x8
|
||||
asm/non_matchings/code/z_map_exp/Map_Init.s,Map_Init,0x8010A430,0x47
|
||||
asm/non_matchings/code/z_map_exp/Minimap_Draw.s,Minimap_Draw,0x8010A54C,0xD
|
||||
asm/non_matchings/code/z_map_exp/Map_Update.s,Map_Update,0x8010A580,0x78
|
||||
asm/non_matchings/code/z_msgevent/func_8010A760.s,func_8010A760,0x8010A760,0x1B
|
||||
asm/non_matchings/code/z_msgevent/func_8010A7CC.s,func_8010A7CC,0x8010A7CC,0x12
|
||||
asm/non_matchings/code/z_msgevent/func_8010A814.s,func_8010A814,0x8010A814,0x12
|
||||
|
||||
|
Reference in New Issue
Block a user