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

Rename game states (#1294)

* `TitleSetup` -> `Setup`

* `Title` -> `ConsoleLogo`

* `Opening` -> `TitleSetup`

* `FileChoose` -> `FileSelect`

* `Select` -> `MapSelect`

* prenmi/sample `Context` -> `State`

* Revert filename changes

* .

* setupstate cleanup

* Oops, `GameState` -> `SetupState`
This commit is contained in:
Dragorn421 2022-06-23 14:34:26 -07:00 committed by GitHub
parent 81ab6fe831
commit e16779cc33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 571 additions and 579 deletions

View file

@ -1305,10 +1305,10 @@ void Sram_InitNewSave(void);
void Sram_InitDebugSave(void);
void Sram_OpenSave(SramContext* sramCtx);
void Sram_WriteSave(SramContext* sramCtx);
void Sram_VerifyAndLoadAllSaves(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void Sram_InitSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void Sram_EraseSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void Sram_CopySave(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCtx);
void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx);
void Sram_EraseSave(FileSelectState* fileSelect, SramContext* sramCtx);
void Sram_CopySave(FileSelectState* fileSelect, SramContext* sramCtx);
void Sram_WriteSramHeader(SramContext* sramCtx);
void Sram_InitSram(GameState* gameState, SramContext* sramCtx);
void Sram_Alloc(GameState* gameState, SramContext* sramCtx);
@ -1564,9 +1564,6 @@ void AudioMgr_HandlePreNMI(AudioMgr* audioMgr);
void AudioMgr_ThreadEntry(void* arg0);
void AudioMgr_Unlock(AudioMgr* audioMgr);
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, Scheduler* sched, IrqMgr* irqMgr);
void TitleSetup_InitImpl(GameState* gameState);
void TitleSetup_Destroy(GameState* gameState);
void TitleSetup_Init(GameState* gameState);
void GameState_FaultPrint(void);
void GameState_SetFBFilter(Gfx** gfx);
// ? func_800C4344(?);
@ -2264,13 +2261,15 @@ void func_801109B0(PlayState* play);
void Message_Init(PlayState* play);
void func_80112098(PlayState* play);
void Title_Init(GameState* thisx);
void Title_Destroy(GameState* thisx);
void Select_Init(GameState* thisx);
void Select_Destroy(GameState* thisx);
void Opening_Init(GameState* thisx);
void Opening_Destroy(GameState* thisx);
void FileChoose_Init(GameState* thisx);
void FileChoose_Destroy(GameState* thisx);
void Setup_Init(GameState* thisx);
void Setup_Destroy(GameState* thisx);
void ConsoleLogo_Init(GameState* thisx);
void ConsoleLogo_Destroy(GameState* thisx);
void MapSelect_Init(GameState* thisx);
void MapSelect_Destroy(GameState* thisx);
void TitleSetup_Init(GameState* thisx);
void TitleSetup_Destroy(GameState* thisx);
void FileSelect_Init(GameState* thisx);
void FileSelect_Destroy(GameState* thisx);
#endif

View file

