1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 19:35:28 +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

@ -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;