Entrance Macro (#987)

* POC

* fix

* Fix typo

* token POC

* The rest

* small cleanup

* More small cleanup

* ENTRANCE

* arg renames

* EntranceIndex -> Entrance

* format

* PR

* PR2

* Remove layer from entrance macro

* namefixer plus comments

* format
This commit is contained in:
Derek Hensley 2022-08-15 11:45:28 -07:00 committed by GitHub
parent 82fe521721
commit 132dd6a373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
69 changed files with 687 additions and 419 deletions

View File

@ -2154,8 +2154,8 @@ void Scene_HeaderCmdSetAreaVisitedFlag(PlayState* play, SceneCmd* cmd);
void Scene_HeaderCmdAnimatedMaterials(PlayState* play, SceneCmd* cmd);
void Scene_SetExitFade(PlayState* play);
s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header);
u16 Entrance_CreateIndex(s32 sceneIndex, s32 spawnIndex, s32 sceneSetup);
u16 Entrance_CreateIndexFromSpawn(s32 spawnIndex);
u16 Entrance_Create(s32 scene, s32 spawn, s32 layer);
u16 Entrance_CreateFromSpawn(s32 spawn);
void Scene_ExecuteDrawConfig(PlayState* play);
void Scene_DrawConfigDefault(PlayState* play);
Gfx* AnimatedMat_TexScroll(PlayState* play, AnimatedMatTexScrollParams* params);
@ -2193,10 +2193,10 @@ void Scene_DrawConfig5(PlayState* play);
void Scene_DrawConfigMatAnimManualStep(PlayState* play);
void Scene_DrawConfigGreatBayTemple(PlayState* play);
EntranceTableEntry* Entrance_GetTableEntry(u16 entrance);
s32 Entrance_GetSceneNum(u16 entranceIndex);
s32 Entrance_GetSceneNumAbsolute(u16 entranceIndex);
s32 Entrance_GetSpawnNum(u16 entranceIndex);
s32 Entrance_GetTransitionFlags(u16 entranceIndex);
s32 Entrance_GetSceneNum(u16 entrance);
s32 Entrance_GetSceneNumAbsolute(u16 entrance);
s32 Entrance_GetSpawnNum(u16 entrance);
s32 Entrance_GetTransitionFlags(u16 entrance);
s32 Schedule_RunScript(PlayState* play, u8* script, ScheduleOutput* output);
void SkelAnime_DrawLimbLod(PlayState* play, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor, s32 lod);
void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor, s32 lod);

View File

