diff options
| author | Tom Overton <tom-overton@users.noreply.github.com> | 2021-09-29 18:08:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-29 21:08:26 -0400 |
| commit | 9dfeec73458cc941e3345613710e4308e1ede7e5 (patch) | |
| tree | 7c6734d485d940e63d9d166d164996d09366ae87 /src/code | |
| parent | 30987676884df00e563f64bde13f8c49a3f96b70 (diff) | |
Fix some dummy label matches (#331)
* Fix some dummy label matches
* Remove dummy label in z_en_railgibud
* Remove dummy label from z_door_ana.c
* Remove dummy label from z_obj_raillift.c
* Remove dummy label from z_en_minislime.c
* A few more dummy label fixes
* Run format, whoops
* Add single line between pad and code
* Add OPEN/CLOSE_DISPS to GameState_Draw
* Add the padding in game.c too (how did I forget this???)
* Run format.sh
* pad -> requiredScopeTemp
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/game.c | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/src/code/game.c b/src/code/game.c index 4fe094497..eb26dee8a 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -68,14 +68,14 @@ void Game_Nop80173534(GameState* gamestate) { void GameState_Draw(GameState* gamestate, GraphicsContext* gfxCtx) { Gfx* nextDisplayList; - Gfx* _polyOpa; - // Unused vars impact regalloc - Gfx* temp_t2; - u32 temp_v1; + Gfx* polyOpa; - _polyOpa = gfxCtx->polyOpa.p; - nextDisplayList = Graph_GfxPlusOne(gfxCtx->polyOpa.p); - gSPDisplayList(gfxCtx->overlay.p++, nextDisplayList); + OPEN_DISPS(gfxCtx); + + polyOpa = POLY_OPA_DISP; + nextDisplayList = Graph_GfxPlusOne(POLY_OPA_DISP); + + gSPDisplayList(OVERLAY_DISP++, nextDisplayList); if (R_FB_FILTER_TYPE && R_FB_FILTER_ENV_COLOR(3) == 0) { GameState_SetFBFilter(&nextDisplayList, (u32)gfxCtx->zbuffer); @@ -86,16 +86,22 @@ void GameState_Draw(GameState* gamestate, GraphicsContext* gfxCtx) { } gSPEndDisplayList(nextDisplayList++); - Graph_BranchDlist(_polyOpa, nextDisplayList); - gfxCtx->polyOpa.p = nextDisplayList; + Graph_BranchDlist(polyOpa, nextDisplayList); + POLY_OPA_DISP = nextDisplayList; -lblUnk:; // Label prevents reordering, if(1) around the above block don't seem to help unlike in OoT - func_800E9F78(gfxCtx); + // Block prevents reordering, if(1) around the above block don't seem to help unlike in OoT + { + s32 requiredScopeTemp; + + func_800E9F78(gfxCtx); + } if (R_ENABLE_ARENA_DBG != 0) { SpeedMeter_DrawTimeEntries(&D_801F7FF0, gfxCtx); SpeedMeter_DrawAllocEntries(&D_801F7FF0, gfxCtx, gamestate); } + + CLOSE_DISPS(gfxCtx); } void Game_ResetSegments(GraphicsContext* gfxCtx) { @@ -197,21 +203,24 @@ void Game_StateInit(GameState* gamestate, GameStateFunc gameStateInit, GraphicsC gamestate->nextGameStateInit = NULL; gamestate->nextGameStateSize = 0U; -lblUnk:; - Gamealloc_Init(&gamestate->alloc); - Game_InitHeap(gamestate, 0x100000); - Game_SetFramerateDivisor(gamestate, 3); + { + s32 requiredScopeTemp; - gameStateInit(gamestate); + Gamealloc_Init(&gamestate->alloc); + Game_InitHeap(gamestate, 0x100000); + Game_SetFramerateDivisor(gamestate, 3); - func_80140CE0(&D_801F8010); - func_801420C0(&D_801F8020); - func_801418B0(&sMonoColors); - func_80140898(&D_801F8048); - func_801773A0(&D_801F7FF0); - func_8013ED9C(); + gameStateInit(gamestate); - osSendMesg(&gamestate->gfxCtx->unk5C, NULL, 1); + func_80140CE0(&D_801F8010); + func_801420C0(&D_801F8020); + func_801418B0(&sMonoColors); + func_80140898(&D_801F8048); + func_801773A0(&D_801F7FF0); + func_8013ED9C(); + + osSendMesg(&gamestate->gfxCtx->unk5C, NULL, 1); + } } void Game_StateFini(GameState* gamestate) { |
