summaryrefslogtreecommitdiff
path: root/src/code/game.c
diff options
context:
space:
mode:
authorZach Banks <zjbanks@gmail.com>2021-05-03 21:49:09 -0400
committerGitHub <noreply@github.com>2021-05-03 21:49:09 -0400
commit7c77253eca304e7afd2002147bc27edb62293b36 (patch)
tree2714c685f9934f630768fa364d552c2d52f33791 /src/code/game.c
parent278e471074167602d65e3882168541fe93c88b37 (diff)
ViMode progress (#802)
* ViMode OK * Fix variable name in regconvert tool * ViMode: fix formatting * Add nonmatching impl for ViMode_Configure, respond to PR - Fixed struct field naming (unkXX -> unk_XX) - ViMode_Configure args are not flags for top/left etc; seem to be for video mode - Used @Random06457's implementation of `ViMode_LogPrint` * Use plain LOG_ADDRESS in ViMode_LogPrint * Incorporate PR feedback from Roman971
Diffstat (limited to 'src/code/game.c')
-rw-r--r--src/code/game.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/code/game.c b/src/code/game.c
index 3efd82259..ce71375f1 100644
--- a/src/code/game.c
+++ b/src/code/game.c
@@ -5,7 +5,7 @@ SpeedMeter D_801664D0;
struct_801664F0 D_801664F0;
struct_80166500 D_80166500;
VisMono sMonoColors;
-unk_80166528 D_80166528;
+ViMode sViMode;
FaultClient sGameFaultClient;
u16 sLastButtonPressed;
@@ -251,9 +251,9 @@ void GameState_Update(GameState* gameState) {
gfxCtx->xScale = gViConfigXScale;
gfxCtx->yScale = gViConfigYScale;
} else if (SREG(48) > 0) {
- func_800ACAF8(&D_80166528, gameState->input, gfxCtx);
- gfxCtx->viMode = &D_80166528.viMode;
- gfxCtx->viFeatures = D_80166528.viFeatures;
+ ViMode_Update(&sViMode, gameState->input);
+ gfxCtx->viMode = &sViMode.customViMode;
+ gfxCtx->viFeatures = sViMode.viFeatures;
gfxCtx->xScale = 1.0f;
gfxCtx->yScale = 1.0f;
}
@@ -416,7 +416,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
func_800AD920(&D_80166500);
VisMono_Init(&sMonoColors);
if (SREG(48) == 0) {
- func_800ACA28(&D_80166528);
+ ViMode_Init(&sViMode);
}
SpeedMeter_Init(&D_801664D0);
func_800AA0B4();
@@ -448,7 +448,7 @@ void GameState_Destroy(GameState* gameState) {
func_800AD950(&D_80166500);
VisMono_Destroy(&sMonoColors);
if (SREG(48) == 0) {
- func_800ACA90(&D_80166528);
+ ViMode_Destroy(&sViMode);
}
THA_Dt(&gameState->tha);
GameAlloc_Cleanup(&gameState->alloc);