Skip to content

Commit

Permalink
Document sSceneInitLetterboxTimer (#2469)
Browse files Browse the repository at this point in the history
* document scene init letterbox timer

* reword
  • Loading branch information
fig02 authored Feb 14, 2025
1 parent bbcdf22 commit c859678
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/code/z_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -7533,7 +7533,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState
#if DEBUG_FEATURES
sDbgModeIdx = -1;
#endif
D_8011D3F0 = 3;
sSceneInitLetterboxTimer = 3; // show letterbox for 3 frames at the start of a new scene
PRINTF(VT_FGCOL(BLUE) "camera: initialize --- " VT_RST " UID %d\n", camera->uid);
}

Expand Down Expand Up @@ -8142,8 +8142,8 @@ Vec3s Camera_Update(Camera* camera) {
if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_END_CREDITS)) {
sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_NONE, CAM_HUD_VISIBILITY_ALL, 0);
Camera_UpdateInterface(sCameraInterfaceField);
} else if ((D_8011D3F0 != 0) && (camera->camId == CAM_ID_MAIN)) {
D_8011D3F0--;
} else if ((sSceneInitLetterboxTimer != 0) && (camera->camId == CAM_ID_MAIN)) {
sSceneInitLetterboxTimer--;
sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_LARGE, CAM_HUD_VISIBILITY_NOTHING_ALT, 0);
Camera_UpdateInterface(sCameraInterfaceField);
} else if (camera->play->transitionMode != TRANS_MODE_OFF) {
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_camera_data.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,7 @@ s16 D_8011D3CC[] = {

s32 sUpdateCameraDirection = 0;
s32 D_8011D3EC = 0;
s32 D_8011D3F0 = 0;
s32 sSceneInitLetterboxTimer = 0;

s32 sDemo5PrevAction12Frame = -16;

Expand Down

0 comments on commit c859678

Please sign in to comment.