[Enhancement] Tatl ISG (#301)

* Tatl ISG

Navi ISG, but with Tatl

* Separated into its own file

Thanks aMannus :)

* Rename Enum

* Added comment

* Spelling error

* NULL instead of 0

Co-authored-by: Archez <Archez@users.noreply.github.com>

---------

Co-authored-by: Archez <Archez@users.noreply.github.com>
This commit is contained in:
Patrick12115
2024-05-22 09:05:05 -05:00
committed by Garrett Cox
co-authored by Archez
parent 67ddce5cba
commit b131806acb
7 changed files with 25 additions and 1 deletions
+3
View File
@@ -460,6 +460,9 @@ void DrawEnhancementsMenu() {
UIWidgets::CVarCheckbox("Side Rolls", "gEnhancements.Restorations.SideRoll", {
.tooltip = "Restores side rolling from OOT."
});
UIWidgets::CVarCheckbox("Tatl ISG", "gEnhancements.Restorations.TatlISG", {
.tooltip = "Restores Navi ISG from OOT, but now with Tatl."
});
ImGui::EndMenu();
}
+1
View File
@@ -30,6 +30,7 @@ void InitEnhancements() {
// Restorations
RegisterPowerCrouchStab();
RegisterSideRoll();
RegisterTatlISG();
// Cutscenes
RegisterSkipEntranceCutscenes();
+1
View File
@@ -16,6 +16,7 @@
#include "Cutscenes/HideTitleCards.h"
#include "Restorations/PowerCrouchStab.h"
#include "Restorations/SideRoll.h"
#include "Restorations/TatlISG.h"
#include "Graphics/PlayAsKafei.h"
#include "Songs/EnableSunsSong.h"
@@ -38,6 +38,7 @@ typedef enum {
GI_VB_SET_BLAST_MASK_COOLDOWN_TIMER,
GI_VB_PATCH_POWER_CROUCH_STAB,
GI_VB_PATCH_SIDEROLL,
GI_VB_TATL_CONVERSATION_AVAILABLE,
GI_VB_PREVENT_MASK_TRANSFORMATION_CS,
GI_VB_PREVENT_CLOCK_DISPLAY,
GI_VB_SONG_AVAILABLE_TO_PLAY,
@@ -0,0 +1,10 @@
#include <libultraship/bridge.h>
#include "Enhancements/GameInteractor/GameInteractor.h"
void RegisterTatlISG() {
REGISTER_VB_SHOULD(GI_VB_TATL_CONVERSATION_AVAILABLE, {
if (CVarGetInteger("gEnhancements.Restorations.TatlISG", 0)) {
*should = false;
}
});
}
@@ -0,0 +1,6 @@
#ifndef RESTORATIONS_TATL_ISG_H
#define RESTORATIONS_TATL_ISG_H
void RegisterTatlISG();
#endif // RESTORATIONS_TATL_ISG_H
@@ -7805,7 +7805,9 @@ s32 Player_ActionChange_4(Player* this, PlayState* play) {
if (var_a1 != NULL) {
if (!var_t1) {
this->stateFlags2 |= PLAYER_STATE2_200000;
if (!CutsceneManager_IsNext(CS_ID_GLOBAL_TALK) ||
// This code is the same as the OoT code, except for the !CutsceneManager_IsNext(CS_ID_GLOBAL_TALK), which is what prevented Tatl ISG from working
bool vanillaCondition = !CutsceneManager_IsNext(CS_ID_GLOBAL_TALK);
if (GameInteractor_Should(GI_VB_TATL_CONVERSATION_AVAILABLE, vanillaCondition, NULL) ||
!CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_CUP)) {
return false;
}