mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-05 02:25:53 -04:00
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:
+12
-14
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user