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

@ -38,12 +38,14 @@ void Sample_Draw(SampleContext* this) {
CLOSE_DISPS(gfxCtx, "../z_sample.c", 111);
}
void Sample_Main(SampleContext* this) {
void Sample_Main(GameState* thisx) {
SampleContext* this = (SampleContext*)thisx;
Sample_Draw(this);
Sample_HandleStateChange(this);
}
void Sample_Destroy(SampleContext* this) {
void Sample_Destroy(GameState* thisx) {
}
void Sample_SetupView(SampleContext* this) {
@ -83,7 +85,9 @@ void Sample_LoadTitleStatic(SampleContext* this) {
DmaMgr_SendRequest1(this->staticSegment, _title_staticSegmentRomStart, size, "../z_sample.c", 164);
}
void Sample_Init(SampleContext* this) {
void Sample_Init(GameState* thisx) {
SampleContext* this = (SampleContext*)thisx;
this->state.main = Sample_Main;
this->state.destroy = Sample_Destroy;
R_UPDATE_RATE = 1;