1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-08 00:44:42 +00:00

Document enum PauseState game over parts (#2283)

* [document] `enum PauseState`, game over parts

* apply Jenkins fixes (automatic code formatting)

also, as previously, i've rerun the "make" to check integrity

* add `PAUSE_STATE_GAME_OVER_*` comments

in case it helps to rename them later, if the need ever arises

* improve `PAUSE_STATE_GAME_OVER_SAVE_*` comments

also i've noticed, that `z64pause.h` doesn't comply fully with the `.clang-format`

temporary changing a couple of setting to
- ColumnLimit: 0
- AlignTrailingComments: false
fixes the issue. i don't want to push unrelated formatting here

* remove redundant comments

https://github.com/zeldaret/oot/pull/2283#discussion_r1827652667

* apply PR naming suggestions

reverified with
> `check_format.py ...`
> `make ...`
This commit is contained in:
Leonid Kapitonov 2024-11-15 09:37:10 +01:00 committed by GitHub
parent c55a1dab57
commit e46fcbdbc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 48 additions and 43 deletions

View file

@ -102,7 +102,7 @@ void GameOver_Update(PlayState* play) {
sGameOverTimer--;
if (sGameOverTimer == 0) {
play->pauseCtx.state = PAUSE_STATE_8;
play->pauseCtx.state = PAUSE_STATE_GAME_OVER_START;
gameOverCtx->state++;
Rumble_Reset();
}

View file

@ -70,7 +70,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_WAIT_BG_PRERENDER
}
} else if (pauseCtx->state == PAUSE_STATE_8) {
} else if (pauseCtx->state == PAUSE_STATE_GAME_OVER_START) {
#if OOT_DEBUG
R_HREG_MODE = HREG_MODE_UCODE_DISAS;
R_UCODE_DISAS_LOG_MODE = 3;
@ -78,13 +78,14 @@ void KaleidoScopeCall_Update(PlayState* play) {
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_9
} else if ((pauseCtx->state == PAUSE_STATE_WAIT_BG_PRERENDER) || (pauseCtx->state == PAUSE_STATE_9)) {
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING; // copied from pause menu, not needed here
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_GAME_OVER_WAIT_BG_PRERENDER
} else if ((pauseCtx->state == PAUSE_STATE_WAIT_BG_PRERENDER) ||
(pauseCtx->state == PAUSE_STATE_GAME_OVER_WAIT_BG_PRERENDER)) {
PRINTF("PR_KAREIDOSCOPE_MODE=%d\n", R_PAUSE_BG_PRERENDER_STATE);
if (R_PAUSE_BG_PRERENDER_STATE >= PAUSE_BG_PRERENDER_READY) {
pauseCtx->state++; // PAUSE_STATE_INIT or PAUSE_STATE_10
pauseCtx->state++; // PAUSE_STATE_INIT or PAUSE_STATE_GAME_OVER_INIT
}
} else if (pauseCtx->state != PAUSE_STATE_OFF) {
if (gKaleidoMgrCurOvl != kaleidoScopeOvl) {
@ -124,7 +125,8 @@ void KaleidoScopeCall_Draw(PlayState* play) {
if (R_PAUSE_BG_PRERENDER_STATE >= PAUSE_BG_PRERENDER_READY) {
if (((play->pauseCtx.state >= PAUSE_STATE_OPENING_1) && (play->pauseCtx.state <= PAUSE_STATE_SAVE_PROMPT)) ||
((play->pauseCtx.state >= PAUSE_STATE_11) && (play->pauseCtx.state <= PAUSE_STATE_CLOSING))) {
((play->pauseCtx.state >= PAUSE_STATE_GAME_OVER_SHOW_MESSAGE) &&
(play->pauseCtx.state <= PAUSE_STATE_CLOSING))) {
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
sKaleidoScopeDrawFunc(play);
}