@ -1157,7 +1157,7 @@ struct PlayState {
/* 0x18875 */ s8 transitionTrigger; // "fade_direction"
/* 0x18876 */ s16 unk_18876;
/* 0x18878 */ s16 bgCoverAlpha;
/* 0x1887A */ u16 nextEntranceIndex;
/* 0x1887A */ u16 nextEntrance;
/* 0x1887C */ s8 unk_1887C; // shootingGalleryStatus?
/* 0x1887D */ s8 unk_1887D;
/* 0x1887E */ s8 unk_1887E;

View File

@ -166,7 +166,7 @@ typedef union CutsceneData {
typedef struct {
/* 0x0 */ CutsceneData* segmentedData;
/* 0x4 */ s16 nextEntranceIndex;
/* 0x4 */ s16 nextEntrance;
/* 0x6 */ u8 unk6;
/* 0x7 */ u8 unk7; // a weekEventReg bitpack?
} CutsceneEntry; // size = 0x8

View File

@ -65,7 +65,7 @@ typedef struct RespawnData {
/* 0x00 */ Vec3f pos;
/* 0x0C */ s16 yaw;
/* 0x0E */ s16 playerParams;
/* 0x10 */ u16 entranceIndex;
/* 0x10 */ u16 entrance;
/* 0x12 */ u8 roomIndex;
/* 0x13 */ s8 data;
/* 0x14 */ u32 tempSwitchFlags;
@ -121,7 +121,7 @@ typedef struct SavePlayerData {
} SavePlayerData; // size = 0x28
typedef struct Save {
/* 0x0000 */ u32 entranceIndex; // "scene_no"
/* 0x0000 */ u32 entrance; // "scene_no"
/* 0x0004 */ u8 equippedMask; // "player_mask"
/* 0x0005 */ u8 isFirstCycle; // "opening_flag"
/* 0x0006 */ u8 unk_06;

View File

@ -648,7 +648,128 @@ typedef enum {
/* 0x6F */ SCENE_CLOCKTOWER,
/* 0x70 */ SCENE_ALLEY,
/* 0x71 */ SCENE_MAX
} SceneID;
} SceneId;
typedef enum {
/* 0x00 */ ENTR_SCENE_MAYORS_RESIDENCE,
/* 0x01 */ ENTR_SCENE_MAJORAS_LAIR,
/* 0x02 */ ENTR_SCENE_MAGIC_HAGS_POTION_SHOP,
/* 0x03 */ ENTR_SCENE_RANCH_HOUSE,
/* 0x04 */ ENTR_SCENE_HONEY_AND_DARLINGS_SHOP,
/* 0x05 */ ENTR_SCENE_BENEATH_THE_GRAVERYARD,
/* 0x06 */ ENTR_SCENE_SOUTHERN_SWAMP_CLEARED,
/* 0x07 */ ENTR_SCENE_CURIOSITY_SHOP,
/* 0x08 */ ENTR_SCENE_UNSET_08,
/* 0x09 */ ENTR_SCENE_UNSET_09,
/* 0x0A */ ENTR_SCENE_GROTTOS,
/* 0x0B */ ENTR_SCENE_UNSET_0B,
/* 0x0C */ ENTR_SCENE_UNSET_0C,
/* 0x0D */ ENTR_SCENE_UNSET_0D,
/* 0x0E */ ENTR_SCENE_CUTSCENE,
/* 0x0F */ ENTR_SCENE_UNSET_0F,
/* 0x10 */ ENTR_SCENE_IKANA_CANYON,
/* 0x11 */ ENTR_SCENE_PIRATES_FORTRESS,
/* 0x12 */ ENTR_SCENE_MILK_BAR,
/* 0x13 */ ENTR_SCENE_STONE_TOWER_TEMPLE,
/* 0x14 */ ENTR_SCENE_TREASURE_CHEST_SHOP,
/* 0x15 */ ENTR_SCENE_STONE_TOWER_TEMPLE_INVERTED,
/* 0x16 */ ENTR_SCENE_CLOCK_TOWER_ROOFTOP,
/* 0x17 */ ENTR_SCENE_OPENING_DUNGEON,
/* 0x18 */ ENTR_SCENE_WOODFALL_TEMPLE,
/* 0x19 */ ENTR_SCENE_PATH_TO_MOUNTAIN_VILLAGE,
/* 0x1A */ ENTR_SCENE_IKANA_CASTLE,
/* 0x1B */ ENTR_SCENE_DEKU_SCRUB_PLAYGROUND,
/* 0x1C */ ENTR_SCENE_ODOLWAS_LAIR,
/* 0x1D */ ENTR_SCENE_TOWN_SHOOTING_GALLERY,
/* 0x1E */ ENTR_SCENE_SNOWHEAD_TEMPLE,
/* 0x1F */ ENTR_SCENE_MILK_ROAD,
/* 0x20 */ ENTR_SCENE_PIRATES_FORTRESS_INTERIOR,
/* 0x21 */ ENTR_SCENE_SWAMP_SHOOTING_GALLERY,
/* 0x22 */ ENTR_SCENE_PINNACLE_ROCK,
/* 0x23 */ ENTR_SCENE_FAIRY_FOUNTAIN,
/* 0x24 */ ENTR_SCENE_SWAMP_SPIDER_HOUSE,
/* 0x25 */ ENTR_SCENE_OCEANSIDE_SPIDER_HOUSE,
/* 0x26 */ ENTR_SCENE_ASTRAL_OBSERVATORY,
/* 0x27 */ ENTR_SCENE_MOON_DEKU_TRIAL,
/* 0x28 */ ENTR_SCENE_DEKU_PALACE,
/* 0x29 */ ENTR_SCENE_MOUNTAIN_SMITHY,
/* 0x2A */ ENTR_SCENE_TERMINA_FIELD,
/* 0x2B */ ENTR_SCENE_POST_OFFICE,
/* 0x2C */ ENTR_SCENE_MARINE_RESEARCH_LAB,
/* 0x2D */ ENTR_SCENE_DAMPES_HOUSE,
/* 0x2E */ ENTR_SCENE_UNSET_2E,
/* 0x2F */ ENTR_SCENE_GORON_SHRINE,
/* 0x30 */ ENTR_SCENE_ZORA_HALL,
/* 0x31 */ ENTR_SCENE_TRADING_POST,
/* 0x32 */ ENTR_SCENE_ROMANI_RANCH,
/* 0x33 */ ENTR_SCENE_TWINMOLDS_LAIR,
/* 0x34 */ ENTR_SCENE_GREAT_BAY_COAST,
/* 0x35 */ ENTR_SCENE_ZORA_CAPE,
/* 0x36 */ ENTR_SCENE_LOTTERY_SHOP,
/* 0x37 */ ENTR_SCENE_UNSET_37,
/* 0x38 */ ENTR_SCENE_PIRATES_FORTRESS_EXTERIOR,
/* 0x39 */ ENTR_SCENE_FISHERMANS_HUT,
/* 0x3A */ ENTR_SCENE_GORON_SHOP,
/* 0x3B */ ENTR_SCENE_DEKU_KINGS_CHAMBER,
/* 0x3C */ ENTR_SCENE_MOON_GORON_TRIAL,
/* 0x3D */ ENTR_SCENE_ROAD_TO_SOUTHERN_SWAMP,
/* 0x3E */ ENTR_SCENE_DOGGY_RACETRACK,
/* 0x3F */ ENTR_SCENE_CUCCO_SHACK,
/* 0x40 */ ENTR_SCENE_IKANA_GRAVEYARD,
/* 0x41 */ ENTR_SCENE_GOHTS_LAIR,
/* 0x42 */ ENTR_SCENE_SOUTHERN_SWAMP_POISONED,
/* 0x43 */ ENTR_SCENE_WOODFALL,
/* 0x44 */ ENTR_SCENE_MOON_ZORA_TRIAL,
/* 0x45 */ ENTR_SCENE_GORON_VILLAGE_SPRING,
/* 0x46 */ ENTR_SCENE_GREAT_BAY_TEMPLE,
/* 0x47 */ ENTR_SCENE_WATERFALL_RAPIDS,
/* 0x48 */ ENTR_SCENE_BENEATH_THE_WELL,
/* 0x49 */ ENTR_SCENE_ZORA_HALL_ROOMS,
/* 0x4A */ ENTR_SCENE_GORON_VILLAGE_WINTER,
/* 0x4B */ ENTR_SCENE_GORON_GRAVERYARD,
/* 0x4C */ ENTR_SCENE_SAKONS_HIDEOUT,
/* 0x4D */ ENTR_SCENE_MOUNTAIN_VILLAGE_WINTER,
/* 0x4E */ ENTR_SCENE_GHOST_HUT,
/* 0x4F */ ENTR_SCENE_DEKU_SHRINE,
/* 0x50 */ ENTR_SCENE_ROAD_TO_IKANA,
/* 0x51 */ ENTR_SCENE_SWORDMANS_SCHOOL,
/* 0x52 */ ENTR_SCENE_MUSIC_BOX_HOUSE,
/* 0x53 */ ENTR_SCENE_IGOS_DU_IKANAS_LAIR,
/* 0x54 */ ENTR_SCENE_TOURIST_INFORMATION,
/* 0x55 */ ENTR_SCENE_STONE_TOWER,
/* 0x56 */ ENTR_SCENE_STONE_TOWER_INVERTED,
/* 0x57 */ ENTR_SCENE_MOUNTAIN_VILLAGE_SPRING,
/* 0x58 */ ENTR_SCENE_PATH_TO_SNOWHEAD,
/* 0x59 */ ENTR_SCENE_SNOWHEAD,
/* 0x5A */ ENTR_SCENE_PATH_TO_GORON_VILLAGE_WINTER,
/* 0x5B */ ENTR_SCENE_PATH_TO_GORON_VILLAGE_SPRING,
/* 0x5C */ ENTR_SCENE_GYORGS_LAIR,
/* 0x5D */ ENTR_SCENE_SECRET_SHRINE,
/* 0x5E */ ENTR_SCENE_STOCK_POT_INN,
/* 0x5F */ ENTR_SCENE_GREAT_BAY_CUTSCENE,
/* 0x60 */ ENTR_SCENE_CLOCK_TOWER_INTERIOR,
/* 0x61 */ ENTR_SCENE_WOODS_OF_MYSTERY,
/* 0x62 */ ENTR_SCENE_LOST_WOODS,
/* 0x63 */ ENTR_SCENE_MOON_LINK_TRIAL,
/* 0x64 */ ENTR_SCENE_THE_MOON,
/* 0x65 */ ENTR_SCENE_BOMB_SHOP,
/* 0x66 */ ENTR_SCENE_GIANTS_CHAMBER,
/* 0x67 */ ENTR_SCENE_GORMAN_TRACK,
/* 0x68 */ ENTR_SCENE_GORON_RACETRACK,
/* 0x69 */ ENTR_SCENE_EAST_CLOCK_TOWN,
/* 0x6A */ ENTR_SCENE_WEST_CLOCK_TOWN,
/* 0x6B */ ENTR_SCENE_NORTH_CLOCK_TOWN,
/* 0x6C */ ENTR_SCENE_SOUTH_CLOCK_TOWN,
/* 0x6D */ ENTR_SCENE_LAUNDRY_POOL,
/* 0x6E */ ENTR_SCENE_MAX
} EntranceSceneId;
/*
* 0xFE00: Index into sSceneEntranceTable (Scene)
* 0x01F0: Index into the scenes specific entrance table (Spawn)
* 0x000F: Index into the specific entrance table (Layer), stored seperately in sceneSetupIndex
*/
#define ENTRANCE(scene, spawn) ((((ENTR_SCENE_##scene) & 0x7F) << 9) | (((spawn) & 0x1F) << 4))
// SceneTableEntry draw configs
typedef enum {

View File

@ -290,7 +290,7 @@ void Cutscene_Command_Misc(PlayState* play2, CutsceneContext* csCtx, CsCmdBase*
break;
case 0x1B:
if (isStartFrame) {
play->nextEntranceIndex = 0x1C00;
play->nextEntrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.nextCutsceneIndex = 0xFFF8;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -569,7 +569,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
gSaveContext.save.cutscene = 0;
if (cmd->base == 1) {
play->nextEntranceIndex = play->csCtx.sceneCsList[play->csCtx.currentCsIndex].nextEntranceIndex;
play->nextEntrance = play->csCtx.sceneCsList[play->csCtx.currentCsIndex].nextEntrance;
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
if (gSaveContext.gameMode != 1) {
@ -582,11 +582,11 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
play->transitionType = TRANS_TYPE_04;
}
if ((play->nextEntranceIndex & 0xF) > 0) {
gSaveContext.nextCutsceneIndex = (play->nextEntranceIndex & 0xF) + 0xFFEF;
if ((play->nextEntrance & 0xF) > 0) {
gSaveContext.nextCutsceneIndex = (play->nextEntrance & 0xF) + 0xFFEF;
}
play->nextEntranceIndex &= ~0xF;
play->nextEntrance &= ~0xF;
}
}
@ -603,11 +603,11 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
switch (D_801F4DE2) {
case 0x1F:
if (gSaveContext.save.weekEventReg[20] & 2) {
play->nextEntranceIndex = 0x3010;
play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1);
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
} else {
play->nextEntranceIndex = 0x8600;
play->nextEntrance = ENTRANCE(WOODFALL, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -616,11 +616,11 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
case 0x44:
if (gSaveContext.save.weekEventReg[33] & 0x80) {
play->nextEntranceIndex = 0xAE70;
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7);
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
} else {
play->nextEntranceIndex = 0xAE00;
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -629,7 +629,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
case 0x5F:
gSaveContext.save.weekEventReg[55] |= 0x80;
play->nextEntranceIndex = 0x6A80;
play->nextEntrance = ENTRANCE(ZORA_CAPE, 8);
gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -637,7 +637,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
case 0x36:
gSaveContext.save.weekEventReg[52] |= 0x20;
play->nextEntranceIndex = 0x2000;
play->nextEntrance = ENTRANCE(IKANA_CANYON, 0);
gSaveContext.nextCutsceneIndex = 0xFFF1;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -658,12 +658,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 2:
if (INV_CONTENT(ITEM_MASK_KAMARO) == ITEM_MASK_KAMARO) {
// Milk bar
play->nextEntranceIndex = 0x2400;
play->nextEntrance = ENTRANCE(MILK_BAR, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C00;
play->nextEntrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -671,12 +669,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 3:
if (INV_CONTENT(ITEM_MASK_GREAT_FAIRY) == ITEM_MASK_GREAT_FAIRY) {
// Fairy's fountain
play->nextEntranceIndex = 0x4600;
play->nextEntrance = ENTRANCE(FAIRY_FOUNTAIN, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C10;
play->nextEntrance = ENTRANCE(CUTSCENE, 1);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -684,12 +680,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 4:
if (INV_CONTENT(ITEM_MASK_ROMANI) == ITEM_MASK_ROMANI) {
// Romani ranch
play->nextEntranceIndex = 0x6400;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0);
gSaveContext.nextCutsceneIndex = 0xFFF1;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C20;
play->nextEntrance = ENTRANCE(CUTSCENE, 2);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -697,12 +691,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 5:
if (INV_CONTENT(ITEM_MASK_BLAST) == ITEM_MASK_BLAST) {
// West clock town
play->nextEntranceIndex = 0xD400;
play->nextEntrance = ENTRANCE(WEST_CLOCK_TOWN, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C30;
play->nextEntrance = ENTRANCE(CUTSCENE, 3);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -710,12 +702,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 6:
if (INV_CONTENT(ITEM_MASK_CIRCUS_LEADER) == ITEM_MASK_CIRCUS_LEADER) {
// Milk bar
play->nextEntranceIndex = 0x2400;
play->nextEntrance = ENTRANCE(MILK_BAR, 0);
gSaveContext.nextCutsceneIndex = 0xFFF1;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C50;
play->nextEntrance = ENTRANCE(CUTSCENE, 5);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -723,32 +713,27 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 7:
if (INV_CONTENT(ITEM_MASK_BREMEN) == ITEM_MASK_BREMEN) {
// Milk bar
play->nextEntranceIndex = 0x2400;
play->nextEntrance = ENTRANCE(MILK_BAR, 0);
gSaveContext.nextCutsceneIndex = 0xFFF3;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C60;
play->nextEntrance = ENTRANCE(CUTSCENE, 6);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
break;
case 8:
// Ikana canyon
play->nextEntranceIndex = 0x2000;
play->nextEntrance = ENTRANCE(IKANA_CANYON, 0);
gSaveContext.nextCutsceneIndex = 0xFFF3;
play->transitionTrigger = TRANS_TRIGGER_START;
break;
case 9:
if (INV_CONTENT(ITEM_MASK_COUPLE) == ITEM_MASK_COUPLE) {
// Termina field
play->nextEntranceIndex = 0x5400;
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 0);
gSaveContext.nextCutsceneIndex = 0xFFF8;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C70;
play->nextEntrance = ENTRANCE(CUTSCENE, 7);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -756,12 +741,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 10:
if (INV_CONTENT(ITEM_MASK_BUNNY) == ITEM_MASK_BUNNY) {
// Cucco shack
play->nextEntranceIndex = 0x7E00;
play->nextEntrance = ENTRANCE(CUCCO_SHACK, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C40;
play->nextEntrance = ENTRANCE(CUTSCENE, 4);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -769,12 +752,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
case 11:
if (INV_CONTENT(ITEM_MASK_POSTMAN) == ITEM_MASK_POSTMAN) {
// Termina field
play->nextEntranceIndex = 0x5410;
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 1);
gSaveContext.nextCutsceneIndex = 0xFFF8;
} else {
// SPOT00
play->nextEntranceIndex = 0x1C80;
play->nextEntrance = ENTRANCE(CUTSCENE, 8);
gSaveContext.nextCutsceneIndex = 0xFFF9;
}
play->transitionTrigger = TRANS_TRIGGER_START;
@ -1528,7 +1509,7 @@ void func_800EDBE0(PlayState* play) {
if ((gSaveContext.respawnFlag == 0) || (gSaveContext.respawnFlag == -2)) {
sp24 = play->loadedScene;
if ((sp24->titleTextId != 0) && gSaveContext.showTitleCard) {
if ((Entrance_GetTransitionFlags(((void)0, gSaveContext.save.entranceIndex) +
if ((Entrance_GetTransitionFlags(((void)0, gSaveContext.save.entrance) +
((void)0, gSaveContext.sceneSetupIndex)) &
0x4000) != 0) {
func_80151A68(play, sp24->titleTextId);

View File

@ -357,11 +357,11 @@ void Play_SaveCycleSceneFlags(GameState* thisx) {
cycleSceneFlags->clearedRoom = this->actorCtx.flags.clearedRoom;
}
void Play_SetRespawnData(GameState* thisx, s32 respawnMode, u16 entranceIndex, s32 roomIndex, s32 playerParams,
Vec3f* pos, s16 yaw) {
void Play_SetRespawnData(GameState* thisx, s32 respawnMode, u16 entrance, s32 roomIndex, s32 playerParams, Vec3f* pos,
s16 yaw) {
PlayState* this = (PlayState*)thisx;
gSaveContext.respawn[respawnMode].entranceIndex = Entrance_CreateIndex(entranceIndex >> 9, 0, entranceIndex & 0xF);
gSaveContext.respawn[respawnMode].entrance = Entrance_Create(entrance >> 9, 0, entrance & 0xF);
gSaveContext.respawn[respawnMode].roomIndex = roomIndex;
gSaveContext.respawn[respawnMode].pos = *pos;
gSaveContext.respawn[respawnMode].yaw = yaw;
@ -376,7 +376,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams)
Player* player = GET_PLAYER(this);
if (this->sceneNum != SCENE_KAKUSIANA) { // Grottos
Play_SetRespawnData(&this->state, respawnMode, (u16)((void)0, gSaveContext.save.entranceIndex),
Play_SetRespawnData(&this->state, respawnMode, (u16)((void)0, gSaveContext.save.entrance),
this->roomCtx.currRoom.num, playerParams, &player->actor.world.pos,
player->actor.shape.rot.y);
}
@ -385,7 +385,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams)
// Override respawn data in Sakon's Hideout
void func_80169ECC(PlayState* this) {
if (this->sceneNum == SCENE_SECOM) {
this->nextEntranceIndex = 0x2060;
this->nextEntrance = ENTRANCE(IKANA_CANYON, 6);
gSaveContext.respawnFlag = -7;
}
}
@ -398,7 +398,7 @@ void func_80169EFC(GameState* thisx) {
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwitchFlags = this->actorCtx.flags.switches[2];
gSaveContext.respawn[RESPAWN_MODE_DOWN].unk_18 = this->actorCtx.flags.collectible[1];
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags = this->actorCtx.flags.collectible[2];
this->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex;
this->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance;
gSaveContext.respawnFlag = 1;
func_80169ECC(this);
this->transitionTrigger = TRANS_TRIGGER_START;
@ -410,7 +410,7 @@ void func_80169EFC(GameState* thisx) {
void func_80169F78(GameState* thisx) {
PlayState* this = (PlayState*)thisx;
this->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex;
this->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_TOP].entrance;
gSaveContext.respawnFlag = -1;
func_80169ECC(this);
this->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -454,7 +454,7 @@ void Scene_HeaderCmdAltHeaderList(PlayState* play, SceneCmd* cmd) {
SceneCmd** altHeaderList;
SceneCmd* altHeader;
if (gSaveContext.sceneSetupIndex) {
if (gSaveContext.sceneSetupIndex != 0) {
altHeaderList = Lib_SegmentedToVirtual(cmd->altHeaders.segment);
altHeader = altHeaderList[gSaveContext.sceneSetupIndex - 1];
@ -527,7 +527,7 @@ void Scene_HeaderCmdAnimatedMaterials(PlayState* play, SceneCmd* cmd) {
* Sets the exit fade from the next entrance index.
*/
void Scene_SetExitFade(PlayState* play) {
play->transitionType = Entrance_GetTransitionFlags(play->nextEntranceIndex) & 0x7F;
play->transitionType = Entrance_GetTransitionFlags(play->nextEntrance) & 0x7F;
}
/**
@ -587,15 +587,15 @@ s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header) {
}
/**
* Creates an entrance index from the scene index, spawn index, and scene setup.
* Creates an entrance from the scene, spawn, and lyaer.
*/
u16 Entrance_CreateIndex(s32 sceneIndex, s32 spawnIndex, s32 sceneSetup) {
return (((sceneIndex << 9) | (spawnIndex << 4)) | sceneSetup) & 0xFFFF;
u16 Entrance_Create(s32 scene, s32 spawn, s32 layer) {
return (scene << 9) | (spawn << 4) | layer;
}
/**
* Creates an entrance index from the current entrance index with the given spawn index.
* Creates an layer 0 entranace from the current entrance and the given spawn.
*/
u16 Entrance_CreateIndexFromSpawn(s32 spawnIndex) {
return Entrance_CreateIndex(gSaveContext.save.entranceIndex >> 9, spawnIndex, 0);
u16 Entrance_CreateFromSpawn(s32 spawn) {
return Entrance_Create(gSaveContext.save.entrance >> 9, spawn, 0);
}

View File

@ -486,22 +486,22 @@ static EntranceTableEntry* sTreasureChestShopEntranceTable[] = {
sTreasureChestShopEntrance1,
};
static EntranceTableEntry sStoneTowerTempleReversedEntrance0[] = {
static EntranceTableEntry sStoneTowerTempleInvertedEntrance0[] = {
{ 0xE8, 0x00, 0xC102 },
};
static EntranceTableEntry sStoneTowerTempleReversedEntrance1[] = {
static EntranceTableEntry sStoneTowerTempleInvertedEntrance1[] = {
{ 0xE8, 0x01, 0x8102 },
};
static EntranceTableEntry sStoneTowerTempleReversedEntrance2[] = {
static EntranceTableEntry sStoneTowerTempleInvertedEntrance2[] = {
{ 0xE8, 0x02, 0x8102 },
};
static EntranceTableEntry* sStoneTowerTempleReversedEntranceTable[] = {
sStoneTowerTempleReversedEntrance0,
sStoneTowerTempleReversedEntrance1,
sStoneTowerTempleReversedEntrance2,
static EntranceTableEntry* sStoneTowerTempleInvertedEntranceTable[] = {
sStoneTowerTempleInvertedEntrance0,
sStoneTowerTempleInvertedEntrance1,
sStoneTowerTempleInvertedEntrance2,
};
static EntranceTableEntry sClockTowerRooftopEntrance0[] = {
@ -2678,7 +2678,7 @@ static SceneEntranceTableEntry sSceneEntranceTable[] = {
/* 0x12 */ SCENE_ENTRANCE(sMilkBarEntranceTable, "Z2_MILK_BAR"),
/* 0x13 */ SCENE_ENTRANCE(sStoneTowerTempleEntranceTable, "Z2_INISIE_N"),
/* 0x14 */ SCENE_ENTRANCE(sTreasureChestShopEntranceTable, "Z2_TAKARAYA"),
/* 0x15 */ SCENE_ENTRANCE(sStoneTowerTempleReversedEntranceTable, "Z2_INISIE_R"),
/* 0x15 */ SCENE_ENTRANCE(sStoneTowerTempleInvertedEntranceTable, "Z2_INISIE_R"),
/* 0x16 */ SCENE_ENTRANCE(sClockTowerRooftopEntranceTable, "Z2_OKUJOU"),
/* 0x17 */ SCENE_ENTRANCE(sOpeningDungeonEntranceTable, "Z2_OPENINGDAN"),
/* 0x18 */ SCENE_ENTRANCE(sWoodfallTempleEntranceTable, "Z2_MITURIN"),
@ -2772,19 +2772,19 @@ static SceneEntranceTableEntry sSceneEntranceTable[] = {
/**
* Returns a pointer to an entrance table from a given entrance index.
*/
EntranceTableEntry* Entrance_GetTableEntry(u16 entranceIndex) {
u32 entranceIndex2 = entranceIndex;
EntranceTableEntry** tableEntryP = sSceneEntranceTable[entranceIndex2 >> 9].table;
EntranceTableEntry* tableEntry = tableEntryP[(entranceIndex2 >> 4) & 0x1F];
EntranceTableEntry* Entrance_GetTableEntry(u16 entrance) {
u32 entranceIndex = entrance;
EntranceTableEntry** tableEntryP = sSceneEntranceTable[entranceIndex >> 9].table;
EntranceTableEntry* tableEntry = tableEntryP[(entranceIndex >> 4) & 0x1F];
return &tableEntry[entranceIndex2 & 0xF];
return &tableEntry[entranceIndex & 0xF];
}
/**
* Returns the scene index from a given entrance index.
*/
s32 Entrance_GetSceneNum(u16 entranceIndex) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex);
s32 Entrance_GetSceneNum(u16 entrance) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance);
return tableEntry->sceneNum;
}
@ -2792,8 +2792,8 @@ s32 Entrance_GetSceneNum(u16 entranceIndex) {
/**
* Returns the absolute value scene index (since for some reason some of them are negative) from a given entrance index.
*/
s32 Entrance_GetSceneNumAbsolute(u16 entranceIndex) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex);
s32 Entrance_GetSceneNumAbsolute(u16 entrance) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance);
return ABS_ALT(tableEntry->sceneNum);
}
@ -2801,8 +2801,8 @@ s32 Entrance_GetSceneNumAbsolute(u16 entranceIndex) {
/**
* Returns the spawn index from a given entrance index.
*/
s32 Entrance_GetSpawnNum(u16 entranceIndex) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex);
s32 Entrance_GetSpawnNum(u16 entrance) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance);
return tableEntry->spawnNum;
}
@ -2810,8 +2810,8 @@ s32 Entrance_GetSpawnNum(u16 entranceIndex) {
/**
* Returns the transition effect flags from a given entrance index.
*/
s32 Entrance_GetTransitionFlags(u16 entranceIndex) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex);
s32 Entrance_GetTransitionFlags(u16 entrance) {
EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance);
return tableEntry->flags;
}

View File

@ -501,7 +501,7 @@ u16 Sram_CalcChecksum(void* data, size_t count) {
// Resets `Save` substruct
void Sram_ResetSave(void) {
gSaveContext.save.entranceIndex = 0x1C00;
gSaveContext.save.entrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.save.equippedMask = 0;
gSaveContext.save.isFirstCycle = false;
gSaveContext.save.unk_06 = 0;
@ -845,7 +845,7 @@ void Sram_InitDebugSave(void) {
gSaveContext.save.horseData.pos.z = -1285;
gSaveContext.save.horseData.yaw = -0x7554;
gSaveContext.save.entranceIndex = 0x1C00;
gSaveContext.save.entrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.save.isFirstCycle = true;
//
@ -910,7 +910,13 @@ void func_80144A94(SramContext* sramCtx) {
gSaveContext.jinxTimer = 0;
}
u16 D_801C6A58[] = { 0x68B0, 0x6A60, 0xB230, 0x9A80, 0xD890, 0x3E40, 0x8640, 0x84A0, 0x2040, 0xAA30 };
u16 D_801C6A58[] = {
ENTRANCE(GREAT_BAY_COAST, 11), ENTRANCE(ZORA_CAPE, 6),
ENTRANCE(SNOWHEAD, 3), ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8),
ENTRANCE(SOUTH_CLOCK_TOWN, 9), ENTRANCE(MILK_ROAD, 4),
ENTRANCE(WOODFALL, 4), ENTRANCE(SOUTHERN_SWAMP_POISONED, 10),
ENTRANCE(IKANA_CANYON, 4), ENTRANCE(STONE_TOWER, 3),
};
void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
s32 i;
@ -973,22 +979,24 @@ void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
}
if (gSaveContext.save.isFirstCycle) {
gSaveContext.save.entranceIndex = 0xD800;
gSaveContext.save.entrance = ENTRANCE(SOUTH_CLOCK_TOWN, 0);
gSaveContext.save.day = 0;
gSaveContext.save.time = 0x3FFF;
} else {
gSaveContext.save.entranceIndex = 0x1C00;
gSaveContext.save.entrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.nextCutsceneIndex = 0;
gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
}
} else {
gSaveContext.save.entranceIndex = D_801C6A58[(void)0, gSaveContext.save.owlSaveLocation];
if ((gSaveContext.save.entranceIndex == 0x84A0) && (gSaveContext.save.weekEventReg[20] & 2)) {
gSaveContext.save.entrance = D_801C6A58[(void)0, gSaveContext.save.owlSaveLocation];
if ((gSaveContext.save.entrance == ENTRANCE(SOUTHERN_SWAMP_POISONED, 10)) &&
(gSaveContext.save.weekEventReg[20] & 2)) {
// Unconfirmed weekEventReg: "Woodfall Temple Prison Entrance raised / Water cleansed"
gSaveContext.save.entranceIndex = 0xCA0;
} else if ((gSaveContext.save.entranceIndex == 0x9A80) && (gSaveContext.save.weekEventReg[33] & 0x80)) {
gSaveContext.save.entrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 10);
} else if ((gSaveContext.save.entrance == ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8)) &&
(gSaveContext.save.weekEventReg[33] & 0x80)) {
// Unconfirmed weekEventReg: "Mountain Village Unfrozen"
gSaveContext.save.entranceIndex = 0xAE80;
gSaveContext.save.entrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 8);
}
for (i = 0; i < ARRAY_COUNT(gSaveContext.cycleSceneFlags); i++) {
@ -1513,7 +1521,7 @@ void func_80146DF8(SramContext* sramCtx) {
}
void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
if (gSaveContext.save.entranceIndex) {} // Required to match
if (gSaveContext.save.entrance) {} // Required to match
func_801A3D98(gSaveContext.options.audioSetting);
}

View File

@ -245,10 +245,10 @@ void func_809541B8(BgIngate* this, PlayState* play) {
void func_809542A0(BgIngate* this, PlayState* play) {
if (gSaveContext.eventInf[5] & 1) {
play->nextEntranceIndex = 0xA820;
play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 2);
gSaveContext.eventInf[5] &= (u8)~1;
} else {
play->nextEntranceIndex = 0xA810;
play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 1);
}
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -1045,7 +1045,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->collider);
if (gSaveContext.save.entranceIndex == 0x2C00) {
if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_ROOFTOP, 0)) {
if (gSaveContext.sceneSetupIndex == 0) {
if (gSaveContext.unk_3DD0[3] == 0) {
// Starts a 5 minute (300 second) timer until the moon falls.

View File

@ -52,9 +52,10 @@ static ColliderCylinderInit sCylinderInit = {
{ 50, 10, 0, { 0, 0, 0 } },
};
static u16 sEntranceIndexes[] = {
0x1A00, 0x1400, 0x1410, 0x1420, 0x1430, 0x1440, 0x1450, 0x1460,
0x1470, 0x1480, 0x1490, 0x14A0, 0x14B0, 0x14C0, 0x14D0,
static u16 sEntrances[] = {
ENTRANCE(UNSET_0D, 0), ENTRANCE(GROTTOS, 0), ENTRANCE(GROTTOS, 1), ENTRANCE(GROTTOS, 2), ENTRANCE(GROTTOS, 3),
ENTRANCE(GROTTOS, 4), ENTRANCE(GROTTOS, 5), ENTRANCE(GROTTOS, 6), ENTRANCE(GROTTOS, 7), ENTRANCE(GROTTOS, 8),
ENTRANCE(GROTTOS, 9), ENTRANCE(GROTTOS, 10), ENTRANCE(GROTTOS, 11), ENTRANCE(GROTTOS, 12), ENTRANCE(GROTTOS, 13),
};
void DoorAna_SetupAction(DoorAna* this, DoorAnaActionFunc actionFunction) {
@ -135,7 +136,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
if (grottoType == DOORANA_TYPE_VISIBLE_SCENE_EXIT) {
s32 exitIndex = DOORANA_GET_EXIT_INDEX(&this->actor);
play->nextEntranceIndex = play->setupExitList[exitIndex];
play->nextEntrance = play->setupExitList[exitIndex];
} else {
s32 destinationIdx = DOORANA_GET_ENTRANCE(&this->actor);
@ -151,7 +152,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
destinationIdx = DOORANA_GET_EX_ENTRANCE(&this->actor);
}
play->nextEntranceIndex = sEntranceIndexes[destinationIdx];
play->nextEntrance = sEntrances[destinationIdx];
}
DoorAna_SetupAction(this, DoorAna_GrabLink);

View File

@ -485,7 +485,7 @@ void func_808B98A8(DoorWarp1* this, PlayState* play) {
if ((gSaveContext.nextCutsceneIndex == 0xFFEF) && (D_808BC000 < this->unk_1D0) &&
(gSaveContext.nextCutsceneIndex == 0xFFEF)) {
if (DOORWARP1_GET_FF00_1(&this->dyna.actor) != 0xFF) {
play->nextEntranceIndex = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)];
play->nextEntrance = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)];
Scene_SetExitFade(play);
play->transitionTrigger = TRANS_TRIGGER_START;
} else {
@ -700,7 +700,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
break;
}
play->nextEntranceIndex = 0xCC00;
play->nextEntrance = ENTRANCE(GIANTS_CHAMBER, 0);
if (phi_v0_3 < 10) {
gSaveContext.nextCutsceneIndex = phi_v0_3 + 0xFFF0;
}
@ -713,12 +713,12 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
case 0:
if (gSaveContext.save.weekEventReg[20] & 2) {
gSaveContext.save.weekEventReg[7] |= 0x80;
play->nextEntranceIndex = 0x3010;
play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1);
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
} else {
play->nextEntranceIndex = 0x8600;
play->nextEntrance = ENTRANCE(WOODFALL, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -728,7 +728,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
case 1:
gSaveContext.save.weekEventReg[33] |= 0x80;
play->nextEntranceIndex = 0xAE70;
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7);
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
@ -736,14 +736,14 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
case 3:
if (gSaveContext.save.weekEventReg[55] & 0x80) {
play->nextEntranceIndex = 0x6A90;
play->nextEntrance = ENTRANCE(ZORA_CAPE, 9);
gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
} else {
gSaveContext.save.weekEventReg[55] |= 0x80;
play->nextEntranceIndex = 0x6A80;
play->nextEntrance = ENTRANCE(ZORA_CAPE, 8);
gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -753,7 +753,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
case 2:
gSaveContext.save.weekEventReg[52] |= 0x20;
play->nextEntranceIndex = 0x20F0;
play->nextEntrance = ENTRANCE(IKANA_CANYON, 15);
gSaveContext.nextCutsceneIndex = 0xFFF2;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -765,7 +765,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
if (DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_6) {
gSaveContext.respawnFlag = ~1;
}
play->nextEntranceIndex = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)];
play->nextEntrance = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)];
Scene_SetExitFade(play);
play->transitionTrigger = TRANS_TRIGGER_START;
} else {

View File

@ -416,7 +416,7 @@ void func_809C1C9C(EnAob01* this, PlayState* play) {
gSaveContext.save.weekEventReg[63] &= (u8)~2;
this->unk_2D2 |= 0x20;
func_800FD750(0x40);
play->nextEntranceIndex = 0x7C10;
play->nextEntrance = ENTRANCE(DOGGY_RACETRACK, 1);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & (u8)~7) | 2;
@ -672,7 +672,7 @@ void func_809C2788(EnAob01* this, PlayState* play) {
this->unk_2D2 |= 0x20;
if (func_809C25E4(this, play)) {
if (func_801A8A50(0) != 0x41) {
play->nextEntranceIndex = 0x7C10;
play->nextEntrance = ENTRANCE(DOGGY_RACETRACK, 1);
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & (u8)~7) | 3;
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;

View File

@ -300,7 +300,7 @@ void EnBaba_HandleConversation(EnBaba* this, PlayState* play) {
}
void EnBaba_TriggerTransition(PlayState* play, u16 nextEntrance) {
play->nextEntranceIndex = nextEntrance;
play->nextEntrance = nextEntrance;
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -510,7 +510,8 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) {
this->actionFunc = EnBaba_Idle;
} else if (play->sceneNum == SCENE_BACKTOWN) {
if ((BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_FOLLOW_SCHEDULE) &&
(gSaveContext.save.entranceIndex != 0xD670) && (BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F)) {
(gSaveContext.save.entrance != ENTRANCE(NORTH_CLOCK_TOWN, 7)) &&
(BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F)) {
if ((gSaveContext.save.weekEventReg[58] & 0x40) ||
(gSaveContext.save.time >= CLOCK_TIME(0, 20) && (gSaveContext.save.time < CLOCK_TIME(6, 0)))) {
Actor_MarkForDeath(&this->actor);
@ -522,7 +523,7 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex);
this->actionFunc = EnBaba_FollowSchedule;
} else if ((BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_IDLE) &&
(gSaveContext.save.entranceIndex == 0xD670)) {
(gSaveContext.save.entrance == ENTRANCE(NORTH_CLOCK_TOWN, 7))) {
if (gSaveContext.save.weekEventReg[81] & 2) {
Actor_MarkForDeath(&this->actor);
return;
@ -603,12 +604,12 @@ void EnBaba_Talk(EnBaba* this, PlayState* play) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.unk120B1 == 0) {
gSaveContext.save.weekEventReg[81] |= 2;
EnBaba_TriggerTransition(play, 0xD670);
EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7));
return;
}
} else {
gSaveContext.save.weekEventReg[81] |= 2;
EnBaba_TriggerTransition(play, 0xD670);
EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7));
}
} else {
this->textId = 0;
@ -626,7 +627,7 @@ void EnBaba_Talk(EnBaba* this, PlayState* play) {
} else if (talkState == TEXT_STATE_DONE) {
if (Message_ShouldAdvance(play) && (play->msgCtx.unk120B1 == 0)) {
gSaveContext.save.weekEventReg[81] |= 2;
EnBaba_TriggerTransition(play, 0xD670);
EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7));
}
}
}
@ -699,7 +700,7 @@ void EnBaba_KnockedOver(EnBaba* this, PlayState* play) {
} else {
if ((gSaveContext.save.weekEventReg[79] & 0x40) && (DECR(this->sakonDeadTimer) == 0)) {
Audio_QueueSeqCmd(0x101400FF);
EnBaba_TriggerTransition(play, 0xD670);
EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7));
} else {
Actor_MoveWithGravity(&this->actor);
}

View File

@ -296,8 +296,8 @@ void func_809CD634(EnBji01* this, PlayState* play) {
AudioSfx_MuteBanks((1 << BANK_PLAYER) | (1 << BANK_ITEM) | (1 << BANK_ENV) | (1 << BANK_ENEMY) |
(1 << BANK_OCARINA) | (1 << BANK_VOICE));
Audio_QueueSeqCmd(0xE0000101);
play->nextEntranceIndex = 0x54A0; /* Termina Field from telescope */
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = play->nextEntranceIndex;
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 10); /* Telescope entrance */
gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = play->nextEntrance;
func_80169EFC(&play->state); /* Load new entrance? */
gSaveContext.respawnFlag = -2;
this->actionFunc = EnBji01_DoNothing;
@ -343,13 +343,13 @@ void EnBji01_Init(Actor* thisx, PlayState* play) {
SubS_FillCutscenesList(&this->actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
this->moonsTear = (ObjMoonStone*)SubS_FindActor(play, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE);
switch (gSaveContext.save.entranceIndex) {
case 0x4C00: /* Observatory from ECT */
case 0x4C10: /* Observatory from Termina Field door */
switch (gSaveContext.save.entrance) {
case ENTRANCE(ASTRAL_OBSERVATORY, 0): /* ECT entrance*/
case ENTRANCE(ASTRAL_OBSERVATORY, 1): /* TF door entrance */
this->actor.params = SHIKASHI_TYPE_DEFAULT;
func_809CCE98(this, play);
break;
case 0x4C20: /* Observatory from Termina Field telescope */
case ENTRANCE(ASTRAL_OBSERVATORY, 2): /* Telescope entrance */
this->actor.flags |= ACTOR_FLAG_10000;
AudioSfx_MuteBanks(0);
Audio_QueueSeqCmd(0xE0000100);

View File

@ -97,7 +97,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play) {
this->path = SubS_GetPathByIndex(play, this->unk_29A, 0x3F);
this->unk_2C8 = 80.0f;
if ((gSaveContext.save.entranceIndex == 0xD220) && (gSaveContext.save.weekEventReg[73] & 0x80) &&
if ((gSaveContext.save.entrance == ENTRANCE(EAST_CLOCK_TOWN, 2)) && (gSaveContext.save.weekEventReg[73] & 0x80) &&
!CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
this->unk_2D6 = this->actor.cutscene;
if (this->unk_2D6 == 0) {
@ -332,7 +332,7 @@ void func_809C51B4(EnBomBowlMan* this, PlayState* play) {
if ((play->msgCtx.unk120B1 == 0) &&
((play->msgCtx.msgMode == 0) || (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE))) {
play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(6);
play->nextEntrance = Entrance_CreateFromSpawn(6);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_86;

View File

@ -94,7 +94,7 @@ void EnBombers2_Init(Actor* thisx, PlayState* play) {
this->jointTable, OBJECT_CS_LIMB_MAX);
this->actor.targetMode = 6;
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
if ((gSaveContext.save.weekEventReg[73] & 0x80) || (gSaveContext.save.entranceIndex == 0xD220)) {
if ((gSaveContext.save.weekEventReg[73] & 0x80) || (gSaveContext.save.entrance == ENTRANCE(EAST_CLOCK_TOWN, 2))) {
this->actor.world.pos.x += Math_SinS(this->actor.home.rot.y + 0xC100) * 50.0f;
cos = Math_CosS(this->actor.home.rot.y + 0xC100) * 50.0f;
this->unk_2AC = 1;

View File

@ -757,7 +757,7 @@ void func_80BFFBC4(EnBomjima* this, PlayState* play) {
if (D_80C009F0 >= 104) {
D_80C009F0 = 0;
func_801477B4(play);
play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(6);
play->nextEntrance = Entrance_CreateFromSpawn(6);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_86;

View File

@ -790,12 +790,12 @@ void func_80C02BCC(EnBomjimb* this, PlayState* play) {
void func_80C02CA4(EnBomjimb* this, PlayState* play) {
if (BREG(13) == 0) {
play->nextEntranceIndex = play->setupExitList[this->unk_2B2];
play->nextEntrance = play->setupExitList[this->unk_2B2];
gSaveContext.nextCutsceneIndex = 0;
Scene_SetExitFade(play);
play->transitionTrigger = TRANS_TRIGGER_START;
} else {
play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(5);
play->nextEntrance = Entrance_CreateFromSpawn(5);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_86;

View File

@ -439,7 +439,7 @@ void func_8092D330(EnDns* this, PlayState* play) {
}
if ((this->unk_2C6 & 0x100) && (DECR(this->unk_2D0) == 0)) {
this->unk_2C6 &= ~0x100;
play->nextEntranceIndex = 0x5010;
play->nextEntrance = ENTRANCE(DEKU_PALACE, 1);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;

View File

@ -341,7 +341,7 @@ void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(0xB);
}
} else if (play->csCtx.frames > 1600) {
play->nextEntranceIndex = 0x2C00;
play->nextEntrance = ENTRANCE(CLOCK_TOWER_ROOFTOP, 0);
gSaveContext.nextCutsceneIndex = 0xFFF2;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02;

View File

@ -356,14 +356,14 @@ void func_80B0FD8C(EnGb2* this, PlayState* play) {
void func_80B0FE18(PlayState* play) {
func_800FD750(0x38);
play->nextEntranceIndex = 0x9C10;
play->nextEntrance = ENTRANCE(GHOST_HUT, 1);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;
play->transitionTrigger = TRANS_TRIGGER_START;
}
void func_80B0FE7C(PlayState* play) {
play->nextEntranceIndex = 0x9C20;
play->nextEntrance = ENTRANCE(GHOST_HUT, 2);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -890,7 +890,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) {
Actor_MarkForDeath(&this->actor);
}
if (gSaveContext.save.entranceIndex == 0x9C10) {
if (gSaveContext.save.entrance == ENTRANCE(GHOST_HUT, 1)) {
func_800FE484();
this->actionFunc = func_80B10240;
break;

View File

@ -645,7 +645,7 @@ void func_80B51760(EnGk* this, PlayState* play) {
this->unk_1E4 |= 2;
}
} else if (((this->actor.xzDistToPlayer < 100.0f) || this->actor.isTargeted) &&
(gSaveContext.save.entranceIndex != 0xD010)) {
(gSaveContext.save.entrance != 0xD010)) {
func_800B863C(&this->actor, play);
}
@ -720,7 +720,7 @@ void func_80B51B40(EnGk* this, PlayState* play) {
}
if (this->unk_31C == 0xE8F) {
play->nextEntranceIndex = 0xD010;
play->nextEntrance = ENTRANCE(GORON_RACETRACK, 1);
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
@ -1029,9 +1029,9 @@ void EnGk_Init(Actor* thisx, PlayState* play) {
}
} else if (play->sceneNum == SCENE_GORONRACE) {
if (gSaveContext.save.weekEventReg[33] & 0x80) {
if (gSaveContext.save.entranceIndex == 0xD010) {
if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) {
this->actionFunc = func_80B51760;
} else if (gSaveContext.save.entranceIndex == 0xD020) {
} else if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 2)) {
this->actionFunc = func_80B52340;
} else {
this->actionFunc = func_80B51760;

View File

@ -1373,7 +1373,8 @@ void func_80A143A8(EnGo* this, PlayState* play) {
}
void func_80A14430(EnGo* this, PlayState* play) {
if (((gSaveContext.save.entranceIndex == 0xD000) || (gSaveContext.save.entranceIndex == 0xD020)) &&
if (((gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 0)) ||
(gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 2))) &&
(gSaveContext.save.weekEventReg[33] & 0x80)) {
func_80A14018(this, play);
this->actionFunc = func_80A149B0;
@ -1383,7 +1384,8 @@ void func_80A14430(EnGo* this, PlayState* play) {
}
void func_80A1449C(EnGo* this, PlayState* play) {
if ((gSaveContext.save.entranceIndex == 0xD010) || (gSaveContext.save.entranceIndex == 0x1C00)) {
if ((gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) ||
(gSaveContext.save.entrance == ENTRANCE(CUTSCENE, 0))) {
func_80A14104(this, play);
this->actionFunc = func_80A149B0;
} else {
@ -1511,7 +1513,7 @@ void func_80A14798(EnGo* this, PlayState* play) {
void func_80A149B0(EnGo* this, PlayState* play) {
s16 sp26 = this->actor.world.rot.y;
if ((ENGO_GET_F(&this->actor) == ENGO_F_2) && (gSaveContext.save.entranceIndex == 0xD010)) {
if ((ENGO_GET_F(&this->actor) == ENGO_F_2) && (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1))) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_GORON_CHEER - SFX_FLAG);
} else if (ENGO_GET_F(&this->actor) != ENGO_F_8) {
if (func_80A1222C(this, play)) {

View File

@ -323,7 +323,7 @@ void func_80B23910(EnHanabi* this, PlayState* play) {
}
void func_80B23934(EnHanabi* this, PlayState* play) {
if ((gSaveContext.save.entranceIndex == 0x5410) && (gSaveContext.sceneSetupIndex == 7)) {
if ((gSaveContext.save.entrance == ENTRANCE(TERMINA_FIELD, 1)) && (gSaveContext.sceneSetupIndex == 7)) {
if (play->csCtx.frames > 1650) {
func_80B236C8(this, play);
func_800B8FE8(&this->actor, NA_SE_EV_FIREWORKS_LAUNCH - SFX_FLAG);

View File

@ -188,7 +188,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) {
func_8012EBF8(play, &play->roomCtx);
}
} else if (this->type == EN_HOLL_TYPE_SCENE_CHANGER) {
play->nextEntranceIndex = play->setupExitList[EN_HOLL_GET_EXIT_LIST_INDEX(&this->actor)];
play->nextEntrance = play->setupExitList[EN_HOLL_GET_EXIT_LIST_INDEX(&this->actor)];
gSaveContext.unk_3DBB = 1;
Scene_SetExitFade(play);
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -775,7 +775,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
}
if (((play->sceneNum == SCENE_KOEPONARACE) && (GET_RACE_FLAGS == 1)) ||
((gSaveContext.save.entranceIndex == 0x6400) && Cutscene_GetSceneSetupIndex(play))) {
((gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0)) && Cutscene_GetSceneSetupIndex(play))) {
this->stateFlags |= ENHORSE_FLAG_25;
}
@ -1551,7 +1551,7 @@ void EnHorse_Stopping(EnHorse* this, PlayState* play) {
if ((this->stateFlags & ENHORSE_STOPPING_NEIGH_SOUND) && (this->skin.skelAnime.curFrame > 29.0f)) {
this->actor.speedXZ = 0.0f;
if ((Rand_ZeroOne() > 0.5f) &&
((gSaveContext.save.entranceIndex != 0x6400) || !Cutscene_GetSceneSetupIndex(play))) {
((gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 0)) || !Cutscene_GetSceneSetupIndex(play))) {
if (this->stateFlags & ENHORSE_DRAW) {
if (this->type == HORSE_TYPE_2) {
Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH);

View File

@ -152,7 +152,7 @@ s32 func_808F8E94(EnHorseGameCheck* this, PlayState* play) {
s32 func_808F8EB0(EnHorseGameCheck* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (play->nextEntranceIndex == 0xCE20) {
if (play->nextEntrance == ENTRANCE(GORMAN_TRACK, 2)) {
return false;
}
@ -172,7 +172,7 @@ s32 func_808F8EB0(EnHorseGameCheck* this, PlayState* play) {
if (player->stateFlags1 & 0x800000) {
D_801BDAA0 = 1;
}
play->nextEntranceIndex = 0xCE20;
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 2);
play->transitionTrigger = TRANS_TRIGGER_START;
return false;
}

View File

@ -216,7 +216,7 @@ void EnHs_DoNothing(EnHs* this, PlayState* play) {
void EnHs_SceneTransitToBunnyHoodDialogue(EnHs* this, PlayState* play) {
if (DECR(this->stateTimer) == 0) {
play->nextEntranceIndex = play->setupExitList[HS_GET_EXIT_INDEX(&this->actor)];
play->nextEntrance = play->setupExitList[HS_GET_EXIT_INDEX(&this->actor)];
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.save.weekEventReg[25] |= 8;
this->actionFunc = EnHs_DoNothing;

View File

@ -819,7 +819,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
case 0x3475:
SET_RACE_FLAGS(RACE_FLAG_START);
func_800FD750(NA_BGM_HORSE);
play->nextEntranceIndex = 0xCE50;
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5);
play->transitionType = TRANS_TYPE_05;
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.save.weekEventReg[57] |= 1;
@ -1066,7 +1066,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
case 0x3475:
SET_RACE_FLAGS(RACE_FLAG_START);
func_800FD750(NA_BGM_HORSE);
play->nextEntranceIndex = 0xCE50;
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5);
play->transitionType = TRANS_TYPE_05;
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.save.weekEventReg[57] |= 1;

View File

@ -1658,10 +1658,10 @@ void func_80B4627C(EnInvadepoh* this, PlayState* play) {
func_80B46F88(this);
}
} else if (D_80B4E940 == 3) {
if (gSaveContext.save.entranceIndex == 0x6460) {
if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 6)) {
func_80B471C0(this);
} else if (gSaveContext.save.entranceIndex == 0x6470) {
} else if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 7)) {
func_80B47248(this);
} else {
func_80B47248(this);
@ -1758,7 +1758,7 @@ void EnInvadepoh_InitRomani(EnInvadepoh* this, PlayState* play) {
}
} else if (temp != 8) {
if (temp == 9) {
if (gSaveContext.save.entranceIndex != 0x6460) {
if (gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 6)) {
Actor_MarkForDeath(&this->actor);
return;
}
@ -1994,7 +1994,7 @@ void func_80B47108(EnInvadepoh* this, PlayState* play) {
}
this->actionTimer--;
if (this->actionTimer <= 0) {
play->nextEntranceIndex = 0x6460;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 6);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_73;
@ -2012,7 +2012,7 @@ void func_80B471C0(EnInvadepoh* this) {
void func_80B471E0(EnInvadepoh* this, PlayState* play) {
if (D_80B4E998) {
play->nextEntranceIndex = 0x6470;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 7);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_72;
@ -2035,7 +2035,7 @@ void func_80B47278(EnInvadepoh* this) {
}
void func_80B47298(EnInvadepoh* this, PlayState* play) {
play->nextEntranceIndex = 0x6400;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0);
gSaveContext.nextCutsceneIndex = 0xFFF3;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_72;

View File

@ -94,7 +94,7 @@ void EnJgameTsn_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.velocity.y = 0.0f;
if (gSaveContext.save.entranceIndex == 0x68D0) {
if (gSaveContext.save.entrance == ENTRANCE(GREAT_BAY_COAST, 13)) {
this->actor.flags |= ACTOR_FLAG_10000;
}
@ -367,7 +367,7 @@ void func_80C144E4(EnJgameTsn* this) {
}
void func_80C144F8(EnJgameTsn* this, PlayState* play) {
play->nextEntranceIndex = 0x68D0;
play->nextEntrance = ENTRANCE(GREAT_BAY_COAST, 13);
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_80;
gSaveContext.nextTransitionType = TRANS_TYPE_03;

View File

@ -929,7 +929,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
if (this->unk204 == 0) {
player = GET_PLAYER(play);
Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateIndexFromSpawn(0), player->unk_3CE,
Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateFromSpawn(0), player->unk_3CE,
0xBFF, &player->unk_3C0, player->unk_3CC);
func_80169EFC(&play->state);

View File

@ -512,7 +512,7 @@ void func_80B41A48(EnKgy* this, PlayState* play) {
if (this->unk_2E4 > 0) {
this->unk_2E4--;
} else {
play->nextEntranceIndex = play->setupExitList[ENKGY_GET_1F(&this->actor)];
play->nextEntrance = play->setupExitList[ENKGY_GET_1F(&this->actor)];
play->transitionTrigger = TRANS_TRIGGER_START;
}
}

View File

@ -295,7 +295,7 @@ void EnLookNuts_SendPlayerToSpawn(EnLookNuts* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(this->spawnIndex);
play->nextEntrance = Entrance_CreateFromSpawn(this->spawnIndex);
gSaveContext.nextCutsceneIndex = 0;
Scene_SetExitFade(play);
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -214,10 +214,10 @@ void EnMa4_Init(Actor* thisx, PlayState* play) {
} else {
EnMa4_InitPath(this, play);
if (gSaveContext.save.entranceIndex == 0x6410) {
if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 1)) {
EnMa4_ChangeAnim(this, 0);
this->state = MA4_STATE_AFTERHORSEBACKGAME;
} else if (gSaveContext.save.entranceIndex == 0x64A0) {
} else if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 10)) {
EnMa4_ChangeAnim(this, 0);
this->state = MA4_STATE_AFTERDESCRIBETHEMCS;
} else {
@ -662,7 +662,7 @@ void EnMa4_SetupBeginHorsebackGame(EnMa4* this) {
}
void EnMa4_BeginHorsebackGame(EnMa4* this, PlayState* play) {
play->nextEntranceIndex = 0x6400;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_80;
@ -753,7 +753,7 @@ void EnMa4_HorsebackGameEnd(EnMa4* this, PlayState* play) {
}
} else if (sFrameCounter == 50) {
play->actorCtx.unk268 = 0;
play->nextEntranceIndex = 0x6410;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 1);
gSaveContext.nextCutsceneIndex = 0;
sFrameCounter = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -859,7 +859,7 @@ void EnMa4_SetupBeginDescribeThemCs(EnMa4* this) {
}
void EnMa4_BeginDescribeThemCs(EnMa4* this, PlayState* play) {
play->nextEntranceIndex = 0x6400;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0);
gSaveContext.nextCutsceneIndex = 0xFFF5;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_64;

View File

@ -1091,11 +1091,9 @@ void EnMaYto_SetupPostMilkRunEnd(EnMaYto* this) {
void EnMaYto_PostMilkRunEnd(EnMaYto* this, PlayState* play) {
if (this->unk310 == 3) {
// Termina Field
play->nextEntranceIndex = 0x54D0;
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 13);
} else {
// Romani Ranch
play->nextEntranceIndex = 0x6480;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 8);
}
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -391,7 +391,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
gSaveContext.gameMode = 2; // Go to FileChoose
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02;
play->nextEntranceIndex = 0x1C00;
play->nextEntrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.save.cutscene = 0;
gSaveContext.sceneSetupIndex = 0;
}

View File

@ -233,7 +233,7 @@ s32 EnMttag_UpdateCheckpoints(EnMttag* this, PlayState* play) {
*/
s32 EnMttag_ExitRace(PlayState* play, s32 transitionType, s32 nextTransitionType) {
CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_SWORD_KOKIRI;
play->nextEntranceIndex = 0xD020;
play->nextEntrance = ENTRANCE(GORON_RACETRACK, 2);
if (gSaveContext.save.weekEventReg[33] & 0x80) {
// Spring
gSaveContext.nextCutsceneIndex = 0xFFF0;
@ -418,7 +418,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
if (((talkState == TEXT_STATE_5 && Message_ShouldAdvance(play)) || talkState == TEXT_STATE_CLOSING)) {
if (this->shouldRestartRace) {
play->nextEntranceIndex = 0xD010;
play->nextEntrance = ENTRANCE(GORON_RACETRACK, 1);
if (gSaveContext.save.weekEventReg[33] & 0x80) {
// Spring
@ -478,7 +478,7 @@ void EnMttag_Init(Actor* thisx, PlayState* play) {
Player* player;
EnMttag* this = THIS;
if (gSaveContext.save.entranceIndex == 0xD010) {
if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) {
player = GET_PLAYER(play);
player->stateFlags1 |= 0x20;
this->raceInitialized = false;

View File

@ -789,17 +789,19 @@ void EnOsn_Init(Actor* thisx, PlayState* play) {
this->unk_1FA = 255;
switch (ENOSN_GET_3(&this->actor)) {
case 0:
if (((gSaveContext.save.entranceIndex == 0xC020) || (gSaveContext.save.entranceIndex == 0xC030)) ||
(gSaveContext.save.entranceIndex == 0xC060)) {
if (((gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 2)) ||
(gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 3))) ||
(gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 6))) {
this->unk_1EA |= 1;
}
this->unk_1F0 = 1;
if (play->sceneNum == SCENE_INSIDETOWER) {
if ((gSaveContext.save.entranceIndex == 0xC020) || (gSaveContext.save.entranceIndex == 0xC060)) {
if ((gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 2)) ||
(gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 6))) {
this->actionFunc = func_80AD16A8;
return;
}
if (gSaveContext.save.entranceIndex == 0xC030) {
if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 3)) {
func_80AD1398(this);
this->actionFunc = func_80AD1634;
return;

View File

@ -155,12 +155,14 @@ void EnPamera_Init(Actor* thisx, PlayState* play) {
func_80BD8658(this);
if (1) {}
if (!(gSaveContext.save.weekEventReg[14] & 4) || (gSaveContext.save.weekEventReg[52] & 0x20) ||
(gSaveContext.save.weekEventReg[75] & 0x20) || (gSaveContext.save.entranceIndex == 0x2090)) {
(gSaveContext.save.weekEventReg[75] & 0x20) || (gSaveContext.save.entrance == ENTRANCE(IKANA_CANYON, 9))) {
Actor_MarkForDeath(&this->actor);
}
if (gSaveContext.save.weekEventReg[61] & 4) {
if (!(gSaveContext.save.weekEventReg[59] & 1) || (gSaveContext.save.entranceIndex != 0x2020)) {
if ((gSaveContext.save.entranceIndex != 0x2020) && (gSaveContext.save.weekEventReg[59] & 1)) {
if (!(gSaveContext.save.weekEventReg[59] & 1) ||
(gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 2))) {
if ((gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 2)) &&
(gSaveContext.save.weekEventReg[59] & 1)) {
gSaveContext.save.weekEventReg[59] &= (u8)~1;
}
func_80BD8700(this);
@ -684,7 +686,7 @@ void func_80BD9B4C(EnPamera* this, PlayState* play) {
}
void func_80BD9C70(EnPamera* this, PlayState* play) {
play->nextEntranceIndex = 0x2020;
play->nextEntrance = ENTRANCE(IKANA_CANYON, 2);
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_70;
gSaveContext.nextTransitionType = TRANS_TYPE_02;

View File

@ -1113,7 +1113,7 @@ void EnRailgibud_InitCutsceneGibdo(EnRailgibud* this, PlayState* play) {
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
if (gSaveContext.save.entranceIndex != 0x2090) { // NOT Cutscene: Music Box House Opens
if (gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 9)) { // NOT Cutscene: Music Box House Opens
Actor_MarkForDeath(&this->actor);
}

View File

@ -724,7 +724,7 @@ void func_80BF4FC4(EnRg* this, PlayState* play) {
void EnRg_Init(Actor* thisx, PlayState* play) {
EnRg* this = THIS;
if (gSaveContext.save.entranceIndex == 0xD010) {
if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
GORON_LIMB_MAX);

View File

@ -260,7 +260,7 @@ s32 func_80AE6704(Actor* thisx, PlayState* play) {
case 6:
gSaveContext.save.weekEventReg[90] &= (u8)~0x40;
func_800B7298(play, &this->actor, 7);
play->nextEntranceIndex = 0x8460;
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 6);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03;
@ -360,7 +360,7 @@ void EnShn_Init(Actor* thisx, PlayState* play) {
this->unk_2E0 = 0;
this->unk_2D8 = 0;
this->unk_1D8 = 0;
if (gSaveContext.save.entranceIndex != 0xA820) {
if (gSaveContext.save.entrance != ENTRANCE(TOURIST_INFORMATION, 2)) {
SubS_UpdateFlags(&this->unk_1D8, 3, 7);
this->unk_2BE = 0;
} else {

View File

@ -222,8 +222,8 @@ Actor* EnSuttari_GetActorById(PlayState* play, s16 actorId) {
return NULL;
}
void EnSuttari_SetNextEntrance(PlayState* play, u16 nextEntranceIndex) {
play->nextEntranceIndex = nextEntranceIndex;
void EnSuttari_TriggerTransition(PlayState* play, u16 entrance) {
play->nextEntrance = entrance;
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -962,7 +962,8 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
if (gSaveContext.save.time >= CLOCK_TIME(0, 20) && gSaveContext.save.time < CLOCK_TIME(6, 00)) {
Actor_MarkForDeath(&this->actor);
}
if ((gSaveContext.save.entranceIndex == 0xD670) || (gSaveContext.save.weekEventReg[58] & 0x40)) {
if ((gSaveContext.save.entrance == ENTRANCE(NORTH_CLOCK_TOWN, 7)) ||
(gSaveContext.save.weekEventReg[58] & 0x40)) {
Actor_MarkForDeath(&this->actor);
}
this->cutscenes[0] = this->actor.cutscene;
@ -1232,7 +1233,7 @@ void func_80BAD380(EnSuttari* this, PlayState* play) {
this->actor.speedXZ = 0.0f;
Audio_QueueSeqCmd(0x101400FF);
this->flags2 |= 4;
EnSuttari_SetNextEntrance(play, 0xD670);
EnSuttari_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7));
} else {
this->unk3F2 = this->headRot.y;
Math_ApproachF(&this->actor.speedXZ, 4.0f, 0.2f, 0.5f);

View File

@ -398,8 +398,8 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
func_80A41FA4(this, play);
} else {
gSaveContext.screenScale = 0.0f;
Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateIndexFromSpawn(0),
player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC);
Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateFromSpawn(0), player->unk_3CE,
0xBFF, &player->unk_3C0, player->unk_3CC);
func_80169EFC(&play->state);
if (player->stateFlags1 & 0x800000) {
EnHorse* rideActor = (EnHorse*)player->rideActor;
@ -440,20 +440,20 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
((gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) ||
(play->sceneNum == SCENE_CLOCKTOWER))) {
s32 playerParams;
u32 entranceIndex = gSaveContext.save.entranceIndex;
u32 entrance = gSaveContext.save.entrance;
if ((play->actorCtx.unk5 & 2)) {
playerParams = 0xCFF;
} else {
playerParams = 0xBFF;
}
Play_SetRespawnData(&play->state, RESPAWN_MODE_RETURN, entranceIndex, player->unk_3CE, playerParams,
Play_SetRespawnData(&play->state, RESPAWN_MODE_RETURN, entrance, player->unk_3CE, playerParams,
&player->unk_3C0, player->unk_3CC);
if ((play->sceneNum == SCENE_TENMON_DAI) || (play->sceneNum == SCENE_00KEIKOKU)) {
play->nextEntranceIndex = 0x5400;
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 0);
} else {
play->nextEntranceIndex = 0xD800;
play->nextEntrance = ENTRANCE(SOUTH_CLOCK_TOWN, 0);
}
gSaveContext.nextCutsceneIndex = 0xFFF1;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -976,11 +976,11 @@ void func_80A92950(EnTest6* this, PlayState* play) {
return;
case 9:
Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entranceIndex & 0xFFFF),
player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC);
Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entrance & 0xFFFF), player->unk_3CE,
0xBFF, &player->unk_3C0, player->unk_3CC);
this->unk_276 = 99;
play->transitionTrigger = TRANS_TRIGGER_START;
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
play->transitionType = TRANS_TYPE_02;
if ((gSaveContext.save.time > CLOCK_TIME(18, 0)) || (gSaveContext.save.time < CLOCK_TIME(6, 0))) {
gSaveContext.respawnFlag = -0x63;
@ -1057,11 +1057,11 @@ void func_80A92950(EnTest6* this, PlayState* play) {
case 9:
if (gSaveContext.save.time > CLOCK_TIME(12, 0)) {
Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entranceIndex & 0xFFFF),
Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entrance & 0xFFFF),
player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC);
this->unk_276 = 99;
play->transitionTrigger = TRANS_TRIGGER_START;
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
play->transitionType = TRANS_TYPE_02;
gSaveContext.respawnFlag = 2;
play->msgCtx.ocarinaMode = 4;

View File

@ -638,7 +638,11 @@ void func_80AF2318(EnTest7* this, PlayState* play) {
}
u16 D_80AF343C[] = {
0x68B0, 0x6A60, 0xB230, 0x9A80, 0xD890, 0x3E40, 0x8640, 0x84A0, 0x2040, 0xAA30,
ENTRANCE(GREAT_BAY_COAST, 11), ENTRANCE(ZORA_CAPE, 6),
ENTRANCE(SNOWHEAD, 3), ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8),
ENTRANCE(SOUTH_CLOCK_TOWN, 9), ENTRANCE(MILK_ROAD, 4),
ENTRANCE(WOODFALL, 4), ENTRANCE(SOUTHERN_SWAMP_POISONED, 10),
ENTRANCE(IKANA_CANYON, 4), ENTRANCE(STONE_TOWER, 3),
};
void func_80AF2350(EnTest7* this, PlayState* play) {
@ -655,17 +659,19 @@ void func_80AF2350(EnTest7* this, PlayState* play) {
this->unk_148.unk_10 -= 0x2EE0;
if (play->sceneNum == SCENE_SECOM) {
play->nextEntranceIndex = 0x2060;
play->nextEntrance = ENTRANCE(IKANA_CANYON, 6);
} else if (ENTEST7_GET(&this->actor) == ENTEST7_26) {
func_80169F78(&play->state);
gSaveContext.respawn[2].playerParams = (gSaveContext.respawn[2].playerParams & 0xFF) | 0x600;
gSaveContext.respawn[RESPAWN_MODE_TOP].playerParams =
(gSaveContext.respawn[RESPAWN_MODE_TOP].playerParams & 0xFF) | 0x600;
gSaveContext.respawnFlag = -6;
} else {
play->nextEntranceIndex = D_80AF343C[ENTEST7_GET(&this->actor) - ENTEST7_1C];
if ((play->nextEntranceIndex == 0x84A0) && (gSaveContext.save.weekEventReg[20] & 2)) {
play->nextEntranceIndex = 0xCA0;
} else if ((play->nextEntranceIndex == 0x9A80) && (gSaveContext.save.weekEventReg[33] & 0x80)) {
play->nextEntranceIndex = 0xAE80;
play->nextEntrance = D_80AF343C[ENTEST7_GET(&this->actor) - ENTEST7_1C];
if ((play->nextEntrance == ENTRANCE(SOUTHERN_SWAMP_POISONED, 10)) && (gSaveContext.save.weekEventReg[20] & 2)) {
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 10);
} else if ((play->nextEntrance == ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8)) &&
(gSaveContext.save.weekEventReg[33] & 0x80)) {
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 8);
}
}

View File

@ -263,7 +263,7 @@ void func_80ACA714(EnTimeTag* this, PlayState* play) {
void func_80ACA724(EnTimeTag* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
play->nextEntranceIndex = play->setupExitList[ENTIMETAG_GET_1F(&this->actor)];
play->nextEntrance = play->setupExitList[ENTIMETAG_GET_1F(&this->actor)];
play->transitionTrigger = TRANS_TRIGGER_START;
if (!ENTIMETAG_GET_E000(&this->actor)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_OC_DOOR_OPEN);

View File

@ -1034,9 +1034,9 @@ void EnTrt_ShopkeeperGone(EnTrt* this, PlayState* play) {
}
if ((talkState == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
if (gSaveContext.save.weekEventReg[20] & 2) {
play->nextEntranceIndex = 0xC50;
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 5);
} else {
play->nextEntranceIndex = 0x8450;
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 5);
}
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;

View File

@ -1105,7 +1105,7 @@ void func_80A881E0(EnTru* this, PlayState* play) {
void EnTru_Init(Actor* thisx, PlayState* play) {
EnTru* this = THIS;
if ((gSaveContext.save.entranceIndex != 0xC200) || (gSaveContext.save.weekEventReg[12] & 8)) {
if ((gSaveContext.save.entrance != 0xC200) || (gSaveContext.save.weekEventReg[12] & 8)) {
Actor_MarkForDeath(&this->actor);
return;
}

View File

@ -373,7 +373,7 @@ void func_80B76A64(EnTruMt* this, PlayState* play) {
void func_80B76BB8(EnTruMt* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) {
play->nextEntranceIndex = 0xA810;
play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 1);
play->transitionType = TRANS_TYPE_03;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -111,8 +111,8 @@ void func_80A66278(EnWarpUzu* this, PlayState* play) {
}
void func_80A66384(EnWarpUzu* this, PlayState* play) {
play->nextEntranceIndex = 0x22A0;
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = play->nextEntranceIndex;
play->nextEntrance = ENTRANCE(PIRATES_FORTRESS, 10);
gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = play->nextEntrance;
func_80169EFC(&play->state);
gSaveContext.respawnFlag = -2;
this->actionFunc = EnWarpUzu_DoNothing;

View File

@ -144,7 +144,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
Player* player;
s32 playerSpawnIndex;
s32 new15E;
s32 entranceIndex;
s32 entrance;
u32 playerSpawnIndexPerForm[PLAYER_FORM_MAX];
u8 playerForm;
s16 playerParams;
@ -192,7 +192,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
playerForm = player->transformation;
}
entranceIndex = gSaveContext.save.entranceIndex;
entrance = gSaveContext.save.entrance;
playerSpawnIndex = playerSpawnIndexPerForm[playerForm];
playerActorEntry = &play->linkActorEntry[playerSpawnIndex];
@ -209,7 +209,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
// why are we getting player home rotation from the room data? doesnt player have home.rot.y?
// especially because we are converting from deg to binang, but isnt home.rot.y already in binang??
Play_SetRespawnData(
&play->state, 0, entranceIndex, // parameter 3 is called "sceneSetup"
&play->state, 0, entrance, // parameter 3 is called "sceneSetup"
play->setupEntranceList[playerSpawnIndex].room, playerParams, &newRespawnPos,
((((playerActorEntry->rot.y >> 7) & 0x1FF) / 180.0f) * 32768.0f)); // DEG_TO_BINANG ?
@ -241,7 +241,7 @@ void EnWarpTag_GrottoReturn(EnWarptag* this, PlayState* play) {
}
if (this->grottoExitDelay++ == 10) {
play->nextEntranceIndex = play->setupExitList[GET_WARPTAG_EXIT_INDEX(&this->dyna.actor)];
play->nextEntrance = play->setupExitList[GET_WARPTAG_EXIT_INDEX(&this->dyna.actor)];
Scene_SetExitFade(play);
play->transitionTrigger = TRANS_TRIGGER_START;
func_8019F128(NA_SE_OC_SECRET_HOLE_OUT);

View File

@ -423,7 +423,7 @@ void func_80BD1DB8(EnZov* this, PlayState* play) {
break;
case 0x1039:
play->nextEntranceIndex = play->setupExitList[ENZOV_GET_FE00(&this->picto.actor)];
play->nextEntrance = play->setupExitList[ENZOV_GET_FE00(&this->picto.actor)];
play->transitionType = TRANS_TYPE_05;
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.save.weekEventReg[78] |= 1;

View File

@ -441,7 +441,7 @@ void func_80BA3344(ObjNozoki* this, PlayState* play) {
ObjNozoki_SetupAction(this, func_80BA3230);
}
} else if ((this->dyna.actor.textId == 0) || Actor_TextboxIsClosing(&this->dyna.actor, play)) {
play->nextEntranceIndex = 0xE20;
play->nextEntrance = ENTRANCE(CURIOSITY_SHOP, 2);
play->transitionTrigger = TRANS_TRIGGER_START;
}
}

View File

@ -457,7 +457,7 @@ void ObjTokeidai_TowerOpening_EndCutscene(ObjTokeidai* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
gSaveContext.respawnFlag = 2;
play->transitionTrigger = TRANS_TRIGGER_START;
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
play->transitionType = TRANS_TYPE_02;
if (gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams == 0xCFF) {
gSaveContext.nextTransitionType = TRANS_TYPE_21;

View File

@ -498,7 +498,7 @@ void func_809289E4(ObjTsubo* this, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_10;
}
}
if ((this->actor.xzDistToPlayer < 800.0f) || (gSaveContext.save.entranceIndex == 0xD010)) {
if ((this->actor.xzDistToPlayer < 800.0f) || (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1))) {
Collider_UpdateCylinder(&this->actor, &this->cylinderCollider);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->cylinderCollider.base);
if (this->actor.xzDistToPlayer < 150.0f) {

View File

@ -833,7 +833,7 @@ s32 func_80B795A0(PlayState* play, ObjUm* this, s32 arg2) {
player = GET_PLAYER(play);
func_8019F208();
gSaveContext.save.weekEventReg[31] |= 0x80;
play->nextEntranceIndex = 0x64B0;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 11);
if (player->stateFlags1 & PLAYER_STATE1_800000) {
D_801BDAA0 = 1;
}
@ -1140,7 +1140,7 @@ void ObjUm_RanchWaitPathFinished(ObjUm* this, PlayState* play) {
case OBJUM_PATH_STATE_FINISH:
if (gSaveContext.save.weekEventReg[31] & 0x80) {
ActorCutscene_Stop(this->dyna.actor.cutscene);
play->nextEntranceIndex = 0x3E50;
play->nextEntrance = ENTRANCE(MILK_ROAD, 5);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -1243,7 +1243,7 @@ void func_80B7A2AC(ObjUm* this, PlayState* play) {
switch (ObjUm_UpdatePath(this, play)) {
case OBJUM_PATH_STATE_1:
case OBJUM_PATH_STATE_FINISH:
play->nextEntranceIndex = 0xCE40;
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 4);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -1301,14 +1301,14 @@ void ObjUm_RunMinigame(ObjUm* this, PlayState* play) {
if (!(gSaveContext.save.weekEventReg[52] & 1) && !(gSaveContext.save.weekEventReg[52] & 2)) {
if (!this->areAllPotsBroken) {
play->nextEntranceIndex = 0x3E60;
play->nextEntrance = ENTRANCE(MILK_ROAD, 6);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.save.weekEventReg[52] |= 1;
gSaveContext.save.weekEventReg[52] &= (u8)~2;
} else {
play->nextEntranceIndex = 0x6480;
play->nextEntrance = ENTRANCE(ROMANI_RANCH, 8);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -1550,7 +1550,7 @@ void ObjUm_PostMilkRunWaitPathFinished(ObjUm* this, PlayState* play) {
Audio_SetCutsceneFlag(false);
gSaveContext.save.weekEventReg[59] |= 2;
gSaveContext.nextCutsceneIndex = 0xFFF3;
play->nextEntranceIndex = 0x5400;
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 0);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -112,10 +112,10 @@ void func_808A7C78(ObjWturn* this, PlayState* play) {
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
gSaveContext.nextCutsceneIndex = 0;
if (play->sceneNum == 0x58) {
play->nextEntranceIndex = 0xAC00;
if (play->sceneNum == SCENE_F40) {
play->nextEntrance = ENTRANCE(STONE_TOWER_INVERTED, 0);
} else {
play->nextEntranceIndex = 0xAA10;
play->nextEntrance = ENTRANCE(STONE_TOWER, 1);
}
play->transitionTrigger = TRANS_TRIGGER_START;
}

View File

@ -7,7 +7,7 @@
#include "z_opening.h"
void Opening_SetupForTitleCutscene(OpeningContext* this) {
static s32 openingEntrances[] = { 0x1C00, 0x1C10 };
static s32 openingEntrances[] = { ENTRANCE(CUTSCENE, 0), ENTRANCE(CUTSCENE, 1) };
static s32 openingCutscenes[] = { 0xFFFA, 0xFFFA };
gSaveContext.eventInf[1] &= (u8)~0x80;
@ -15,7 +15,7 @@ void Opening_SetupForTitleCutscene(OpeningContext* this) {
Sram_InitNewSave();
gSaveContext.save.entranceIndex = openingEntrances[D_801BB12C];
gSaveContext.save.entrance = openingEntrances[D_801BB12C];
gSaveContext.nextCutsceneIndex = gSaveContext.save.cutscene = openingCutscenes[D_801BB12C];
gSaveContext.sceneSetupIndex = 0;
@ -57,8 +57,8 @@ void Opening_Init(GameState* thisx) {
this->gameState.destroy = Opening_Destroy;
gSaveContext.respawnFlag = 0;
gSaveContext.respawn[RESPAWN_MODE_GORON].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_ZORA].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_DEKU].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_HUMAN].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_GORON].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_ZORA].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF;
}

View File

@ -17,7 +17,7 @@ void MapSelect_LoadTitle(MapSelectState* this) {
SET_NEXT_GAMESTATE(&this->state, Title_Init, TitleContext);
}
void MapSelect_LoadGame(MapSelectState* this, u32 entranceIndex, s32 opt) {
void MapSelect_LoadGame(MapSelectState* this, u32 entrance, s32 spawn) {
if (gSaveContext.fileNum == 0xFF) {
Sram_InitDebugSave();
}
@ -33,26 +33,26 @@ void MapSelect_LoadGame(MapSelectState* this, u32 entranceIndex, s32 opt) {
gSaveContext.unk_3F24 = 0;
Audio_QueueSeqCmd(NA_BGM_STOP);
gSaveContext.save.entranceIndex = entranceIndex;
gSaveContext.save.entrance = entrance;
if (opt != 0) {
gSaveContext.save.entranceIndex =
Entrance_CreateIndex((s32)gSaveContext.save.entranceIndex >> 9, opt, gSaveContext.save.entranceIndex & 0xF);
if (spawn != 0) {
gSaveContext.save.entrance =
Entrance_Create((s32)gSaveContext.save.entrance >> 9, spawn, gSaveContext.save.entrance & 0xF);
}
if (gSaveContext.save.entranceIndex == 0xC000) {
if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 0)) {
gSaveContext.save.day = 0;
gSaveContext.save.time = CLOCK_TIME(6, 0) - 1;
}
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = 0xFFFF;
gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = 0xFFFF;
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
gSaveContext.nightSeqIndex = 0xFF;
gSaveContext.showTitleCard = true;
gSaveContext.respawnFlag = 0;
gSaveContext.respawn[RESPAWN_MODE_GORON].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_ZORA].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_DEKU].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_HUMAN].entranceIndex = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_GORON].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_ZORA].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF;
gWeatherMode = 0;
do {
@ -65,434 +65,443 @@ void MapSelect_LoadGame(MapSelectState* this, u32 entranceIndex, s32 opt) {
// "Translation" (Actual name)
static SceneSelectEntry sScenes[] = {
// "0: OP Woods for Cutscene Use" (Forest Opening Scene)
{ " 0:OP" GFXP_KATAKANA "デモ" GFXP_HIRAGANA "ヨウ シンリン", MapSelect_LoadGame, 0x1C00 },
{ " 0:OP" GFXP_KATAKANA "デモ" GFXP_HIRAGANA "ヨウ シンリン", MapSelect_LoadGame, ENTRANCE(CUTSCENE, 0) },
// "0-0: Lost Woods" (Lost Woods)
{ " 0-0:" GFXP_HIRAGANA "マヨイ ノ モリ", MapSelect_LoadGame, 0xC400 },
{ " 0-0:" GFXP_HIRAGANA "マヨイ ノ モリ", MapSelect_LoadGame, ENTRANCE(LOST_WOODS, 0) },
// "1: Town Outskirts" (Termina Field)
{ " 1:" GFXP_KATAKANA "タウン " GFXP_HIRAGANA "コウガイ", MapSelect_LoadGame, 0x5400 },
{ " 1:" GFXP_KATAKANA "タウン " GFXP_HIRAGANA "コウガイ", MapSelect_LoadGame, ENTRANCE(TERMINA_FIELD, 0) },
// "1-0: Astral Observatory" (Astral Observatory)
{ " 1-0:" GFXP_HIRAGANA "テンモンカンソクジョ", MapSelect_LoadGame, 0x4C00 },
{ " 1-0:" GFXP_HIRAGANA "テンモンカンソクジョ", MapSelect_LoadGame, ENTRANCE(ASTRAL_OBSERVATORY, 0) },
// "1-1: Astral Observatory Telescope" (Astral Observatory - Telescope)
{ " 1-1:" GFXP_HIRAGANA "テンモンカンソクジョ デ ボウエンキョウ", MapSelect_LoadGame, 0x54A0 },
{ " 1-1:" GFXP_HIRAGANA "テンモンカンソクジョ デ ボウエンキョウ", MapSelect_LoadGame, ENTRANCE(TERMINA_FIELD, 10) },
// "1-2: Ikana Graveyard" (Ikana Canyon Graveyard)
{ " 1-2:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ノ ハカバ", MapSelect_LoadGame, 0x8000 },
{ " 1-2:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ノ ハカバ", MapSelect_LoadGame, ENTRANCE(IKANA_GRAVEYARD, 0) },
// "2: Romani Ranch" (Romani Ranch)
{ " 2:" GFXP_KATAKANA "ロマニー " GFXP_HIRAGANA "ボクジョウ", MapSelect_LoadGame, 0x6400 },
{ " 2:" GFXP_KATAKANA "ロマニー " GFXP_HIRAGANA "ボクジョウ", MapSelect_LoadGame, ENTRANCE(ROMANI_RANCH, 0) },
// "3: Milk Road" (Milk Road)
{ " 3:" GFXP_KATAKANA "ミルクロード", MapSelect_LoadGame, 0x3E00 },
{ " 3:" GFXP_KATAKANA "ミルクロード", MapSelect_LoadGame, ENTRANCE(MILK_ROAD, 0) },
// "4: Main Building" ("Ranch House)
{ " 4:" GFXP_HIRAGANA "オモヤ", MapSelect_LoadGame, 0x610 },
{ " 4:" GFXP_HIRAGANA "オモヤ", MapSelect_LoadGame, ENTRANCE(RANCH_HOUSE, 1) },
// "5: Cow Shed" (Cow Shed)
{ " 5:" GFXP_HIRAGANA "ウシゴヤ", MapSelect_LoadGame, 0x600 },
{ " 5:" GFXP_HIRAGANA "ウシゴヤ", MapSelect_LoadGame, ENTRANCE(RANCH_HOUSE, 0) },
// "6: Cucco Shed" (Cucco Shed)
{ " 6:" GFXP_KATAKANA "コッコ " GFXP_HIRAGANA "ゴヤ", MapSelect_LoadGame, 0x7E00 },
{ " 6:" GFXP_KATAKANA "コッコ " GFXP_HIRAGANA "ゴヤ", MapSelect_LoadGame, ENTRANCE(CUCCO_SHACK, 0) },
// "7: Dog Racing Area" (Doggy Racetrack)
{ " 7:" GFXP_KATAKANA "ドッグレース" GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, 0x7C00 },
{ " 7:" GFXP_KATAKANA "ドッグレース" GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, ENTRANCE(DOGGY_RACETRACK, 0) },
// "8: Gorman Track" (Gorman Track)
{ " 8:" GFXP_KATAKANA "ゴーマン トラック", MapSelect_LoadGame, 0xCE00 },
{ " 8:" GFXP_KATAKANA "ゴーマン トラック", MapSelect_LoadGame, ENTRANCE(GORMAN_TRACK, 0) },
// "10: Mountain Village -Winter-" (Mountain Village - Winter)
{ " 10:" GFXP_HIRAGANA "ヤマザト -フユ-", MapSelect_LoadGame, 0x9A00 },
{ " 10:" GFXP_HIRAGANA "ヤマザト -フユ-", MapSelect_LoadGame, ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 0) },
// "10-0: Mountain Village -Spring-" (Mountain Village - Spring)
{ " 10-0:" GFXP_HIRAGANA "ヤマザト -ハル-", MapSelect_LoadGame, 0xAE00 },
{ " 10-0:" GFXP_HIRAGANA "ヤマザト -ハル-", MapSelect_LoadGame, ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 0) },
// "10-1: Mountain Village Blacksmith" (Mountain Smithy)
{ " 10-1:" GFXP_HIRAGANA "ヤマザト ノ カジヤ", MapSelect_LoadGame, 0x5200 },
{ " 10-1:" GFXP_HIRAGANA "ヤマザト ノ カジヤ", MapSelect_LoadGame, ENTRANCE(MOUNTAIN_SMITHY, 0) },
// "11: Goron Village -Winter-" (Goron Village - Winter)
{ " 11:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -フユ-", MapSelect_LoadGame, 0x9400 },
{ " 11:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -フユ-", MapSelect_LoadGame, ENTRANCE(GORON_VILLAGE_WINTER, 0) },
// "11-0: Goron Village -Spring-" (Goron Village - Spring)
{ " 11-0:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -ハル-", MapSelect_LoadGame, 0x8A00 },
{ " 11-0:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -ハル-", MapSelect_LoadGame, ENTRANCE(GORON_VILLAGE_SPRING, 0) },
// "11-1: Goron Shrine" (Goron Shrine)
{ " 11-1:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ ホコラ", MapSelect_LoadGame, 0x5E00 },
{ " 11-1:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ ホコラ", MapSelect_LoadGame, ENTRANCE(GORON_SHRINE, 0) },
// "11-2: Lone Peak Shrine" (Lone Peak Shrine)
{ " 11-2:" GFXP_HIRAGANA "ハナレヤマ ノ ホコラ", MapSelect_LoadGame, 0x1500 },
{ " 11-2:" GFXP_HIRAGANA "ハナレヤマ ノ ホコラ", MapSelect_LoadGame, ENTRANCE(GROTTOS, 16) },
// "11-3: Goron Shop" (Goron Shop)
{ " 11-3:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, 0x7400 },
{ " 11-3:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, ENTRANCE(GORON_SHOP, 0) },
// "12: Snowhead" (Snowhead)
{ " 12:" GFXP_KATAKANA "スノーヘッド", MapSelect_LoadGame, 0xB200 },
{ " 12:" GFXP_KATAKANA "スノーヘッド", MapSelect_LoadGame, ENTRANCE(SNOWHEAD, 0) },
// "13: Blizzard Path" (Path to Goron Village - Part 1)
{ " 13:" GFXP_HIRAGANA "フブキ ノ ミチ", MapSelect_LoadGame, 0x3200 },
{ " 13:" GFXP_HIRAGANA "フブキ ノ ミチ", MapSelect_LoadGame, ENTRANCE(PATH_TO_MOUNTAIN_VILLAGE, 0) },
// "14: Snowball Path" (Path to Goron Village - Part 2)
{ " 14:" GFXP_HIRAGANA "ユキダマ ノ ミチ", MapSelect_LoadGame, 0xB000 },
{ " 14:" GFXP_HIRAGANA "ユキダマ ノ ミチ", MapSelect_LoadGame, ENTRANCE(PATH_TO_SNOWHEAD, 0) },
// "15: Goron Racetrack" (Goron Racetrack)
{ " 15:" GFXP_KATAKANA "ゴロンレース " GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, 0xD000 },
{ " 15:" GFXP_KATAKANA "ゴロンレース " GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, ENTRANCE(GORON_RACETRACK, 0) },
// "16: Goron Grave" (Darmani's Grave)
{ " 16:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ハカ", MapSelect_LoadGame, 0x9600 },
{ " 16:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ハカ", MapSelect_LoadGame, ENTRANCE(GORON_GRAVERYARD, 0) },
// "17: Snow Field Battle -Winter-" (Path to Goron Village - Winter)
{ " 17:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-フユ-", MapSelect_LoadGame, 0xB400 },
{ " 17:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-フユ-", MapSelect_LoadGame,
ENTRANCE(PATH_TO_GORON_VILLAGE_WINTER, 0) },
// "17-0: Snow Field Battle -Spring-" (Path to Goron Village - Spring)
{ " 17-0:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-ハル-", MapSelect_LoadGame, 0xB600 },
{ " 17-0:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-ハル-", MapSelect_LoadGame,
ENTRANCE(PATH_TO_GORON_VILLAGE_SPRING, 0) },
// "20: Swampland" (Southern Swamp)
{ " 20:" GFXP_HIRAGANA "ヌマチ", MapSelect_LoadGame, 0x8400 },
{ " 20:" GFXP_HIRAGANA "ヌマチ", MapSelect_LoadGame, ENTRANCE(SOUTHERN_SWAMP_POISONED, 0) },
// "20-0: Swampland - Afterwards" (Southern Swamp - After Odolwa)
{ " 20-0:" GFXP_HIRAGANA "ヌマチ ソノゴ", MapSelect_LoadGame, 0xC00 },
{ " 20-0:" GFXP_HIRAGANA "ヌマチ ソノゴ", MapSelect_LoadGame, ENTRANCE(SOUTHERN_SWAMP_CLEARED, 0) },
// "20-1: Swamp Tourist Information" (Tourist Information)
{ " 20-1:" GFXP_HIRAGANA "ヌマ ノ カンコウアンナイ", MapSelect_LoadGame, 0xA800 },
{ " 20-1:" GFXP_HIRAGANA "ヌマ ノ カンコウアンナイ", MapSelect_LoadGame, ENTRANCE(TOURIST_INFORMATION, 0) },
// "20-2: Magic Hags' Potion Shop" (Magic Hags' Potion Shop)
{ " 20-2:" GFXP_HIRAGANA "マホウオババ ノ クスリヤ", MapSelect_LoadGame, 0x400 },
{ " 20-2:" GFXP_HIRAGANA "マホウオババ ノ クスリヤ", MapSelect_LoadGame, ENTRANCE(MAGIC_HAGS_POTION_SHOP, 0) },
// "21: Wood Mountain" (Woodfall)
{ " 21:" GFXP_KATAKANA "ウッドマウンテン", MapSelect_LoadGame, 0x8600 },
{ " 21:" GFXP_KATAKANA "ウッドマウンテン", MapSelect_LoadGame, ENTRANCE(WOODFALL, 0) },
// "21-0: Deku Princess's Prison" (Deku Princess's Prison Cutscene: Tatl Apologizes)
{ " 21-0:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "ヒメ ノ ロウヤ", MapSelect_LoadGame, 0x3010 },
{ " 21-0:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "ヒメ ノ ロウヤ", MapSelect_LoadGame, ENTRANCE(WOODFALL_TEMPLE, 1) },
// "22: Deku Castle" (Deku Palace)
{ " 22:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ シロ", MapSelect_LoadGame, 0x5000 },
{ " 22:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ シロ", MapSelect_LoadGame, ENTRANCE(DEKU_PALACE, 0) },
// "22-0: Boe Hole 0" (Deku Palace Grotto 0 - Deku Baba & Butterflies, Entrance 1)
{ " 22-0:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ0", MapSelect_LoadGame, 0x1460 },
{ " 22-0:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ0", MapSelect_LoadGame, ENTRANCE(GROTTOS, 6) },
// "22-1: Boe Hole 1" (Deku Palace Grotto 1 - Deku Baba & Butterflies, Entrance 2)
{ " 22-1:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ1", MapSelect_LoadGame, 0x14E0 },
{ " 22-1:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ1", MapSelect_LoadGame, ENTRANCE(GROTTOS, 14) },
// "22-2: Boe Hole 2" (Deku Palace Grotto 2 - Skullwalltula Wall, Lower Entrance)
{ " 22-2:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ2", MapSelect_LoadGame, 0x1480 },
{ " 22-2:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ2", MapSelect_LoadGame, ENTRANCE(GROTTOS, 8) },
// "22-3: Boe Hole 3" (Deku Palace Grotto 3 - Skullwalltula Wall, Upper Entrance)
{ " 22-3:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ3", MapSelect_LoadGame, 0x14F0 },
{ " 22-3:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ3", MapSelect_LoadGame, ENTRANCE(GROTTOS, 15) },
// "22-4: Boe Hole 4" (Deku Palace Grotto 4 - Bean Seller)
{ " 22-4:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ4", MapSelect_LoadGame, 0x14C0 },
{ " 22-4:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ4", MapSelect_LoadGame, ENTRANCE(GROTTOS, 12) },
// "24: Beast Path" (Road to Swamp)
{ " 24:" GFXP_HIRAGANA "ケモノミチ", MapSelect_LoadGame, 0x7A00 },
{ " 24:" GFXP_HIRAGANA "ケモノミチ", MapSelect_LoadGame, ENTRANCE(ROAD_TO_SOUTHERN_SWAMP, 0) },
// "24-0: Forest Shooting Gallery" (Swamp Shooting Gallery)
{ " 24-0:" GFXP_HIRAGANA "モリ ノ シャテキジョウ", MapSelect_LoadGame, 0x4200 },
{ " 24-0:" GFXP_HIRAGANA "モリ ノ シャテキジョウ", MapSelect_LoadGame, ENTRANCE(SWAMP_SHOOTING_GALLERY, 0) },
// "25: Deku King's Chamber" (Deku Palace Throne Room)
{ " 25:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "オウ ノ マ", MapSelect_LoadGame, 0x7600 },
{ " 25:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "オウ ノ マ", MapSelect_LoadGame, ENTRANCE(DEKU_KINGS_CHAMBER, 0) },
// "26: Woods of Mystery" (Woods of Mystery)
{ " 26:" GFXP_HIRAGANA "フシギ ノ モリ", MapSelect_LoadGame, 0xC200 },
{ " 26:" GFXP_HIRAGANA "フシギ ノ モリ", MapSelect_LoadGame, ENTRANCE(WOODS_OF_MYSTERY, 0) },
// "30: Great Bay Coast" (Great Bay Coast - Entrance Area)
{ " 30:" GFXP_KATAKANA "グレートベイ" GFXP_HIRAGANA " ノ カイガン", MapSelect_LoadGame, 0x6800 },
{ " 30:" GFXP_KATAKANA "グレートベイ" GFXP_HIRAGANA " ノ カイガン", MapSelect_LoadGame, ENTRANCE(GREAT_BAY_COAST, 0) },
// "30-0: Ocean Laboratory" (Marine Research Lab)
{ " 30-0:" GFXP_HIRAGANA "カイヨウ ケンキュウジョ", MapSelect_LoadGame, 0x5800 },
{ " 30-0:" GFXP_HIRAGANA "カイヨウ ケンキュウジョ", MapSelect_LoadGame, ENTRANCE(MARINE_RESEARCH_LAB, 0) },
// "30-1: Fisherman's House" (Fisherman's Hut)
{ " 30-1:" GFXP_HIRAGANA "リョウシ ノ イエ", MapSelect_LoadGame, 0x7200 },
{ " 30-1:" GFXP_HIRAGANA "リョウシ ノ イエ", MapSelect_LoadGame, ENTRANCE(FISHERMANS_HUT, 0) },
// "30-2: Pointed Rock" (Twin Pillars)
{ " 30-2:" GFXP_HIRAGANA "トンガリ イワ", MapSelect_LoadGame, 0x4400 },
{ " 30-2:" GFXP_HIRAGANA "トンガリ イワ", MapSelect_LoadGame, ENTRANCE(PINNACLE_ROCK, 0) },
// "31: Cape" (Great Bay Coast - River Area)
{ " 31:" GFXP_HIRAGANA "ミサキ", MapSelect_LoadGame, 0x6A00 },
{ " 31:" GFXP_HIRAGANA "ミサキ", MapSelect_LoadGame, ENTRANCE(ZORA_CAPE, 0) },
// "32: Outside of Pirates' Fortress" (Pirates' Fortress - Exterior)
{ " 32:" GFXP_HIRAGANA "カイゾクノトリデマエ", MapSelect_LoadGame, 0x7000 },
{ " 32:" GFXP_HIRAGANA "カイゾクノトリデマエ", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_EXTERIOR, 0) },
// "32-0: Pirates' Fortress" (Pirates' Fortress - Courtyard)
{ " 32-0:" GFXP_HIRAGANA "カイゾクノトリデ", MapSelect_LoadGame, 0x2200 },
{ " 32-0:" GFXP_HIRAGANA "カイゾクノトリデ", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS, 0) },
// "32-1: Pirates' Fortress - Telescope" (Pirates' Fortress - Secret Entrance, Looking Through Telescope)
{ " 32-1:" GFXP_HIRAGANA "カイゾクノトリデ ボウエンキョウ", MapSelect_LoadGame, 0x22A0 },
{ " 32-1:" GFXP_HIRAGANA "カイゾクノトリデ ボウエンキョウ", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS, 10) },
// "32-2: Pirates' Fortress - Interior 0" (Pirates' Fortress - Throne Room)
{ " 32-2:" GFXP_HIRAGANA "カイゾクノトリデナイブ0", MapSelect_LoadGame, 0x4000 },
{ " 32-2:" GFXP_HIRAGANA "カイゾクノトリデナイブ0", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 0) },
// "32-3: Pirates' Fortress - Interior 1" (Pirates' Fortress - View of Throne Room, Wasp Nest)
{ " 32-3:" GFXP_HIRAGANA "カイゾクノトリデナイブ1", MapSelect_LoadGame, 0x4010 },
{ " 32-3:" GFXP_HIRAGANA "カイゾクノトリデナイブ1", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 1) },
// "32-4: Pirates' Fortress - Interior 2" (Pirates' Fortress - Tempting Treasure Chest, Leading to 32-5)
{ " 32-4:" GFXP_HIRAGANA "カイゾクノトリデナイブ2", MapSelect_LoadGame, 0x4020 },
{ " 32-4:" GFXP_HIRAGANA "カイゾクノトリデナイブ2", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 2) },
// "32-5: Pirates' Fortress - Interior 3" (Pirates' Fortress - Zora Egg Room, One Shell Blade)
{ " 32-5:" GFXP_HIRAGANA "カイゾクノトリデナイブ3", MapSelect_LoadGame, 0x4030 },
{ " 32-5:" GFXP_HIRAGANA "カイゾクノトリデナイブ3", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 3) },
// "32-6: Pirates' Fortress - Interior 4" (Pirates' Fortress - Oil Drum Room, Leading to 32-7)
{ " 32-6:" GFXP_HIRAGANA "カイゾクノトリデナイブ4", MapSelect_LoadGame, 0x4040 },
{ " 32-6:" GFXP_HIRAGANA "カイゾクノトリデナイブ4", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 4) },
// "32-7: Pirates' Fortress - Interior 5" (Pirates' Fortress - Zora Egg Room, One Shell Blade)
{ " 32-7:" GFXP_HIRAGANA "カイゾクノトリデナイブ5", MapSelect_LoadGame, 0x4050 },
{ " 32-7:" GFXP_HIRAGANA "カイゾクノトリデナイブ5", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 5) },
// "32-8: Pirates' Fortress - Interior 6" (Pirates' Fortress - Fenced Indoor Walkway, Leading to 32-9)
{ " 32-8:" GFXP_HIRAGANA "カイゾクノトリデナイブ6", MapSelect_LoadGame, 0x4060 },
{ " 32-8:" GFXP_HIRAGANA "カイゾクノトリデナイブ6", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 6) },
// "32-9: Pirates' Fortress - Interior 7" (Pirates' Fortress - Zora Egg Room, One Desbreko & Treasure Chest)
{ " 32-9:" GFXP_HIRAGANA "カイゾクノトリデナイブ7", MapSelect_LoadGame, 0x4070 },
{ " 32-9:" GFXP_HIRAGANA "カイゾクノトリデナイブ7", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 7) },
// "32-10: Pirates' Fortress - Interior 8" (Pirates' Fortress - End of Secret Entrance: Telescope Room)
{ " 32-10:" GFXP_HIRAGANA "カイゾクノトリデナイブ8", MapSelect_LoadGame, 0x4080 },
{ " 32-10:" GFXP_HIRAGANA "カイゾクノトリデナイブ8", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 8) },
// "32-11: Pirates' Fortress - Interior 9" (Pirates' Fortress - Start of Secret Entrance)
{ " 32-11:" GFXP_HIRAGANA "カイゾクノトリデナイブ9", MapSelect_LoadGame, 0x4090 },
{ " 32-11:" GFXP_HIRAGANA "カイゾクノトリデナイブ9", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 9) },
// "33: Zora Shrine" (Zora Hall)
{ " 33:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, 0x6000 },
{ " 33:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, ENTRANCE(ZORA_HALL, 0) },
// "33-0: Zora Shop" (Zora Shop)
{ " 33-0:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, 0x9250 },
{ " 33-0:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, ENTRANCE(ZORA_HALL_ROOMS, 5) },
// "33-1: Zora Waiting Room" (Mikau & Tijo's Room)
{ " 33-1:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ヒカエシツ", MapSelect_LoadGame, 0x9200 },
{ " 33-1:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ヒカエシツ", MapSelect_LoadGame, ENTRANCE(ZORA_HALL_ROOMS, 0) },
// "34: Great Bay" (Great Bay Cutscene: Pirates Approach Temple)
{ " 34:" GFXP_KATAKANA "グレートベイ", MapSelect_LoadGame, 0xBE00 },
{ " 34:" GFXP_KATAKANA "グレートベイ", MapSelect_LoadGame, ENTRANCE(GREAT_BAY_CUTSCENE, 0) },
// "35: Mountain Stream Above Falls" (Waterfall Rapids)
{ " 35:" GFXP_HIRAGANA "タキウエ ノ ケイリュウ", MapSelect_LoadGame, 0x8E00 },
{ " 35:" GFXP_HIRAGANA "タキウエ ノ ケイリュウ", MapSelect_LoadGame, ENTRANCE(WATERFALL_RAPIDS, 0) },
// "40: Rock Building Shaft" (Stone Tower)
{ " 40:" GFXP_KATAKANA "ロックビル" GFXP_HIRAGANA " ノ タテアナ", MapSelect_LoadGame, 0xAA00 },
{ " 40:" GFXP_KATAKANA "ロックビル" GFXP_HIRAGANA " ノ タテアナ", MapSelect_LoadGame, ENTRANCE(STONE_TOWER, 0) },
// "40-0: Heaven & Earth Are Overturned" (Stone Tower Cutscene: Tower is Flipped)
{ " 40-0:" GFXP_HIRAGANA "テンチ ギャクテン", MapSelect_LoadGame, 0xAC00 },
{ " 40-0:" GFXP_HIRAGANA "テンチ ギャクテン", MapSelect_LoadGame, ENTRANCE(STONE_TOWER_INVERTED, 0) },
// "41: Road to Ikana" (Road to Ikana)
{ " 41:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ヘノ ミチ", MapSelect_LoadGame, 0xA000 },
{ " 41:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ヘノ ミチ", MapSelect_LoadGame, ENTRANCE(ROAD_TO_IKANA, 0) },
// "42: Ancient Castle of Ikana" (Ancient Castle of Ikana)
{ " 42:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " コジョウ", MapSelect_LoadGame, 0x3400 },
{ " 42:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " コジョウ", MapSelect_LoadGame, ENTRANCE(IKANA_CASTLE, 0) },
// "42-0: Ancient Castle of Ikana - Interior" (Ancient Castle of Ikana - Interior)
{ " 42-0:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " ノ コジョウ ナイブ", MapSelect_LoadGame, 0x3430 },
{ " 42-0:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " ノ コジョウ ナイブ", MapSelect_LoadGame, ENTRANCE(IKANA_CASTLE, 3) },
// "42-B: Ancient Castle of Ikana - Boss Room" (Ikana King's Throne)
{ " 42-B:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " ノ コジョウ " GFXP_KATAKANA "ボス" GFXP_HIRAGANA "ベヤ",
MapSelect_LoadGame, 0xA600 },
MapSelect_LoadGame, ENTRANCE(IGOS_DU_IKANAS_LAIR, 0) },
// "43: Ikana Canyon" (Ikana Canyon)
{ " 43:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク", MapSelect_LoadGame, 0x2000 },
{ " 43:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク", MapSelect_LoadGame, ENTRANCE(IKANA_CANYON, 0) },
// "43-0: Ikana Canyon Cave" (Sharp's Cave)
{ " 43-0:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク ドウクツ", MapSelect_LoadGame, 0x20E0 },
{ " 43-0:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク ドウクツ", MapSelect_LoadGame, ENTRANCE(IKANA_CANYON, 14) },
// "43-1: Secom's House" (Sakon's Hideout)
{ " 43-1:" GFXP_KATAKANA "セコム " GFXP_HIRAGANA "ノ イエ", MapSelect_LoadGame, 0x9800 },
{ " 43-1:" GFXP_KATAKANA "セコム " GFXP_HIRAGANA "ノ イエ", MapSelect_LoadGame, ENTRANCE(SAKONS_HIDEOUT, 0) },
// "43-2: Music Box House" (Music Box House)
{ " 43-2:" GFXP_KATAKANA "オルゴール ハウス", MapSelect_LoadGame, 0xA400 },
{ " 43-2:" GFXP_KATAKANA "オルゴール ハウス", MapSelect_LoadGame, ENTRANCE(MUSIC_BOX_HOUSE, 0) },
// "50: Clock Town -East-" (East Clock Town)
{ " 50:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ヒガシ-", MapSelect_LoadGame, 0xD200 },
{ " 50:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ヒガシ-", MapSelect_LoadGame, ENTRANCE(EAST_CLOCK_TOWN, 0) },
// "50-0: Town Target Range" (Shooting Gallery)
{ " 50-0:" GFXP_HIRAGANA "マチ ノ シャテキジョウ", MapSelect_LoadGame, 0x3A00 },
{ " 50-0:" GFXP_HIRAGANA "マチ ノ シャテキジョウ", MapSelect_LoadGame, ENTRANCE(TOWN_SHOOTING_GALLERY, 0) },
// "50-1: Honey and Darling's Shop" (Honey & Darling's Shop)
{ " 50-1:" GFXP_KATAKANA "ハニー アンド ダーリン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, 0x800 },
{ " 50-1:" GFXP_KATAKANA "ハニー アンド ダーリン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame,
ENTRANCE(HONEY_AND_DARLINGS_SHOP, 0) },
// "50-2: Treasure Chest Shop" (Treasure Chest Shop)
{ " 50-2:" GFXP_HIRAGANA "タカラバコヤ", MapSelect_LoadGame, 0x2800 },
{ " 50-2:" GFXP_HIRAGANA "タカラバコヤ", MapSelect_LoadGame, ENTRANCE(TREASURE_CHEST_SHOP, 0) },
// "50-3: Pots 'n' Pans Inn" (Stockpot Inn)
{ " 50-3:" GFXP_KATAKANA "ナベ" GFXP_HIRAGANA "カマ テイ", MapSelect_LoadGame, 0xBC00 },
{ " 50-3:" GFXP_KATAKANA "ナベ" GFXP_HIRAGANA "カマ テイ", MapSelect_LoadGame, ENTRANCE(STOCK_POT_INN, 0) },
// "50-4: Mayor's House" (The Mayor's Residence)
{ " 50-4:" GFXP_HIRAGANA "チョウチョウ ノ イエ", MapSelect_LoadGame, 0 },
{ " 50-4:" GFXP_HIRAGANA "チョウチョウ ノ イエ", MapSelect_LoadGame, ENTRANCE(MAYORS_RESIDENCE, 0) },
// "50-5: Milk Bar" (Milk Bar)
{ " 50-5:" GFXP_KATAKANA "ミルクバー", MapSelect_LoadGame, 0x2400 },
{ " 50-5:" GFXP_KATAKANA "ミルクバー", MapSelect_LoadGame, ENTRANCE(MILK_BAR, 0) },
// "51: Clock Town -West-" (West Clock Town)
{ " 51:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ニシ-", MapSelect_LoadGame, 0xD400 },
{ " 51:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ニシ-", MapSelect_LoadGame, ENTRANCE(WEST_CLOCK_TOWN, 0) },
// "51-0: Bomb Shop" (Bomb Shop)
{ " 51-0:" GFXP_HIRAGANA "バクダン ヤ", MapSelect_LoadGame, 0xCA00 },
{ " 51-0:" GFXP_HIRAGANA "バクダン ヤ", MapSelect_LoadGame, ENTRANCE(BOMB_SHOP, 0) },
// "51-1: Maniac Mart" (Curiosity Shop)
{ " 51-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "", MapSelect_LoadGame, 0xE00 },
{ " 51-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "", MapSelect_LoadGame, ENTRANCE(CURIOSITY_SHOP, 0) },
// "51-2: General Store" (Trading Post)
{ " 51-2:" GFXP_HIRAGANA "ザッカ ヤ", MapSelect_LoadGame, 0x6200 },
{ " 51-2:" GFXP_HIRAGANA "ザッカ ヤ", MapSelect_LoadGame, ENTRANCE(TRADING_POST, 0) },
// "51-3: Sword Dojo" (Swordsman's School)
{ " 51-3:" GFXP_HIRAGANA "ケンドウジョウ", MapSelect_LoadGame, 0xA200 },
{ " 51-3:" GFXP_HIRAGANA "ケンドウジョウ", MapSelect_LoadGame, ENTRANCE(SWORDMANS_SCHOOL, 0) },
// "51-4: Post House" (Post Office)
{ " 51-4:" GFXP_HIRAGANA "ポストハウス", MapSelect_LoadGame, 0x5600 },
{ " 51-4:" GFXP_HIRAGANA "ポストハウス", MapSelect_LoadGame, ENTRANCE(POST_OFFICE, 0) },
// "51-5: Lottery Shop" (Lottery Shop)
{ " 51-5:" GFXP_HIRAGANA "タカラクジヤ", MapSelect_LoadGame, 0x6C00 },
{ " 51-5:" GFXP_HIRAGANA "タカラクジヤ", MapSelect_LoadGame, ENTRANCE(LOTTERY_SHOP, 0) },
// "52: Clock Town -North-" (North Clock Town)
{ " 52:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-キタ-", MapSelect_LoadGame, 0xD600 },
{ " 52:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-キタ-", MapSelect_LoadGame, ENTRANCE(NORTH_CLOCK_TOWN, 0) },
// "53: Clocktown -South-" (South Clock Town)
{ " 53:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ミナミ-", MapSelect_LoadGame, 0xD800 },
{ " 53:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ミナミ-", MapSelect_LoadGame, ENTRANCE(SOUTH_CLOCK_TOWN, 0) },
// "53-0: Clock Tower Interior" (Clock Tower Interior)
{ " 53-0:" GFXP_HIRAGANA "トケイトウナイブ", MapSelect_LoadGame, 0xC000 },
{ " 53-0:" GFXP_HIRAGANA "トケイトウナイブ", MapSelect_LoadGame, ENTRANCE(CLOCK_TOWER_INTERIOR, 0) },
// "54: Clock Tower Rooftop" (Clock Tower Rooftop)
{ " 54:" GFXP_HIRAGANA "トケイトウ オクジョウ", MapSelect_LoadGame, 0x2C00 },
{ " 54:" GFXP_HIRAGANA "トケイトウ オクジョウ", MapSelect_LoadGame, ENTRANCE(CLOCK_TOWER_ROOFTOP, 0) },
// "55: Laundry Area" (Laundry Pool)
{ " 55:" GFXP_HIRAGANA "センタクジョウ", MapSelect_LoadGame, 0xDA00 },
{ " 55:" GFXP_HIRAGANA "センタクジョウ", MapSelect_LoadGame, ENTRANCE(LAUNDRY_POOL, 0) },
// "55-0: Maniac Mart - Rear Entrance" (Curiosity Shop - Back Room)
{ " 55-0:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ウラグチ", MapSelect_LoadGame, 0xE10 },
{ " 55-0:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ウラグチ", MapSelect_LoadGame, ENTRANCE(CURIOSITY_SHOP, 1) },
// "55-1: Maniac Mart - Peephole" (Curiosity Shop Back Room - Peephole)
{ " 55-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ノゾキアナ", MapSelect_LoadGame, 0xE20 },
{ " 55-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ノゾキアナ", MapSelect_LoadGame, ENTRANCE(CURIOSITY_SHOP, 2) },
// "100: Wood Mountain Temple" (Woodfall Temple)
{ "100:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, 0x3000 },
{ "100:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, ENTRANCE(WOODFALL_TEMPLE, 0) },
// "100-B: Wood Mountain Temple - Boss" (Odolwa's Lair)
{ "100-B:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0x3800 },
{ "100-B:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame,
ENTRANCE(ODOLWAS_LAIR, 0) },
// "101: Snowhead Temple" (Snowhead Temple)
{ "101:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, 0x3C00 },
{ "101:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, ENTRANCE(SNOWHEAD_TEMPLE, 0) },
// "101-B: Snowhead Temple - Boss" (Goht's Lair)
{ "101-B:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0x8200 },
{ "101-B:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame,
ENTRANCE(GOHTS_LAIR, 0) },
// "102: Great Bay Temple" (Great Bay Temple)
{ "102:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, 0x8C00 },
{ "102:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, ENTRANCE(GREAT_BAY_TEMPLE, 0) },
// "102-B: Great Bay Temple - Boss" (Gyorg's Lair)
{ "102-B:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0xB800 },
{ "102-B:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame,
ENTRANCE(GYORGS_LAIR, 0) },
// "103: Rock Building Temple -Top Side-" (Stone Tower Temple)
{ "103:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-オモテー", MapSelect_LoadGame, 0x2600 },
{ "103:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-オモテー", MapSelect_LoadGame,
ENTRANCE(STONE_TOWER_TEMPLE, 0) },
// "103-0: Rock Building Temple -Underside-" (Stone Tower Temple - Flipped)
{ "103-0:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-ウラー", MapSelect_LoadGame, 0x2A00 },
{ "103-0:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-ウラー", MapSelect_LoadGame,
ENTRANCE(STONE_TOWER_TEMPLE_INVERTED, 0) },
// "103-B: Rock Building Temple - Boss" (Twinmold's Lair)
{ "103-B:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0x6600 },
{ "103-B:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame,
ENTRANCE(TWINMOLDS_LAIR, 0) },
// "104: Steppe" (On the Moon)
{ "104:" GFXP_KATAKANA "ソウゲン", MapSelect_LoadGame, 0xC800 },
{ "104:" GFXP_KATAKANA "ソウゲン", MapSelect_LoadGame, ENTRANCE(THE_MOON, 0) },
// "104-0: Last Deku Dungeon" (Deku Trial)
{ "104-0:" GFXP_KATAKANA "ラスト デク ダンジョン", MapSelect_LoadGame, 0x4E00 },
{ "104-0:" GFXP_KATAKANA "ラスト デク ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_DEKU_TRIAL, 0) },
// "104-1: Last Goron Dungeon" (Goron Trial)
{ "104-1:" GFXP_KATAKANA "ラスト ゴロン ダンジョン", MapSelect_LoadGame, 0x7800 },
{ "104-1:" GFXP_KATAKANA "ラスト ゴロン ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_GORON_TRIAL, 0) },
// "104-2: Last Zora Dungeon" (Zora Trial)
{ "104-2:" GFXP_KATAKANA "ラスト ゾーラ ダンジョン", MapSelect_LoadGame, 0x8800 },
{ "104-2:" GFXP_KATAKANA "ラスト ゾーラ ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_ZORA_TRIAL, 0) },
// "104-3: Last Link Dungeon" (Link Trial)
{ "104-3:" GFXP_KATAKANA "ラスト リンク ダンジョン", MapSelect_LoadGame, 0xC600 },
{ "104-3:" GFXP_KATAKANA "ラスト リンク ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_LINK_TRIAL, 0) },
// "104-B: Last Dungeon -Boss-" (Majora's Lair)
{ "104-B:" GFXP_KATAKANA "ラストダンジョン -ボス-", MapSelect_LoadGame, 0x200 },
{ "104-B:" GFXP_KATAKANA "ラストダンジョン -ボス-", MapSelect_LoadGame, ENTRANCE(MAJORAS_LAIR, 0) },
// "119: Deku Shrine" (Deku Shrine)
{ "119:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, 0x9E00 },
{ "119:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, ENTRANCE(DEKU_SHRINE, 0) },
// "121: Secret Shrine" (Secret Shrine)
{ "121:" GFXP_HIRAGANA "ヒミツ ノ ホコラ", MapSelect_LoadGame, 0xBA00 },
{ "121:" GFXP_HIRAGANA "ヒミツ ノ ホコラ", MapSelect_LoadGame, ENTRANCE(SECRET_SHRINE, 0) },
// "122: Opening Dungeon" (Pond Area Cutscene: Falling of the Cliff)
{ "122:" GFXP_KATAKANA "オープニング ダンジョン", MapSelect_LoadGame, 0x2E00 },
{ "122:" GFXP_KATAKANA "オープニング ダンジョン", MapSelect_LoadGame, ENTRANCE(OPENING_DUNGEON, 0) },
// "123: Giants' Chamber" (Giants' Chamber)
{ "123:" GFXP_HIRAGANA "キョジン ノ マ", MapSelect_LoadGame, 0xCC00 },
{ "123:" GFXP_HIRAGANA "キョジン ノ マ", MapSelect_LoadGame, ENTRANCE(GIANTS_CHAMBER, 0) },
// "126: Deku Minigame" (Deku Rupee Minigame)
{ "126:" GFXP_KATAKANA "デクナッツ ミニゲーム", MapSelect_LoadGame, 0x3600 },
{ "126:" GFXP_KATAKANA "デクナッツ ミニゲーム", MapSelect_LoadGame, ENTRANCE(DEKU_SCRUB_PLAYGROUND, 0) },
// "127-0: Fairy Fountain 0" (Fairy Fountain - Clock Town)
{ "127-0:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 0", MapSelect_LoadGame, 0x4600 },
{ "127-0:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 0", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 0) },
// "127-1: Fairy Fountain 1" (Fairy Fountain - Woodfall)
{ "127-1:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 1", MapSelect_LoadGame, 0x4610 },
{ "127-1:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 1", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 1) },
// "127-2: Fairy Fountain 2" (Fairy Fountain - Snowhead)
{ "127-2:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 2", MapSelect_LoadGame, 0x4620 },
{ "127-2:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 2", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 2) },
// "127-3: Fairy Fountain 3" (Fairy Fountain - Great Bay Coast)
{ "127-3:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 3", MapSelect_LoadGame, 0x4630 },
{ "127-3:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 3", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 3) },
// "127-4: Fairy Fountain 4" (Fairy Fountain - Ikana Canyon)
{ "127-4:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 4", MapSelect_LoadGame, 0x4640 },
{ "127-4:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 4", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 4) },
// "128: Swamp Spider Manor" (Swamp Spider House)
{ "128:" GFXP_HIRAGANA "ヌマ ノ クモヤカタ", MapSelect_LoadGame, 0x4800 },
{ "128:" GFXP_HIRAGANA "ヌマ ノ クモヤカタ", MapSelect_LoadGame, ENTRANCE(SWAMP_SPIDER_HOUSE, 0) },
// "129: Ocean Spider Manor" (Oceanside Spider House)
{ "129:" GFXP_HIRAGANA "ウミ ノ クモヤカタ", MapSelect_LoadGame, 0x4A00 },
{ "129:" GFXP_HIRAGANA "ウミ ノ クモヤカタ", MapSelect_LoadGame, ENTRANCE(OCEANSIDE_SPIDER_HOUSE, 0) },
// "130: Beneath the Graves - Dampe" (Beneath the Graveyard)
{ "130:" GFXP_HIRAGANA "ハカ ノ シタ-" GFXP_KATAKANA "ダンペイ-", MapSelect_LoadGame, 0x5A00 },
{ "130:" GFXP_HIRAGANA "ハカ ノ シタ-" GFXP_KATAKANA "ダンペイ-", MapSelect_LoadGame, ENTRANCE(DAMPES_HOUSE, 0) },
// "131: Beneath the Well" (Beneath the Well)
{ "131:" GFXP_HIRAGANA "イド ノ シタ", MapSelect_LoadGame, 0x9000 },
{ "131:" GFXP_HIRAGANA "イド ノ シタ", MapSelect_LoadGame, ENTRANCE(BENEATH_THE_WELL, 0) },
// "132: Ghost Hut" (Ghost Hut)
{ "132:" GFXP_HIRAGANA "ユウレイゴヤ", MapSelect_LoadGame, 0x9C00 },
{ "132:" GFXP_HIRAGANA "ユウレイゴヤ", MapSelect_LoadGame, ENTRANCE(GHOST_HUT, 0) },
// "133-0: Beneath the Graves 0" (Beneath the Graveyard - Part 1)
{ "133-0:" GFXP_HIRAGANA "ハカ ノ シタ0", MapSelect_LoadGame, 0xA00 },
{ "133-0:" GFXP_HIRAGANA "ハカ ノ シタ0", MapSelect_LoadGame, ENTRANCE(BENEATH_THE_GRAVERYARD, 0) },
// "133-1: Beneath the Graves 1" (Beneath the Graveyard - Part 2)
{ "133-1:" GFXP_HIRAGANA "ハカ ノ シタ1", MapSelect_LoadGame, 0xA10 },
{ "133-1:" GFXP_HIRAGANA "ハカ ノ シタ1", MapSelect_LoadGame, ENTRANCE(BENEATH_THE_GRAVERYARD, 1) },
// "134-0: Secret Grotto 0" (Secret Grotto - Four Gossip Stones)
{ "134-0:" GFXP_HIRAGANA "カクシアナ 0", MapSelect_LoadGame, 0x1400 },
{ "134-0:" GFXP_HIRAGANA "カクシアナ 0", MapSelect_LoadGame, ENTRANCE(GROTTOS, 0) },
// "134-1: Secret Grotto 1" (Secret Grotto - Four Gossip Stones, Skulltula)
{ "134-1:" GFXP_HIRAGANA "カクシアナ 1", MapSelect_LoadGame, 0x1410 },
{ "134-1:" GFXP_HIRAGANA "カクシアナ 1", MapSelect_LoadGame, ENTRANCE(GROTTOS, 1) },
// "134-2: Secret Grotto 2" (Secret Grotto - Four Gossip Stones, Water Puddles)
{ "134-2:" GFXP_HIRAGANA "カクシアナ 2", MapSelect_LoadGame, 0x1420 },
{ "134-2:" GFXP_HIRAGANA "カクシアナ 2", MapSelect_LoadGame, ENTRANCE(GROTTOS, 2) },
// "134-3: Secret Grotto 3" (Secret Grotto - Four Gossip Stones, Water Puddle With Bugs)
{ "134-3:" GFXP_HIRAGANA "カクシアナ 3", MapSelect_LoadGame, 0x1430 },
{ "134-3:" GFXP_HIRAGANA "カクシアナ 3", MapSelect_LoadGame, ENTRANCE(GROTTOS, 3) },
// "134-4: Secret Grotto 4" (Secret Grotto - Chest with Blue Rupee, Deku Babas)
{ "134-4:" GFXP_HIRAGANA "カクシアナ 4", MapSelect_LoadGame, 0x1440 },
{ "134-4:" GFXP_HIRAGANA "カクシアナ 4", MapSelect_LoadGame, ENTRANCE(GROTTOS, 4) },
// "134-5: Secret Grotto 5" (Secret Grotto - Hot Spring, Deku Babas, Large Stones)
{ "134-5:" GFXP_HIRAGANA "カクシアナ5", MapSelect_LoadGame, 0x1450 },
{ "134-5:" GFXP_HIRAGANA "カクシアナ5", MapSelect_LoadGame, ENTRANCE(GROTTOS, 5) },
// "134-7: Secret Grotto 7" (Secret Grotto - Two Dondogos)
{ "134-7:" GFXP_HIRAGANA "カクシアナ 7", MapSelect_LoadGame, 0x1470 },
{ "134-7:" GFXP_HIRAGANA "カクシアナ 7", MapSelect_LoadGame, ENTRANCE(GROTTOS, 7) },
// "134-9: Secret Grotto 9" (Secret Grotto - Tall Grass With Box, Pot, Bugs)
{ "134-9:" GFXP_HIRAGANA "カクシアナ 9", MapSelect_LoadGame, 0x1490 },
{ "134-9:" GFXP_HIRAGANA "カクシアナ 9", MapSelect_LoadGame, ENTRANCE(GROTTOS, 9) },
// "134-10: Secret Grotto 10" (Secret Grotto - Two Cows Surrounded by Grass)
{ "134-10:" GFXP_HIRAGANA "カクシアナ10", MapSelect_LoadGame, 0x14A0 },
{ "134-10:" GFXP_HIRAGANA "カクシアナ10", MapSelect_LoadGame, ENTRANCE(GROTTOS, 10) },
// "134-11: Secret Grotto 11" (Secret Grotto - Watery Hole Filled with Underwater Babas, Fish)
{ "134-11:" GFXP_HIRAGANA "カクシアナ11", MapSelect_LoadGame, 0x14B0 },
{ "134-11:" GFXP_HIRAGANA "カクシアナ11", MapSelect_LoadGame, ENTRANCE(GROTTOS, 11) },
// "134-13: Secret Grotto 13" (Secret Grotto - Peahat in Center)
{ "134-13:" GFXP_HIRAGANA "カクシアナ13", MapSelect_LoadGame, 0x14D0 },
{ "134-13:" GFXP_HIRAGANA "カクシアナ13", MapSelect_LoadGame, ENTRANCE(GROTTOS, 13) },
// "X 1: SPOT00" (Opening Cutscene)
{ "X 1:SPOT00", MapSelect_LoadGame, 0x1C00 },
{ "X 1:SPOT00", MapSelect_LoadGame, ENTRANCE(CUTSCENE, 0) },
// "Title" (Title Screen)
{ "title", (void*)MapSelect_LoadTitle, 0x0000 },
{ "title", (void*)MapSelect_LoadTitle, 0 },
};
void MapSelect_UpdateMenu(MapSelectState* this) {
@ -516,8 +525,7 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
gSaveContext.minigameState = 0;
if (this->scenes[this->currentScene].loadFunc != NULL) {
this->scenes[this->currentScene].loadFunc(this, this->scenes[this->currentScene].entranceIndex,
this->opt);
this->scenes[this->currentScene].loadFunc(this, this->scenes[this->currentScene].entrance, this->opt);
}
}

View File

@ -10,7 +10,7 @@ typedef void (*Select_LoadFunc)(struct MapSelectState*, u32, s32);
typedef struct {
/* 0x00 */ char* name;
/* 0x04 */ Select_LoadFunc loadFunc;
/* 0x08 */ s32 entranceIndex;
/* 0x08 */ s32 entrance;
} SceneSelectEntry; // size = 0xC
typedef struct MapSelectState {

View File

@ -2456,8 +2456,8 @@
0x80130674:("Scene_HeaderCmdAnimatedMaterials",),
0x801306A4:("Scene_SetExitFade",),
0x801306E8:("Scene_ProcessHeader",),
0x80130768:("Entrance_CreateIndex",),
0x80130784:("Entrance_CreateIndexFromSpawn",),
0x80130768:("Entrance_Create",),
0x80130784:("Entrance_CreateFromSpawn",),
0x801307C0:("Scene_ExecuteDrawConfig",),
0x801307F4:("Scene_DrawConfigDefault",),
0x80130834:("AnimatedMat_TexScroll",),
@ -15198,7 +15198,7 @@
0x80BAA220:("EnBaba_Draw",),
0x80BAA6D0:("EnSuttari_UpdateCollider",),
0x80BAA848:("EnSuttari_GetActorById",),
0x80BAA88C:("EnSuttari_SetNextEntrance",),
0x80BAA88C:("EnSuttari_TriggerTransition",),
0x80BAA8D0:("EnSuttari_UpdateTime",),
0x80BAA904:("func_80BAA904",),
0x80BAA9B4:("func_80BAA9B4",),

132
tools/entr.py Executable file
View File

@ -0,0 +1,132 @@
#!/usr/bin/env python3
enumPrfix = "ENTR_SCENE_"
entranceScenes = [
"ENTR_SCENE_MAYORS_RESIDENCE",
"ENTR_SCENE_MAJORAS_LAIR",
"ENTR_SCENE_MAGIC_HAGS_POTION_SHOP",
"ENTR_SCENE_RANCH_HOUSE",
"ENTR_SCENE_HONEY_AND_DARLINGS_SHOP",
"ENTR_SCENE_BENEATH_THE_GRAVERYARD",
"ENTR_SCENE_SOUTHERN_SWAMP_CLEARED",
"ENTR_SCENE_CURIOSITY_SHOP",
"ENTR_SCENE_UNSET_08",
"ENTR_SCENE_UNSET_09",
"ENTR_SCENE_GROTTOS",
"ENTR_SCENE_UNSET_0B",
"ENTR_SCENE_UNSET_0C",
"ENTR_SCENE_UNSET_0D",
"ENTR_SCENE_CUTSCENE",
"ENTR_SCENE_UNSET_0F",
"ENTR_SCENE_IKANA_CANYON",
"ENTR_SCENE_PIRATES_FORTRESS",
"ENTR_SCENE_MILK_BAR",
"ENTR_SCENE_STONE_TOWER_TEMPLE",
"ENTR_SCENE_TREASURE_CHEST_SHOP",
"ENTR_SCENE_STONE_TOWER_TEMPLE_REVERSED",
"ENTR_SCENE_CLOCK_TOWER_ROOFTOP",
"ENTR_SCENE_OPENING_DUNGEON",
"ENTR_SCENE_WOODFALL_TEMPLE",
"ENTR_SCENE_PATH_TO_MOUNTAIN_VILLAGE",
"ENTR_SCENE_IKANA_CASTLE",
"ENTR_SCENE_DEKU_SCRUB_PLAYGROUND",
"ENTR_SCENE_ODOLWAS_LAIR",
"ENTR_SCENE_TOWN_SHOOTING_GALLERY",
"ENTR_SCENE_SNOWHEAD_TEMPLE",
"ENTR_SCENE_MILK_ROAD",
"ENTR_SCENE_PIRATES_FORTRESS_INTERIOR",
"ENTR_SCENE_SWAMP_SHOOTING_GALLERY",
"ENTR_SCENE_PINNACLE_ROCK",
"ENTR_SCENE_FAIRY_FOUNTAIN",
"ENTR_SCENE_SWAMP_SPIDER_HOUSE",
"ENTR_SCENE_OCEANSIDE_SPIDER_HOUSE",
"ENTR_SCENE_ASTRAL_OBSERVATORY",
"ENTR_SCENE_MOON_DEKU_TRIAL",
"ENTR_SCENE_DEKU_PALACE",
"ENTR_SCENE_MOUNTAIN_SMITHY",
"ENTR_SCENE_TERMINA_FIELD",
"ENTR_SCENE_POST_OFFICE",
"ENTR_SCENE_MARINE_RESEARCH_LAB",
"ENTR_SCENE_DAMPES_HOUSE",
"ENTR_SCENE_UNSET_2E",
"ENTR_SCENE_GORON_SHRINE",
"ENTR_SCENE_ZORA_HALL",
"ENTR_SCENE_TRADING_POST",
"ENTR_SCENE_ROMANI_RANCH",
"ENTR_SCENE_TWINMOLDS_LAIR",
"ENTR_SCENE_GREAT_BAY_COAST",
"ENTR_SCENE_ZORA_CAPE",
"ENTR_SCENE_LOTTERY_SHOP",
"ENTR_SCENE_UNSET_37",
"ENTR_SCENE_PIRATES_FORTRESS_EXTERIOR",
"ENTR_SCENE_FISHERMANS_HUT",
"ENTR_SCENE_GORON_SHOP",
"ENTR_SCENE_DEKU_KINGS_CHAMBER",
"ENTR_SCENE_MOON_GORON_TRIAL",
"ENTR_SCENE_ROAD_TO_SOUTHERN_SWAMP",
"ENTR_SCENE_DOGGY_RACETRACK",
"ENTR_SCENE_CUCCO_SHACK",
"ENTR_SCENE_IKANA_GRAVEYARD",
"ENTR_SCENE_GOHTS_LAIR",
"ENTR_SCENE_SOUTHERN_SWAMP_POISONED",
"ENTR_SCENE_WOODFALL",
"ENTR_SCENE_MOON_ZORA_TRIAL",
"ENTR_SCENE_GORON_VILLAGE_SPRING",
"ENTR_SCENE_GREAT_BAY_TEMPLE",
"ENTR_SCENE_WATERFALL_RAPIDS",
"ENTR_SCENE_BENEATH_THE_WELL",
"ENTR_SCENE_ZORA_HALL_ROOMS",
"ENTR_SCENE_GORON_VILLAGE_WINTER",
"ENTR_SCENE_GORON_GRAVERYARD",
"ENTR_SCENE_SAKONS_HIDEOUT",
"ENTR_SCENE_MOUNTAIN_VILLAGE_WINTER",
"ENTR_SCENE_GHOST_HUT",
"ENTR_SCENE_DEKU_SHRINE",
"ENTR_SCENE_ROAD_TO_IKANA",
"ENTR_SCENE_SWORDMANS_SCHOOL",
"ENTR_SCENE_MUSIC_BOX_HOUSE",
"ENTR_SCENE_IGOS_DU_IKANAS_LAIR",
"ENTR_SCENE_TOURIST_INFORMATION",
"ENTR_SCENE_STONE_TOWER",
"ENTR_SCENE_STONE_TOWER_INVERTED",
"ENTR_SCENE_MOUNTAIN_VILLAGE_SPRING",
"ENTR_SCENE_PATH_TO_SNOWHEAD",
"ENTR_SCENE_SNOWHEAD",
"ENTR_SCENE_PATH_TO_GORON_VILLAGE_WINTER",
"ENTR_SCENE_PATH_TO_GORON_VILLAGE_SPRING",
"ENTR_SCENE_GYORGS_LAIR",
"ENTR_SCENE_SECRET_SHRINE",
"ENTR_SCENE_STOCK_POT_INN",
"ENTR_SCENE_GREAT_BAY_CUTSCENE",
"ENTR_SCENE_CLOCK_TOWER_INTERIOR",
"ENTR_SCENE_WOODS_OF_MYSTERY",
"ENTR_SCENE_LOST_WOODS",
"ENTR_SCENE_MOON_LINK_TRIAL",
"ENTR_SCENE_THE_MOON",
"ENTR_SCENE_BOMB_SHOP",
"ENTR_SCENE_GIANTS_CHAMBER",
"ENTR_SCENE_GORMAN_TRACK",
"ENTR_SCENE_GORON_RACETRACK",
"ENTR_SCENE_EAST_CLOCK_TOWN",
"ENTR_SCENE_WEST_CLOCK_TOWN",
"ENTR_SCENE_NORTH_CLOCK_TOWN",
"ENTR_SCENE_SOUTH_CLOCK_TOWN",
"ENTR_SCENE_LAUNDRY_POOL",
"ENTR_SCENE_MAX"
]
def macro(num):
sceneIndex = (num >> 9) & 0x7F
spawnIndex = (num >> 4) & 0x1F
return f'ENTRANCE({entranceScenes[sceneIndex][len(enumPrfix):]}, {spawnIndex})'
if __name__ == "__main__":
import sys
if len(sys.argv) < 2:
print(f'{sys.argv[0]} nextEntrance', file=sys.stderr)
exit(1)
nextEntrance = sys.argv[1]
nextEntrance = int(nextEntrance, 16 if nextEntrance.startswith("0x") else 10)
print(macro(nextEntrance))

View File

@ -607,6 +607,9 @@ wordReplace = {
"ActorCutscene_GetCurrentCamera": "ActorCutscene_GetCurrentSubCamId",
"Entrance_CreateIndex": "Entrance_Create",
"Entrance_CreateIndexFromSpawn": "Entrance_CreateFromSpawn",
# Structs
"ActorAnimationEntry": "AnimationInfo",
"ActorAnimationEntryS": "AnimationInfoS",
@ -651,7 +654,7 @@ wordReplace = {
"gSaveContext.playerName": "gSaveContext.save.playerData.playerName",
"gSaveContext.inventory": "gSaveContext.save.inventory",
"gSaveContext.equippedMask": "gSaveContext.save.equippedMask",
"gSaveContext.entranceIndex": "gSaveContext.save.entranceIndex",
"gSaveContext.entranceIndex": "gSaveContext.save.entrance",
"gSaveContext.time": "gSaveContext.save.time",
"gSaveContext.unk_14": "gSaveContext.save.daySpeed",
"gSaveContext.unk_FE6": "gSaveContext.save.bombersCaughtNum",
@ -668,6 +671,7 @@ wordReplace = {
"gSaveContext.unk_1016": "gSaveContext.jinxTimer",
"gSaveContext.unk_3F58": "gSaveContext.sunsSongState",
"gSaveContext.unk_48C8": "gSaveContext.dungeonIndex",
"gSaveContext.save.entranceIndex": "gSaveContext.save.entrance",
"player->unk_A87": "player->exchangeItemId",
"player->leftHandActor": "player->heldActor",
@ -700,6 +704,7 @@ wordReplace = {
"play->msgCtx.unk12023": "play->msgCtx.stateTimer",
"play->msgCtx.unk1202A": "play->msgCtx.ocarinaMode",
"play->msgCtx.unk1202C": "play->msgCtx.ocarinaAction",
"play->nextEntranceIndex": "play->nextEntrance",
"play->sceneLoadFlag": "play->transitionTrigger",
"play->unk_18B4A": "play->transitionMode",

View File

@ -1970,8 +1970,8 @@ asm/non_matchings/code/z_scene/Scene_HeaderCmdSetAreaVisitedFlag.s,Scene_HeaderC
asm/non_matchings/code/z_scene/Scene_HeaderCmdAnimatedMaterials.s,Scene_HeaderCmdAnimatedMaterials,0x80130674,0xC
asm/non_matchings/code/z_scene/Scene_SetExitFade.s,Scene_SetExitFade,0x801306A4,0x11
asm/non_matchings/code/z_scene/Scene_ProcessHeader.s,Scene_ProcessHeader,0x801306E8,0x20
asm/non_matchings/code/z_scene/Entrance_CreateIndex.s,Entrance_CreateIndex,0x80130768,0x7
asm/non_matchings/code/z_scene/Entrance_CreateIndexFromSpawn.s,Entrance_CreateIndexFromSpawn,0x80130784,0xF
asm/non_matchings/code/z_scene/Entrance_Create.s,Entrance_Create,0x80130768,0x7
asm/non_matchings/code/z_scene/Entrance_CreateFromSpawn.s,Entrance_CreateFromSpawn,0x80130784,0xF
asm/non_matchings/code/z_scene_proc/Scene_ExecuteDrawConfig.s,Scene_ExecuteDrawConfig,0x801307C0,0xD
asm/non_matchings/code/z_scene_proc/Scene_DrawConfigDefault.s,Scene_DrawConfigDefault,0x801307F4,0x10
asm/non_matchings/code/z_scene_proc/AnimatedMat_TexScroll.s,AnimatedMat_TexScroll,0x80130834,0x1B

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
1970 asm/non_matchings/code/z_scene/Scene_HeaderCmdAnimatedMaterials.s Scene_HeaderCmdAnimatedMaterials 0x80130674 0xC
1971 asm/non_matchings/code/z_scene/Scene_SetExitFade.s Scene_SetExitFade 0x801306A4 0x11
1972 asm/non_matchings/code/z_scene/Scene_ProcessHeader.s Scene_ProcessHeader 0x801306E8 0x20
1973 asm/non_matchings/code/z_scene/Entrance_CreateIndex.s asm/non_matchings/code/z_scene/Entrance_Create.s Entrance_CreateIndex Entrance_Create 0x80130768 0x7
1974 asm/non_matchings/code/z_scene/Entrance_CreateIndexFromSpawn.s asm/non_matchings/code/z_scene/Entrance_CreateFromSpawn.s Entrance_CreateIndexFromSpawn Entrance_CreateFromSpawn 0x80130784 0xF
1975 asm/non_matchings/code/z_scene_proc/Scene_ExecuteDrawConfig.s Scene_ExecuteDrawConfig 0x801307C0 0xD
1976 asm/non_matchings/code/z_scene_proc/Scene_DrawConfigDefault.s Scene_DrawConfigDefault 0x801307F4 0x10
1977 asm/non_matchings/code/z_scene_proc/AnimatedMat_TexScroll.s AnimatedMat_TexScroll 0x80130834 0x1B