Gamestates Cleanup (#1047)

* Setup

* ConsoleLogo

* TitleSetup

* MapSelect

* FileSelect

* Daytelop

* Save file

* PreNMI

* Final cleanup and format

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* DayTelop

* Split off setup

* split of prenmi

* readd SET

* shorten some gamestate member names

* Add comment about init

* Update include/z64.h

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* Small cleanup of comments

* PR

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
This commit is contained in:
Derek Hensley
2022-09-24 12:40:40 -07:00
committed by GitHub
parent 0e1b244354
commit 6d6304d1a0
26 changed files with 369 additions and 369 deletions
+3 -12
View File
@@ -1968,12 +1968,6 @@ s32 func_80128640(PlayState* play, Player* player, Gfx* dlist);
void func_80128B74(PlayState* play, Player* player, s32 limbIndex);
void func_80128BD0(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot, Actor* actor);
void PreNMI_Stop(PreNMIContext* prenmiCtx);
void PreNMI_Update(PreNMIContext* prenmiCtx);
void PreNMI_Draw(PreNMIContext* prenmiCtx);
void PreNMI_Main(PreNMIContext* prenmiCtx);
void PreNMI_Destroy(PreNMIContext* prenmiCtx);
void PreNMI_Init(PreNMIContext* prenmiCtx);
f32 Quake_Random(void);
void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 verticalPertubation, f32 horizontalPertubation);
s16 Quake_Callback1(QuakeRequest* req, ShakeInfo* shake);
@@ -2664,10 +2658,7 @@ void AudioMgr_HandlePRENMI(AudioMgr* audioMgr);
void AudioMgr_ThreadEntry(void* arg);
void AudioMgr_Unlock(AudioMgr* audioMgr);
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr);
void TitleSetup_GameStateResetContext(void);
void TitleSetup_InitImpl(GameState* gameState);
void TitleSetup_Destroy(GameState* gameState);
void TitleSetup_Init(GameState* gameState);
void Game_UpdateFramerateVariables(s32 divisor);
void Game_SetFramerateDivisor(GameState* gameState, s32 divisor);
void GameState_SetFBFilter(Gfx** gfx, u32 arg1);
@@ -2682,8 +2673,8 @@ void GameState_InitArena(GameState* gameState, size_t size);
void GameState_Realloc(GameState* gameState, size_t size);
void GameState_Init(GameState* gameState, GameStateFunc gameStateInit, GraphicsContext* gfxCtx);
void GameState_Destroy(GameState* gameState);
GameStateFunc GameState_GetNextStateInit(GameState* gameState);
size_t GameState_GetNextStateSize(GameState* gameState);
GameStateFunc GameState_GetInit(GameState* gameState);
size_t GameState_GetSize(GameState* gameState);
u32 GameState_IsRunning(GameState* gameState);
s32 GameState_GetArenaSize(GameState* gameState);
s32 func_80173B48(GameState* gameState);
+14 -3
View File
@@ -24,9 +24,20 @@
#define GET_ACTIVE_CAM(play) ((play)->cameraPtrs[(play)->activeCamId])
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
(curState)->nextGameStateInit = (GameStateFunc)newInit; \
(curState)->nextGameStateSize = sizeof(newStruct)
#define STOP_GAMESTATE(curState) \
do { \
GameState* state = curState; \
\
state->running = false; \
} while(0)
#define SET_NEXT_GAMESTATE(curState, nextInit, nextSize) \
do { \
GameState* state = curState; \
\
(state)->init = nextInit; \
(state)->size = nextSize; \
} while (0)
#define GET_PLAYER(play) ((Player*)(play)->actorCtx.actorLists[ACTORCAT_PLAYER].first)
+2 -8
View File
@@ -867,8 +867,8 @@ typedef struct GameState {
/* 0x00 */ GraphicsContext* gfxCtx;
/* 0x04 */ GameStateFunc main;
/* 0x08 */ GameStateFunc destroy;
/* 0x0C */ GameStateFunc nextGameStateInit;
/* 0x10 */ size_t nextGameStateSize;
/* 0x0C */ GameStateFunc init; // Usually the current game state's init, though after stopping, the graph thread will look here to determine the next game state to load.
/* 0x10 */ size_t size;
/* 0x14 */ Input input[4];
/* 0x74 */ TwoHeadArena heap;
/* 0x84 */ GameAlloc alloc;
@@ -880,12 +880,6 @@ typedef struct GameState {
/* 0xA3 */ u8 unk_A3;
} GameState; // size = 0xA4
typedef struct PreNMIContext {
/* 0x00 */ GameState state;
/* 0xA4 */ u32 timer;
/* 0xA8 */ UNK_TYPE4 unkA8;
} PreNMIContext; // size = 0xAC
typedef struct {
/* 0x00 */ u32 resetting;
/* 0x04 */ u32 resetCount;
+7 -7
View File
@@ -7,7 +7,7 @@
struct GameState;
struct PlayState;
struct FileChooseContext;
struct FileSelectState;
// TODO: properly name DOWN, RETURN and TOP
typedef enum RespawnMode {
@@ -398,15 +398,15 @@ u16 Sram_CalcChecksum(void* data, size_t count);
void Sram_InitNewSave(void);
void Sram_InitDebugSave(void);
void func_80144A94(SramContext* sramCtx);
void Sram_OpenSave(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void Sram_OpenSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
void func_8014546C(SramContext* sramCtx);
void func_801457CC(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void func_80146580(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx, s32 fileNum);
void func_80146628(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void Sram_InitSave(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx);
void func_801457CC(struct FileSelectState* fileSelect, SramContext* sramCtx);
void func_80146580(struct FileSelectState* fileSelect, SramContext* sramCtx, s32 fileNum);
void func_80146628(struct FileSelectState* fileSelect, SramContext* sramCtx);
void Sram_InitSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
void func_80146DF8(SramContext* sramCtx);
void Sram_InitSram(struct GameState* gameState, SramContext* sramCtx);
void Sram_Alloc(struct GameState* gamestate, SramContext* sramCtx);
void Sram_Alloc(struct GameState* gameState, SramContext* sramCtx);
void Sram_SaveSpecialEnterClockTown(struct PlayState* play);
void Sram_SaveSpecialNewDay(struct PlayState* play);
void func_80147008(SramContext* sramCtx, u32 curPage, u32 numPages);
+15
View File
@@ -0,0 +1,15 @@
#ifndef Z64_PRENMI_H
#define Z64_PRENMI_H
#include "global.h"
void PreNMI_Destroy(GameState* thisx);
void PreNMI_Init(GameState* thisx);
typedef struct {
/* 0x00 */ GameState state;
/* 0xA4 */ u32 timer;
/* 0xA8 */ UNK_TYPE4 unkA8;
} PreNMIState; // size = 0xAC
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef Z64_TITLE_SETUP_H
#define Z64_TITLE_SETUP_H
#include "global.h"
void Setup_Destroy(GameState* gameState);
void Setup_Init(GameState* gameState);
typedef struct {
/* 0x00 */ GameState state;
} SetupState; // size = 0xA4
#endif
+6 -6
View File
@@ -200,8 +200,8 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
gfxCtx->viConfigFeatures = gViConfigFeatures;
gfxCtx->xScale = gViConfigXScale;
gfxCtx->yScale = gViConfigYScale;
gameState->nextGameStateInit = NULL;
gameState->nextGameStateSize = 0;
gameState->init = NULL;
gameState->size = 0;
{
s32 requiredScopeTemp;
@@ -242,12 +242,12 @@ void GameState_Destroy(GameState* gameState) {
GameAlloc_Cleanup(&gameState->alloc);
}
GameStateFunc GameState_GetNextStateInit(GameState* gameState) {
return gameState->nextGameStateInit;
GameStateFunc GameState_GetInit(GameState* gameState) {
return gameState->init;
}
size_t GameState_GetNextStateSize(GameState* gameState) {
return gameState->nextGameStateSize;
size_t GameState_GetSize(GameState* gameState) {
return gameState->size;
}
u32 GameState_IsRunning(GameState* gameState) {
+16 -14
View File
@@ -6,6 +6,7 @@
#include "overlays/gamestates/ovl_opening/z_opening.h"
#include "overlays/gamestates/ovl_select/z_select.h"
#include "overlays/gamestates/ovl_title/z_title.h"
#include "z_title_setup.h"
FaultAddrConvClient sGraphFaultAddrConvClient;
FaultClient sGraphFaultClient;
@@ -63,44 +64,45 @@ void Graph_SetNextGfxPool(GraphicsContext* gfxCtx) {
}
GameStateOverlay* Graph_GetNextGameState(GameState* gameState) {
GameStateFunc gameStateInit = GameState_GetNextStateInit(gameState);
GameStateFunc gameStateInit = GameState_GetInit(gameState);
if (gameStateInit == (GameStateFunc)TitleSetup_Init) {
if (gameStateInit == Setup_Init) {
return &gGameStateOverlayTable[0];
}
if (gameStateInit == (GameStateFunc)MapSelect_Init) {
if (gameStateInit == MapSelect_Init) {
return &gGameStateOverlayTable[1];
}
if (gameStateInit == (GameStateFunc)Title_Init) {
if (gameStateInit == ConsoleLogo_Init) {
return &gGameStateOverlayTable[2];
}
if (gameStateInit == (GameStateFunc)Play_Init) {
if (gameStateInit == Play_Init) {
return &gGameStateOverlayTable[3];
}
if (gameStateInit == (GameStateFunc)Opening_Init) {
if (gameStateInit == TitleSetup_Init) {
return &gGameStateOverlayTable[4];
}
if (gameStateInit == (GameStateFunc)FileChoose_Init) {
if (gameStateInit == FileSelect_Init) {
return &gGameStateOverlayTable[5];
}
if (gameStateInit == (GameStateFunc)Daytelop_Init) {
if (gameStateInit == DayTelop_Init) {
return &gGameStateOverlayTable[6];
}
return NULL;
}
void* Graph_FaultAddrConvFunc(void* address, void* param) {
uintptr_t addr = address;
GameStateOverlay* gamestateOvl = &gGameStateOverlayTable[0];
GameStateOverlay* gameStateOvl = &gGameStateOverlayTable[0];
uintptr_t ramConv;
void* ramStart;
uintptr_t diff;
s32 i;
for (i = 0; i < graphNumGameStates; i++, gamestateOvl++) {
diff = VRAM_PTR_SIZE(gamestateOvl);
ramStart = gamestateOvl->loadedRamAddr;
ramConv = (uintptr_t)gamestateOvl->vramStart - (uintptr_t)ramStart;
for (i = 0; i < graphNumGameStates; i++, gameStateOvl++) {
diff = VRAM_PTR_SIZE(gameStateOvl);
ramStart = gameStateOvl->loadedRamAddr;
ramConv = (uintptr_t)gameStateOvl->vramStart - (uintptr_t)ramStart;
if (ramStart != NULL) {
if (addr >= (uintptr_t)ramStart && addr < (uintptr_t)ramStart + diff) {
@@ -235,7 +237,7 @@ void Graph_UpdateGame(GameState* gameState) {
}
/**
* Run the gamestate logic, then finalize the gfx buffer
* Run the game state logic, then finalize the gfx buffer
* and run the graphics task for this frame.
*/
void Graph_ExecuteAndDraw(GraphicsContext* gfxCtx, GameState* gameState) {
+12 -14
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "z_title_setup.h"
#include "overlays/gamestates/ovl_title/z_title.h"
void TitleSetup_GameStateResetContext(void) {
void Setup_SetRegs(void) {
XREG(2) = 0;
XREG(10) = 0x1A;
XREG(11) = 0x14;
@@ -45,23 +45,21 @@ void TitleSetup_GameStateResetContext(void) {
YREG(43) = 0xB1;
}
void TitleSetup_InitImpl(GameState* gameState) {
void Setup_InitImpl(SetupState* this) {
func_80185908();
SaveContext_Init();
TitleSetup_GameStateResetContext();
Setup_SetRegs();
gameState->running = 0;
setNextGamestate
:; // This label is probably a leftover of a debug ifdef, it's essential to not have gameState->running reordered!
SET_NEXT_GAMESTATE(gameState, Title_Init, TitleContext);
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, sizeof(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);
}
+5 -9
View File
@@ -126,12 +126,11 @@ void func_800EA2B8(PlayState* play, CutsceneContext* csCtx) {
/* Start of command handling section */
// Command 0x96: Miscellaneous commands.
void Cutscene_Command_Misc(PlayState* play2, CutsceneContext* csCtx, CsCmdBase* cmd) {
void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
static u16 D_801BB15C = 0xFFFF;
Player* player = GET_PLAYER(play2);
PlayState* play = play2;
u8 isStartFrame = false;
Player* player = GET_PLAYER(play);
f32 progress;
u8 isStartFrame = false;
SceneTableEntry* loadedScene;
if ((csCtx->frames < cmd->startFrame) || ((csCtx->frames >= cmd->endFrame) && (cmd->endFrame != cmd->startFrame))) {
@@ -346,11 +345,8 @@ void Cutscene_Command_Misc(PlayState* play2, CutsceneContext* csCtx, CsCmdBase*
gSaveContext.save.day = 9;
{
GameState* gameState = &play->state;
gameState->running = false;
}
SET_NEXT_GAMESTATE(&play->state, Daytelop_Init, DaytelopContext);
STOP_GAMESTATE(&play->state);
SET_NEXT_GAMESTATE(&play->state, DayTelop_Init, sizeof(DayTelopState));
Sram_SaveSpecialNewDay(play);
break;
+6 -5
View File
@@ -4,6 +4,7 @@
#include "overlays/gamestates/ovl_opening/z_opening.h"
#include "overlays/gamestates/ovl_select/z_select.h"
#include "overlays/gamestates/ovl_title/z_title.h"
#include "z_title_setup.h"
#define GAMESTATE_OVERLAY(name, init, destroy, size) \
{ \
@@ -14,13 +15,13 @@
{ NULL, 0, 0, NULL, NULL, 0, init, destroy, 0, 0, 0, size }
GameStateOverlay gGameStateOverlayTable[] = {
GAMESTATE_OVERLAY_INTERNAL(TitleSetup_Init, TitleSetup_Destroy, sizeof(GameState)),
GAMESTATE_OVERLAY_INTERNAL(Setup_Init, Setup_Destroy, sizeof(SetupState)),
GAMESTATE_OVERLAY(select, MapSelect_Init, MapSelect_Destroy, sizeof(MapSelectState)),
GAMESTATE_OVERLAY(title, Title_Init, Title_Destroy, sizeof(TitleContext)),
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(daytelop, Daytelop_Init, Daytelop_Destroy, sizeof(DaytelopContext)),
GAMESTATE_OVERLAY(opening, TitleSetup_Init, TitleSetup_Destroy, sizeof(TitleSetupState)),
GAMESTATE_OVERLAY(file_choose, FileSelect_Init, FileSelect_Destroy, sizeof(FileSelectState)),
GAMESTATE_OVERLAY(daytelop, DayTelop_Init, DayTelop_Destroy, sizeof(DayTelopState)),
};
s32 graphNumGameStates = ARRAY_COUNT(gGameStateOverlayTable);
+26 -23
View File
@@ -1,23 +1,22 @@
#include "global.h"
#include "z_prenmi.h"
void PreNMI_Stop(PreNMIContext* prenmiCtx) {
prenmiCtx->state.running = 0;
prenmiCtx->state.nextGameStateInit = NULL;
prenmiCtx->state.nextGameStateSize = 0;
void PreNMI_Stop(PreNMIState* this) {
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, NULL, 0);
}
void PreNMI_Update(PreNMIContext* prenmiCtx) {
if (prenmiCtx->timer == 0) {
void PreNMI_Update(PreNMIState* this) {
if (this->timer == 0) {
ViConfig_UpdateVi(1);
PreNMI_Stop(prenmiCtx);
PreNMI_Stop(this);
return;
}
prenmiCtx->timer--;
this->timer--;
}
void PreNMI_Draw(PreNMIContext* prenmiCtx) {
GraphicsContext* gfxCtx = prenmiCtx->state.gfxCtx;
void PreNMI_Draw(PreNMIState* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
func_8012CF0C(gfxCtx, true, true, 0, 0, 0);
@@ -26,26 +25,30 @@ void PreNMI_Draw(PreNMIContext* prenmiCtx) {
func_8012C470(gfxCtx);
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1));
gDPFillRectangle(POLY_OPA_DISP++, 0, prenmiCtx->timer + 100, SCREEN_WIDTH - 1, prenmiCtx->timer + 100);
gDPFillRectangle(POLY_OPA_DISP++, 0, this->timer + 100, SCREEN_WIDTH - 1, this->timer + 100);
CLOSE_DISPS(gfxCtx);
}
void PreNMI_Main(PreNMIContext* prenmiCtx) {
PreNMI_Update(prenmiCtx);
PreNMI_Draw(prenmiCtx);
void PreNMI_Main(GameState* thisx) {
PreNMIState* this = (PreNMIState*)thisx;
prenmiCtx->state.unk_A3 = 1;
PreNMI_Update(this);
PreNMI_Draw(this);
this->state.unk_A3 = 1;
}
void PreNMI_Destroy(PreNMIContext* prenmiCtx) {
void PreNMI_Destroy(GameState* thisx) {
}
void PreNMI_Init(PreNMIContext* prenmiCtx) {
prenmiCtx->state.main = (GameStateFunc)PreNMI_Main;
prenmiCtx->state.destroy = (GameStateFunc)PreNMI_Destroy;
prenmiCtx->timer = 30;
prenmiCtx->unkA8 = 10;
void PreNMI_Init(GameState* thisx) {
PreNMIState* this = (PreNMIState*)thisx;
Game_SetFramerateDivisor(&prenmiCtx->state, 1);
this->state.main = PreNMI_Main;
this->state.destroy = PreNMI_Destroy;
this->timer = 30;
this->unkA8 = 10;
Game_SetFramerateDivisor(&this->state, 1);
}
+94 -98
View File
@@ -918,7 +918,7 @@ u16 D_801C6A58[] = {
ENTRANCE(IKANA_CANYON, 4), ENTRANCE(STONE_TOWER, 3),
};
void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
void Sram_OpenSave(FileSelectState* fileSelect, SramContext* sramCtx) {
s32 i;
s32 pad;
s32 phi_t1;
@@ -930,7 +930,7 @@ void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
if (gSaveContext.fileNum == 0xFF) {
func_80185968(sramCtx->saveBuf, D_801C67C8[0], D_801C67F0[0]);
} else if (fileChooseCtx->unk_2446A[gSaveContext.fileNum] != 0) {
} else if (fileSelect->unk_2446A[gSaveContext.fileNum] != 0) {
phi_t1 = gSaveContext.fileNum + 2;
phi_t1 *= 2;
@@ -1079,8 +1079,8 @@ void func_80145698(SramContext* sramCtx) {
// Verifies save and use backup if corrupted?
#ifdef NON_EQUIVALENT
void func_801457CC(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
FileChooseContext* fileChooseCtx = fileChooseCtx2;
void func_801457CC(FileSelectState* fileSelect2, SramContext* sramCtx) {
FileSelectState* fileSelect = fileSelect2;
u16 sp7A;
// u16 sp78;
u16 sp76;
@@ -1119,7 +1119,7 @@ void func_801457CC(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
}
if (sp76 < 2) {
fileChooseCtx->unk_24468[sp76] = 0;
fileSelect->unk_24468[sp76] = 0;
if (phi_s2) {
bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE);
Lib_MemCpy(&gSaveContext, sramCtx->saveBuf, D_801C6870[sp64]);
@@ -1157,34 +1157,33 @@ void func_801457CC(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
Sram_CalcChecksum(&gSaveContext, D_801C6870[sp64 & 0xFFFFFFFF]); // TODO: Needed?
for (sp7A = 0; sp7A < ARRAY_COUNT(gSaveContext.save.playerData.newf); sp7A++) {
fileChooseCtx->newf[sp76][sp7A] = gSaveContext.save.playerData.newf[sp7A];
fileSelect->newf[sp76][sp7A] = gSaveContext.save.playerData.newf[sp7A];
}
if (!CHECK_NEWF(fileChooseCtx->newf[sp76])) {
fileChooseCtx->unk_2440C[sp76] = gSaveContext.save.playerData.deaths;
if (!CHECK_NEWF(fileSelect->newf[sp76])) {
fileSelect->unk_2440C[sp76] = gSaveContext.save.playerData.deaths;
for (sp7A = 0; sp7A < ARRAY_COUNT(gSaveContext.save.playerData.playerName); sp7A++) {
fileChooseCtx->unk_24414[sp76][sp7A] = gSaveContext.save.playerData.playerName[sp7A];
fileSelect->unk_24414[sp76][sp7A] = gSaveContext.save.playerData.playerName[sp7A];
}
fileChooseCtx->healthCapacity[sp76] = gSaveContext.save.playerData.healthCapacity;
fileChooseCtx->health[sp76] = gSaveContext.save.playerData.health;
fileChooseCtx->unk_24454[sp76] = gSaveContext.save.inventory.defenseHearts;
fileChooseCtx->unk_24444[sp76] = gSaveContext.save.inventory.questItems;
fileChooseCtx->unk_24458[sp76] = gSaveContext.save.time;
fileChooseCtx->unk_24460[sp76] = gSaveContext.save.day;
fileChooseCtx->unk_24468[sp76] = gSaveContext.save.isOwlSave;
fileChooseCtx->rupees[sp76] = gSaveContext.save.playerData.rupees;
fileChooseCtx->unk_24474[sp76] = CUR_UPG_VALUE(4);
fileSelect->healthCapacity[sp76] = gSaveContext.save.playerData.healthCapacity;
fileSelect->health[sp76] = gSaveContext.save.playerData.health;
fileSelect->unk_24454[sp76] = gSaveContext.save.inventory.defenseHearts;
fileSelect->unk_24444[sp76] = gSaveContext.save.inventory.questItems;
fileSelect->unk_24458[sp76] = gSaveContext.save.time;
fileSelect->unk_24460[sp76] = gSaveContext.save.day;
fileSelect->unk_24468[sp76] = gSaveContext.save.isOwlSave;
fileSelect->rupees[sp76] = gSaveContext.save.playerData.rupees;
fileSelect->unk_24474[sp76] = CUR_UPG_VALUE(4);
for (sp7A = 0, phi_a0 = 0; sp7A < 24; sp7A++) {
if (gSaveContext.save.inventory.items[sp7A + 24] != 0xFF) {
phi_a0++;
}
}
fileChooseCtx->maskCount[sp76] = phi_a0;
fileChooseCtx->heartPieceCount[sp76] =
((gSaveContext.save.inventory.questItems & 0xF0000000) >> 0x1C);
fileSelect->maskCount[sp76] = phi_a0;
fileSelect->heartPieceCount[sp76] = ((gSaveContext.save.inventory.questItems & 0xF0000000) >> 0x1C);
}
if (sp6E == 1) {
@@ -1209,9 +1208,9 @@ void func_801457CC(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
}
}
} else if (sp76 < 4) {
fileChooseCtx->unk_24468[sp76] = 0;
fileSelect->unk_24468[sp76] = 0;
if (!CHECK_NEWF(fileChooseCtx->newf2[(s32)sp76])) { // TODO: Needed?
if (!CHECK_NEWF(fileSelect->newf2[(s32)sp76])) { // TODO: Needed?
if (phi_s2) {
bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE);
Lib_MemCpy(&gSaveContext, sramCtx->saveBuf,
@@ -1251,34 +1250,34 @@ void func_801457CC(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
Sram_CalcChecksum(&gSaveContext, D_801C6870[sp64 & 0xFFFFFFFF]); // TODO: Needed?
for (sp7A = 0; sp7A < ARRAY_COUNT(gSaveContext.save.playerData.newf); sp7A++) {
fileChooseCtx->newf[sp76][sp7A] = gSaveContext.save.playerData.newf[sp7A];
fileSelect->newf[sp76][sp7A] = gSaveContext.save.playerData.newf[sp7A];
}
if (!CHECK_NEWF(fileChooseCtx->newf[sp76])) {
fileChooseCtx->unk_2440C[sp76] = gSaveContext.save.playerData.deaths;
if (!CHECK_NEWF(fileSelect->newf[sp76])) {
fileSelect->unk_2440C[sp76] = gSaveContext.save.playerData.deaths;
for (sp7A = 0; sp7A < ARRAY_COUNT(gSaveContext.save.playerData.playerName); sp7A++) {
phi_s2 += 0; // TODO: Needed?
fileChooseCtx->unk_24414[sp76][sp7A] = gSaveContext.save.playerData.playerName[sp7A];
fileSelect->unk_24414[sp76][sp7A] = gSaveContext.save.playerData.playerName[sp7A];
}
fileChooseCtx->healthCapacity[sp76] = gSaveContext.save.playerData.healthCapacity;
fileChooseCtx->health[sp76] = gSaveContext.save.playerData.health;
fileChooseCtx->unk_24454[sp76] = gSaveContext.save.inventory.defenseHearts;
fileChooseCtx->unk_24444[sp76] = gSaveContext.save.inventory.questItems;
fileChooseCtx->unk_24458[sp76] = gSaveContext.save.time;
fileChooseCtx->unk_24460[sp76] = gSaveContext.save.day;
fileChooseCtx->unk_24468[sp76] = gSaveContext.save.isOwlSave;
fileChooseCtx->rupees[sp76] = gSaveContext.save.playerData.rupees;
fileChooseCtx->unk_24474[sp76] = CUR_UPG_VALUE(4);
fileSelect->healthCapacity[sp76] = gSaveContext.save.playerData.healthCapacity;
fileSelect->health[sp76] = gSaveContext.save.playerData.health;
fileSelect->unk_24454[sp76] = gSaveContext.save.inventory.defenseHearts;
fileSelect->unk_24444[sp76] = gSaveContext.save.inventory.questItems;
fileSelect->unk_24458[sp76] = gSaveContext.save.time;
fileSelect->unk_24460[sp76] = gSaveContext.save.day;
fileSelect->unk_24468[sp76] = gSaveContext.save.isOwlSave;
fileSelect->rupees[sp76] = gSaveContext.save.playerData.rupees;
fileSelect->unk_24474[sp76] = CUR_UPG_VALUE(4);
for (sp7A = 0, phi_a0 = 0; sp7A < 24; sp7A++) {
if (gSaveContext.save.inventory.items[sp7A + 24] != 0xFF) {
phi_a0++;
}
}
fileChooseCtx->maskCount[sp76] = phi_a0;
fileChooseCtx->heartPieceCount[sp76] =
fileSelect->maskCount[sp76] = phi_a0;
fileSelect->heartPieceCount[sp76] =
((gSaveContext.save.inventory.questItems & 0xF0000000) >> 0x1C);
}
@@ -1342,14 +1341,14 @@ void func_801457CC(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sram_NES/func_801457CC.s")
#endif
void func_80146580(FileChooseContext* fileChooseCtx2, SramContext* sramCtx, s32 fileNum) {
FileChooseContext* fileChooseCtx = fileChooseCtx2;
void func_80146580(FileSelectState* fileSelect2, SramContext* sramCtx, s32 fileNum) {
FileSelectState* fileSelect = fileSelect2;
s32 pad;
if (gSaveContext.unk_3F3F) {
if (fileChooseCtx->unk_2446A[fileNum]) {
if (fileSelect->unk_2446A[fileNum]) {
func_80147314(sramCtx, fileNum);
fileChooseCtx->unk_2446A[fileNum] = 0;
fileSelect->unk_2446A[fileNum] = 0;
}
bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE);
Lib_MemCpy(&gSaveContext, sramCtx->saveBuf, sizeof(Save));
@@ -1361,30 +1360,30 @@ void func_80146580(FileChooseContext* fileChooseCtx2, SramContext* sramCtx, s32
#ifdef NON_MATCHING
// v0/v1
void func_80146628(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
FileChooseContext* fileChooseCtx = fileChooseCtx2;
void func_80146628(FileSelectState* fileSelect2, SramContext* sramCtx) {
FileSelectState* fileSelect = fileSelect2;
u16 i;
s16 maskCount;
if (gSaveContext.unk_3F3F) {
if (fileChooseCtx->unk_2446A[fileChooseCtx->unk_2448E]) {
func_80147414(sramCtx, fileChooseCtx->unk_2448E, fileChooseCtx->fileNum);
fileChooseCtx->unk_24410[fileChooseCtx->fileNum] = gSaveContext.save.playerData.deaths;
if (fileSelect->unk_2446A[fileSelect->unk_2448E]) {
func_80147414(sramCtx, fileSelect->unk_2448E, fileSelect->fileNum);
fileSelect->unk_24410[fileSelect->fileNum] = gSaveContext.save.playerData.deaths;
for (i = 0; i < ARRAY_COUNT(gSaveContext.save.playerData.playerName); i++) {
fileChooseCtx->unk_24424[fileChooseCtx->fileNum][i] = gSaveContext.save.playerData.playerName[i];
fileSelect->unk_24424[fileSelect->fileNum][i] = gSaveContext.save.playerData.playerName[i];
}
fileChooseCtx->unk_24438[fileChooseCtx->fileNum] = gSaveContext.save.playerData.healthCapacity;
fileChooseCtx->unk_24440[fileChooseCtx->fileNum] = gSaveContext.save.playerData.health;
fileChooseCtx->unk_24456[fileChooseCtx->fileNum] = gSaveContext.save.inventory.defenseHearts;
fileChooseCtx->unk_2444C[fileChooseCtx->fileNum] = gSaveContext.save.inventory.questItems;
fileChooseCtx->unk_2445C[fileChooseCtx->fileNum] = gSaveContext.save.time;
fileChooseCtx->unk_24464[fileChooseCtx->fileNum] = gSaveContext.save.day;
fileChooseCtx->unk_2446A[fileChooseCtx->fileNum] = gSaveContext.save.isOwlSave;
fileChooseCtx->unk_24470[fileChooseCtx->fileNum] = gSaveContext.save.playerData.rupees;
fileSelect->unk_24438[fileSelect->fileNum] = gSaveContext.save.playerData.healthCapacity;
fileSelect->unk_24440[fileSelect->fileNum] = gSaveContext.save.playerData.health;
fileSelect->unk_24456[fileSelect->fileNum] = gSaveContext.save.inventory.defenseHearts;
fileSelect->unk_2444C[fileSelect->fileNum] = gSaveContext.save.inventory.questItems;
fileSelect->unk_2445C[fileSelect->fileNum] = gSaveContext.save.time;
fileSelect->unk_24464[fileSelect->fileNum] = gSaveContext.save.day;
fileSelect->unk_2446A[fileSelect->fileNum] = gSaveContext.save.isOwlSave;
fileSelect->unk_24470[fileSelect->fileNum] = gSaveContext.save.playerData.rupees;
// = CUR_UPG_VALUE(UPG_WALLET);
fileChooseCtx->unk_24476[fileChooseCtx->fileNum] =
fileSelect->unk_24476[fileSelect->fileNum] =
(gSaveContext.save.inventory.upgrades & gUpgradeMasks[4]) >> gUpgradeShifts[4];
for (i = 0, maskCount = 0; i < 24; i++) {
@@ -1393,41 +1392,39 @@ void func_80146628(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
}
}
fileChooseCtx->unk_2447A[fileChooseCtx->fileNum] = maskCount;
fileChooseCtx->unk_2447E[fileChooseCtx->fileNum] =
(gSaveContext.save.inventory.questItems & 0xF0000000) >> 0x1C;
fileSelect->unk_2447A[fileSelect->fileNum] = maskCount;
fileSelect->unk_2447E[fileSelect->fileNum] = (gSaveContext.save.inventory.questItems & 0xF0000000) >> 0x1C;
}
// clear buffer
bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE);
// read to buffer
func_80185968(sramCtx->saveBuf, D_801C67C8[fileChooseCtx->unk_2448E * 2],
D_801C67F0[fileChooseCtx->unk_2448E * 2]);
func_80185968(sramCtx->saveBuf, D_801C67C8[fileSelect->unk_2448E * 2], D_801C67F0[fileSelect->unk_2448E * 2]);
if (1) {}
func_80185968(&sramCtx->saveBuf[0x2000], D_801C67C8[fileChooseCtx->unk_2448E * 2 + 1],
D_801C67F0[fileChooseCtx->unk_2448E * 2 + 1]);
func_80185968(&sramCtx->saveBuf[0x2000], D_801C67C8[fileSelect->unk_2448E * 2 + 1],
D_801C67F0[fileSelect->unk_2448E * 2 + 1]);
if (1) {}
// copy buffer to save context
Lib_MemCpy(&gSaveContext.save, sramCtx->saveBuf, sizeof(Save));
fileChooseCtx->unk_2440C[fileChooseCtx->fileNum] = gSaveContext.save.playerData.deaths;
fileSelect->unk_2440C[fileSelect->fileNum] = gSaveContext.save.playerData.deaths;
for (i = 0; i < ARRAY_COUNT(gSaveContext.save.playerData.playerName); i++) {
fileChooseCtx->unk_24414[fileChooseCtx->fileNum][i] = gSaveContext.save.playerData.playerName[i];
fileSelect->unk_24414[fileSelect->fileNum][i] = gSaveContext.save.playerData.playerName[i];
}
fileChooseCtx->healthCapacity[fileChooseCtx->fileNum] = gSaveContext.save.playerData.healthCapacity;
fileChooseCtx->health[fileChooseCtx->fileNum] = gSaveContext.save.playerData.health;
fileChooseCtx->unk_24454[fileChooseCtx->fileNum] = gSaveContext.save.inventory.defenseHearts;
fileChooseCtx->unk_24444[fileChooseCtx->fileNum] = gSaveContext.save.inventory.questItems;
fileChooseCtx->unk_24458[fileChooseCtx->fileNum] = gSaveContext.save.time;
fileChooseCtx->unk_24460[fileChooseCtx->fileNum] = gSaveContext.save.day;
fileChooseCtx->unk_24468[fileChooseCtx->fileNum] = gSaveContext.save.isOwlSave;
fileChooseCtx->rupees[fileChooseCtx->fileNum] = gSaveContext.save.playerData.rupees;
fileSelect->healthCapacity[fileSelect->fileNum] = gSaveContext.save.playerData.healthCapacity;
fileSelect->health[fileSelect->fileNum] = gSaveContext.save.playerData.health;
fileSelect->unk_24454[fileSelect->fileNum] = gSaveContext.save.inventory.defenseHearts;
fileSelect->unk_24444[fileSelect->fileNum] = gSaveContext.save.inventory.questItems;
fileSelect->unk_24458[fileSelect->fileNum] = gSaveContext.save.time;
fileSelect->unk_24460[fileSelect->fileNum] = gSaveContext.save.day;
fileSelect->unk_24468[fileSelect->fileNum] = gSaveContext.save.isOwlSave;
fileSelect->rupees[fileSelect->fileNum] = gSaveContext.save.playerData.rupees;
// = CUR_UPG_VALUE(UPG_WALLET);
fileChooseCtx->unk_24474[fileChooseCtx->fileNum] =
fileSelect->unk_24474[fileSelect->fileNum] =
(gSaveContext.save.inventory.upgrades & gUpgradeMasks[4]) >> gUpgradeShifts[4];
for (i = 0, maskCount = 0; i < 24; i++) {
@@ -1436,8 +1433,8 @@ void func_80146628(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
}
}
fileChooseCtx->maskCount[fileChooseCtx->fileNum] = maskCount;
fileChooseCtx->heartPieceCount[fileChooseCtx->fileNum] =
fileSelect->maskCount[fileSelect->fileNum] = maskCount;
fileSelect->heartPieceCount[fileSelect->fileNum] =
(gSaveContext.save.inventory.questItems & 0xF0000000) >> 0x1C;
}
@@ -1448,21 +1445,20 @@ void func_80146628(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sram_NES/func_80146628.s")
#endif
void Sram_InitSave(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
void Sram_InitSave(FileSelectState* fileSelect2, SramContext* sramCtx) {
s32 phi_v0;
u16 i;
FileChooseContext* fileChooseCtx = fileChooseCtx2;
FileSelectState* fileSelect = fileSelect2;
s16 maskCount;
if (gSaveContext.unk_3F3F) {
Sram_InitNewSave();
if (fileChooseCtx->unk_24480 == 0) {
if (fileSelect->unk_24480 == 0) {
gSaveContext.save.cutscene = 0xFFF0;
}
for (phi_v0 = 0; phi_v0 < ARRAY_COUNT(gSaveContext.save.playerData.playerName); phi_v0++) {
gSaveContext.save.playerData.playerName[phi_v0] =
fileChooseCtx->unk_24414[fileChooseCtx->unk_24480][phi_v0];
gSaveContext.save.playerData.playerName[phi_v0] = fileSelect->unk_24414[fileSelect->unk_24480][phi_v0];
}
gSaveContext.save.playerData.newf[0] = 'Z';
@@ -1478,24 +1474,24 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
Lib_MemCpy(&sramCtx->saveBuf[0x2000], &gSaveContext.save, sizeof(Save));
for (i = 0; i < ARRAY_COUNT(gSaveContext.save.playerData.newf); i++) {
fileChooseCtx->newf[fileChooseCtx->unk_24480][i] = gSaveContext.save.playerData.newf[i];
fileSelect->newf[fileSelect->unk_24480][i] = gSaveContext.save.playerData.newf[i];
}
fileChooseCtx->unk_2440C[fileChooseCtx->unk_24480] = gSaveContext.save.playerData.deaths;
fileSelect->unk_2440C[fileSelect->unk_24480] = gSaveContext.save.playerData.deaths;
for (i = 0; i < ARRAY_COUNT(gSaveContext.save.playerData.playerName); i++) {
fileChooseCtx->unk_24414[fileChooseCtx->unk_24480][i] = gSaveContext.save.playerData.playerName[i];
fileSelect->unk_24414[fileSelect->unk_24480][i] = gSaveContext.save.playerData.playerName[i];
}
fileChooseCtx->healthCapacity[fileChooseCtx->unk_24480] = gSaveContext.save.playerData.healthCapacity;
fileChooseCtx->health[fileChooseCtx->unk_24480] = gSaveContext.save.playerData.health;
fileChooseCtx->unk_24454[fileChooseCtx->unk_24480] = gSaveContext.save.inventory.defenseHearts;
fileChooseCtx->unk_24444[fileChooseCtx->unk_24480] = gSaveContext.save.inventory.questItems;
fileChooseCtx->unk_24458[fileChooseCtx->unk_24480] = gSaveContext.save.time;
fileChooseCtx->unk_24460[fileChooseCtx->unk_24480] = gSaveContext.save.day;
fileChooseCtx->unk_24468[fileChooseCtx->unk_24480] = gSaveContext.save.isOwlSave;
fileChooseCtx->rupees[fileChooseCtx->unk_24480] = gSaveContext.save.playerData.rupees;
fileChooseCtx->unk_24474[fileChooseCtx->unk_24480] = CUR_UPG_VALUE(UPG_WALLET);
fileSelect->healthCapacity[fileSelect->unk_24480] = gSaveContext.save.playerData.healthCapacity;
fileSelect->health[fileSelect->unk_24480] = gSaveContext.save.playerData.health;
fileSelect->unk_24454[fileSelect->unk_24480] = gSaveContext.save.inventory.defenseHearts;
fileSelect->unk_24444[fileSelect->unk_24480] = gSaveContext.save.inventory.questItems;
fileSelect->unk_24458[fileSelect->unk_24480] = gSaveContext.save.time;
fileSelect->unk_24460[fileSelect->unk_24480] = gSaveContext.save.day;
fileSelect->unk_24468[fileSelect->unk_24480] = gSaveContext.save.isOwlSave;
fileSelect->rupees[fileSelect->unk_24480] = gSaveContext.save.playerData.rupees;
fileSelect->unk_24474[fileSelect->unk_24480] = CUR_UPG_VALUE(UPG_WALLET);
for (i = 0, maskCount = 0; i < 24; i++) {
if (gSaveContext.save.inventory.items[i + 24] != ITEM_NONE) {
@@ -1503,8 +1499,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx2, SramContext* sramCtx) {
}
}
fileChooseCtx->maskCount[fileChooseCtx->unk_24480] = maskCount;
fileChooseCtx->heartPieceCount[fileChooseCtx->unk_24480] =
fileSelect->maskCount[fileSelect->unk_24480] = maskCount;
fileSelect->heartPieceCount[fileSelect->unk_24480] =
(gSaveContext.save.inventory.questItems & 0xF0000000) >> 0x1C;
}
@@ -1526,9 +1522,9 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
func_801A3D98(gSaveContext.options.audioSetting);
}
void Sram_Alloc(GameState* gamestate, SramContext* sramCtx) {
void Sram_Alloc(GameState* gameState, SramContext* sramCtx) {
if (gSaveContext.unk_3F3F) {
sramCtx->saveBuf = THA_AllocEndAlign16(&gamestate->heap, SAVE_BUFFER_SIZE);
sramCtx->saveBuf = THA_AllocEndAlign16(&gameState->heap, SAVE_BUFFER_SIZE);
sramCtx->status = 0;
}
}
@@ -315,12 +315,8 @@ void EnTest4_Init(Actor* thisx, PlayState* play) {
if (gSaveContext.save.time < CLOCK_TIME(6, 1)) {
gSaveContext.save.time = CLOCK_TIME(6, 0);
gSaveContext.gameMode = 0;
{
GameState* state = &play->state;
state->running = false;
}
SET_NEXT_GAMESTATE(&play->state, Daytelop_Init, DaytelopContext);
if (this && this && this) {}
STOP_GAMESTATE(&play->state);
SET_NEXT_GAMESTATE(&play->state, DayTelop_Init, sizeof(DayTelopState));
this->unk_144 = 1;
gSaveContext.save.time = CLOCK_TIME(6, 0);
Actor_MarkForDeath(&this->actor);
@@ -63,7 +63,7 @@ UNK_TYPE D_808158E0[] = {
0x00000001, 0x00000000,
};
void Daytelop_Update(DaytelopContext* this, GameState* gameState) {
void DayTelop_Update(DayTelopState* this, GameState* thisx) {
static u8 D_80815FF0 = 0;
s16 new_var;
u8 temp_v0_2;
@@ -77,12 +77,9 @@ void Daytelop_Update(DaytelopContext* this, GameState* gameState) {
gSaveContext.save.day = 1;
}
{
GameState* state = &this->state;
state->running = 0;
}
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, Play_Init, sizeof(PlayState));
SET_NEXT_GAMESTATE(&this->state, Play_Init, PlayState);
gSaveContext.save.time = CLOCK_TIME(6, 0);
D_801BDBC8 = 0xFE;
} else if (this->transitionCountdown == 90) {
@@ -126,7 +123,7 @@ TexturePtr sHoursLeftTextures[] = {
gDaytelop24HoursNESTex,
};
void Daytelop_Draw(DaytelopContext* this) {
void DayTelop_Draw(DayTelopState* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
OPEN_DISPS(gfxCtx);
@@ -187,11 +184,11 @@ void Daytelop_Draw(DaytelopContext* this) {
0x0400, 0x0400);
}
CLOSE_DISPS(this->state.gfxCtx);
CLOSE_DISPS(gfxCtx);
}
void Daytelop_Main(GameState* thisx) {
DaytelopContext* this = (DaytelopContext*)thisx;
void DayTelop_Main(GameState* thisx) {
DayTelopState* this = (DayTelopState*)thisx;
func_8012CF0C(this->state.gfxCtx, true, true, 0, 0, 0);
@@ -200,18 +197,18 @@ void Daytelop_Main(GameState* thisx) {
gSPSegment(POLY_OPA_DISP++, 0x0C, this->gameoverStaticFile);
CLOSE_DISPS(this->state.gfxCtx);
Daytelop_Draw(this);
Daytelop_Update(this, &this->state);
DayTelop_Draw(this);
DayTelop_Update(this, &this->state);
}
void Daytelop_Destroy(GameState* thisx) {
void DayTelop_Destroy(GameState* thisx) {
ShrinkWindow_Destroy();
}
void Daytelop_nop80815770(DaytelopContext* this) {
void DayTelop_Noop(DayTelopState* this) {
}
void Daytelop_LoadGraphics(DaytelopContext* this) {
void DayTelop_LoadGraphics(DayTelopState* this) {
size_t segmentSize = SEGMENT_ROM_SIZE(daytelop_static);
this->daytelopStaticFile = THA_AllocEndAlign16(&this->state.heap, segmentSize);
@@ -222,15 +219,15 @@ void Daytelop_LoadGraphics(DaytelopContext* this) {
DmaMgr_SendRequest0(this->gameoverStaticFile, SEGMENT_ROM_START(icon_item_gameover_static), segmentSize);
}
void Daytelop_Init(GameState* thisx) {
DaytelopContext* this = (DaytelopContext*)thisx;
void DayTelop_Init(GameState* thisx) {
DayTelopState* this = (DayTelopState*)thisx;
Game_SetFramerateDivisor(thisx, 1);
Matrix_Init(thisx);
Game_SetFramerateDivisor(&this->state, 1);
Matrix_Init(&this->state);
ShrinkWindow_Destroy();
View_Init(&this->view, thisx->gfxCtx);
thisx->main = Daytelop_Main;
thisx->destroy = Daytelop_Destroy;
View_Init(&this->view, this->state.gfxCtx);
this->state.main = DayTelop_Main;
this->state.destroy = DayTelop_Destroy;
this->transitionCountdown = 140;
this->fadeInState = DAYTELOP_HOURSTEXT_OFF;
@@ -241,7 +238,7 @@ void Daytelop_Init(GameState* thisx) {
Sram_IncrementDay();
}
Daytelop_nop80815770(this);
Daytelop_LoadGraphics(this);
DayTelop_Noop(this);
DayTelop_LoadGraphics(this);
play_sound(NA_SE_OC_TELOP_IMPACT);
}
@@ -3,8 +3,8 @@
#include "global.h"
void Daytelop_Init(GameState* thisx);
void Daytelop_Destroy(GameState* thisx);
void DayTelop_Init(GameState* thisx);
void DayTelop_Destroy(GameState* thisx);
typedef struct {
/* 0x000 */ GameState state;
@@ -16,12 +16,12 @@ typedef struct {
/* 0x240 */ s16 transitionCountdown;
/* 0x242 */ s16 fadeInState;
/* 0x244 */ s16 alpha;
} DaytelopContext; // size = 0x248
} DayTelopState; // size = 0x248
typedef enum {
/* 0 */ DAYTELOP_HOURSTEXT_OFF,
/* 1 */ DAYTELOP_HOURSTEXT_FADEIN,
/* 2 */ DAYTELOP_HOURSTEXT_ON
} Daytelop_FadeState;
} DaytelopFadeState;
#endif
@@ -3,10 +3,10 @@
#include "global.h"
void FileChoose_Init(GameState* thisx);
void FileChoose_Destroy(GameState* thisx);
void FileSelect_Init(GameState* thisx);
void FileSelect_Destroy(GameState* thisx);
typedef struct FileChooseContext {
typedef struct FileSelectState {
/* 0x00000 */ GameState state;
/* 0x000A4 */ Vtx* unk_A4;
/* 0x000A8 */ u8* staticSegment;
@@ -110,6 +110,6 @@ typedef struct FileChooseContext {
/* 0x2454C */ s16 unk_2454C;
/* 0x2454E */ s16 unk_2454E;
/* 0x24550 */ s16 unk_24550;
} FileChooseContext; // size = 0x24558
} FileSelectState; // size = 0x24558
#endif
@@ -19,15 +19,15 @@ extern GfxMasterList D_0E000000;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080BC20.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileChoose_nop8080bc44.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_nop8080bc44.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileChoose_nop8080BC4C.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_nop8080BC4C.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080BC58.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080BDAC.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileChoose_RenderView.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_RenderView.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080BE60.s")
@@ -85,13 +85,13 @@ extern GfxMasterList D_0E000000;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80812ED0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileChoose_UpdateAndDrawSkybox.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_UpdateAndDrawSkybox.s")
void FileChoose_Main(GameState* thisx);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileChoose_Main.s")
void FileSelect_Main(GameState* thisx);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_Main.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80813908.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileChoose_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileChoose_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_Init.s")
+21 -23
View File
@@ -6,55 +6,53 @@
#include "z_opening.h"
void Opening_SetupForTitleCutscene(OpeningContext* this) {
static s32 openingEntrances[] = { ENTRANCE(CUTSCENE, 0), ENTRANCE(CUTSCENE, 1) };
static s32 openingCutscenes[] = { 0xFFFA, 0xFFFA };
void TitleSetup_SetupTitleScreen(TitleSetupState* this) {
static s32 sOpeningEntrances[] = { ENTRANCE(CUTSCENE, 0), ENTRANCE(CUTSCENE, 1) };
static s32 sOpeningCutscenes[] = { 0xFFFA, 0xFFFA };
gSaveContext.eventInf[1] &= (u8)~0x80;
gSaveContext.gameMode = 1;
Sram_InitNewSave();
gSaveContext.save.entrance = openingEntrances[D_801BB12C];
gSaveContext.nextCutsceneIndex = gSaveContext.save.cutscene = openingCutscenes[D_801BB12C];
gSaveContext.save.entrance = sOpeningEntrances[D_801BB12C];
gSaveContext.nextCutsceneIndex = gSaveContext.save.cutscene = sOpeningCutscenes[D_801BB12C];
gSaveContext.sceneSetupIndex = 0;
gSaveContext.save.time = CLOCK_TIME(8, 0);
gSaveContext.save.day = 1;
{
GameState* thisx = &this->gameState;
thisx->running = false;
}
SET_NEXT_GAMESTATE(&this->gameState, Play_Init, PlayState);
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, Play_Init, sizeof(PlayState));
gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
}
void func_80803EA0(OpeningContext* this) {
void func_80803EA0(TitleSetupState* this) {
SREG(33) |= 1;
}
void Opening_Main(GameState* thisx) {
OpeningContext* this = (OpeningContext*)thisx;
void TitleSetup_Main(GameState* thisx) {
TitleSetupState* this = (TitleSetupState*)thisx;
func_8012CF0C(this->gameState.gfxCtx, false, true, 0, 0, 0);
Opening_SetupForTitleCutscene(this);
func_8012CF0C(this->state.gfxCtx, false, true, 0, 0, 0);
TitleSetup_SetupTitleScreen(this);
func_80803EA0(this);
}
void Opening_Destroy(GameState* thisx) {
void TitleSetup_Destroy(GameState* thisx) {
ShrinkWindow_Destroy();
}
void Opening_Init(GameState* thisx) {
OpeningContext* this = (OpeningContext*)thisx;
void TitleSetup_Init(GameState* thisx) {
TitleSetupState* this = (TitleSetupState*)thisx;
Game_SetFramerateDivisor(&this->gameState, 1);
Matrix_Init(&this->gameState);
Game_SetFramerateDivisor(&this->state, 1);
Matrix_Init(&this->state);
ShrinkWindow_Init();
View_Init(&this->view, this->gameState.gfxCtx);
this->gameState.main = Opening_Main;
this->gameState.destroy = Opening_Destroy;
View_Init(&this->view, this->state.gfxCtx);
this->state.main = TitleSetup_Main;
this->state.destroy = TitleSetup_Destroy;
gSaveContext.respawnFlag = 0;
gSaveContext.respawn[RESPAWN_MODE_GORON].entrance = 0xFF;
@@ -3,13 +3,13 @@
#include "global.h"
void Opening_Init(GameState* thisx);
void Opening_Destroy(GameState* thisx);
void TitleSetup_Init(GameState* thisx);
void TitleSetup_Destroy(GameState* thisx);
typedef struct {
/* 0x000 */ GameState gameState;
/* 0x000 */ GameState state;
/* 0x0A4 */ UNK_TYPE1 unk_A4[0x4];
/* 0x0A8 */ View view;
} OpeningContext; // size = 0x210
} TitleSetupState; // size = 0x210
#endif
+6 -13
View File
@@ -8,13 +8,9 @@
#include "libc/alloca.h"
#include "overlays/gamestates/ovl_title/z_title.h"
void MapSelect_LoadTitle(MapSelectState* this) {
{
GameState* gameState = &this->state;
gameState->running = false;
}
SET_NEXT_GAMESTATE(&this->state, Title_Init, TitleContext);
void MapSelect_LoadConsoleLogo(MapSelectState* this) {
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, sizeof(ConsoleLogoState));
}
void MapSelect_LoadGame(MapSelectState* this, u32 entrance, s32 spawn) {
@@ -55,11 +51,8 @@ void MapSelect_LoadGame(MapSelectState* this, u32 entrance, s32 spawn) {
gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF;
gWeatherMode = 0;
do {
GameState* gameState = &this->state;
gameState->running = false;
} while (0);
SET_NEXT_GAMESTATE(&this->state, Play_Init, PlayState);
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, Play_Init, sizeof(PlayState));
}
// "Translation" (Actual name)
@@ -501,7 +494,7 @@ static SceneSelectEntry sScenes[] = {
{ "X 1:SPOT00", MapSelect_LoadGame, ENTRANCE(CUTSCENE, 0) },
// "Title" (Title Screen)
{ "title", (void*)MapSelect_LoadTitle, 0 },
{ "title", (void*)MapSelect_LoadConsoleLogo, 0 },
};
void MapSelect_UpdateMenu(MapSelectState* this) {
@@ -5,11 +5,11 @@
struct MapSelectState;
typedef void (*Select_LoadFunc)(struct MapSelectState*, u32, s32);
typedef void (*SelectLoadFunc)(struct MapSelectState*, u32, s32);
typedef struct {
/* 0x00 */ char* name;
/* 0x04 */ Select_LoadFunc loadFunc;
/* 0x04 */ SelectLoadFunc loadFunc;
/* 0x08 */ s32 entrance;
} SceneSelectEntry; // size = 0xC
+37 -41
View File
@@ -8,7 +8,7 @@
#include "overlays/gamestates/ovl_opening/z_opening.h"
#include "misc/nintendo_rogo_static/nintendo_rogo_static.h"
void Title_UpdateCounters(TitleContext* this) {
void ConsoleLogo_UpdateCounters(ConsoleLogoState* this) {
if ((this->coverAlpha == 0) && (this->visibleDuration != 0)) {
this->timer--;
this->visibleDuration--;
@@ -32,7 +32,7 @@ void Title_UpdateCounters(TitleContext* this) {
this->ult++;
}
void Title_RenderView(TitleContext* this, f32 x, f32 y, f32 z) {
void ConsoleLogo_RenderView(ConsoleLogoState* this, f32 x, f32 y, f32 z) {
View* view = &this->view;
Vec3f eye;
Vec3f at;
@@ -49,10 +49,10 @@ void Title_RenderView(TitleContext* this, f32 x, f32 y, f32 z) {
View_RenderView(view, 0xF);
}
void Title_Draw(GameState* thisx) {
static s16 titleRotation = 0;
void ConsoleLogo_Draw(GameState* thisx) {
static s16 sTitleRotation = 0;
static Lights1 sTitleLights = gdSPDefLights1(100, 100, 100, 255, 255, 255, 69, 69, 69);
TitleContext* this = (TitleContext*)thisx;
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
u16 y;
u16 idx;
Vec3f lightDir;
@@ -60,7 +60,7 @@ void Title_Draw(GameState* thisx) {
Vec3f eye;
s32 pad[2];
OPEN_DISPS(this->gameState.gfxCtx);
OPEN_DISPS(this->state.gfxCtx);
lightDir.x = 69.0f;
lightDir.y = 69.0f;
@@ -74,20 +74,20 @@ void Title_Draw(GameState* thisx) {
eye.y = 4002.5417f;
eye.z = 1119.0837f;
Hilite_DrawOpa(&object, &eye, &lightDir, this->gameState.gfxCtx);
Hilite_DrawOpa(&object, &eye, &lightDir, this->state.gfxCtx);
gSPSetLights1(POLY_OPA_DISP++, sTitleLights);
Title_RenderView(this, 0.0f, 150.0f, 300.0f);
func_8012C28C(this->gameState.gfxCtx);
ConsoleLogo_RenderView(this, 0.0f, 150.0f, 300.0f);
func_8012C28C(this->state.gfxCtx);
Matrix_Translate(-53.0f, -5.0f, 0.0f, MTXMODE_NEW);
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
Matrix_RotateZYX(0, titleRotation, 0, MTXMODE_APPLY);
Matrix_RotateZYX(0, sTitleRotation, 0, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(this->gameState.gfxCtx), G_MTX_LOAD);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(this->state.gfxCtx), G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, gNintendo64LogoNDL);
func_8012C628(this->gameState.gfxCtx);
func_8012C628(this->state.gfxCtx);
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_2CYCLE);
@@ -109,62 +109,58 @@ void Title_Draw(GameState* thisx) {
1 << 10, 1 << 10);
}
func_800FC444(this->gameState.gfxCtx, 0, 0, 0, this->coverAlpha, 2);
func_800FC444(this->state.gfxCtx, 0, 0, 0, this->coverAlpha, 2);
titleRotation += 300;
sTitleRotation += 300;
CLOSE_DISPS(this->gameState.gfxCtx);
CLOSE_DISPS(this->state.gfxCtx);
}
void Title_Main(GameState* thisx) {
TitleContext* this = (TitleContext*)thisx;
void ConsoleLogo_Main(GameState* thisx) {
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
func_8012CF0C(this->gameState.gfxCtx, true, true, 0, 0, 0);
func_8012CF0C(this->state.gfxCtx, true, true, 0, 0, 0);
OPEN_DISPS(this->gameState.gfxCtx);
OPEN_DISPS(this->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x01, this->staticSegment);
Title_UpdateCounters(this);
Title_Draw(&this->gameState);
ConsoleLogo_UpdateCounters(this);
ConsoleLogo_Draw(&this->state);
if (this->exit) {
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
gSaveContext.nightSeqIndex = 0xFF;
gSaveContext.gameMode = 1;
{
GameState* gameState = &this->gameState;
gameState->running = false;
}
SET_NEXT_GAMESTATE(&this->gameState, Opening_Init, OpeningContext);
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, TitleSetup_Init, sizeof(TitleSetupState));
}
CLOSE_DISPS(this->gameState.gfxCtx);
CLOSE_DISPS(this->state.gfxCtx);
}
void Title_Destroy(GameState* thisx) {
TitleContext* this = (TitleContext*)thisx;
void ConsoleLogo_Destroy(GameState* thisx) {
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
Sram_InitSram(&this->gameState, &this->sramCtx);
Sram_InitSram(&this->state, &this->sramCtx);
ShrinkWindow_Destroy();
CIC6105_Nop80081828();
}
void Title_Init(GameState* thisx) {
TitleContext* this = (TitleContext*)thisx;
uintptr_t segmentSize =
(uintptr_t)_nintendo_rogo_staticSegmentRomEnd - (uintptr_t)_nintendo_rogo_staticSegmentRomStart;
void ConsoleLogo_Init(GameState* thisx) {
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
uintptr_t segmentSize = SEGMENT_ROM_SIZE(nintendo_rogo_static);
this->staticSegment = THA_AllocEndAlign16(&this->gameState.heap, segmentSize);
DmaMgr_SendRequest0(this->staticSegment, (uintptr_t)_nintendo_rogo_staticSegmentRomStart, segmentSize);
this->staticSegment = THA_AllocEndAlign16(&this->state.heap, segmentSize);
DmaMgr_SendRequest0(this->staticSegment, SEGMENT_ROM_START(nintendo_rogo_static), segmentSize);
Game_SetFramerateDivisor(thisx, 1);
Matrix_Init(thisx);
Game_SetFramerateDivisor(&this->state, 1);
Matrix_Init(&this->state);
ShrinkWindow_Init();
View_Init(&this->view, thisx->gfxCtx);
View_Init(&this->view, this->state.gfxCtx);
thisx->main = Title_Main;
thisx->destroy = Title_Destroy;
this->state.main = ConsoleLogo_Main;
this->state.destroy = ConsoleLogo_Destroy;
this->exit = false;
if (!(Padmgr_GetControllerBitmask() & 1)) {
+4 -4
View File
@@ -3,11 +3,11 @@
#include "global.h"
void Title_Init(GameState* thisx);
void Title_Destroy(GameState* thisx);
void ConsoleLogo_Init(GameState* thisx);
void ConsoleLogo_Destroy(GameState* thisx);
typedef struct {
/* 0x000 */ GameState gameState;
/* 0x000 */ GameState state;
/* 0x0A4 */ u8* staticSegment;
/* 0x0A8 */ View view;
/* 0x210 */ SramContext sramCtx;
@@ -18,6 +18,6 @@ typedef struct {
/* 0x240 */ s16 ult;
/* 0x242 */ s16 uls;
/* 0x244 */ u8 exit;
} TitleContext; // size = 0x248
} ConsoleLogoState; // size = 0x248
#endif
+31 -31
View File
@@ -3116,10 +3116,10 @@
0x80172ED0:("AudioMgr_ThreadEntry",),
0x80173048:("AudioMgr_Unlock",),
0x80173074:("AudioMgr_Init",),
0x80173130:("TitleSetup_GameStateResetContext",),
0x801732DC:("TitleSetup_InitImpl",),
0x8017332C:("TitleSetup_Destroy",),
0x80173338:("TitleSetup_Init",),
0x80173130:("Setup_SetRegs",),
0x801732DC:("Setup_InitImpl",),
0x8017332C:("Setup_Destroy",),
0x80173338:("Setup_Init",),
0x80173360:("Game_UpdateFramerateVariables",),
0x801733A8:("Game_SetFramerateDivisor",),
0x801733DC:("GameState_SetFBFilter",),
@@ -3134,8 +3134,8 @@
0x80173880:("GameState_Realloc",),
0x80173950:("GameState_Init",),
0x80173A50:("GameState_Destroy",),
0x80173B00:("GameState_GetNextStateInit",),
0x80173B0C:("GameState_GetNextStateSize",),
0x80173B00:("GameState_GetInit",),
0x80173B0C:("GameState_GetSize",),
0x80173B18:("GameState_IsRunning",),
0x80173B24:("GameState_GetArenaSize",),
0x80173B48:("func_80173B48",),
@@ -4083,13 +4083,13 @@
0x801AA624:("GameOver_FadeLights",),
0x801AA68C:("GameOver_Update",),
0x801AAAA0:("func_801AAAA0",),
0x80800000:("Title_UpdateCounters",),
0x8080009C:("Title_RenderView",),
0x80800134:("Title_Draw",),
0x8080066C:("Title_Main",),
0x8080071C:("Title_Destroy",),
0x8080074C:("Title_Init",),
0x80800910:("MapSelect_LoadTitle",),
0x80800000:("ConsoleLogo_UpdateCounters",),
0x8080009C:("ConsoleLogo_RenderView",),
0x80800134:("ConsoleLogo_Draw",),
0x8080066C:("ConsoleLogo_Main",),
0x8080071C:("ConsoleLogo_Destroy",),
0x8080074C:("ConsoleLogo_Init",),
0x80800910:("MapSelect_LoadConsoleLogo",),
0x80800930:("MapSelect_LoadGame",),
0x80800A44:("MapSelect_UpdateMenu",),
0x808013B8:("MapSelect_PrintMenu",),
@@ -4102,11 +4102,11 @@
0x80801AFC:("MapSelect_Main",),
0x80801B28:("MapSelect_Destroy",),
0x80801B4C:("MapSelect_Init",),
0x80803DF0:("Opening_SetupForTitleCutscene",),
0x80803DF0:("TitleSetup_SetupTitleScreen",),
0x80803EA0:("func_80803EA0",),
0x80803EC0:("Opening_Main",),
0x80803F0C:("Opening_Destroy",),
0x80803F30:("Opening_Init",),
0x80803EC0:("TitleSetup_Main",),
0x80803F0C:("TitleSetup_Destroy",),
0x80803F30:("TitleSetup_Init",),
0x80804010:("func_80804010",),
0x808041A0:("func_808041A0",),
0x80804654:("func_80804654",),
@@ -4152,11 +4152,11 @@
0x8080A708:("func_8080A708",),
0x8080BBFC:("func_8080BBFC",),
0x8080BC20:("func_8080BC20",),
0x8080BC44:("FileChoose_nop8080bc44",),
0x8080BC4C:("FileChoose_nop8080BC4C",),
0x8080BC44:("FileSelect_nop8080bc44",),
0x8080BC4C:("FileSelect_nop8080BC4C",),
0x8080BC58:("func_8080BC58",),
0x8080BDAC:("func_8080BDAC",),
0x8080BDDC:("FileChoose_RenderView",),
0x8080BDDC:("FileSelect_RenderView",),
0x8080BE60:("func_8080BE60",),
0x8080C040:("func_8080C040",),
0x8080C228:("func_8080C228",),
@@ -4185,18 +4185,18 @@
0x80812D94:("func_80812D94",),
0x80812E94:("func_80812E94",),
0x80812ED0:("func_80812ED0",),
0x8081313C:("FileChoose_UpdateAndDrawSkybox",),
0x80813268:("FileChoose_Main",),
0x8081313C:("FileSelect_UpdateAndDrawSkybox",),
0x80813268:("FileSelect_Main",),
0x80813908:("func_80813908",),
0x80813C74:("FileChoose_Destroy",),
0x80813C98:("FileChoose_Init",),
0x80814EB0:("Daytelop_Update",),
0x80814FE8:("Daytelop_Draw",),
0x808156B4:("Daytelop_Main",),
0x8081574C:("Daytelop_Destroy",),
0x80815770:("Daytelop_nop80815770",),
0x8081577C:("Daytelop_LoadGraphics",),
0x80815820:("Daytelop_Init",),
0x80813C74:("FileSelect_Destroy",),
0x80813C98:("FileSelect_Init",),
0x80814EB0:("DayTelop_Update",),
0x80814FE8:("DayTelop_Draw",),
0x808156B4:("DayTelop_Main",),
0x8081574C:("DayTelop_Destroy",),
0x80815770:("DayTelop_Noop",),
0x8081577C:("DayTelop_LoadGraphics",),
0x80815820:("DayTelop_Init",),
0x808160A0:("func_808160A0",),
0x80817B5C:("func_80817B5C",),
0x80818904:("func_80818904",),
+6 -6
View File
@@ -2630,10 +2630,10 @@ asm/non_matchings/code/audioMgr/AudioMgr_HandlePRENMI.s,AudioMgr_HandlePRENMI,0x
asm/non_matchings/code/audioMgr/AudioMgr_ThreadEntry.s,AudioMgr_ThreadEntry,0x80172ED0,0x5E
asm/non_matchings/code/audioMgr/AudioMgr_Unlock.s,AudioMgr_Unlock,0x80173048,0xB
asm/non_matchings/code/audioMgr/AudioMgr_Init.s,AudioMgr_Init,0x80173074,0x2F
asm/non_matchings/code/title_setup/TitleSetup_GameStateResetContext.s,TitleSetup_GameStateResetContext,0x80173130,0x6B
asm/non_matchings/code/title_setup/TitleSetup_InitImpl.s,TitleSetup_InitImpl,0x801732DC,0x14
asm/non_matchings/code/title_setup/TitleSetup_Destroy.s,TitleSetup_Destroy,0x8017332C,0x3
asm/non_matchings/code/title_setup/TitleSetup_Init.s,TitleSetup_Init,0x80173338,0xA
asm/non_matchings/code/title_setup/Setup_SetRegs.s,Setup_SetRegs,0x80173130,0x6B
asm/non_matchings/code/title_setup/Setup_InitImpl.s,Setup_InitImpl,0x801732DC,0x14
asm/non_matchings/code/title_setup/Setup_Destroy.s,Setup_Destroy,0x8017332C,0x3
asm/non_matchings/code/title_setup/Setup_Init.s,Setup_Init,0x80173338,0xA
asm/non_matchings/code/game/Game_UpdateFramerateVariables.s,Game_UpdateFramerateVariables,0x80173360,0x12
asm/non_matchings/code/game/Game_SetFramerateDivisor.s,Game_SetFramerateDivisor,0x801733A8,0xD
asm/non_matchings/code/game/GameState_SetFBFilter.s,GameState_SetFBFilter,0x801733DC,0x56
@@ -2648,8 +2648,8 @@ asm/non_matchings/code/game/Game_InitHeap.s,Game_InitHeap,0x80173810,0x1C
asm/non_matchings/code/game/Game_ResizeHeap.s,Game_ResizeHeap,0x80173880,0x34
asm/non_matchings/code/game/GameState_Init.s,GameState_Init,0x80173950,0x40
asm/non_matchings/code/game/GameState_Destroy.s,GameState_Destroy,0x80173A50,0x2C
asm/non_matchings/code/game/GameState_GetNextStateInit.s,GameState_GetNextStateInit,0x80173B00,0x3
asm/non_matchings/code/game/GameState_GetNextStateSize.s,GameState_GetNextStateSize,0x80173B0C,0x3
asm/non_matchings/code/game/GameState_GetInit.s,GameState_GetInit,0x80173B00,0x3
asm/non_matchings/code/game/GameState_GetSize.s,GameState_GetSize,0x80173B0C,0x3
asm/non_matchings/code/game/GameState_IsRunning.s,GameState_IsRunning,0x80173B18,0x3
asm/non_matchings/code/game/Game_GetHeapFreeSize.s,Game_GetHeapFreeSize,0x80173B24,0x9
asm/non_matchings/code/game/func_80173B48.s,func_80173B48,0x80173B48,0x2A
1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
2630 asm/non_matchings/code/audioMgr/AudioMgr_ThreadEntry.s AudioMgr_ThreadEntry 0x80172ED0 0x5E
2631 asm/non_matchings/code/audioMgr/AudioMgr_Unlock.s AudioMgr_Unlock 0x80173048 0xB
2632 asm/non_matchings/code/audioMgr/AudioMgr_Init.s AudioMgr_Init 0x80173074 0x2F
2633 asm/non_matchings/code/title_setup/TitleSetup_GameStateResetContext.s asm/non_matchings/code/title_setup/Setup_SetRegs.s TitleSetup_GameStateResetContext Setup_SetRegs 0x80173130 0x6B
2634 asm/non_matchings/code/title_setup/TitleSetup_InitImpl.s asm/non_matchings/code/title_setup/Setup_InitImpl.s TitleSetup_InitImpl Setup_InitImpl 0x801732DC 0x14
2635 asm/non_matchings/code/title_setup/TitleSetup_Destroy.s asm/non_matchings/code/title_setup/Setup_Destroy.s TitleSetup_Destroy Setup_Destroy 0x8017332C 0x3
2636 asm/non_matchings/code/title_setup/TitleSetup_Init.s asm/non_matchings/code/title_setup/Setup_Init.s TitleSetup_Init Setup_Init 0x80173338 0xA
2637 asm/non_matchings/code/game/Game_UpdateFramerateVariables.s Game_UpdateFramerateVariables 0x80173360 0x12
2638 asm/non_matchings/code/game/Game_SetFramerateDivisor.s Game_SetFramerateDivisor 0x801733A8 0xD
2639 asm/non_matchings/code/game/GameState_SetFBFilter.s GameState_SetFBFilter 0x801733DC 0x56
2648 asm/non_matchings/code/game/Game_ResizeHeap.s Game_ResizeHeap 0x80173880 0x34
2649 asm/non_matchings/code/game/GameState_Init.s GameState_Init 0x80173950 0x40
2650 asm/non_matchings/code/game/GameState_Destroy.s GameState_Destroy 0x80173A50 0x2C
2651 asm/non_matchings/code/game/GameState_GetNextStateInit.s asm/non_matchings/code/game/GameState_GetInit.s GameState_GetNextStateInit GameState_GetInit 0x80173B00 0x3
2652 asm/non_matchings/code/game/GameState_GetNextStateSize.s asm/non_matchings/code/game/GameState_GetSize.s GameState_GetNextStateSize GameState_GetSize 0x80173B0C 0x3
2653 asm/non_matchings/code/game/GameState_IsRunning.s GameState_IsRunning 0x80173B18 0x3
2654 asm/non_matchings/code/game/Game_GetHeapFreeSize.s Game_GetHeapFreeSize 0x80173B24 0x9
2655 asm/non_matchings/code/game/func_80173B48.s func_80173B48 0x80173B48 0x2A