Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document sSceneInitLetterboxTimer #2469

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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