1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 06:52:03 +00:00

Make Gamestates use thisx for entry point functions (#437)

* fix colliderinit typo

* fix initchain

* reloc

* thisx

* sample

* review

* forgot sample main
This commit is contained in:
fig02 2020-10-11 21:52:50 -04:00 committed by GitHub
parent b010db7c19
commit ed719f3da0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 74 additions and 54 deletions

View file

@ -124,8 +124,8 @@ void Title_Draw(TitleContext* this) {
CLOSE_DISPS(this->state.gfxCtx, "../z_title.c", 483);
}
void Title_Main(TitleContext* this) {
s32 pad;
void Title_Main(GameState* thisx) {
TitleContext* this = (TitleContext*)thisx;
OPEN_DISPS(this->state.gfxCtx, "../z_title.c", 494);
@ -154,13 +154,15 @@ void Title_Main(TitleContext* this) {
CLOSE_DISPS(this->state.gfxCtx, "../z_title.c", 541);
}
void Title_Destroy(TitleContext* this) {
void Title_Destroy(GameState* thisx) {
TitleContext* this = (TitleContext*)thisx;
Sram_InitSram(this, &this->sramCtx);
}
void Title_Init(TitleContext* this) {
void Title_Init(GameState* thisx) {
u32 size = (u32)_nintendo_rogo_staticSegmentRomEnd - (u32)_nintendo_rogo_staticSegmentRomStart;
s32 pad;
TitleContext* this = (TitleContext*)thisx;
this->staticSegment = GameState_Alloc(&this->state, size, "../z_title.c", 611);
osSyncPrintf("z_title.c\n");