1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 19:35:28 +00:00

Document pause states (excluding gameover) (#1483)

* Document PauseContext.state

* Very light docs surrounding pause states

* PAUSE_STATE_UNPAUSE -> PAUSE_STATE_RESUME_GAMEPLAY and comment on purpose in the enum

* PAUSE_STATE_MAIN -> PAUSE_STATE_6

* format

* Player_InitDrawPause -> Player_InitPauseDrawData
This commit is contained in:
Dragorn421 2023-09-06 17:14:15 +02:00 committed by GitHub
parent 475b8a1eba
commit d314cfe923
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 174 additions and 139 deletions

View file

@ -447,7 +447,7 @@ void Play_Init(GameState* thisx) {
void Play_Update(PlayState* this) {
s32 pad1;
s32 sp80;
s32 isPaused;
Input* input;
u32 i;
s32 pad2;
@ -849,7 +849,7 @@ void Play_Update(PlayState* this) {
}
PLAY_LOG(3551);
sp80 = (this->pauseCtx.state != 0) || (this->pauseCtx.debugState != 0);
isPaused = IS_PAUSED(&this->pauseCtx);
PLAY_LOG(3555);
AnimationContext_Reset(&this->animationCtx);
@ -859,7 +859,7 @@ void Play_Update(PlayState* this) {
PLAY_LOG(3577);
if ((sp80 == 0) && (IREG(72) == 0)) {
if (!isPaused && (IREG(72) == 0)) {
PLAY_LOG(3580);
this->gameplayFrames++;
@ -926,7 +926,7 @@ void Play_Update(PlayState* this) {
if (this->viewpoint != VIEWPOINT_NONE) {
if (CHECK_BTN_ALL(input[0].press.button, BTN_CUP)) {
if ((this->pauseCtx.state != 0) || (this->pauseCtx.debugState != 0)) {
if (IS_PAUSED(&this->pauseCtx)) {
// "Changing viewpoint is prohibited due to the kaleidoscope"
osSyncPrintf(VT_FGCOL(CYAN) "カレイドスコープ中につき視点変更を禁止しております\n" VT_RST);
} else if (Player_InCsMode(this)) {
@ -950,7 +950,7 @@ void Play_Update(PlayState* this) {
PLAY_LOG(3716);
if ((this->pauseCtx.state != 0) || (this->pauseCtx.debugState != 0)) {
if (IS_PAUSED(&this->pauseCtx)) {
PLAY_LOG(3721);
KaleidoScopeCall_Update(this);
} else if (this->gameOverCtx.state != GAMEOVER_INACTIVE) {
@ -987,7 +987,7 @@ void Play_Update(PlayState* this) {
skip:
PLAY_LOG(3801);
if ((sp80 == 0) || gDebugCamEnabled) {
if (!isPaused || gDebugCamEnabled) {
s32 pad3[5];
s32 i;
@ -1013,7 +1013,7 @@ skip:
}
void Play_DrawOverlayElements(PlayState* this) {
if ((this->pauseCtx.state != 0) || (this->pauseCtx.debugState != 0)) {
if (IS_PAUSED(&this->pauseCtx)) {
KaleidoScopeCall_Draw(this);
}