1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-14 03:44:34 +00:00

Introduce DEFINE_ENTRANCE for entrance table and create entrance enum (#1213)

* entrance table OK

* entrance enum fixed

* most entrances using enum, still need to do conditionals

* more entrances

* entrance_table.h cleanups

* some review

* remove _0 from first entrance in a group of setups

* change table description

* typo

* wens spellcheck in vscode

* remove extra line
This commit is contained in:
fig02 2022-05-09 13:45:53 -04:00 committed by GitHub
parent 95b4317931
commit 2efd00863a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 2478 additions and 2231 deletions

View file

@ -204,7 +204,7 @@ void Gameplay_Init(GameState* thisx) {
u8 tempSetupIndex;
s32 pad[2];
if (gSaveContext.entranceIndex == -1) {
if (gSaveContext.entranceIndex == ENTR_LOAD_OPENING) {
gSaveContext.entranceIndex = 0;
globalCtx->state.running = false;
SET_NEXT_GAMESTATE(&globalCtx->state, Opening_Init, OpeningContext);
@ -1806,11 +1806,11 @@ void Gameplay_LoadToLastEntrance(GlobalContext* globalCtx) {
if ((globalCtx->sceneNum == SCENE_GANON_SONOGO) || (globalCtx->sceneNum == SCENE_GANON_FINAL) ||
(globalCtx->sceneNum == SCENE_GANONTIKA_SONOGO) || (globalCtx->sceneNum == SCENE_GANON_DEMO)) {
globalCtx->nextEntranceIndex = 0x043F;
globalCtx->nextEntranceIndex = ENTR_GANON_FINAL_0;
Item_Give(globalCtx, ITEM_SWORD_MASTER);
} else if ((gSaveContext.entranceIndex == 0x028A) || (gSaveContext.entranceIndex == 0x028E) ||
(gSaveContext.entranceIndex == 0x0292) || (gSaveContext.entranceIndex == 0x0476)) {
globalCtx->nextEntranceIndex = 0x01F9;
} else if ((gSaveContext.entranceIndex == ENTR_SPOT00_11) || (gSaveContext.entranceIndex == ENTR_SPOT00_12) ||
(gSaveContext.entranceIndex == ENTR_SPOT00_13) || (gSaveContext.entranceIndex == ENTR_SPOT00_15)) {
globalCtx->nextEntranceIndex = ENTR_SPOT00_6;
} else {
globalCtx->nextEntranceIndex = gSaveContext.entranceIndex;
}