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
+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);
}