@ -1067,6 +1067,10 @@ typedef struct GameState {
/* 0xA0 */ u32 unk_A0;
} GameState; // size = 0xA4
typedef struct {
/* 0x00 */ GameState state;
} SetupState; // size = 0xA4
typedef struct {
/* 0x0000 */ GameState state;
/* 0x00A4 */ u8* staticSegment;
@ -1081,17 +1085,17 @@ typedef struct {
/* 0x01E0 */ char unk_1E0[0x01];
/* 0x01E1 */ u8 exit;
/* 0x01E2 */ char unk_1E2[0x06];
} TitleContext; // size = 0x1E8
} ConsoleLogoState; // size = 0x1E8
struct SelectContext;
struct MapSelectState;
typedef struct {
/* 0x00 */ char* name;
/* 0x04 */ void (*loadFunc)(struct SelectContext*, s32);
/* 0x04 */ void (*loadFunc)(struct MapSelectState*, s32);
/* 0x08 */ s32 entranceIndex;
} SceneSelectEntry; // size = 0xC
typedef struct SelectContext {
typedef struct MapSelectState {
/* 0x0000 */ GameState state;
/* 0x00A8 */ View view;
/* 0x01D0 */ s32 count;
@ -1111,13 +1115,13 @@ typedef struct SelectContext {
/* 0x0230 */ s32 lockDown;
/* 0x0234 */ s32 unk_234; // unused
/* 0x0238 */ u8* staticSegment;
} SelectContext; // size = 0x240
} MapSelectState; // size = 0x240
typedef struct {
/* 0x0000 */ GameState state;
/* 0x00A4 */ u8* staticSegment;
/* 0x00A8 */ View view;
} SampleContext; // size = 0x1D0
} SampleState; // size = 0x1D0
typedef struct {
/* 0x00 */ u8 byte0;
@ -1215,7 +1219,7 @@ typedef struct PlayState {
typedef struct {
/* 0x0000 */ GameState state;
/* 0x00A8 */ View view;
} OpeningContext; // size = 0x1D0
} TitleSetupState; // size = 0x1D0
typedef struct {
/* 0x00000 */ GameState state;
@ -1294,7 +1298,7 @@ typedef struct {
/* 0x1CAD2 */ s16 kbdY;
/* 0x1CAD4 */ s16 newFileNameCharCount;
/* 0x1CAD6 */ s16 unk_1CAD6[5];
} FileChooseContext; // size = 0x1CAE0
} FileSelectState; // size = 0x1CAE0
typedef enum {
DPM_UNK = 0,
@ -1379,11 +1383,11 @@ typedef struct {
/* 0x2C */ u32 instanceSize;
} GameStateOverlay; // size = 0x30
typedef struct PreNMIContext {
typedef struct {
/* 0x00 */ GameState state;
/* 0xA4 */ u32 timer;
/* 0xA8 */ UNK_TYPE4 unk_A8;
} PreNMIContext; // size = 0xAC
} PreNMIState; // size = 0xAC
typedef enum {
/* 1 */ F_8F = 1,

View file

@ -102,22 +102,22 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) {
GameStateOverlay* Graph_GetNextGameState(GameState* gameState) {
void* gameStateInitFunc = GameState_GetInit(gameState);
if (gameStateInitFunc == TitleSetup_Init) {
if (gameStateInitFunc == Setup_Init) {
return &gGameStateOverlayTable[0];
}
if (gameStateInitFunc == Select_Init) {
if (gameStateInitFunc == MapSelect_Init) {
return &gGameStateOverlayTable[1];
}
if (gameStateInitFunc == Title_Init) {
if (gameStateInitFunc == ConsoleLogo_Init) {
return &gGameStateOverlayTable[2];
}
if (gameStateInitFunc == Play_Init) {
return &gGameStateOverlayTable[3];
}
if (gameStateInitFunc == Opening_Init) {
if (gameStateInitFunc == TitleSetup_Init) {
return &gGameStateOverlayTable[4];
}
if (gameStateInitFunc == FileChoose_Init) {
if (gameStateInitFunc == FileSelect_Init) {
return &gGameStateOverlayTable[5];
}
@ -385,14 +385,14 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
if (gIsCtrlr2Valid && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
gSaveContext.gameMode = 0;
SET_NEXT_GAMESTATE(gameState, Select_Init, SelectContext);
SET_NEXT_GAMESTATE(gameState, MapSelect_Init, MapSelectState);
gameState->running = false;
}
if (gIsCtrlr2Valid && PreNmiBuff_IsResetting(gAppNmiBufferPtr) && !gameState->unk_A0) {
// "To reset mode"
osSyncPrintf(VT_COL(YELLOW, BLACK) "PRE-NMIによりリセットモードに移行します\n" VT_RST);
SET_NEXT_GAMESTATE(gameState, PreNMI_Init, PreNMIContext);
SET_NEXT_GAMESTATE(gameState, PreNMI_Init, PreNMIState);
gameState->running = false;
}
}

View file

@ -1,16 +1,18 @@
#include "global.h"
void TitleSetup_InitImpl(GameState* gameState) {
void Setup_InitImpl(SetupState* this) {
osSyncPrintf("ゼルダ共通データ初期化\n"); // "Zelda common data initalization"
SaveContext_Init();
gameState->running = false;
SET_NEXT_GAMESTATE(gameState, Title_Init, TitleContext);
this->state.running = false;
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, ConsoleLogoState);
}
void TitleSetup_Destroy(GameState* gameState) {
void Setup_Destroy(GameState* thisx) {
}
void TitleSetup_Init(GameState* gameState) {
gameState->destroy = TitleSetup_Destroy;
TitleSetup_InitImpl(gameState);
void Setup_Init(GameState* thisx) {
SetupState* this = (SetupState*)thisx;
this->state.destroy = Setup_Destroy;
Setup_InitImpl(this);
}

View file

@ -9,10 +9,10 @@
{ NULL, 0, 0, NULL, NULL, NULL, init, destroy, NULL, NULL, 0, size }
GameStateOverlay gGameStateOverlayTable[] = {
GAMESTATE_OVERLAY_INTERNAL(TitleSetup_Init, TitleSetup_Destroy, sizeof(GameState)),
GAMESTATE_OVERLAY(select, Select_Init, Select_Destroy, sizeof(SelectContext)),
GAMESTATE_OVERLAY(title, Title_Init, Title_Destroy, sizeof(TitleContext)),
GAMESTATE_OVERLAY_INTERNAL(Setup_Init, Setup_Destroy, sizeof(SetupState)),
GAMESTATE_OVERLAY(select, MapSelect_Init, MapSelect_Destroy, sizeof(MapSelectState)),
GAMESTATE_OVERLAY(title, ConsoleLogo_Init, ConsoleLogo_Destroy, sizeof(ConsoleLogoState)),
GAMESTATE_OVERLAY_INTERNAL(Play_Init, Play_Destroy, sizeof(PlayState)),
GAMESTATE_OVERLAY(opening, Opening_Init, Opening_Destroy, sizeof(OpeningContext)),
GAMESTATE_OVERLAY(file_choose, FileChoose_Init, FileChoose_Destroy, sizeof(FileChooseContext)),
GAMESTATE_OVERLAY(opening, TitleSetup_Init, TitleSetup_Destroy, sizeof(TitleSetupState)),
GAMESTATE_OVERLAY(file_choose, FileSelect_Init, FileSelect_Destroy, sizeof(FileSelectState)),
};

View file

@ -228,7 +228,7 @@ void Play_Init(GameState* thisx) {
if (gSaveContext.entranceIndex == ENTR_LOAD_OPENING) {
gSaveContext.entranceIndex = 0;
this->state.running = false;
SET_NEXT_GAMESTATE(&this->state, Opening_Init, OpeningContext);
SET_NEXT_GAMESTATE(&this->state, TitleSetup_Init, TitleSetupState);
return;
}
@ -635,7 +635,7 @@ void Play_Update(PlayState* this) {
gSaveContext.minigameState = 3;
}
} else {
SET_NEXT_GAMESTATE(&this->state, FileChoose_Init, FileChooseContext);
SET_NEXT_GAMESTATE(&this->state, FileSelect_Init, FileSelectState);
}
} else {
this->transitionCtx.destroy(&this->transitionCtx.instanceData);

View file

@ -1,13 +1,13 @@
#include "global.h"
#include "vt.h"
void func_80092320(PreNMIContext* this) {
void func_80092320(PreNMIState* this) {
this->state.running = false;
this->state.init = NULL;
this->state.size = 0;
}
void PreNMI_Update(PreNMIContext* this) {
void PreNMI_Update(PreNMIState* this) {
osSyncPrintf(VT_COL(YELLOW, BLACK) "prenmi_move\n" VT_RST);
// Strings existing only in rodata
@ -25,7 +25,7 @@ void PreNMI_Update(PreNMIContext* this) {
this->timer--;
}
void PreNMI_Draw(PreNMIContext* this) {
void PreNMI_Draw(PreNMIState* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
osSyncPrintf(VT_COL(YELLOW, BLACK) "prenmi_draw\n" VT_RST);
@ -42,7 +42,7 @@ void PreNMI_Draw(PreNMIContext* this) {
}
void PreNMI_Main(GameState* thisx) {
PreNMIContext* this = (PreNMIContext*)thisx;
PreNMIState* this = (PreNMIState*)thisx;
PreNMI_Update(this);
PreNMI_Draw(this);
@ -54,7 +54,7 @@ void PreNMI_Destroy(GameState* thisx) {
}
void PreNMI_Init(GameState* thisx) {
PreNMIContext* this = (PreNMIContext*)thisx;
PreNMIState* this = (PreNMIState*)thisx;
this->state.main = PreNMI_Main;
this->state.destroy = PreNMI_Destroy;

View file

@ -1,13 +1,13 @@
#include "global.h"
void Sample_HandleStateChange(SampleContext* this) {
void Sample_HandleStateChange(SampleState* this) {
if (CHECK_BTN_ALL(this->state.input[0].press.button, BTN_START)) {
SET_NEXT_GAMESTATE(&this->state, Play_Init, PlayState);
this->state.running = false;
}
}
void Sample_Draw(SampleContext* this) {
void Sample_Draw(SampleState* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
View* view = &this->view;
@ -40,7 +40,7 @@ void Sample_Draw(SampleContext* this) {
}
void Sample_Main(GameState* thisx) {
SampleContext* this = (SampleContext*)thisx;
SampleState* this = (SampleState*)thisx;
Sample_Draw(this);
Sample_HandleStateChange(this);
@ -49,7 +49,7 @@ void Sample_Main(GameState* thisx) {
void Sample_Destroy(GameState* thisx) {
}
void Sample_SetupView(SampleContext* this) {
void Sample_SetupView(SampleState* this) {
View* view = &this->view;
GraphicsContext* gfxCtx = this->state.gfxCtx;
@ -76,7 +76,7 @@ void Sample_SetupView(SampleContext* this) {
}
}
void Sample_LoadTitleStatic(SampleContext* this) {
void Sample_LoadTitleStatic(SampleState* this) {
u32 size = _title_staticSegmentRomEnd - _title_staticSegmentRomStart;
this->staticSegment = GameState_Alloc(&this->state, size, "../z_sample.c", 163);
@ -84,7 +84,7 @@ void Sample_LoadTitleStatic(SampleContext* this) {
}
void Sample_Init(GameState* thisx) {
SampleContext* this = (SampleContext*)thisx;
SampleState* this = (SampleState*)thisx;
this->state.main = Sample_Main;
this->state.destroy = Sample_Destroy;

View file

@ -528,7 +528,7 @@ void Sram_WriteSave(SramContext* sramCtx) {
*
* After verifying all 3 saves, pass relevant data to File Select to be displayed.
*/
void Sram_VerifyAndLoadAllSaves(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCtx) {
u16 i;
u16 newChecksum;
u16 slotNum;
@ -645,60 +645,50 @@ void Sram_VerifyAndLoadAllSaves(FileChooseContext* fileChooseCtx, SramContext* s
osSyncPrintf("SAVECT=%x, NAME=%x, LIFE=%x, ITEM=%x, 64DD=%x, HEART=%x\n", DEATHS, NAME, HEALTH_CAP, QUEST, N64DD,
DEFENSE);
MemCpy(&fileChooseCtx->deaths[0], sramCtx->readBuff + SLOT_OFFSET(0) + DEATHS, sizeof(fileChooseCtx->deaths[0]));
MemCpy(&fileChooseCtx->deaths[1], sramCtx->readBuff + SLOT_OFFSET(1) + DEATHS, sizeof(fileChooseCtx->deaths[0]));
MemCpy(&fileChooseCtx->deaths[2], sramCtx->readBuff + SLOT_OFFSET(2) + DEATHS, sizeof(fileChooseCtx->deaths[0]));
MemCpy(&fileSelect->deaths[0], sramCtx->readBuff + SLOT_OFFSET(0) + DEATHS, sizeof(fileSelect->deaths[0]));
MemCpy(&fileSelect->deaths[1], sramCtx->readBuff + SLOT_OFFSET(1) + DEATHS, sizeof(fileSelect->deaths[0]));
MemCpy(&fileSelect->deaths[2], sramCtx->readBuff + SLOT_OFFSET(2) + DEATHS, sizeof(fileSelect->deaths[0]));
MemCpy(&fileChooseCtx->fileNames[0], sramCtx->readBuff + SLOT_OFFSET(0) + NAME,
sizeof(fileChooseCtx->fileNames[0]));
MemCpy(&fileChooseCtx->fileNames[1], sramCtx->readBuff + SLOT_OFFSET(1) + NAME,
sizeof(fileChooseCtx->fileNames[0]));
MemCpy(&fileChooseCtx->fileNames[2], sramCtx->readBuff + SLOT_OFFSET(2) + NAME,
sizeof(fileChooseCtx->fileNames[0]));
MemCpy(&fileSelect->fileNames[0], sramCtx->readBuff + SLOT_OFFSET(0) + NAME, sizeof(fileSelect->fileNames[0]));
MemCpy(&fileSelect->fileNames[1], sramCtx->readBuff + SLOT_OFFSET(1) + NAME, sizeof(fileSelect->fileNames[0]));
MemCpy(&fileSelect->fileNames[2], sramCtx->readBuff + SLOT_OFFSET(2) + NAME, sizeof(fileSelect->fileNames[0]));
MemCpy(&fileChooseCtx->healthCapacities[0], sramCtx->readBuff + SLOT_OFFSET(0) + HEALTH_CAP,
sizeof(fileChooseCtx->healthCapacities[0]));
MemCpy(&fileChooseCtx->healthCapacities[1], sramCtx->readBuff + SLOT_OFFSET(1) + HEALTH_CAP,
sizeof(fileChooseCtx->healthCapacities[0]));
MemCpy(&fileChooseCtx->healthCapacities[2], sramCtx->readBuff + SLOT_OFFSET(2) + HEALTH_CAP,
sizeof(fileChooseCtx->healthCapacities[0]));
MemCpy(&fileSelect->healthCapacities[0], sramCtx->readBuff + SLOT_OFFSET(0) + HEALTH_CAP,
sizeof(fileSelect->healthCapacities[0]));
MemCpy(&fileSelect->healthCapacities[1], sramCtx->readBuff + SLOT_OFFSET(1) + HEALTH_CAP,
sizeof(fileSelect->healthCapacities[0]));
MemCpy(&fileSelect->healthCapacities[2], sramCtx->readBuff + SLOT_OFFSET(2) + HEALTH_CAP,
sizeof(fileSelect->healthCapacities[0]));
MemCpy(&fileChooseCtx->questItems[0], sramCtx->readBuff + SLOT_OFFSET(0) + QUEST,
sizeof(fileChooseCtx->questItems[0]));
MemCpy(&fileChooseCtx->questItems[1], sramCtx->readBuff + SLOT_OFFSET(1) + QUEST,
sizeof(fileChooseCtx->questItems[0]));
MemCpy(&fileChooseCtx->questItems[2], sramCtx->readBuff + SLOT_OFFSET(2) + QUEST,
sizeof(fileChooseCtx->questItems[0]));
MemCpy(&fileSelect->questItems[0], sramCtx->readBuff + SLOT_OFFSET(0) + QUEST, sizeof(fileSelect->questItems[0]));
MemCpy(&fileSelect->questItems[1], sramCtx->readBuff + SLOT_OFFSET(1) + QUEST, sizeof(fileSelect->questItems[0]));
MemCpy(&fileSelect->questItems[2], sramCtx->readBuff + SLOT_OFFSET(2) + QUEST, sizeof(fileSelect->questItems[0]));
MemCpy(&fileChooseCtx->n64ddFlags[0], sramCtx->readBuff + SLOT_OFFSET(0) + N64DD,
sizeof(fileChooseCtx->n64ddFlags[0]));
MemCpy(&fileChooseCtx->n64ddFlags[1], sramCtx->readBuff + SLOT_OFFSET(1) + N64DD,
sizeof(fileChooseCtx->n64ddFlags[0]));
MemCpy(&fileChooseCtx->n64ddFlags[2], sramCtx->readBuff + SLOT_OFFSET(2) + N64DD,
sizeof(fileChooseCtx->n64ddFlags[0]));
MemCpy(&fileSelect->n64ddFlags[0], sramCtx->readBuff + SLOT_OFFSET(0) + N64DD, sizeof(fileSelect->n64ddFlags[0]));
MemCpy(&fileSelect->n64ddFlags[1], sramCtx->readBuff + SLOT_OFFSET(1) + N64DD, sizeof(fileSelect->n64ddFlags[0]));
MemCpy(&fileSelect->n64ddFlags[2], sramCtx->readBuff + SLOT_OFFSET(2) + N64DD, sizeof(fileSelect->n64ddFlags[0]));
MemCpy(&fileChooseCtx->defense[0], sramCtx->readBuff + SLOT_OFFSET(0) + DEFENSE, sizeof(fileChooseCtx->defense[0]));
MemCpy(&fileChooseCtx->defense[1], sramCtx->readBuff + SLOT_OFFSET(1) + DEFENSE, sizeof(fileChooseCtx->defense[0]));
MemCpy(&fileChooseCtx->defense[2], sramCtx->readBuff + SLOT_OFFSET(2) + DEFENSE, sizeof(fileChooseCtx->defense[0]));
MemCpy(&fileSelect->defense[0], sramCtx->readBuff + SLOT_OFFSET(0) + DEFENSE, sizeof(fileSelect->defense[0]));
MemCpy(&fileSelect->defense[1], sramCtx->readBuff + SLOT_OFFSET(1) + DEFENSE, sizeof(fileSelect->defense[0]));
MemCpy(&fileSelect->defense[2], sramCtx->readBuff + SLOT_OFFSET(2) + DEFENSE, sizeof(fileSelect->defense[0]));
MemCpy(&fileChooseCtx->health[0], sramCtx->readBuff + SLOT_OFFSET(0) + HEALTH, sizeof(fileChooseCtx->health[0]));
MemCpy(&fileChooseCtx->health[1], sramCtx->readBuff + SLOT_OFFSET(1) + HEALTH, sizeof(fileChooseCtx->health[0]));
MemCpy(&fileChooseCtx->health[2], sramCtx->readBuff + SLOT_OFFSET(2) + HEALTH, sizeof(fileChooseCtx->health[0]));
MemCpy(&fileSelect->health[0], sramCtx->readBuff + SLOT_OFFSET(0) + HEALTH, sizeof(fileSelect->health[0]));
MemCpy(&fileSelect->health[1], sramCtx->readBuff + SLOT_OFFSET(1) + HEALTH, sizeof(fileSelect->health[0]));
MemCpy(&fileSelect->health[2], sramCtx->readBuff + SLOT_OFFSET(2) + HEALTH, sizeof(fileSelect->health[0]));
osSyncPrintf("f_64dd=%d, %d, %d\n", fileChooseCtx->n64ddFlags[0], fileChooseCtx->n64ddFlags[1],
fileChooseCtx->n64ddFlags[2]);
osSyncPrintf("heart_status=%d, %d, %d\n", fileChooseCtx->defense[0], fileChooseCtx->defense[1],
fileChooseCtx->defense[2]);
osSyncPrintf("now_life=%d, %d, %d\n", fileChooseCtx->health[0], fileChooseCtx->health[1], fileChooseCtx->health[2]);
osSyncPrintf("f_64dd=%d, %d, %d\n", fileSelect->n64ddFlags[0], fileSelect->n64ddFlags[1],
fileSelect->n64ddFlags[2]);
osSyncPrintf("heart_status=%d, %d, %d\n", fileSelect->defense[0], fileSelect->defense[1], fileSelect->defense[2]);
osSyncPrintf("now_life=%d, %d, %d\n", fileSelect->health[0], fileSelect->health[1], fileSelect->health[2]);
}
void Sram_InitSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
u16 offset;
u16 j;
u16* ptr;
u16 checksum;
if (fileChooseCtx->buttonIndex != 0) {
if (fileSelect->buttonIndex != 0) {
Sram_InitNewSave();
} else {
Sram_InitDebugSave();
@ -709,12 +699,12 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
gSaveContext.dayTime = CLOCK_TIME(10, 0);
gSaveContext.cutsceneIndex = 0xFFF1;
if (fileChooseCtx->buttonIndex == 0) {
if (fileSelect->buttonIndex == 0) {
gSaveContext.cutsceneIndex = 0;
}
for (offset = 0; offset < 8; offset++) {
gSaveContext.playerName[offset] = fileChooseCtx->fileNames[fileChooseCtx->buttonIndex][offset];
gSaveContext.playerName[offset] = fileSelect->fileNames[fileSelect->buttonIndex][offset];
}
gSaveContext.newf[0] = 'Z';
@ -724,8 +714,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
gSaveContext.newf[4] = 'A';
gSaveContext.newf[5] = 'Z';
gSaveContext.n64ddFlag = fileChooseCtx->n64ddFlag;
osSyncPrintf("64DDフラグ=%d\n", fileChooseCtx->n64ddFlag);
gSaveContext.n64ddFlag = fileSelect->n64ddFlag;
osSyncPrintf("64DDフラグ=%d\n", fileSelect->n64ddFlag);
osSyncPrintf("newf=%x,%x,%x,%x,%x,%x\n", gSaveContext.newf[0], gSaveContext.newf[1], gSaveContext.newf[2],
gSaveContext.newf[3], gSaveContext.newf[4], gSaveContext.newf[5]);
osSyncPrintf("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
@ -762,82 +752,79 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
j = gSramSlotOffsets[gSaveContext.fileNum];
MemCpy(&fileChooseCtx->deaths[gSaveContext.fileNum], sramCtx->readBuff + j + DEATHS,
sizeof(fileChooseCtx->deaths[0]));
MemCpy(&fileChooseCtx->fileNames[gSaveContext.fileNum], sramCtx->readBuff + j + NAME,
sizeof(fileChooseCtx->fileNames[0]));
MemCpy(&fileChooseCtx->healthCapacities[gSaveContext.fileNum], sramCtx->readBuff + j + HEALTH_CAP,
sizeof(fileChooseCtx->healthCapacities[0]));
MemCpy(&fileChooseCtx->questItems[gSaveContext.fileNum], sramCtx->readBuff + j + QUEST,
sizeof(fileChooseCtx->questItems[0]));
MemCpy(&fileChooseCtx->n64ddFlags[gSaveContext.fileNum], sramCtx->readBuff + j + N64DD,
sizeof(fileChooseCtx->n64ddFlags[0]));
MemCpy(&fileChooseCtx->defense[gSaveContext.fileNum], sramCtx->readBuff + j + DEFENSE,
sizeof(fileChooseCtx->defense[0]));
MemCpy(&fileChooseCtx->health[gSaveContext.fileNum], sramCtx->readBuff + j + HEALTH,
sizeof(fileChooseCtx->health[0]));
MemCpy(&fileSelect->deaths[gSaveContext.fileNum], sramCtx->readBuff + j + DEATHS, sizeof(fileSelect->deaths[0]));
MemCpy(&fileSelect->fileNames[gSaveContext.fileNum], sramCtx->readBuff + j + NAME,
sizeof(fileSelect->fileNames[0]));
MemCpy(&fileSelect->healthCapacities[gSaveContext.fileNum], sramCtx->readBuff + j + HEALTH_CAP,
sizeof(fileSelect->healthCapacities[0]));
MemCpy(&fileSelect->questItems[gSaveContext.fileNum], sramCtx->readBuff + j + QUEST,
sizeof(fileSelect->questItems[0]));
MemCpy(&fileSelect->n64ddFlags[gSaveContext.fileNum], sramCtx->readBuff + j + N64DD,
sizeof(fileSelect->n64ddFlags[0]));
MemCpy(&fileSelect->defense[gSaveContext.fileNum], sramCtx->readBuff + j + DEFENSE, sizeof(fileSelect->defense[0]));
MemCpy(&fileSelect->health[gSaveContext.fileNum], sramCtx->readBuff + j + HEALTH, sizeof(fileSelect->health[0]));
osSyncPrintf("f_64dd[%d]=%d\n", gSaveContext.fileNum, fileChooseCtx->n64ddFlags[gSaveContext.fileNum]);
osSyncPrintf("heart_status[%d]=%d\n", gSaveContext.fileNum, fileChooseCtx->defense[gSaveContext.fileNum]);
osSyncPrintf("now_life[%d]=%d\n", gSaveContext.fileNum, fileChooseCtx->health[gSaveContext.fileNum]);
osSyncPrintf("f_64dd[%d]=%d\n", gSaveContext.fileNum, fileSelect->n64ddFlags[gSaveContext.fileNum]);
osSyncPrintf("heart_status[%d]=%d\n", gSaveContext.fileNum, fileSelect->defense[gSaveContext.fileNum]);
osSyncPrintf("now_life[%d]=%d\n", gSaveContext.fileNum, fileSelect->health[gSaveContext.fileNum]);
}
void Sram_EraseSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
void Sram_EraseSave(FileSelectState* fileSelect, SramContext* sramCtx) {
s32 offset;
Sram_InitNewSave();
offset = gSramSlotOffsets[fileChooseCtx->selectedFileIndex];
offset = gSramSlotOffsets[fileSelect->selectedFileIndex];
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE, OS_WRITE);
MemCpy(&fileChooseCtx->n64ddFlags[fileChooseCtx->selectedFileIndex], sramCtx->readBuff + offset + N64DD,
sizeof(fileChooseCtx->n64ddFlags[0]));
MemCpy(&fileSelect->n64ddFlags[fileSelect->selectedFileIndex], sramCtx->readBuff + offset + N64DD,
sizeof(fileSelect->n64ddFlags[0]));
offset = gSramSlotOffsets[fileChooseCtx->selectedFileIndex + 3];
offset = gSramSlotOffsets[fileSelect->selectedFileIndex + 3];
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE, OS_WRITE);
osSyncPrintf("CLEAR終了\n");
}
void Sram_CopySave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
void Sram_CopySave(FileSelectState* fileSelect, SramContext* sramCtx) {
s32 offset;
osSyncPrintf("=%d(%x) =%d(%x)\n", fileChooseCtx->selectedFileIndex,
gSramSlotOffsets[fileChooseCtx->selectedFileIndex], fileChooseCtx->copyDestFileIndex,
gSramSlotOffsets[fileChooseCtx->copyDestFileIndex]);
osSyncPrintf("=%d(%x) =%d(%x)\n", fileSelect->selectedFileIndex,
gSramSlotOffsets[fileSelect->selectedFileIndex], fileSelect->copyDestFileIndex,
gSramSlotOffsets[fileSelect->copyDestFileIndex]);
offset = gSramSlotOffsets[fileChooseCtx->selectedFileIndex];
offset = gSramSlotOffsets[fileSelect->selectedFileIndex];
MemCpy(&gSaveContext, sramCtx->readBuff + offset, sizeof(Save));
offset = gSramSlotOffsets[fileChooseCtx->copyDestFileIndex];
offset = gSramSlotOffsets[fileSelect->copyDestFileIndex];
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
offset = gSramSlotOffsets[fileChooseCtx->copyDestFileIndex + 3];
offset = gSramSlotOffsets[fileSelect->copyDestFileIndex + 3];
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_WRITE);
offset = gSramSlotOffsets[fileChooseCtx->copyDestFileIndex];
offset = gSramSlotOffsets[fileSelect->copyDestFileIndex];
MemCpy(&fileChooseCtx->deaths[fileChooseCtx->copyDestFileIndex], sramCtx->readBuff + offset + DEATHS,
sizeof(fileChooseCtx->deaths[0]));
MemCpy(&fileChooseCtx->fileNames[fileChooseCtx->copyDestFileIndex], sramCtx->readBuff + offset + NAME,
sizeof(fileChooseCtx->fileNames[0]));
MemCpy(&fileChooseCtx->healthCapacities[fileChooseCtx->copyDestFileIndex], sramCtx->readBuff + offset + HEALTH_CAP,
sizeof(fileChooseCtx->healthCapacities[0]));
MemCpy(&fileChooseCtx->questItems[fileChooseCtx->copyDestFileIndex], sramCtx->readBuff + offset + QUEST,
sizeof(fileChooseCtx->questItems[0]));
MemCpy(&fileChooseCtx->n64ddFlags[fileChooseCtx->copyDestFileIndex], sramCtx->readBuff + offset + N64DD,
sizeof(fileChooseCtx->n64ddFlags[0]));
MemCpy(&fileChooseCtx->defense[fileChooseCtx->copyDestFileIndex], sramCtx->readBuff + offset + DEFENSE,
sizeof(fileChooseCtx->defense[0]));
MemCpy(&fileChooseCtx->health[fileChooseCtx->copyDestFileIndex], (sramCtx->readBuff + offset) + HEALTH,
sizeof(fileChooseCtx->health[0]));
MemCpy(&fileSelect->deaths[fileSelect->copyDestFileIndex], sramCtx->readBuff + offset + DEATHS,
sizeof(fileSelect->deaths[0]));
MemCpy(&fileSelect->fileNames[fileSelect->copyDestFileIndex], sramCtx->readBuff + offset + NAME,
sizeof(fileSelect->fileNames[0]));
MemCpy(&fileSelect->healthCapacities[fileSelect->copyDestFileIndex], sramCtx->readBuff + offset + HEALTH_CAP,
sizeof(fileSelect->healthCapacities[0]));
MemCpy(&fileSelect->questItems[fileSelect->copyDestFileIndex], sramCtx->readBuff + offset + QUEST,
sizeof(fileSelect->questItems[0]));
MemCpy(&fileSelect->n64ddFlags[fileSelect->copyDestFileIndex], sramCtx->readBuff + offset + N64DD,
sizeof(fileSelect->n64ddFlags[0]));
MemCpy(&fileSelect->defense[fileSelect->copyDestFileIndex], sramCtx->readBuff + offset + DEFENSE,
sizeof(fileSelect->defense[0]));
MemCpy(&fileSelect->health[fileSelect->copyDestFileIndex], (sramCtx->readBuff + offset) + HEALTH,
sizeof(fileSelect->health[0]));
osSyncPrintf("f_64dd[%d]=%d\n", gSaveContext.fileNum, fileChooseCtx->n64ddFlags[gSaveContext.fileNum]);
osSyncPrintf("heart_status[%d]=%d\n", gSaveContext.fileNum, fileChooseCtx->defense[gSaveContext.fileNum]);
osSyncPrintf("f_64dd[%d]=%d\n", gSaveContext.fileNum, fileSelect->n64ddFlags[gSaveContext.fileNum]);
osSyncPrintf("heart_status[%d]=%d\n", gSaveContext.fileNum, fileSelect->defense[gSaveContext.fileNum]);
osSyncPrintf("COPY終了\n"); // "Copy end"
}

View file

@ -1,5 +1,5 @@
#ifndef _FILE_CHOOSE_H_
#define _FILE_CHOOSE_H_
#ifndef FILE_SELECT_H
#define FILE_SELECT_H
#include "libc/stddef.h"
#include "ultra64.h"
@ -170,50 +170,50 @@ typedef enum {
/* 99 */ FS_KBD_BTN_NONE = 99
} KeyboardButton;
void FileChoose_SetupCopySource(GameState* thisx);
void FileChoose_SelectCopySource(GameState* thisx);
void FileChoose_SetupCopyDest1(GameState* thisx);
void FileChoose_SetupCopyDest2(GameState* thisx);
void FileChoose_SelectCopyDest(GameState* thisx);
void FileChoose_ExitToCopySource1(GameState* thisx);
void FileChoose_ExitToCopySource2(GameState* thisx);
void FileChoose_SetupCopyConfirm1(GameState* thisx);
void FileChoose_SetupCopyConfirm2(GameState* thisx);
void FileChoose_CopyConfirm(GameState* thisx);
void FileChoose_ReturnToCopyDest(GameState* thisx);
void FileChoose_CopyAnim1(GameState* thisx);
void FileChoose_CopyAnim2(GameState* thisx);
void FileChoose_CopyAnim3(GameState* thisx);
void FileChoose_CopyAnim4(GameState* thisx);
void FileChoose_CopyAnim5(GameState* thisx);
void FileSelect_SetupCopySource(GameState* thisx);
void FileSelect_SelectCopySource(GameState* thisx);
void FileSelect_SetupCopyDest1(GameState* thisx);
void FileSelect_SetupCopyDest2(GameState* thisx);
void FileSelect_SelectCopyDest(GameState* thisx);
void FileSelect_ExitToCopySource1(GameState* thisx);
void FileSelect_ExitToCopySource2(GameState* thisx);
void FileSelect_SetupCopyConfirm1(GameState* thisx);
void FileSelect_SetupCopyConfirm2(GameState* thisx);
void FileSelect_CopyConfirm(GameState* thisx);
void FileSelect_ReturnToCopyDest(GameState* thisx);
void FileSelect_CopyAnim1(GameState* thisx);
void FileSelect_CopyAnim2(GameState* thisx);
void FileSelect_CopyAnim3(GameState* thisx);
void FileSelect_CopyAnim4(GameState* thisx);
void FileSelect_CopyAnim5(GameState* thisx);
void FileChoose_ExitCopyToMain(GameState* thisx);
void FileChoose_SetupEraseSelect(GameState* thisx);
void FileChoose_EraseSelect(GameState* thisx);
void FileChoose_SetupEraseConfirm1(GameState* thisx);
void FileChoose_SetupEraseConfirm2(GameState* thisx);
void FileChoose_EraseConfirm(GameState* thisx);
void FileChoose_ExitToEraseSelect1(GameState* thisx);
void FileChoose_ExitToEraseSelect2(GameState* thisx);
void FileChoose_EraseAnim1(GameState* thisx);
void FileChoose_EraseAnim2(GameState* thisx);
void FileChoose_EraseAnim3(GameState* thisx);
void FileChoose_ExitEraseToMain(GameState* thisx);
void FileSelect_ExitCopyToMain(GameState* thisx);
void FileSelect_SetupEraseSelect(GameState* thisx);
void FileSelect_EraseSelect(GameState* thisx);
void FileSelect_SetupEraseConfirm1(GameState* thisx);
void FileSelect_SetupEraseConfirm2(GameState* thisx);
void FileSelect_EraseConfirm(GameState* thisx);
void FileSelect_ExitToEraseSelect1(GameState* thisx);
void FileSelect_ExitToEraseSelect2(GameState* thisx);
void FileSelect_EraseAnim1(GameState* thisx);
void FileSelect_EraseAnim2(GameState* thisx);
void FileSelect_EraseAnim3(GameState* thisx);
void FileSelect_ExitEraseToMain(GameState* thisx);
void FileChoose_UpdateKeyboardCursor(GameState* thisx);
void FileChoose_StartNameEntry(GameState* thisx);
void FileChoose_UpdateOptionsMenu(GameState* thisx);
void FileChoose_StartOptions(GameState* thisx);
void FileSelect_UpdateKeyboardCursor(GameState* thisx);
void FileSelect_StartNameEntry(GameState* thisx);
void FileSelect_UpdateOptionsMenu(GameState* thisx);
void FileSelect_StartOptions(GameState* thisx);
void FileChoose_InitModeDraw(GameState* thisx);
void FileChoose_ConfigModeDraw(GameState* thisx);
void FileChoose_SelectModeDraw(GameState* thisx);
void FileSelect_InitModeDraw(GameState* thisx);
void FileSelect_ConfigModeDraw(GameState* thisx);
void FileSelect_SelectModeDraw(GameState* thisx);
void FileChoose_PulsateCursor(GameState* thisx);
void FileChoose_DrawOptions(GameState* thisx);
void FileSelect_PulsateCursor(GameState* thisx);
void FileSelect_DrawOptions(GameState* thisx);
void FileChoose_DrawNameEntry(GameState* thisx);
void FileChoose_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx);
void FileSelect_DrawNameEntry(GameState* thisx);
void FileSelect_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx);
extern s16 D_808123F0[];

View file

@ -1,4 +1,4 @@
#include "file_choose.h"
#include "file_select.h"
#include "assets/textures/title_static/title_static.h"
#include "assets/textures/parameter_static/parameter_static.h"
@ -24,7 +24,7 @@ static s16 sWindowContentColors[2][3] = {
{ 100, 100, 100 }, // gray
};
void FileChoose_SetView(FileChooseContext* this, f32 eyeX, f32 eyeY, f32 eyeZ) {
void FileSelect_SetView(FileSelectState* this, f32 eyeX, f32 eyeY, f32 eyeZ) {
Vec3f eye;
Vec3f lookAt;
Vec3f up;
@ -42,7 +42,7 @@ void FileChoose_SetView(FileChooseContext* this, f32 eyeX, f32 eyeY, f32 eyeZ) {
View_Apply(&this->view, VIEW_ALL | VIEW_FORCE_VIEWING | VIEW_FORCE_VIEWPORT | VIEW_FORCE_PROJECTION_PERSPECTIVE);
}
Gfx* FileChoose_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s16 point) {
Gfx* FileSelect_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s16 point) {
gDPLoadTextureBlock(gfx++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@ -51,8 +51,8 @@ Gfx* FileChoose_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s
return gfx;
}
void FileChoose_InitModeUpdate(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_InitModeUpdate(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
if (this->menuMode == FS_MENU_MODE_INIT) {
this->menuMode = FS_MENU_MODE_CONFIG;
@ -64,7 +64,7 @@ void FileChoose_InitModeUpdate(GameState* thisx) {
}
}
void FileChoose_InitModeDraw(GameState* thisx) {
void FileSelect_InitModeDraw(GameState* thisx) {
}
/**
@ -72,8 +72,8 @@ void FileChoose_InitModeDraw(GameState* thisx) {
* If a file is occupied fade in the name, name box, and connector.
* Fade in the copy erase and options button according to the window alpha.
*/
void FileChoose_FadeInMenuElements(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_FadeInMenuElements(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
@ -99,7 +99,7 @@ void FileChoose_FadeInMenuElements(GameState* thisx) {
/**
* Converts a numerical value to ones-tens-hundreds digits
*/
void FileChoose_SplitNumber(u16 value, s16* hundreds, s16* tens, s16* ones) {
void FileSelect_SplitNumber(u16 value, s16* hundreds, s16* tens, s16* ones) {
*hundreds = 0;
*tens = 0;
*ones = value;
@ -126,10 +126,10 @@ void FileChoose_SplitNumber(u16 value, s16* hundreds, s16* tens, s16* ones) {
* Additionally, slide the window from the right to the center of the screen.
* Update function for `CM_FADE_IN_START`
*/
void FileChoose_StartFadeIn(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_StartFadeIn(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
FileChoose_FadeInMenuElements(&this->state);
FileSelect_FadeInMenuElements(&this->state);
sScreenFillAlpha -= 40;
this->windowPosX -= 20;
@ -145,11 +145,11 @@ void FileChoose_StartFadeIn(GameState* thisx) {
* Fade in the controls text at the bottom of the screen.
* Update function for `CM_FADE_IN_END`
*/
void FileChoose_FinishFadeIn(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_FinishFadeIn(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->controlsAlpha += VREG(1);
FileChoose_FadeInMenuElements(&this->state);
FileSelect_FadeInMenuElements(&this->state);
if (this->titleAlpha[0] >= 255) {
this->titleAlpha[0] = 255;
@ -167,9 +167,9 @@ void FileChoose_FinishFadeIn(GameState* thisx) {
* Lastly, set any warning labels if appropriate.
* Update function for `CM_MAIN_MENU`
*/
void FileChoose_UpdateMainMenu(GameState* thisx) {
void FileSelect_UpdateMainMenu(GameState* thisx) {
static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
Input* input = &this->state.input[0];
@ -281,7 +281,7 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
/**
* Update function for `CM_UNUSED_31`
*/
void FileChoose_UnusedCM31(GameState* thisx) {
void FileSelect_UnusedCM31(GameState* thisx) {
}
/**
@ -290,8 +290,8 @@ void FileChoose_UnusedCM31(GameState* thisx) {
* Unused in the final game, was possibly used for debugging.
* Update function for `CM_UNUSED_DELAY`
*/
void FileChoose_UnusedCMDelay(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_UnusedCMDelay(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
XREG(73) += 2;
@ -305,8 +305,8 @@ void FileChoose_UnusedCMDelay(GameState* thisx) {
* Rotate the window from the main menu to the name entry menu.
* Update function for `CM_ROTATE_TO_NAME_ENTRY`
*/
void FileChoose_RotateToNameEntry(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_RotateToNameEntry(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->windowRot += VREG(16);
@ -320,8 +320,8 @@ void FileChoose_RotateToNameEntry(GameState* thisx) {
* Rotate the window from the main menu to the options menu.
* Update function for `CM_MAIN_TO_OPTIONS`
*/
void FileChoose_RotateToOptions(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_RotateToOptions(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->windowRot += VREG(16);
@ -335,8 +335,8 @@ void FileChoose_RotateToOptions(GameState* thisx) {
* Rotate the window from the options menu to the main menu.
* Update function for `CM_NAME_ENTRY_TO_MAIN` and `CM_OPTIONS_TO_MAIN`
*/
void FileChoose_RotateToMain(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_RotateToMain(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->windowRot += VREG(16);
@ -347,36 +347,36 @@ void FileChoose_RotateToMain(GameState* thisx) {
}
static void (*gConfigModeUpdateFuncs[])(GameState*) = {
FileChoose_StartFadeIn, FileChoose_FinishFadeIn,
FileChoose_UpdateMainMenu, FileChoose_SetupCopySource,
FileChoose_SelectCopySource, FileChoose_SetupCopyDest1,
FileChoose_SetupCopyDest2, FileChoose_SelectCopyDest,
FileChoose_ExitToCopySource1, FileChoose_ExitToCopySource2,
FileChoose_SetupCopyConfirm1, FileChoose_SetupCopyConfirm2,
FileChoose_CopyConfirm, FileChoose_ReturnToCopyDest,
FileChoose_CopyAnim1, FileChoose_CopyAnim2,
FileChoose_CopyAnim3, FileChoose_CopyAnim4,
FileChoose_CopyAnim5, FileChoose_ExitCopyToMain,
FileChoose_SetupEraseSelect, FileChoose_EraseSelect,
FileChoose_SetupEraseConfirm1, FileChoose_SetupEraseConfirm2,
FileChoose_EraseConfirm, FileChoose_ExitToEraseSelect1,
FileChoose_ExitToEraseSelect2, FileChoose_EraseAnim1,
FileChoose_EraseAnim2, FileChoose_EraseAnim3,
FileChoose_ExitEraseToMain, FileChoose_UnusedCM31,
FileChoose_RotateToNameEntry, FileChoose_UpdateKeyboardCursor,
FileChoose_StartNameEntry, FileChoose_RotateToMain,
FileChoose_RotateToOptions, FileChoose_UpdateOptionsMenu,
FileChoose_StartOptions, FileChoose_RotateToMain,
FileChoose_UnusedCMDelay,
FileSelect_StartFadeIn, FileSelect_FinishFadeIn,
FileSelect_UpdateMainMenu, FileSelect_SetupCopySource,
FileSelect_SelectCopySource, FileSelect_SetupCopyDest1,
FileSelect_SetupCopyDest2, FileSelect_SelectCopyDest,
FileSelect_ExitToCopySource1, FileSelect_ExitToCopySource2,
FileSelect_SetupCopyConfirm1, FileSelect_SetupCopyConfirm2,
FileSelect_CopyConfirm, FileSelect_ReturnToCopyDest,
FileSelect_CopyAnim1, FileSelect_CopyAnim2,
FileSelect_CopyAnim3, FileSelect_CopyAnim4,
FileSelect_CopyAnim5, FileSelect_ExitCopyToMain,
FileSelect_SetupEraseSelect, FileSelect_EraseSelect,
FileSelect_SetupEraseConfirm1, FileSelect_SetupEraseConfirm2,
FileSelect_EraseConfirm, FileSelect_ExitToEraseSelect1,
FileSelect_ExitToEraseSelect2, FileSelect_EraseAnim1,
FileSelect_EraseAnim2, FileSelect_EraseAnim3,
FileSelect_ExitEraseToMain, FileSelect_UnusedCM31,
FileSelect_RotateToNameEntry, FileSelect_UpdateKeyboardCursor,
FileSelect_StartNameEntry, FileSelect_RotateToMain,
FileSelect_RotateToOptions, FileSelect_UpdateOptionsMenu,
FileSelect_StartOptions, FileSelect_RotateToMain,
FileSelect_UnusedCMDelay,
};
/**
* Updates the alpha of the cursor to make it pulsate.
* On the debug rom, this function also handles switching languages with controller 3.
*/
void FileChoose_PulsateCursor(GameState* thisx) {
void FileSelect_PulsateCursor(GameState* thisx) {
static s16 cursorAlphaTargets[] = { 70, 200 };
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
s16 alphaStep;
SramContext* sramCtx = &this->sramCtx;
Input* debugInput = &this->state.input[2];
@ -438,14 +438,14 @@ void FileChoose_PulsateCursor(GameState* thisx) {
}
}
void FileChoose_ConfigModeUpdate(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ConfigModeUpdate(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
gConfigModeUpdateFuncs[this->configMode](&this->state);
}
void FileChoose_SetWindowVtx(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetWindowVtx(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 i;
s16 j;
s16 x;
@ -501,8 +501,8 @@ static s16 D_8081283C[] = { 0x0040, 0x0054, 0x0068, 0x0278 };
static s16 D_80812844[] = { 0x0274, 0x0278 };
static s16 D_80812848[] = { 0x0274, 0x0278 };
void FileChoose_SetWindowContentVtx(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetWindowContentVtx(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 phi_t2;
s16 phi_t0;
s16 phi_t5;
@ -797,8 +797,8 @@ static void* sHeartTextures[] = { gHeartFullTex, gDefenseHeartFullTex };
static s16 sHeartPrimColors[2][3] = { { 255, 70, 50 }, { 200, 0, 0 } };
static s16 sHeartEnvColors[2][3] = { { 50, 40, 60 }, { 255, 255, 255 } };
void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
FileSelectState* this = (FileSelectState*)thisx;
Font* sp54 = &this->font;
s32 heartType;
s16 i;
@ -821,7 +821,7 @@ void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
sNamePrimColors[isActive][2], this->nameAlpha[fileIndex]);
for (i = 0, vtxOffset = 0; vtxOffset < 0x20; i++, vtxOffset += 4) {
FileChoose_DrawCharacter(this->state.gfxCtx,
FileSelect_DrawCharacter(this->state.gfxCtx,
sp54->fontBuf + this->fileNames[fileIndex][i] * FONT_CHAR_TEX_SIZE, vtxOffset);
}
}
@ -833,11 +833,11 @@ void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x00, 255, 255, 255, this->fileInfoAlpha[fileIndex]);
gSPVertex(POLY_OPA_DISP++, &this->windowContentVtx[D_8081284C[fileIndex]] + 0x24, 12, 0);
FileChoose_SplitNumber(this->deaths[fileIndex], &deathCountSplit[0], &deathCountSplit[1], &deathCountSplit[2]);
FileSelect_SplitNumber(this->deaths[fileIndex], &deathCountSplit[0], &deathCountSplit[1], &deathCountSplit[2]);
// draw death count
for (i = 0, vtxOffset = 0; i < 3; i++, vtxOffset += 4) {
FileChoose_DrawCharacter(this->state.gfxCtx, sp54->fontBuf + deathCountSplit[i] * FONT_CHAR_TEX_SIZE,
FileSelect_DrawCharacter(this->state.gfxCtx, sp54->fontBuf + deathCountSplit[i] * FONT_CHAR_TEX_SIZE,
vtxOffset);
}
@ -859,7 +859,7 @@ void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
for (vtxOffset = 0, j = 0; j < i; j++, vtxOffset += 4) {
gSPVertex(POLY_OPA_DISP++, &this->windowContentVtx[D_8081284C[fileIndex] + vtxOffset] + 0x30, 4, 0);
POLY_OPA_DISP = FileChoose_QuadTextureIA8(POLY_OPA_DISP, sHeartTextures[heartType], 0x10, 0x10, 0);
POLY_OPA_DISP = FileSelect_QuadTextureIA8(POLY_OPA_DISP, sHeartTextures[heartType], 0x10, 0x10, 0);
}
gDPPipeSync(POLY_OPA_DISP++);
@ -880,7 +880,7 @@ void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
} else {
POLY_OPA_DISP = FileChoose_QuadTextureIA8(POLY_OPA_DISP, sQuestItemTextures[j], 0x10, 0x10, 0);
POLY_OPA_DISP = FileSelect_QuadTextureIA8(POLY_OPA_DISP, sQuestItemTextures[j], 0x10, 0x10, 0);
}
}
}
@ -937,8 +937,8 @@ static void* sOptionsButtonTextures[] = {
* Draw most window contents including buttons, labels, and icons.
* Does not include anything from the keyboard and settings windows.
*/
void FileChoose_DrawWindowContents(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_DrawWindowContents(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 fileIndex;
s16 temp;
s16 i;
@ -1034,7 +1034,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
// draw file info
for (fileIndex = 0; fileIndex < 3; fileIndex++) {
isActive = ((this->n64ddFlag == this->n64ddFlags[fileIndex]) || (this->nameBoxAlpha[fileIndex] == 0)) ? 0 : 1;
FileChoose_DrawFileInfo(&this->state, fileIndex, isActive);
FileSelect_DrawFileInfo(&this->state, fileIndex, isActive);
}
gDPPipeSync(POLY_OPA_DISP++);
@ -1113,8 +1113,8 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
CLOSE_DISPS(this->state.gfxCtx, "../z_file_choose.c", 2198);
}
void FileChoose_ConfigModeDraw(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ConfigModeDraw(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
f32 eyeX;
f32 eyeY;
f32 eyeZ;
@ -1126,16 +1126,16 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
eyeY = ZREG(13);
eyeZ = 1000.0f * Math_SinS(ZREG(11)) + 1000.0f * Math_CosS(ZREG(11));
FileChoose_SetView(this, eyeX, eyeY, eyeZ);
FileSelect_SetView(this, eyeX, eyeY, eyeZ);
SkyboxDraw_Draw(&this->skyboxCtx, this->state.gfxCtx, 1, this->envCtx.skyboxBlend, eyeX, eyeY, eyeZ);
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_NONE);
ZREG(11) += ZREG(10);
Environment_UpdateSkybox(SKYBOX_NORMAL_SKY, &this->envCtx, &this->skyboxCtx);
gDPPipeSync(POLY_OPA_DISP++);
Gfx_SetupDL_42Opa(this->state.gfxCtx);
FileChoose_SetView(this, 0.0f, 0.0f, 64.0f);
FileChoose_SetWindowVtx(&this->state);
FileChoose_SetWindowContentVtx(&this->state);
FileSelect_SetView(this, 0.0f, 0.0f, 64.0f);
FileSelect_SetWindowVtx(&this->state);
FileSelect_SetWindowContentVtx(&this->state);
if ((this->configMode != CM_NAME_ENTRY) && (this->configMode != CM_START_NAME_ENTRY)) {
gDPPipeSync(POLY_OPA_DISP++);
@ -1165,7 +1165,7 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
gDPPipeSync(POLY_OPA_DISP++);
FileChoose_DrawWindowContents(&this->state);
FileSelect_DrawWindowContents(&this->state);
}
// draw name entry menu
@ -1193,7 +1193,7 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
gDPPipeSync(POLY_OPA_DISP++);
FileChoose_DrawNameEntry(&this->state);
FileSelect_DrawNameEntry(&this->state);
}
// draw options menu
@ -1222,11 +1222,11 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
gDPPipeSync(POLY_OPA_DISP++);
FileChoose_DrawOptions(&this->state);
FileSelect_DrawOptions(&this->state);
}
gDPPipeSync(POLY_OPA_DISP++);
FileChoose_SetView(this, 0.0f, 0.0f, 64.0f);
FileSelect_SetView(this, 0.0f, 0.0f, 64.0f);
CLOSE_DISPS(this->state.gfxCtx, "../z_file_choose.c", 2352);
}
@ -1235,8 +1235,8 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
* Fade out the main menu elements to transition to select mode.
* Update function for `SM_FADE_MAIN_TO_SELECT`
*/
void FileChoose_FadeMainToSelect(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_FadeMainToSelect(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
@ -1268,9 +1268,9 @@ void FileChoose_FadeMainToSelect(GameState* thisx) {
* Moves the selected file to the top of the window.
* Update function for `SM_MOVE_FILE_TO_TOP`
*/
void FileChoose_MoveSelectedFileToTop(GameState* thisx) {
void FileSelect_MoveSelectedFileToTop(GameState* thisx) {
static s16 fileYOffsets[] = { 0, 16, 32 }; // amount to move by to reach the top of the screen
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
s16 yStep;
yStep = ABS(this->buttonYOffsets[this->buttonIndex] - fileYOffsets[this->buttonIndex]) / this->actionTimer;
@ -1288,8 +1288,8 @@ void FileChoose_MoveSelectedFileToTop(GameState* thisx) {
* Fade in the file info for the selected file.
* Update function for `SM_FADE_IN_FILE_INFO`
*/
void FileChoose_FadeInFileInfo(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_FadeInFileInfo(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->fileInfoAlpha[this->buttonIndex] += 25;
this->nameBoxAlpha[this->buttonIndex] -= 50;
@ -1314,8 +1314,8 @@ void FileChoose_FadeInFileInfo(GameState* thisx) {
* Update the cursor and handle the option that the player picks for confirming the selected file.
* Update function for `SM_CONFIRM_FILE`
*/
void FileChoose_ConfirmFile(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ConfirmFile(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
Input* input = &this->state.input[0];
if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) {
@ -1345,8 +1345,8 @@ void FileChoose_ConfirmFile(GameState* thisx) {
* Fade out the file info for the selected file before returning to the main menu.
* Update function for `SM_FADE_OUT_FILE_INFO`
*/
void FileChoose_FadeOutFileInfo(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_FadeOutFileInfo(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->fileInfoAlpha[this->buttonIndex] -= 25;
this->nameBoxAlpha[this->buttonIndex] += 25;
@ -1368,8 +1368,8 @@ void FileChoose_FadeOutFileInfo(GameState* thisx) {
* Move the selected file back to the slot position then go to config mode for the main menu.
* Update function for `SM_MOVE_FILE_TO_SLOT`
*/
void FileChoose_MoveSelectedFileToSlot(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_MoveSelectedFileToSlot(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 yStep;
s16 i;
@ -1419,8 +1419,8 @@ void FileChoose_MoveSelectedFileToSlot(GameState* thisx) {
* Fill the screen with black to fade out.
* Update function for `SM_FADE_OUT`
*/
void FileChoose_FadeOut(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_FadeOut(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
sScreenFillAlpha += VREG(10);
@ -1435,8 +1435,8 @@ void FileChoose_FadeOut(GameState* thisx) {
* Note: On Debug ROM, File 1 will go to Map Select.
* Update function for `SM_LOAD_GAME`
*/
void FileChoose_LoadGame(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_LoadGame(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
u16 swordEquipValue;
s32 pad;
@ -1446,7 +1446,7 @@ void FileChoose_LoadGame(GameState* thisx) {
gSaveContext.fileNum = this->buttonIndex;
Sram_OpenSave(&this->sramCtx);
gSaveContext.gameMode = 0;
SET_NEXT_GAMESTATE(&this->state, Select_Init, SelectContext);
SET_NEXT_GAMESTATE(&this->state, MapSelect_Init, MapSelectState);
this->state.running = false;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@ -1515,18 +1515,18 @@ void FileChoose_LoadGame(GameState* thisx) {
}
static void (*gSelectModeUpdateFuncs[])(GameState*) = {
FileChoose_FadeMainToSelect, FileChoose_MoveSelectedFileToTop, FileChoose_FadeInFileInfo, FileChoose_ConfirmFile,
FileChoose_FadeOutFileInfo, FileChoose_MoveSelectedFileToSlot, FileChoose_FadeOut, FileChoose_LoadGame,
FileSelect_FadeMainToSelect, FileSelect_MoveSelectedFileToTop, FileSelect_FadeInFileInfo, FileSelect_ConfirmFile,
FileSelect_FadeOutFileInfo, FileSelect_MoveSelectedFileToSlot, FileSelect_FadeOut, FileSelect_LoadGame,
};
void FileChoose_SelectModeUpdate(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SelectModeUpdate(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
gSelectModeUpdateFuncs[this->selectMode](&this->state);
}
void FileChoose_SelectModeDraw(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SelectModeDraw(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
f32 eyeX;
f32 eyeY;
f32 eyeZ;
@ -1539,16 +1539,16 @@ void FileChoose_SelectModeDraw(GameState* thisx) {
eyeY = ZREG(13);
eyeZ = 1000.0f * Math_SinS(ZREG(11)) + 1000.0f * Math_CosS(ZREG(11));
FileChoose_SetView(this, eyeX, eyeY, eyeZ);
FileSelect_SetView(this, eyeX, eyeY, eyeZ);
SkyboxDraw_Draw(&this->skyboxCtx, this->state.gfxCtx, 1, this->envCtx.skyboxBlend, eyeX, eyeY, eyeZ);
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_NONE);
ZREG(11) += ZREG(10);
Environment_UpdateSkybox(SKYBOX_NORMAL_SKY, &this->envCtx, &this->skyboxCtx);
gDPPipeSync(POLY_OPA_DISP++);
Gfx_SetupDL_42Opa(this->state.gfxCtx);
FileChoose_SetView(this, 0.0f, 0.0f, 64.0f);
FileChoose_SetWindowVtx(&this->state);
FileChoose_SetWindowContentVtx(&this->state);
FileSelect_SetView(this, 0.0f, 0.0f, 64.0f);
FileSelect_SetWindowVtx(&this->state);
FileSelect_SetWindowContentVtx(&this->state);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
@ -1570,32 +1570,32 @@ void FileChoose_SelectModeDraw(GameState* thisx) {
gSPVertex(POLY_OPA_DISP++, &this->windowVtx[64], 16, 0);
gSPDisplayList(POLY_OPA_DISP++, gFileSelWindow3DL);
FileChoose_DrawWindowContents(&this->state);
FileSelect_DrawWindowContents(&this->state);
gDPPipeSync(POLY_OPA_DISP++);
FileChoose_SetView(this, 0.0f, 0.0f, 64.0f);
FileSelect_SetView(this, 0.0f, 0.0f, 64.0f);
CLOSE_DISPS(this->state.gfxCtx, "../z_file_choose.c", 2834);
}
static void (*gFileSelectDrawFuncs[])(GameState*) = {
FileChoose_InitModeDraw,
FileChoose_ConfigModeDraw,
FileChoose_SelectModeDraw,
FileSelect_InitModeDraw,
FileSelect_ConfigModeDraw,
FileSelect_SelectModeDraw,
};
static void (*gFileSelectUpdateFuncs[])(GameState*) = {
FileChoose_InitModeUpdate,
FileChoose_ConfigModeUpdate,
FileChoose_SelectModeUpdate,
FileSelect_InitModeUpdate,
FileSelect_ConfigModeUpdate,
FileSelect_SelectModeUpdate,
};
void FileChoose_Main(GameState* thisx) {
void FileSelect_Main(GameState* thisx) {
static void* controlsTextures[] = {
gFileSelControlsENGTex,
gFileSelControlsGERTex,
gFileSelControlsFRATex,
};
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
Input* input = &this->state.input[0];
OPEN_DISPS(this->state.gfxCtx, "../z_file_choose.c", 2898);
@ -1669,7 +1669,7 @@ void FileChoose_Main(GameState* thisx) {
this->emptyFileTextAlpha = 0;
FileChoose_PulsateCursor(&this->state);
FileSelect_PulsateCursor(&this->state);
gFileSelectUpdateFuncs[this->menuMode](&this->state);
gFileSelectDrawFuncs[this->menuMode](&this->state);
@ -1695,8 +1695,8 @@ void FileChoose_Main(GameState* thisx) {
CLOSE_DISPS(this->state.gfxCtx, "../z_file_choose.c", 3035);
}
void FileChoose_InitContext(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_InitContext(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
EnvironmentContext* envCtx = &this->envCtx;
SramContext* sramCtx = &this->sramCtx;
@ -1866,11 +1866,11 @@ void FileChoose_InitContext(GameState* thisx) {
}
}
void FileChoose_Destroy(GameState* thisx) {
void FileSelect_Destroy(GameState* thisx) {
}
void FileChoose_Init(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_Init(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
u32 size = (u32)_title_staticSegmentRomEnd - (u32)_title_staticSegmentRomStart;
s32 pad;
@ -1889,9 +1889,9 @@ void FileChoose_Init(GameState* thisx) {
Matrix_Init(&this->state);
View_Init(&this->view, this->state.gfxCtx);
this->state.main = FileChoose_Main;
this->state.destroy = FileChoose_Destroy;
FileChoose_InitContext(&this->state);
this->state.main = FileSelect_Main;
this->state.destroy = FileSelect_Destroy;
FileSelect_InitContext(&this->state);
Font_LoadOrderedFont(&this->font);
Audio_QueueSeqCmd(0xF << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA);
func_800F5E18(SEQ_PLAYER_BGM_MAIN, NA_BGM_FILE_SELECT, 0, 7, 1);

View file

@ -1,4 +1,4 @@
#include "file_choose.h"
#include "file_select.h"
// when choosing a file to copy or erase, the 6 main menu buttons are placed at these offsets
static s16 sChooseFileYOffsets[] = { -48, -48, -48, -24, -24, 0 };
@ -15,8 +15,8 @@ static s16 sEraseDelayTimer = 15;
* Move buttons into place for the select source screen and fade in the proper labels.
* Update function for `CM_SETUP_COPY_SOURCE`
*/
void FileChoose_SetupCopySource(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetupCopySource(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 yStep;
s16 i;
@ -58,8 +58,8 @@ void FileChoose_SetupCopySource(GameState* thisx) {
* Allow the player to select a file to copy or exit back to the main menu.
* Update function for `CM_SELECT_COPY_SOURCE`
*/
void FileChoose_SelectCopySource(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SelectCopySource(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
Input* input = &this->state.input[0];
@ -120,8 +120,8 @@ void FileChoose_SelectCopySource(GameState* thisx) {
* Move the menu buttons into place for the copy destination selection and switch titles.
* Update function for `CM_SETUP_COPY_DEST_1`
*/
void FileChoose_SetupCopyDest1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetupCopyDest1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 yStep;
s16 i;
@ -154,8 +154,8 @@ void FileChoose_SetupCopyDest1(GameState* thisx) {
* Show the file info of the file selected to copy from.
* Update function for `CM_SETUP_COPY_DEST_2`
*/
void FileChoose_SetupCopyDest2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetupCopyDest2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->nameBoxAlpha[this->buttonIndex] -= 25;
this->fileInfoAlpha[this->buttonIndex] += 25;
@ -174,8 +174,8 @@ void FileChoose_SetupCopyDest2(GameState* thisx) {
* Allow the player to select a slot to copy to or exit to the copy select screen.
* Update function for `CM_SELECT_COPY_DEST`
*/
void FileChoose_SelectCopyDest(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SelectCopyDest(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
Input* input = &this->state.input[0];
@ -248,8 +248,8 @@ void FileChoose_SelectCopyDest(GameState* thisx) {
* Fade out file info, bring back the name box, and get ready to return to copy source screen.
* Update function for `CM_EXIT_TO_COPY_SOURCE_1`
*/
void FileChoose_ExitToCopySource1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ExitToCopySource1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->fileInfoAlpha[this->buttonIndex] -= 25;
this->nameBoxAlpha[this->buttonIndex] += 25;
@ -268,8 +268,8 @@ void FileChoose_ExitToCopySource1(GameState* thisx) {
* Move the buttons back into place and return to copy source select.
* Update function for `CM_EXIT_TO_COPY_SOURCE_2`
*/
void FileChoose_ExitToCopySource2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ExitToCopySource2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
@ -301,9 +301,9 @@ void FileChoose_ExitToCopySource2(GameState* thisx) {
* Rearrange buttons on the screen to prepare for copy confirmation.
* Update function for `CM_SETUP_COPY_CONFIRM_1`
*/
void FileChoose_SetupCopyConfirm1(GameState* thisx) {
void FileSelect_SetupCopyConfirm1(GameState* thisx) {
static s16 D_808124A4[] = { -56, -40, -24, 0 };
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
@ -346,8 +346,8 @@ void FileChoose_SetupCopyConfirm1(GameState* thisx) {
* Fade in the 'Yes' button before allowing the player to decide.
* Update function for `CM_SETUP_COPY_CONFIRM_2`
*/
void FileChoose_SetupCopyConfirm2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetupCopyConfirm2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] += 25;
this->actionTimer--;
@ -363,8 +363,8 @@ void FileChoose_SetupCopyConfirm2(GameState* thisx) {
* If yes is selected, the actual copy occurs in this function before moving on to the animation.
* Update function for `CM_COPY_CONFIRM`
*/
void FileChoose_CopyConfirm(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_CopyConfirm(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
Input* input = &this->state.input[0];
u16 dayTime;
@ -398,8 +398,8 @@ void FileChoose_CopyConfirm(GameState* thisx) {
* Move buttons back in place and return to copy destination select.
* Update function for `CM_RETURN_TO_COPY_DEST`
*/
void FileChoose_ReturnToCopyDest(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ReturnToCopyDest(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
@ -443,8 +443,8 @@ void FileChoose_ReturnToCopyDest(GameState* thisx) {
* Hide title
* Update function for `CM_COPY_ANIM_1`
*/
void FileChoose_CopyAnim1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_CopyAnim1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->titleAlpha[0] -= 31;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
@ -464,8 +464,8 @@ void FileChoose_CopyAnim1(GameState* thisx) {
* Move a copy of the file window down and fade in the file info.
* Update function for `CM_COPY_ANIM_2`
*/
void FileChoose_CopyAnim2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_CopyAnim2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 yStep;
this->fileInfoAlpha[this->copyDestFileIndex] += 25;
@ -494,8 +494,8 @@ void FileChoose_CopyAnim2(GameState* thisx) {
* the player to press a button before moving on.
* Update function for `CM_COPY_ANIM_3`
*/
void FileChoose_CopyAnim3(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_CopyAnim3(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
Input* input = &this->state.input[0];
if (this->actionTimer == 75) {
@ -521,8 +521,8 @@ void FileChoose_CopyAnim3(GameState* thisx) {
* Fade out the info boxes for both files and bring in their name boxes. Fade out title.
* Update function for `CM_COPY_ANIM_4`
*/
void FileChoose_CopyAnim4(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_CopyAnim4(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->fileInfoAlpha[this->selectedFileIndex] -= 25;
this->fileInfoAlpha[this->copyDestFileIndex] -= 25;
@ -543,8 +543,8 @@ void FileChoose_CopyAnim4(GameState* thisx) {
* Restore all buttons and labels back to their original place and go back to the main menu.
* Update function for `CM_COPY_ANIM_5`
*/
void FileChoose_CopyAnim5(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_CopyAnim5(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
@ -603,8 +603,8 @@ void FileChoose_CopyAnim5(GameState* thisx) {
* Exit from the copy source screen to the main menu. Return all buttons and labels to their original place.
* Update function for `CM_COPY_RETURN_MAIN`
*/
void FileChoose_ExitCopyToMain(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ExitCopyToMain(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 i;
s16 yStep;
@ -641,8 +641,8 @@ void FileChoose_ExitCopyToMain(GameState* thisx) {
* Move buttons into place for the erase select screen and fade in the proper labels.
* Update function for `CM_SETUP_ERASE_SELECT`
*/
void FileChoose_SetupEraseSelect(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetupEraseSelect(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 i;
s16 yStep;
@ -689,8 +689,8 @@ void FileChoose_SetupEraseSelect(GameState* thisx) {
* Allow the player to select a file to erase or exit back to the main menu.
* Update function for `CM_ERASE_SELECT`
*/
void FileChoose_EraseSelect(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_EraseSelect(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
Input* input = &this->state.input[0];
@ -751,9 +751,9 @@ void FileChoose_EraseSelect(GameState* thisx) {
* ...
* Update function for `CM_SETUP_ERASE_CONFIRM_1`
*/
void FileChoose_SetupEraseConfirm1(GameState* thisx) {
void FileSelect_SetupEraseConfirm1(GameState* thisx) {
static s16 D_808124AC[] = { 0, 16, 32 };
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
@ -807,8 +807,8 @@ void FileChoose_SetupEraseConfirm1(GameState* thisx) {
* Show the file info of the file selected to erase.
* Update function for `CM_SETUP_ERASE_CONFIRM_2`
*/
void FileChoose_SetupEraseConfirm2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetupEraseConfirm2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] += 25;
this->titleAlpha[0] -= 15;
@ -831,8 +831,8 @@ void FileChoose_SetupEraseConfirm2(GameState* thisx) {
* Allow the player to confirm their chioce to erase or return back to erase select.
* Update function for `CM_ERASE_CONFIRM`
*/
void FileChoose_EraseConfirm(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_EraseConfirm(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
Input* input = &this->state.input[0];
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
@ -863,8 +863,8 @@ void FileChoose_EraseConfirm(GameState* thisx) {
* Fade out file info, bring back the name box, and get ready to return to erase select screen.
* Update function for `CM_EXIT_TO_ERASE_SELECT_1`
*/
void FileChoose_ExitToEraseSelect1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ExitToEraseSelect1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->fileInfoAlpha[this->buttonIndex] -= 25;
this->nameBoxAlpha[this->buttonIndex] += 25;
@ -882,8 +882,8 @@ void FileChoose_ExitToEraseSelect1(GameState* thisx) {
* Move the buttons back into place and return to erase select.
* Update function for `CM_EXIT_TO_ERASE_SELECT_2`
*/
void FileChoose_ExitToEraseSelect2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ExitToEraseSelect2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
@ -927,9 +927,9 @@ void FileChoose_ExitToEraseSelect2(GameState* thisx) {
* The actual file deletion occurs in this function
* Update function for `CM_ERASE_ANIM_1`
*/
void FileChoose_EraseAnim1(GameState* thisx) {
void FileSelect_EraseAnim1(GameState* thisx) {
static s16 D_80813800;
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
if (sEraseDelayTimer == 0) {
@ -978,8 +978,8 @@ void FileChoose_EraseAnim1(GameState* thisx) {
* Wait for a delay timer or for the palyer to press a button before returning to the main menu.
* Update function for `CM_ERASE_ANIM_2`
*/
void FileChoose_EraseAnim2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_EraseAnim2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
Input* input = &this->state.input[0];
if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_B | BTN_START) || (--this->actionTimer == 0)) {
@ -996,8 +996,8 @@ void FileChoose_EraseAnim2(GameState* thisx) {
* Exit from the erase animation to the main menu. Return all buttons and labels to their original place.
* Update function for `CM_ERASE_ANIM_3`
*/
void FileChoose_EraseAnim3(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_EraseAnim3(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
@ -1050,8 +1050,8 @@ void FileChoose_EraseAnim3(GameState* thisx) {
* Exit from the erase select screen to the main menu. Return all buttons and labels to their original place.
* Update function for `CM_EXIT_ERASE_TO_MAIN`
*/
void FileChoose_ExitEraseToMain(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_ExitEraseToMain(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 i;
s16 yStep;

View file

@ -1,4 +1,4 @@
#include "file_choose.h"
#include "file_select.h"
#include "assets/textures/title_static/title_static.h"
#include "assets/overlays/ovl_File_Choose/ovl_file_choose.h"
@ -18,7 +18,7 @@ static s16 D_80812544[] = {
0x0003, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0001, 0x0003,
};
void FileChoose_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx) {
void FileSelect_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx) {
OPEN_DISPS(gfxCtx, "../z_file_nameset_PAL.c", 110);
gDPLoadTextureBlock_4b(POLY_OPA_DISP++, texture, G_IM_FMT_I, 16, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP,
@ -28,8 +28,8 @@ void FileChoose_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx) {
CLOSE_DISPS(gfxCtx, "../z_file_nameset_PAL.c", 119);
}
void FileChoose_SetKeyboardVtx(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetKeyboardVtx(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 val;
s16 phi_t2;
s16 phi_t0;
@ -108,8 +108,8 @@ static s16 D_80812604[] = {
* Set vertices used by all elements of the name entry screen that are NOT the keyboard.
* This includes the cursor highlight, the name entry plate and characters, and the buttons.
*/
void FileChoose_SetNameEntryVtx(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_SetNameEntryVtx(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
Font* font = &this->font;
s16 phi_s0;
s16 phi_t1;
@ -211,7 +211,7 @@ void FileChoose_SetNameEntryVtx(GameState* thisx) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->nameEntryBoxAlpha);
for (phi_v0 = 0, phi_s0 = 0; phi_s0 < 0x20; phi_s0 += 4, phi_v0++) {
FileChoose_DrawCharacter(this->state.gfxCtx,
FileSelect_DrawCharacter(this->state.gfxCtx,
font->fontBuf + this->fileNames[this->buttonIndex][phi_v0] * FONT_CHAR_TEX_SIZE,
phi_s0);
}
@ -229,8 +229,8 @@ void FileChoose_SetNameEntryVtx(GameState* thisx) {
CLOSE_DISPS(this->state.gfxCtx, "../z_file_nameset_PAL.c", 307);
}
void FileChoose_DrawKeyboard(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_DrawKeyboard(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
Font* font = &this->font;
s16 i = 0;
s16 tmp;
@ -249,20 +249,20 @@ void FileChoose_DrawKeyboard(GameState* thisx) {
gSPVertex(POLY_OPA_DISP++, &this->keyboardVtx[vtx], 32, 0);
for (tmp = 0; tmp < 32; i++, tmp += 4) {
FileChoose_DrawCharacter(this->state.gfxCtx, font->fontBuf + D_808123F0[i] * FONT_CHAR_TEX_SIZE, tmp);
FileSelect_DrawCharacter(this->state.gfxCtx, font->fontBuf + D_808123F0[i] * FONT_CHAR_TEX_SIZE, tmp);
}
vtx += 32;
}
gSPVertex(POLY_OPA_DISP++, &this->keyboardVtx[0x100], 4, 0);
FileChoose_DrawCharacter(this->state.gfxCtx, font->fontBuf + D_808123F0[i] * FONT_CHAR_TEX_SIZE, 0);
FileSelect_DrawCharacter(this->state.gfxCtx, font->fontBuf + D_808123F0[i] * FONT_CHAR_TEX_SIZE, 0);
CLOSE_DISPS(this->state.gfxCtx, "../z_file_nameset_PAL.c", 347);
}
void FileChoose_DrawNameEntry(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_DrawNameEntry(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
Font* font = &this->font;
Input* input = &this->state.input[0];
s16 i;
@ -272,9 +272,9 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
OPEN_DISPS(this->state.gfxCtx, "../z_file_nameset_PAL.c", 368);
FileChoose_SetKeyboardVtx(&this->state);
FileChoose_SetNameEntryVtx(&this->state);
FileChoose_PulsateCursor(&this->state);
FileSelect_SetKeyboardVtx(&this->state);
FileSelect_SetNameEntryVtx(&this->state);
FileSelect_PulsateCursor(&this->state);
tmp = (this->newFileNameCharCount * 4) + 4;
this->nameEntryVtx[36].v.ob[0] = this->nameEntryVtx[38].v.ob[0] = this->nameEntryVtx[tmp].v.ob[0] - 6;
@ -338,7 +338,7 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
gSP1Quadrangle(POLY_OPA_DISP++, 4, 6, 7, 5, 0);
FileChoose_DrawKeyboard(&this->state);
FileSelect_DrawKeyboard(&this->state);
gDPPipeSync(POLY_OPA_DISP++);
Gfx_SetupDL_42Opa(this->state.gfxCtx);
@ -385,7 +385,7 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 0, 255);
gSPVertex(POLY_OPA_DISP++, &this->keyboardVtx[this->charIndex * 4], 4, 0);
FileChoose_DrawCharacter(this->state.gfxCtx,
FileSelect_DrawCharacter(this->state.gfxCtx,
font->fontBuf + D_808123F0[this->charIndex] * FONT_CHAR_TEX_SIZE, 0);
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
@ -486,8 +486,8 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
* After the name entry box is in place, init the keyboard/cursor and change modes.
* Update function for `CM_START_NAME_ENTRY`
*/
void FileChoose_StartNameEntry(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_StartNameEntry(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->nameEntryBoxAlpha += 25;
@ -513,8 +513,8 @@ void FileChoose_StartNameEntry(GameState* thisx) {
* the cursor currently is.
* Update function for `CM_NAME_ENTRY`
*/
void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 prevKbdX;
this->kbdButton = 99;
@ -632,13 +632,13 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
}
/**
* This function is mostly a copy paste of `FileChoose_StartNameEntry`.
* This function is mostly a copy paste of `FileSelect_StartNameEntry`.
* The name entry box fades and slides in even though it is not visible.
* After this is complete, change to the options config mode.
* Update function for `CM_START_OPTIONS`
*/
void FileChoose_StartOptions(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_StartOptions(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->nameEntryBoxAlpha += 25;
@ -663,8 +663,8 @@ static u8 sSelectedSetting;
* and set config mode to rotate back to the main menu.
* Update function for `CM_OPTIONS_MENU`
*/
void FileChoose_UpdateOptionsMenu(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
void FileSelect_UpdateOptionsMenu(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
Input* input = &this->state.input[0];
@ -790,7 +790,7 @@ static OptionsMenuTextureInfo gOptionsMenuSettings[] = {
},
};
void FileChoose_DrawOptionsImpl(GameState* thisx) {
void FileSelect_DrawOptionsImpl(GameState* thisx) {
static s16 cursorPrimRed = 255;
static s16 cursorPrimGreen = 255;
static s16 cursorPrimBlue = 255;
@ -807,7 +807,7 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
{ 0, 0, 0 },
{ 0, 150, 150 },
};
FileChooseContext* this = (FileChooseContext*)thisx;
FileSelectState* this = (FileSelectState*)thisx;
s16 cursorRed;
s16 cursorGreen;
s16 cursorBlue;
@ -1006,6 +1006,6 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
CLOSE_DISPS(this->state.gfxCtx, "../z_file_nameset_PAL.c", 1040);
}
void FileChoose_DrawOptions(GameState* thisx) {
FileChoose_DrawOptionsImpl(thisx);
void FileSelect_DrawOptions(GameState* thisx) {
FileSelect_DrawOptionsImpl(thisx);
}

View file

@ -1,4 +1,4 @@
#include "file_choose.h"
#include "file_select.h"
#include "assets/overlays/ovl_File_Choose/ovl_file_choose.c"

View file

@ -6,7 +6,7 @@
#include "global.h"
void Opening_SetupTitleScreen(OpeningContext* this) {
void TitleSetup_SetupTitleScreen(TitleSetupState* this) {
gSaveContext.gameMode = 1;
this->state.running = false;
gSaveContext.linkAge = LINK_AGE_ADULT;
@ -16,26 +16,26 @@ void Opening_SetupTitleScreen(OpeningContext* this) {
SET_NEXT_GAMESTATE(&this->state, Play_Init, PlayState);
}
void func_80803C5C(OpeningContext* this) {
void func_80803C5C(TitleSetupState* this) {
}
void Opening_Main(GameState* thisx) {
OpeningContext* this = (OpeningContext*)thisx;
void TitleSetup_Main(GameState* thisx) {
TitleSetupState* this = (TitleSetupState*)thisx;
func_80095248(this->state.gfxCtx, 0, 0, 0);
Opening_SetupTitleScreen(this);
TitleSetup_SetupTitleScreen(this);
func_80803C5C(this);
}
void Opening_Destroy(GameState* thisx) {
void TitleSetup_Destroy(GameState* thisx) {
}
void Opening_Init(GameState* thisx) {
OpeningContext* this = (OpeningContext*)thisx;
void TitleSetup_Init(GameState* thisx) {
TitleSetupState* this = (TitleSetupState*)thisx;
R_UPDATE_RATE = 1;
Matrix_Init(&this->state);
View_Init(&this->view, this->state.gfxCtx);
this->state.main = Opening_Main;
this->state.destroy = Opening_Destroy;
this->state.main = TitleSetup_Main;
this->state.destroy = TitleSetup_Destroy;
}

View file

@ -9,12 +9,12 @@
#include "vt.h"
#include "alloca.h"
void Select_LoadTitle(SelectContext* this) {
void MapSelect_LoadTitle(MapSelectState* this) {
this->state.running = false;
SET_NEXT_GAMESTATE(&this->state, Title_Init, TitleContext);
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, ConsoleLogoState);
}
void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
void MapSelect_LoadGame(MapSelectState* this, s32 entranceIndex) {
osSyncPrintf(VT_FGCOL(BLUE));
osSyncPrintf("\n\n\n_%x\n\n\n", gSaveContext.fileNum);
osSyncPrintf(VT_RST);
@ -45,261 +45,261 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
// "Translation" (Actual name)
static SceneSelectEntry sScenes[] = {
// "1: SPOT00" (Hyrule Field)
{ " 1:SPOT00", Select_LoadGame, ENTR_SPOT00_0 },
{ " 1:SPOT00", MapSelect_LoadGame, ENTR_SPOT00_0 },
// "2: SPOT01" (Kakariko Village)
{ " 2:SPOT01", Select_LoadGame, ENTR_SPOT01_0 },
{ " 2:SPOT01", MapSelect_LoadGame, ENTR_SPOT01_0 },
// "3: SPOT02" (Graveyard)
{ " 3:SPOT02", Select_LoadGame, ENTR_SPOT02_0 },
{ " 3:SPOT02", MapSelect_LoadGame, ENTR_SPOT02_0 },
// "4: SPOT03" (Zora's River)
{ " 4:SPOT03", Select_LoadGame, ENTR_SPOT03_0 },
{ " 4:SPOT03", MapSelect_LoadGame, ENTR_SPOT03_0 },
// "5: SPOT04" (Kokiri Forest)
{ " 5:SPOT04", Select_LoadGame, ENTR_SPOT04_0 },
{ " 5:SPOT04", MapSelect_LoadGame, ENTR_SPOT04_0 },
// "6: SPOT05" (Sacred Forest Meadow)
{ " 6:SPOT05", Select_LoadGame, ENTR_SPOT05_0 },
{ " 6:SPOT05", MapSelect_LoadGame, ENTR_SPOT05_0 },
// "7: SPOT06" (Lake Hylia)
{ " 7:SPOT06", Select_LoadGame, ENTR_SPOT06_0 },
{ " 7:SPOT06", MapSelect_LoadGame, ENTR_SPOT06_0 },
// "8: SPOT07" (Zora's Domain)
{ " 8:SPOT07", Select_LoadGame, ENTR_SPOT07_0 },
{ " 8:SPOT07", MapSelect_LoadGame, ENTR_SPOT07_0 },
// "9: SPOT08" (Zora's Fountain)
{ " 9:SPOT08", Select_LoadGame, ENTR_SPOT08_0 },
{ " 9:SPOT08", MapSelect_LoadGame, ENTR_SPOT08_0 },
// "10: SPOT09" (Gerudo Valley)
{ "10:SPOT09", Select_LoadGame, ENTR_SPOT09_0 },
{ "10:SPOT09", MapSelect_LoadGame, ENTR_SPOT09_0 },
// "11: SPOT10" (Lost Woods)
{ "11:SPOT10", Select_LoadGame, ENTR_SPOT10_0 },
{ "11:SPOT10", MapSelect_LoadGame, ENTR_SPOT10_0 },
// "12: SPOT11" (Desert Colossus)
{ "12:SPOT11", Select_LoadGame, ENTR_SPOT11_0 },
{ "12:SPOT11", MapSelect_LoadGame, ENTR_SPOT11_0 },
// "13: SPOT12" (Gerudo's Fortress)
{ "13:SPOT12", Select_LoadGame, ENTR_SPOT12_0 },
{ "13:SPOT12", MapSelect_LoadGame, ENTR_SPOT12_0 },
// "14: SPOT13" (Haunted Wasteland)
{ "14:SPOT13", Select_LoadGame, ENTR_SPOT13_0 },
{ "14:SPOT13", MapSelect_LoadGame, ENTR_SPOT13_0 },
// "15: SPOT15" (Hyrule Castle)
{ "15:SPOT15", Select_LoadGame, ENTR_SPOT15_0 },
{ "15:SPOT15", MapSelect_LoadGame, ENTR_SPOT15_0 },
// "16: SPOT16" (Death Mountain Trail)
{ "16:SPOT16", Select_LoadGame, ENTR_SPOT16_0 },
{ "16:SPOT16", MapSelect_LoadGame, ENTR_SPOT16_0 },
// "17: SPOT17" (Death Mountain Crater)
{ "17:SPOT17", Select_LoadGame, ENTR_SPOT17_0 },
{ "17:SPOT17", MapSelect_LoadGame, ENTR_SPOT17_0 },
// "18: SPOT18" (Goron City)
{ "18:SPOT18", Select_LoadGame, ENTR_SPOT18_0 },
{ "18:SPOT18", MapSelect_LoadGame, ENTR_SPOT18_0 },
// "19: SPOT20" (Lon Lon Ranch)
{ "19:SPOT20", Select_LoadGame, ENTR_SPOT20_0 },
{ "19:SPOT20", MapSelect_LoadGame, ENTR_SPOT20_0 },
// "20: Chamber of Time" (Temple Of Time)
{ "20:" GFXP_HIRAGANA "トキノマ", Select_LoadGame, ENTR_TOKINOMA_0 },
{ "20:" GFXP_HIRAGANA "トキノマ", MapSelect_LoadGame, ENTR_TOKINOMA_0 },
// "21: Chamber of the Sages" (Chamber of the Sages)
{ "21:" GFXP_HIRAGANA "ケンジャノマ", Select_LoadGame, ENTR_KENJYANOMA_0 },
{ "21:" GFXP_HIRAGANA "ケンジャノマ", MapSelect_LoadGame, ENTR_KENJYANOMA_0 },
// "22: Target Range" (Shooting Gallery)
{ "22:" GFXP_HIRAGANA "シャテキジョウ", Select_LoadGame, ENTR_SYATEKIJYOU_0 },
{ "22:" GFXP_HIRAGANA "シャテキジョウ", MapSelect_LoadGame, ENTR_SYATEKIJYOU_0 },
// "23: Hyrule Garden Game" (Hyrule Garden Minigame)
{ "23:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム", Select_LoadGame, ENTR_HAIRAL_NIWA_0 },
{ "23:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム", MapSelect_LoadGame, ENTR_HAIRAL_NIWA_0 },
// "24: Grave Dive Hole" (Grave (Redead))
{ "24:" GFXP_HIRAGANA "ハカシタトビコミアナ", Select_LoadGame, ENTR_HAKAANA_0 },
{ "24:" GFXP_HIRAGANA "ハカシタトビコミアナ", MapSelect_LoadGame, ENTR_HAKAANA_0 },
// "25: Grave Dive Hole 2" (Grave (Fairy's Fountain))
{ "25:" GFXP_HIRAGANA "ハカシタトビコミアナ 2", Select_LoadGame, ENTR_HAKAANA2_0 },
{ "25:" GFXP_HIRAGANA "ハカシタトビコミアナ 2", MapSelect_LoadGame, ENTR_HAKAANA2_0 },
// "26: Royal Family's Grave" (Royal Family's Tomb)
{ "26:" GFXP_HIRAGANA "オウケ ノ ハカアナ", Select_LoadGame, ENTR_HAKAANA_OUKE_0 },
{ "26:" GFXP_HIRAGANA "オウケ ノ ハカアナ", MapSelect_LoadGame, ENTR_HAKAANA_OUKE_0 },
// "27: Great Fairy's Fountain" (Great Fairy's Fountain (Upgrades))
{ "27:" GFXP_HIRAGANA "ダイヨウセイノイズミ", Select_LoadGame, ENTR_DAIYOUSEI_IZUMI_0 },
{ "27:" GFXP_HIRAGANA "ダイヨウセイノイズミ", MapSelect_LoadGame, ENTR_DAIYOUSEI_IZUMI_0 },
// "28: Fairy Dive Hole" (Fairy's Fountain (Healing Fairies))
{ "28:" GFXP_HIRAGANA "トビコミ ヨウセイ アナ", Select_LoadGame, ENTR_YOUSEI_IZUMI_TATE_0 },
{ "28:" GFXP_HIRAGANA "トビコミ ヨウセイ アナ", MapSelect_LoadGame, ENTR_YOUSEI_IZUMI_TATE_0 },
// "29: Magic Stone Fairy's Fountain" (Great Fairy's Fountain (Spells))
{ "29:" GFXP_HIRAGANA "マホウセキ ヨウセイノイズミ", Select_LoadGame, ENTR_YOUSEI_IZUMI_YOKO_0 },
{ "29:" GFXP_HIRAGANA "マホウセキ ヨウセイノイズミ", MapSelect_LoadGame, ENTR_YOUSEI_IZUMI_YOKO_0 },
// "30: Final Battle With Ganon" (Battle With Ganon)
{ "30:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン", Select_LoadGame, ENTR_GANON_FINAL_0 },
{ "30:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン", MapSelect_LoadGame, ENTR_GANON_FINAL_0 },
// "31: Hyrule Inner Garden" (Castle Courtyard)
{ "31:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ナカニワ", Select_LoadGame, ENTR_NAKANIWA_0 },
{ "31:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ナカニワ", MapSelect_LoadGame, ENTR_NAKANIWA_0 },
// "32: Fishing" (Fishing Pond)
{ "32:" GFXP_HIRAGANA "ツリボリ", Select_LoadGame, ENTR_TURIBORI_0 },
{ "32:" GFXP_HIRAGANA "ツリボリ", MapSelect_LoadGame, ENTR_TURIBORI_0 },
// "33: Bombchu Bowling" (Bombchu Bowling Alley)
{ "33:" GFXP_KATAKANA "ボムチュウボーリング", Select_LoadGame, ENTR_BOWLING_0 },
{ "33:" GFXP_KATAKANA "ボムチュウボーリング", MapSelect_LoadGame, ENTR_BOWLING_0 },
// "34: Lon Lon Ranch - Storehouse 1" (Talon's House)
{ "34:" GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 1", Select_LoadGame, ENTR_SOUKO_0 },
{ "34:" GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 1", MapSelect_LoadGame, ENTR_SOUKO_0 },
// "35: Lon Lon Ranch - Storehouse 2" (Ranch Silo)
{ "35:" GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 2", Select_LoadGame, ENTR_SOUKO_1 },
{ "35:" GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 2", MapSelect_LoadGame, ENTR_SOUKO_1 },
// "36: Lookout Hut" (Guard House)
{ "36:" GFXP_HIRAGANA "ミハリ ゴヤ", Select_LoadGame, ENTR_MIHARIGOYA_0 },
{ "36:" GFXP_HIRAGANA "ミハリ ゴヤ", MapSelect_LoadGame, ENTR_MIHARIGOYA_0 },
// "37: Magic Potion Shop" (Granny's Potion Shop)
{ "37:" GFXP_HIRAGANA "マホウ ノ クスリヤ", Select_LoadGame, ENTR_MAHOUYA_0 },
{ "37:" GFXP_HIRAGANA "マホウ ノ クスリヤ", MapSelect_LoadGame, ENTR_MAHOUYA_0 },
// "38: Treasure Chest Shop" (Treasure Chest Game)
{ "38:" GFXP_HIRAGANA "タカラバコヤ", Select_LoadGame, ENTR_TAKARAYA_0 },
{ "38:" GFXP_HIRAGANA "タカラバコヤ", MapSelect_LoadGame, ENTR_TAKARAYA_0 },
// "39: Gold Skulltula House" (House of Skulltula)
{ "39:" GFXP_HIRAGANA "キン " GFXP_KATAKANA "スタルチュラ ハウス", Select_LoadGame, ENTR_KINSUTA_0 },
{ "39:" GFXP_HIRAGANA "キン " GFXP_KATAKANA "スタルチュラ ハウス", MapSelect_LoadGame, ENTR_KINSUTA_0 },
// "40: Castle Town - Entrance" (Market Entrance)
{ "40:" GFXP_HIRAGANA "ジョウカマチ イリグチ", Select_LoadGame, ENTR_ENTRA_0 },
{ "40:" GFXP_HIRAGANA "ジョウカマチ イリグチ", MapSelect_LoadGame, ENTR_ENTRA_0 },
// "41: Castle Town" (Market)
{ "41:" GFXP_HIRAGANA "ジョウカマチ", Select_LoadGame, ENTR_MARKET_DAY_0 },
{ "41:" GFXP_HIRAGANA "ジョウカマチ", MapSelect_LoadGame, ENTR_MARKET_DAY_0 },
// "42: Back Alley" (Back Alley)
{ "42:" GFXP_HIRAGANA "ウラロジ", Select_LoadGame, ENTR_MARKET_ALLEY_0 },
{ "42:" GFXP_HIRAGANA "ウラロジ", MapSelect_LoadGame, ENTR_MARKET_ALLEY_0 },
// "43: In Front of the Temple of Time" (Temple of Time Exterior)
{ "43:" GFXP_HIRAGANA "トキノシンデン マエ", Select_LoadGame, ENTR_SHRINE_0 },
{ "43:" GFXP_HIRAGANA "トキノシンデン マエ", MapSelect_LoadGame, ENTR_SHRINE_0 },
// "44: Link's House" (Link's House)
{ "44:" GFXP_HIRAGANA "リンクノイエ", Select_LoadGame, ENTR_LINK_HOME_0 },
{ "44:" GFXP_HIRAGANA "リンクノイエ", MapSelect_LoadGame, ENTR_LINK_HOME_0 },
// "45: Kakariko Village Row House" (Carpenter Boss's House)
{ "45:" GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラノナガヤ", Select_LoadGame, ENTR_KAKARIKO_0 },
{ "45:" GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラノナガヤ", MapSelect_LoadGame, ENTR_KAKARIKO_0 },
// "46: Back Alley House" (Back Alley House (Man in Green))
{ "46:" GFXP_HIRAGANA "ウラロジノ イエ", Select_LoadGame, ENTR_KAKARIKO3_0 },
{ "46:" GFXP_HIRAGANA "ウラロジノ イエ", MapSelect_LoadGame, ENTR_KAKARIKO3_0 },
// "47: Kokiri Village - Know-It-All Brothers' House" (Know-It-All Brothers' House)
{ "47:" GFXP_HIRAGANA "コキリノムラ モノシリキョウダイノイエ", Select_LoadGame, ENTR_KOKIRI_HOME_0 },
{ "47:" GFXP_HIRAGANA "コキリノムラ モノシリキョウダイノイエ", MapSelect_LoadGame, ENTR_KOKIRI_HOME_0 },
// "48: Kokiri Village - Twins' House" (Twins' House)
{ "48:" GFXP_HIRAGANA "コキリノムラ フタゴノイエ", Select_LoadGame, ENTR_KOKIRI_HOME3_0 },
{ "48:" GFXP_HIRAGANA "コキリノムラ フタゴノイエ", MapSelect_LoadGame, ENTR_KOKIRI_HOME3_0 },
// "49: Kokiri Village - Mido's House" (Mido's House)
{ "49:" GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "ミド" GFXP_HIRAGANA "ノイエ", Select_LoadGame, ENTR_KOKIRI_HOME4_0 },
{ "49:" GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "ミド" GFXP_HIRAGANA "ノイエ", MapSelect_LoadGame, ENTR_KOKIRI_HOME4_0 },
// "50: Kokiri Village - Saria's House" (Saria's House)
{ "50:" GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "サリア" GFXP_HIRAGANA "ノイエ", Select_LoadGame, ENTR_KOKIRI_HOME5_0 },
{ "50:" GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "サリア" GFXP_HIRAGANA "ノイエ", MapSelect_LoadGame, ENTR_KOKIRI_HOME5_0 },
// "51: Stable" (Stable)
{ "51:" GFXP_HIRAGANA "ウマゴヤ", Select_LoadGame, ENTR_MALON_STABLE_0 },
{ "51:" GFXP_HIRAGANA "ウマゴヤ", MapSelect_LoadGame, ENTR_MALON_STABLE_0 },
// "52: Grave Keeper's House" (Gravekeeper's Hut)
{ "52:" GFXP_HIRAGANA "ハカモリノイエ", Select_LoadGame, ENTR_HUT_0 },
{ "52:" GFXP_HIRAGANA "ハカモリノイエ", MapSelect_LoadGame, ENTR_HUT_0 },
// "53: Back Alley - Dog Lady's House" (Back Alley House)
{ "53:" GFXP_HIRAGANA "ウラロジ イヌオバサンノイエ", Select_LoadGame, ENTR_IMPA_0 },
{ "53:" GFXP_HIRAGANA "ウラロジ イヌオバサンノイエ", MapSelect_LoadGame, ENTR_IMPA_0 },
// "54: Kakariko Village - Impa's House" (Impa's House)
{ "54:" GFXP_HIRAGANA "カカリコムラ " GFXP_KATAKANA "インパ" GFXP_HIRAGANA "ノイエ", Select_LoadGame, ENTR_LABO_0 },
{ "54:" GFXP_HIRAGANA "カカリコムラ " GFXP_KATAKANA "インパ" GFXP_HIRAGANA "ノイエ", MapSelect_LoadGame, ENTR_LABO_0 },
// "55: Hylia Laboratory" (Lakeside Laboratory)
{ "55:" GFXP_KATAKANA "ハイリア" GFXP_HIRAGANA " ケンキュウジョ", Select_LoadGame, ENTR_HYLIA_LABO_0 },
{ "55:" GFXP_KATAKANA "ハイリア" GFXP_HIRAGANA " ケンキュウジョ", MapSelect_LoadGame, ENTR_HYLIA_LABO_0 },
// "56: Tent" (Carpenters' Tent)
{ "56:" GFXP_KATAKANA "テント", Select_LoadGame, ENTR_TENT_0 },
{ "56:" GFXP_KATAKANA "テント", MapSelect_LoadGame, ENTR_TENT_0 },
// "57: Shield Shop" (Bazaar)
{ "57:" GFXP_HIRAGANA "タテノミセ", Select_LoadGame, ENTR_SHOP1_0 },
{ "57:" GFXP_HIRAGANA "タテノミセ", MapSelect_LoadGame, ENTR_SHOP1_0 },
// "58: Kokiri Shop" (Kokiri Shop)
{ "58:" GFXP_HIRAGANA "コキリゾクノミセ", Select_LoadGame, ENTR_KOKIRI_SHOP_0 },
{ "58:" GFXP_HIRAGANA "コキリゾクノミセ", MapSelect_LoadGame, ENTR_KOKIRI_SHOP_0 },
// "59: Goron Shop" (Goron Shop)
{ "59:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA "ノミセ", Select_LoadGame, ENTR_GOLON_0 },
{ "59:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA "ノミセ", MapSelect_LoadGame, ENTR_GOLON_0 },
// "60: Zora Shop" (Zora Shop)
{ "60:" GFXP_KATAKANA "ゾーラ" GFXP_HIRAGANA "ノミセ", Select_LoadGame, ENTR_ZOORA_0 },
{ "60:" GFXP_KATAKANA "ゾーラ" GFXP_HIRAGANA "ノミセ", MapSelect_LoadGame, ENTR_ZOORA_0 },
// "61: Kakariko Village - Potion Shop" (Kakariko Potion Shop)
{ "61:" GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラ クスリヤ", Select_LoadGame, ENTR_DRAG_0 },
{ "61:" GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラ クスリヤ", MapSelect_LoadGame, ENTR_DRAG_0 },
// "62: Castle Town - Potion Shop" (Market Potion Shop)
{ "62:" GFXP_HIRAGANA "ジョウカマチ クスリヤ", Select_LoadGame, ENTR_ALLEY_SHOP_0 },
{ "62:" GFXP_HIRAGANA "ジョウカマチ クスリヤ", MapSelect_LoadGame, ENTR_ALLEY_SHOP_0 },
// "63: Back Alley - Night Shop" (Bombchu Shop)
{ "63:" GFXP_HIRAGANA "ウラロジ ヨルノミセ", Select_LoadGame, ENTR_NIGHT_SHOP_0 },
{ "63:" GFXP_HIRAGANA "ウラロジ ヨルノミセ", MapSelect_LoadGame, ENTR_NIGHT_SHOP_0 },
// "64: Mask Shop" (Happy Mask Shop)
{ "64:" GFXP_HIRAGANA "オメンヤ", Select_LoadGame, ENTR_FACE_SHOP_0 },
{ "64:" GFXP_HIRAGANA "オメンヤ", MapSelect_LoadGame, ENTR_FACE_SHOP_0 },
// "65: Gerudo Training Area" (Gerudo Training Ground)
{ "65:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ノシュウレンジョウ", Select_LoadGame, ENTR_MEN_0 },
{ "65:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ノシュウレンジョウ", MapSelect_LoadGame, ENTR_MEN_0 },
// "66: Fairy Tree Dungeon" (Inside the Deku Tree)
{ "66:" GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン", Select_LoadGame, ENTR_YDAN_0 },
{ "66:" GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_YDAN_0 },
// "67: Fairy Tree Dungeon - Boss" (Gohma's Lair)
{ "67:" GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン ボス", Select_LoadGame, ENTR_YDAN_BOSS_0 },
{ "67:" GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_YDAN_BOSS_0 },
// "68: Dondogo Dungeon" (Dodongo's Cavern)
{ "68:" GFXP_KATAKANA "ドドンゴ ダンジョン", Select_LoadGame, ENTR_DDAN_0 },
{ "68:" GFXP_KATAKANA "ドドンゴ ダンジョン", MapSelect_LoadGame, ENTR_DDAN_0 },
// "69: Dondogo Dungeon - Boss" (King Dodongo's Lair)
{ "69:" GFXP_KATAKANA "ドドンゴ ダンジョン ボス", Select_LoadGame, ENTR_DDAN_BOSS_0 },
{ "69:" GFXP_KATAKANA "ドドンゴ ダンジョン ボス", MapSelect_LoadGame, ENTR_DDAN_BOSS_0 },
// "70: Giant Fish Dungeon" (Inside Jabu-Jabu's Belly)
{ "70:" GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン", Select_LoadGame, ENTR_BDAN_0 },
{ "70:" GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_BDAN_0 },
// "71: Giant Fish Dungeon - Boss" (Barinade's Lair)
{ "71:" GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン ボス", Select_LoadGame, ENTR_BDAN_BOSS_0 },
{ "71:" GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_BDAN_BOSS_0 },
// "72: Forest Temple" (Forest Temple)
{ "72:" GFXP_HIRAGANA "モリノシンデン", Select_LoadGame, ENTR_BMORI1_0 },
{ "72:" GFXP_HIRAGANA "モリノシンデン", MapSelect_LoadGame, ENTR_BMORI1_0 },
// "73: Forest Temple - Boss" (Phantom Ganon's Lair)
{ "73:" GFXP_HIRAGANA "モリノシンデン " GFXP_KATAKANA "ボス", Select_LoadGame, ENTR_MORIBOSSROOM_0 },
{ "73:" GFXP_HIRAGANA "モリノシンデン " GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_MORIBOSSROOM_0 },
// "74: Dungeon Below the Well" (Bottom of the Well)
{ "74:" GFXP_HIRAGANA "イドシタ " GFXP_KATAKANA "ダンジョン", Select_LoadGame, ENTR_HAKADANCH_0 },
{ "74:" GFXP_HIRAGANA "イドシタ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_HAKADANCH_0 },
// "75: Dungeon Beneath the Graves" (Shadow Temple)
{ "75:" GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン", Select_LoadGame, ENTR_HAKADAN_0 },
{ "75:" GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_HAKADAN_0 },
// "76: Dungeon Beneath the Graves - Boss" (Bongo Bongo's Lair)
{ "76:" GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン ボス", Select_LoadGame, ENTR_HAKADAN_BS_0 },
{ "76:" GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_HAKADAN_BS_0 },
// "77: Fire Temple" (Fire Temple)
{ "77:" GFXP_HIRAGANA "ヒノシンデン", Select_LoadGame, ENTR_HIDAN_0 },
{ "77:" GFXP_HIRAGANA "ヒノシンデン", MapSelect_LoadGame, ENTR_HIDAN_0 },
// "78: Fire Temple - Boss" (Volvagia's Lair)
{ "78:" GFXP_HIRAGANA "ヒノシンデン " GFXP_KATAKANA "ボス", Select_LoadGame, ENTR_FIRE_BS_0 },
{ "78:" GFXP_HIRAGANA "ヒノシンデン " GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_FIRE_BS_0 },
// "79: Water Temple" (Water Temple)
{ "79:" GFXP_HIRAGANA "ミズノシンデン", Select_LoadGame, ENTR_MIZUSIN_0 },
{ "79:" GFXP_HIRAGANA "ミズノシンデン", MapSelect_LoadGame, ENTR_MIZUSIN_0 },
// "80: Water Temple - Boss" (Morpha's Lair)
{ "80:" GFXP_HIRAGANA "ミズノシンデン " GFXP_KATAKANA "ボス", Select_LoadGame, ENTR_MIZUSIN_BS_0 },
{ "80:" GFXP_HIRAGANA "ミズノシンデン " GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_MIZUSIN_BS_0 },
// "81: Evil Goddess Statue Dungeon" (Spirit Temple)
{ "81:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン", Select_LoadGame, ENTR_JYASINZOU_0 },
{ "81:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_JYASINZOU_0 },
// "82: Evil Goddess Statue Dungeon - Iron Knuckle" (Iron Knuckle's Lair)
{ "82:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン アイアンナック", Select_LoadGame, ENTR_JYASINBOSS_0 },
{ "82:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン アイアンナック", MapSelect_LoadGame, ENTR_JYASINBOSS_0 },
// "83: Evil Goddess Statue Dungeon - Boss" (Twinrova's Lair)
{ "83:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン ボス", Select_LoadGame, ENTR_JYASINBOSS_2 },
{ "83:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_JYASINBOSS_2 },
// "84: Ganon's Tower" (Ganon's Tower)
{ "84:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ", Select_LoadGame, ENTR_GANON_0 },
{ "84:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ", MapSelect_LoadGame, ENTR_GANON_0 },
// "85: Ganon's Tower - Boss" (Ganondorf's Lair)
{ "85:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ" GFXP_KATAKANA "ボス", Select_LoadGame, ENTR_GANON_BOSS_0 },
{ "85:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ" GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_GANON_BOSS_0 },
// "86: Ice Cavern" (Ice Cavern)
{ "86:" GFXP_HIRAGANA "コオリノドウクツ", Select_LoadGame, ENTR_ICE_DOUKUTO_0 },
{ "86:" GFXP_HIRAGANA "コオリノドウクツ", MapSelect_LoadGame, ENTR_ICE_DOUKUTO_0 },
// "87: Relay Beneath the Graves" (Dampé's Grave)
{ "87:" GFXP_HIRAGANA "ハカシタ" GFXP_KATAKANA "リレー", Select_LoadGame, ENTR_HAKASITARELAY_0 },
{ "87:" GFXP_HIRAGANA "ハカシタ" GFXP_KATAKANA "リレー", MapSelect_LoadGame, ENTR_HAKASITARELAY_0 },
// "88: Ganon's Basement Dungeon" (Inside Ganon's Castle)
{ "88:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ " GFXP_KATAKANA "ダンジョン", Select_LoadGame, ENTR_GANONTIKA_0 },
{ "88:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_GANONTIKA_0 },
// "89: Final Battle With Ganon - Cutscene & Battle" (Ganondorf's Death Scene & Tower Escape Exterior)
{ "89:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン " GFXP_KATAKANA "デモ & バトル", Select_LoadGame,
{ "89:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン " GFXP_KATAKANA "デモ & バトル", MapSelect_LoadGame,
ENTR_GANON_DEMO_0 },
// "90: Ganon's Tower Aftermath 1" (Escaping Ganon's Tower 1)
{ "90:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 1", Select_LoadGame, ENTR_GANON_SONOGO_0 },
{ "90:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 1", MapSelect_LoadGame, ENTR_GANON_SONOGO_0 },
// "91: Ganon's Tower Aftermath 2" (Escaping Ganon's Tower 2)
{ "91:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 2", Select_LoadGame, ENTR_GANON_SONOGO_2 },
{ "91:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 2", MapSelect_LoadGame, ENTR_GANON_SONOGO_2 },
// "92: Ganon's Tower Aftermath 3" (Escaping Ganon's Tower 3)
{ "92:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 3", Select_LoadGame, ENTR_GANON_SONOGO_4 },
{ "92:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 3", MapSelect_LoadGame, ENTR_GANON_SONOGO_4 },
// "93: Ganon's Tower Aftermath 4" (Escaping Ganon's Tower 4)
{ "93:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 4", Select_LoadGame, ENTR_GANON_SONOGO_6 },
{ "93:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 4", MapSelect_LoadGame, ENTR_GANON_SONOGO_6 },
// "94: Ganon's Basement Aftermath" (Escaping Ganon's Castle)
{ "94:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ ソノゴ", Select_LoadGame, ENTR_GANONTIKA_SONOGO_0 },
{ "94:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ ソノゴ", MapSelect_LoadGame, ENTR_GANONTIKA_SONOGO_0 },
// "95: Gerudo Passage 1-2" (Thieves' Hideout 1)
{ "95:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 1-2", Select_LoadGame, ENTR_GERUDOWAY_0 },
{ "95:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 1-2", MapSelect_LoadGame, ENTR_GERUDOWAY_0 },
// "96: Gerudo Passage 3-4 9-10" (Thieves' Hideout 2)
{ "96:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 3-4 9-10", Select_LoadGame, ENTR_GERUDOWAY_2 },
{ "96:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 3-4 9-10", MapSelect_LoadGame, ENTR_GERUDOWAY_2 },
// "97: Gerudo Passage 5-6" (Thieves' Hideout 3)
{ "97:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 5-6", Select_LoadGame, ENTR_GERUDOWAY_4 },
{ "97:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 5-6", MapSelect_LoadGame, ENTR_GERUDOWAY_4 },
// "98: Gerudo Passage 7-8" (Thieves' Hideout 4)
{ "98:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 7-8", Select_LoadGame, ENTR_GERUDOWAY_6 },
{ "98:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 7-8", MapSelect_LoadGame, ENTR_GERUDOWAY_6 },
// "99: Gerudo Passage 11-12" (Thieves' Hideout 5)
{ "99:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 11-12", Select_LoadGame, ENTR_GERUDOWAY_10 },
{ "99:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 11-12", MapSelect_LoadGame, ENTR_GERUDOWAY_10 },
// "100: Gerudo Passage 13" (Thieves' Hideout 6)
{ "100:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 13", Select_LoadGame, ENTR_GERUDOWAY_12 },
{ "100:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 13", MapSelect_LoadGame, ENTR_GERUDOWAY_12 },
// "101: Hidden Dive Hole 0" (Grotto 0 - Gossip Stone & Chest)
{ "101:" GFXP_HIRAGANA "カクシトビコミアナ 0", Select_LoadGame, ENTR_KAKUSIANA_0 },
{ "101:" GFXP_HIRAGANA "カクシトビコミアナ 0", MapSelect_LoadGame, ENTR_KAKUSIANA_0 },
// "102: Hidden Dive Hole 1" (Grotto 1 - Skulltula & Gold Skulltula)
{ "102:" GFXP_HIRAGANA "カクシトビコミアナ 1", Select_LoadGame, ENTR_KAKUSIANA_1 },
{ "102:" GFXP_HIRAGANA "カクシトビコミアナ 1", MapSelect_LoadGame, ENTR_KAKUSIANA_1 },
// "103: Hidden Dive Hole 2" (Grotto 2 - Business Scrub & Heart Piece)
{ "103:" GFXP_HIRAGANA "カクシトビコミアナ 2", Select_LoadGame, ENTR_KAKUSIANA_2 },
{ "103:" GFXP_HIRAGANA "カクシトビコミアナ 2", MapSelect_LoadGame, ENTR_KAKUSIANA_2 },
// "104: Hidden Dive Hole 3" (Grotto 3 - Redeads)
{ "104:" GFXP_HIRAGANA "カクシトビコミアナ 3", Select_LoadGame, ENTR_KAKUSIANA_3 },
{ "104:" GFXP_HIRAGANA "カクシトビコミアナ 3", MapSelect_LoadGame, ENTR_KAKUSIANA_3 },
// "105: Hidden Dive Hole 4" (Grotto 4 - 3 Business Scrubs)
{ "105:" GFXP_HIRAGANA "カクシトビコミアナ 4", Select_LoadGame, ENTR_KAKUSIANA_4 },
{ "105:" GFXP_HIRAGANA "カクシトビコミアナ 4", MapSelect_LoadGame, ENTR_KAKUSIANA_4 },
// "106: Hidden Dive Hole 5" (Grotto 5 - Gossip Stone, Skulltula, Cow)
{ "106:" GFXP_HIRAGANA "カクシトビコミアナ 5", Select_LoadGame, ENTR_KAKUSIANA_5 },
{ "106:" GFXP_HIRAGANA "カクシトビコミアナ 5", MapSelect_LoadGame, ENTR_KAKUSIANA_5 },
// "107: Hidden Dive Hole 6" (Grotto 6 - Octorok)
{ "107:" GFXP_HIRAGANA "カクシトビコミアナ 6", Select_LoadGame, ENTR_KAKUSIANA_6 },
{ "107:" GFXP_HIRAGANA "カクシトビコミアナ 6", MapSelect_LoadGame, ENTR_KAKUSIANA_6 },
// "108: Hidden Dive Hole 7" (Grotto 7 - Business Scrub & Deku Nut Upgrade)
{ "108:" GFXP_HIRAGANA "カクシトビコミアナ 7", Select_LoadGame, ENTR_KAKUSIANA_7 },
{ "108:" GFXP_HIRAGANA "カクシトビコミアナ 7", MapSelect_LoadGame, ENTR_KAKUSIANA_7 },
// "109: Hidden Dive Hole 8" (Grotto 8 - 2 Wolfos)
{ "109:" GFXP_HIRAGANA "カクシトビコミアナ 8", Select_LoadGame, ENTR_KAKUSIANA_8 },
{ "109:" GFXP_HIRAGANA "カクシトビコミアナ 8", MapSelect_LoadGame, ENTR_KAKUSIANA_8 },
// "110: Hidden Dive Hole 9" (Grotto 9 - Bombable Walls)
{ "110:" GFXP_HIRAGANA "カクシトビコミアナ 9", Select_LoadGame, ENTR_KAKUSIANA_9 },
{ "110:" GFXP_HIRAGANA "カクシトビコミアナ 9", MapSelect_LoadGame, ENTR_KAKUSIANA_9 },
// "111: Hidden Dive Hole 10" (Grotto 10 - 2 Business Scrubs)
{ "111:" GFXP_HIRAGANA "カクシトビコミアナ 10", Select_LoadGame, ENTR_KAKUSIANA_10 },
{ "111:" GFXP_HIRAGANA "カクシトビコミアナ 10", MapSelect_LoadGame, ENTR_KAKUSIANA_10 },
// "112: Hidden Dive Hole 11" (Grotto 11 - Tektite & Heart Piece)
{ "112:" GFXP_HIRAGANA "カクシトビコミアナ 11", Select_LoadGame, ENTR_KAKUSIANA_11 },
{ "112:" GFXP_HIRAGANA "カクシトビコミアナ 11", MapSelect_LoadGame, ENTR_KAKUSIANA_11 },
// "113: Hidden Dive Hole 12" (Grotto 12 - Deku Stage)
{ "113:" GFXP_HIRAGANA "カクシトビコミアナ 12", Select_LoadGame, ENTR_KAKUSIANA_12 },
{ "113:" GFXP_HIRAGANA "カクシトビコミアナ 12", MapSelect_LoadGame, ENTR_KAKUSIANA_12 },
// "114: Hidden Dive Hole 13" (Grotto 13 - Rupees & Cow)
{ "114:" GFXP_HIRAGANA "カクシトビコミアナ 13", Select_LoadGame, ENTR_KAKUSIANA_13 },
{ "114:" GFXP_HIRAGANA "カクシトビコミアナ 13", MapSelect_LoadGame, ENTR_KAKUSIANA_13 },
// "115: Hyrule Cutscenes" (Cutscene Map)
{ "115:" GFXP_KATAKANA "ハイラル デモ", Select_LoadGame, ENTR_HIRAL_DEMO_0 },
{ "115:" GFXP_KATAKANA "ハイラル デモ", MapSelect_LoadGame, ENTR_HIRAL_DEMO_0 },
// "116: Special Room (Treasure Chest Warp)" (Ganondorf Test Room)
{ "116:" GFXP_HIRAGANA "ベッシツ (タカラバコ" GFXP_KATAKANA "ワープ)", Select_LoadGame, ENTR_BESITU_0 },
{ "116:" GFXP_HIRAGANA "ベッシツ (タカラバコ" GFXP_KATAKANA "ワープ)", MapSelect_LoadGame, ENTR_BESITU_0 },
// "117: Sasaki Test" (Sasa Test)
{ "117:" GFXP_HIRAGANA "ササ" GFXP_KATAKANA "テスト", Select_LoadGame, ENTR_SASATEST_0 },
{ "117:" GFXP_HIRAGANA "ササ" GFXP_KATAKANA "テスト", MapSelect_LoadGame, ENTR_SASATEST_0 },
// "118: Test Map" (Jungle Gym)
{ "118:" GFXP_KATAKANA "テストマップ", Select_LoadGame, ENTR_TEST01_0 },
{ "118:" GFXP_KATAKANA "テストマップ", MapSelect_LoadGame, ENTR_TEST01_0 },
// "119: Test Room" (Treasure Chest Room)
{ "119:" GFXP_KATAKANA "テストルーム", Select_LoadGame, ENTR_TESTROOM_0 },
{ "119:" GFXP_KATAKANA "テストルーム", MapSelect_LoadGame, ENTR_TESTROOM_0 },
// "120: Stalfos Miniboss Room" (Stalfos Miniboss Room)
{ "120:" GFXP_HIRAGANA "チュウ" GFXP_KATAKANA "スタロフォス" GFXP_HIRAGANA "ベヤ", Select_LoadGame, ENTR_SYOTES_0 },
{ "120:" GFXP_HIRAGANA "チュウ" GFXP_KATAKANA "スタロフォス" GFXP_HIRAGANA "ベヤ", MapSelect_LoadGame, ENTR_SYOTES_0 },
// "121: Boss Stalfos Room" (Stalfos Boss Room)
{ "121:" GFXP_KATAKANA "ボススタロフォス" GFXP_HIRAGANA "ベヤ", Select_LoadGame, ENTR_SYOTES2_0 },
{ "121:" GFXP_KATAKANA "ボススタロフォス" GFXP_HIRAGANA "ベヤ", MapSelect_LoadGame, ENTR_SYOTES2_0 },
// "122: Stal" (Sutaru)
{ "122:Sutaru", Select_LoadGame, ENTR_SUTARU_0 },
{ "122:Sutaru", MapSelect_LoadGame, ENTR_SUTARU_0 },
// "123: Test Area" (Shooting Gallery)
{ "123:jikkenjyou", Select_LoadGame, ENTR_TEST_SYATEKIJYOU_0 },
{ "123:jikkenjyou", MapSelect_LoadGame, ENTR_TEST_SYATEKIJYOU_0 },
// "124: Depth Test" (Depth Test)
{ "124:depth" GFXP_KATAKANA "テスト", Select_LoadGame, ENTR_DEPTH_TEST_0 },
{ "124:depth" GFXP_KATAKANA "テスト", MapSelect_LoadGame, ENTR_DEPTH_TEST_0 },
// "125: Hyrule Garden Game 2" (Early Hyrule Garden Game)
{ "125:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム2", Select_LoadGame, ENTR_HAIRAL_NIWA2_0 },
{ "125:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム2", MapSelect_LoadGame, ENTR_HAIRAL_NIWA2_0 },
// "title" (Title Screen)
{ "title", (void*)Select_LoadTitle, 0 },
{ "title", (void*)MapSelect_LoadTitle, 0 },
};
void Select_UpdateMenu(SelectContext* this) {
void MapSelect_UpdateMenu(MapSelectState* this) {
Input* input = &this->state.input[0];
s32 pad;
SceneSelectEntry* selectedScene;
@ -506,7 +506,7 @@ void Select_UpdateMenu(SelectContext* this) {
}
}
void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
void MapSelect_PrintMenu(MapSelectState* this, GfxPrint* printer) {
s32 scene;
s32 i;
char* name;
@ -566,7 +566,7 @@ static const char* sLoadingMessages[] = {
GFXP_HIRAGANA "アワテナイアワテナイ。ヒトヤスミヒトヤスミ。",
};
void Select_PrintLoadingMessage(SelectContext* this, GfxPrint* printer) {
void MapSelect_PrintLoadingMessage(MapSelectState* this, GfxPrint* printer) {
s32 randomMsg;
GfxPrint_SetPos(printer, 10, 15);
@ -580,13 +580,13 @@ static const char* sAgeLabels[] = {
GFXP_HIRAGANA "5(ワカスギ)", // "5(very young)"
};
void Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) {
void MapSelect_PrintAgeSetting(MapSelectState* this, GfxPrint* printer, s32 age) {
GfxPrint_SetPos(printer, 4, 26);
GfxPrint_SetColor(printer, 255, 255, 55, 255);
GfxPrint_Printf(printer, "Age:%s", sAgeLabels[age]);
}
void Select_PrintCutsceneSetting(SelectContext* this, GfxPrint* printer, u16 csIndex) {
void MapSelect_PrintCutsceneSetting(MapSelectState* this, GfxPrint* printer, u16 csIndex) {
char* label;
GfxPrint_SetPos(printer, 4, 25);
@ -643,7 +643,7 @@ void Select_PrintCutsceneSetting(SelectContext* this, GfxPrint* printer, u16 csI
GfxPrint_Printf(printer, "Stage:" GFXP_KATAKANA "%s", label);
}
void Select_DrawMenu(SelectContext* this) {
void MapSelect_DrawMenu(MapSelectState* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
GfxPrint* printer;
@ -658,16 +658,16 @@ void Select_DrawMenu(SelectContext* this) {
printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(printer);
GfxPrint_Open(printer, POLY_OPA_DISP);
Select_PrintMenu(this, printer);
Select_PrintAgeSetting(this, printer, ((void)0, gSaveContext.linkAge));
Select_PrintCutsceneSetting(this, printer, ((void)0, gSaveContext.cutsceneIndex));
MapSelect_PrintMenu(this, printer);
MapSelect_PrintAgeSetting(this, printer, ((void)0, gSaveContext.linkAge));
MapSelect_PrintCutsceneSetting(this, printer, ((void)0, gSaveContext.cutsceneIndex));
POLY_OPA_DISP = GfxPrint_Close(printer);
GfxPrint_Destroy(printer);
CLOSE_DISPS(gfxCtx, "../z_select.c", 966);
}
void Select_DrawLoadingScreen(SelectContext* this) {
void MapSelect_DrawLoadingScreen(MapSelectState* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
GfxPrint* printer;
@ -682,14 +682,14 @@ void Select_DrawLoadingScreen(SelectContext* this) {
printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(printer);
GfxPrint_Open(printer, POLY_OPA_DISP);
Select_PrintLoadingMessage(this, printer);
MapSelect_PrintLoadingMessage(this, printer);
POLY_OPA_DISP = GfxPrint_Close(printer);
GfxPrint_Destroy(printer);
CLOSE_DISPS(gfxCtx, "../z_select.c", 1006);
}
void Select_Draw(SelectContext* this) {
void MapSelect_Draw(MapSelectState* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
OPEN_DISPS(gfxCtx, "../z_select.c", 1013);
@ -700,34 +700,34 @@ void Select_Draw(SelectContext* this) {
View_Apply(&this->view, VIEW_ALL);
if (!this->state.running) {
Select_DrawLoadingScreen(this);
MapSelect_DrawLoadingScreen(this);
} else {
Select_DrawMenu(this);
MapSelect_DrawMenu(this);
}
CLOSE_DISPS(gfxCtx, "../z_select.c", 1037);
}
void Select_Main(GameState* thisx) {
SelectContext* this = (SelectContext*)thisx;
void MapSelect_Main(GameState* thisx) {
MapSelectState* this = (MapSelectState*)thisx;
Select_UpdateMenu(this);
Select_Draw(this);
MapSelect_UpdateMenu(this);
MapSelect_Draw(this);
}
void Select_Destroy(GameState* thisx) {
void MapSelect_Destroy(GameState* thisx) {
osSyncPrintf("%c", BEL);
// "view_cleanup will hang, so it won't be called"
osSyncPrintf("*** view_cleanupはハングアップするので、呼ばない ***\n");
}
void Select_Init(GameState* thisx) {
SelectContext* this = (SelectContext*)thisx;
void MapSelect_Init(GameState* thisx) {
MapSelectState* this = (MapSelectState*)thisx;
u32 size;
s32 pad;
this->state.main = Select_Main;
this->state.destroy = Select_Destroy;
this->state.main = MapSelect_Main;
this->state.destroy = MapSelect_Destroy;
this->scenes = sScenes;
this->topDisplayedScene = 0;
this->currentScene = 0;

View file

@ -8,7 +8,7 @@
#include "alloca.h"
#include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h"
void Title_PrintBuildInfo(Gfx** gfxp) {
void ConsoleLogo_PrintBuildInfo(Gfx** gfxp) {
Gfx* g;
GfxPrint* printer;
@ -32,11 +32,11 @@ void Title_PrintBuildInfo(Gfx** gfxp) {
// Note: In other rom versions this function also updates unk_1D4, coverAlpha, addAlpha, visibleDuration to calculate
// the fade-in/fade-out + the duration of the n64 logo animation
void Title_Calc(TitleContext* this) {
void ConsoleLogo_Calc(ConsoleLogoState* this) {
this->exit = true;
}
void Title_SetupView(TitleContext* this, f32 x, f32 y, f32 z) {
void ConsoleLogo_SetupView(ConsoleLogoState* this, f32 x, f32 y, f32 z) {
View* view = &this->view;
Vec3f eye;
Vec3f lookAt;
@ -54,7 +54,7 @@ void Title_SetupView(TitleContext* this, f32 x, f32 y, f32 z) {
View_Apply(view, VIEW_ALL);
}
void Title_Draw(TitleContext* this) {
void ConsoleLogo_Draw(ConsoleLogoState* this) {
static s16 sTitleRotY = 0;
static Lights1 sTitleLights = gdSPDefLights1(100, 100, 100, 255, 255, 255, 69, 69, 69);
@ -80,7 +80,7 @@ void Title_Draw(TitleContext* this) {
func_8002EABC(&v1, &v2, &v3, this->state.gfxCtx);
gSPSetLights1(POLY_OPA_DISP++, sTitleLights);
Title_SetupView(this, 0, 150.0, 300.0);
ConsoleLogo_SetupView(this, 0, 150.0, 300.0);
Gfx_SetupDL_25Opa(this->state.gfxCtx);
Matrix_Translate(-53.0, -5.0, 0, MTXMODE_NEW);
Matrix_Scale(1.0, 1.0, 1.0, MTXMODE_APPLY);
@ -117,22 +117,22 @@ void Title_Draw(TitleContext* this) {
CLOSE_DISPS(this->state.gfxCtx, "../z_title.c", 483);
}
void Title_Main(GameState* thisx) {
TitleContext* this = (TitleContext*)thisx;
void ConsoleLogo_Main(GameState* thisx) {
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
OPEN_DISPS(this->state.gfxCtx, "../z_title.c", 494);
gSPSegment(POLY_OPA_DISP++, 0, NULL);
gSPSegment(POLY_OPA_DISP++, 1, this->staticSegment);
func_80095248(this->state.gfxCtx, 0, 0, 0);
Title_Calc(this);
Title_Draw(this);
ConsoleLogo_Calc(this);
ConsoleLogo_Draw(this);
if (gIsCtrlr2Valid) {
Gfx* gfx = POLY_OPA_DISP;
s32 pad;
Title_PrintBuildInfo(&gfx);
ConsoleLogo_PrintBuildInfo(&gfx);
POLY_OPA_DISP = gfx;
}
@ -141,21 +141,21 @@ void Title_Main(GameState* thisx) {
gSaveContext.natureAmbienceId = 0xFF;
gSaveContext.gameMode = 1;
this->state.running = false;
SET_NEXT_GAMESTATE(&this->state, Opening_Init, OpeningContext);
SET_NEXT_GAMESTATE(&this->state, TitleSetup_Init, TitleSetupState);
}
CLOSE_DISPS(this->state.gfxCtx, "../z_title.c", 541);
}
void Title_Destroy(GameState* thisx) {
TitleContext* this = (TitleContext*)thisx;
void ConsoleLogo_Destroy(GameState* thisx) {
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
Sram_InitSram(&this->state, &this->sramCtx);
}
void Title_Init(GameState* thisx) {
void ConsoleLogo_Init(GameState* thisx) {
u32 size = (u32)_nintendo_rogo_staticSegmentRomEnd - (u32)_nintendo_rogo_staticSegmentRomStart;
TitleContext* this = (TitleContext*)thisx;
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
this->staticSegment = GameState_Alloc(&this->state, size, "../z_title.c", 611);
osSyncPrintf("z_title.c\n");
@ -164,8 +164,8 @@ void Title_Init(GameState* thisx) {
R_UPDATE_RATE = 1;
Matrix_Init(&this->state);
View_Init(&this->view, this->state.gfxCtx);
this->state.main = Title_Main;
this->state.destroy = Title_Destroy;
this->state.main = ConsoleLogo_Main;
this->state.destroy = ConsoleLogo_Destroy;
this->exit = false;
gSaveContext.fileNum = 0xFF;
Sram_Alloc(&this->state, &this->sramCtx);

View file

@ -3419,7 +3419,7 @@ void KaleidoScope_Update(PlayState* play) {
osSyncPrintf(VT_RST);
} else {
play->state.running = false;
SET_NEXT_GAMESTATE(&play->state, Opening_Init, OpeningContext);
SET_NEXT_GAMESTATE(&play->state, TitleSetup_Init, TitleSetupState);
}
}
}