diff options
| author | fig02 <fig02srl@gmail.com> | 2020-10-11 21:52:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-11 21:52:50 -0400 |
| commit | ed719f3da03afcfd5b4ebb47506d63564073a066 (patch) | |
| tree | 65f79157fde359aa929beec9ce143144af70b076 /src/code/z_sample.c | |
| parent | b010db7c19207f0e607d5ccaf0d1f2350dda3964 (diff) | |
Make Gamestates use thisx for entry point functions (#437)
* fix colliderinit typo
* fix initchain
* reloc
* thisx
* sample
* review
* forgot sample main
Diffstat (limited to 'src/code/z_sample.c')
| -rw-r--r-- | src/code/z_sample.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/code/z_sample.c b/src/code/z_sample.c index d5383b373..7df885439 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -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; |
