1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-06 16:04:35 +00:00

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
This commit is contained in:
Zach Banks 2021-05-03 21:49:09 -04:00 committed by GitHub
parent 278e471074
commit 7c77253eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 359 additions and 794 deletions

View file

@ -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);