Skip to content

Commit

Permalink
add credits skip enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
Qlonever committed Dec 29, 2024
1 parent 28e31cf commit bc4bfbd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/overlays/ovl_ending/fox_end1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,10 @@ void Ending_Draw(void) {
}

void Ending_8018ABE8(void) {
if (CVarGetInteger("gSkipCredits", 0)) {
return;
}

if (gControllerPress[3].button & Z_TRIG) {
D_ending_80198584 ^= 1;
}
Expand Down Expand Up @@ -1357,6 +1361,10 @@ void Ending_8018B174(Vec3f* actorPos, Vec3f* actorRot, f32* actorScale) {
Vec3f sp1C = *actorRot;
scale = *actorScale;

if (CVarGetInteger("gSkipCredits", 0)) {
return;
}

if (gControllerHold[2].button & Z_TRIG) {
if (gControllerHold[2].button & R_CBUTTONS) {
var_fa1 += 100.0f;
Expand Down
7 changes: 7 additions & 0 deletions src/overlays/ovl_ending/fox_end2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,13 @@ void Ending_801924EC(u32 arg0) {
void Ending_801926D4(void) {
gControllerLock = 10000;

if (CVarGetInteger("gSkipCredits", 0)) {
gControllerLock = 0;
if (gControllerPress[0].button & START_BUTTON) {
Ending_80191234(D_ending_801934B4[93].unk_0C, &D_ending_801934B4[93]);
}
}

Matrix_Push(&gGfxMatrix);

Ending_801924EC(D_ending_80192E70);
Expand Down
9 changes: 9 additions & 0 deletions src/port/ui/ImguiUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,15 @@ void DrawEnhancementsMenu() {

ImGui::EndMenu();
}

if (UIWidgets::BeginMenu("Cutscenes")) {
UIWidgets::CVarCheckbox("Skip Credits", "gSkipCredits", {
.tooltip = "Allows skipping credits by pressing the START button",
.defaultValue = true
});

ImGui::EndMenu();
}

if (UIWidgets::BeginMenu("Fixes")) {
UIWidgets::CVarCheckbox("Macbeth: Level ending cutscene camera fix", "gMaCameraFix", {
Expand Down

0 comments on commit bc4bfbd

Please sign in to comment.