From 6c05fb3ad384574d5e9cb88459397f890a6baf67 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Wed, 22 May 2024 10:50:46 -0500 Subject: [PATCH 01/10] Add persistent bunny mask enhancement --- mm/2s2h/BenGui/BenMenuBar.cpp | 5 + mm/2s2h/Enhancements/Enhancements.cpp | 1 + mm/2s2h/Enhancements/Enhancements.h | 1 + .../GameInteractor/GameInteractor.cpp | 17 ++ .../GameInteractor/GameInteractor.h | 13 +- .../Enhancements/Masks/PersistentMasks.cpp | 206 ++++++++++++++++++ mm/2s2h/Enhancements/Masks/PersistentMasks.h | 7 + mm/include/gfxprint.h | 8 + mm/include/z64.h | 2 - mm/src/code/z_player_lib.c | 3 + .../actors/ovl_player_actor/z_player.c | 34 +-- .../ovl_kaleido_scope/z_kaleido_mask.c | 29 ++- .../ovl_kaleido_scope/z_kaleido_scope_NES.c | 9 + 13 files changed, 307 insertions(+), 28 deletions(-) create mode 100644 mm/2s2h/Enhancements/Masks/PersistentMasks.cpp create mode 100644 mm/2s2h/Enhancements/Masks/PersistentMasks.h diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index 266bf22ed7..3e72dbfd53 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -540,6 +540,11 @@ void DrawEnhancementsMenu() { UIWidgets::CVarCheckbox("Fierce Deity's Mask Anywhere", "gEnhancements.Masks.FierceDeitysAnywhere", { .tooltip = "Allow using Fierce Deity's mask outside of boss rooms." }); UIWidgets::CVarCheckbox("No Blast Mask Cooldown", "gEnhancements.Masks.NoBlastMaskCooldown", {}); + if (UIWidgets::CVarCheckbox("Persistent Bunny Hood", "gEnhancements.Masks.PersistentBunnyHood.Enabled", + { .tooltip = "Permanantly toggle a speed boost from the bunny hood by pressing " + "'A' on it in the mask menu." })) { + UpdatePersistentMasksState(); + } ImGui::EndMenu(); } diff --git a/mm/2s2h/Enhancements/Enhancements.cpp b/mm/2s2h/Enhancements/Enhancements.cpp index 87a1191559..4cce69edec 100644 --- a/mm/2s2h/Enhancements/Enhancements.cpp +++ b/mm/2s2h/Enhancements/Enhancements.cpp @@ -33,6 +33,7 @@ void InitEnhancements() { RegisterFastTransformation(); RegisterFierceDeityAnywhere(); RegisterNoBlastMaskCooldown(); + RegisterPersistentMasks(); // Minigames RegisterAlwaysWinDoggyRace(); diff --git a/mm/2s2h/Enhancements/Enhancements.h b/mm/2s2h/Enhancements/Enhancements.h index 9b78c6aca7..b238d49005 100644 --- a/mm/2s2h/Enhancements/Enhancements.h +++ b/mm/2s2h/Enhancements/Enhancements.h @@ -15,6 +15,7 @@ #include "Masks/FierceDeityAnywhere.h" #include "Masks/NoBlastMaskCooldown.h" #include "Masks/FastTransformation.h" +#include "Masks/PersistentMasks.h" #include "Minigames/AlwaysWinDoggyRace.h" #include "Cutscenes/Cutscenes.h" #include "Restorations/FlipHopVariable.h" diff --git a/mm/2s2h/Enhancements/GameInteractor/GameInteractor.cpp b/mm/2s2h/Enhancements/GameInteractor/GameInteractor.cpp index ae7eda45d2..3e57042fe0 100644 --- a/mm/2s2h/Enhancements/GameInteractor/GameInteractor.cpp +++ b/mm/2s2h/Enhancements/GameInteractor/GameInteractor.cpp @@ -23,6 +23,17 @@ void GameInteractor_ExecuteOnKaleidoUpdate(PauseContext* pauseCtx) { GameInteractor::Instance->ExecuteHooks(pauseCtx); } +void GameInteractor_ExecuteBeforeKaleidoDrawPage(PauseContext* pauseCtx, u16 pauseIndex) { + GameInteractor::Instance->ExecuteHooks(pauseCtx, pauseIndex); + GameInteractor::Instance->ExecuteHooksForID(pauseIndex, pauseCtx, + pauseIndex); +} + +void GameInteractor_ExecuteAfterKaleidoDrawPage(PauseContext* pauseCtx, u16 pauseIndex) { + GameInteractor::Instance->ExecuteHooks(pauseCtx, pauseIndex); + GameInteractor::Instance->ExecuteHooksForID(pauseIndex, pauseCtx, pauseIndex); +} + void GameInteractor_ExecuteOnSaveInit(s16 fileNum) { GameInteractor::Instance->ExecuteHooks(fileNum); } @@ -112,6 +123,12 @@ void GameInteractor_ExecuteOnActorKill(Actor* actor) { GameInteractor::Instance->ExecuteHooksForFilter(actor); } +void GameInteractor_ExecuteOnPlayerPostLimbDraw(Player* player, s32 limbIndex) { + GameInteractor::Instance->ExecuteHooks(player, limbIndex); + GameInteractor::Instance->ExecuteHooksForID(limbIndex, player, limbIndex); + GameInteractor::Instance->ExecuteHooksForFilter(player, limbIndex); +} + void GameInteractor_ExecuteOnSceneFlagSet(s16 sceneId, FlagType flagType, u32 flag) { SPDLOG_DEBUG("OnSceneFlagSet: sceneId: {}, flagType: {}, flag: {}", sceneId, (u32)flagType, flag); GameInteractor::Instance->ExecuteHooks(sceneId, flagType, flag); diff --git a/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h b/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h index fe10c1f29b..339a16fd9b 100644 --- a/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h +++ b/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h @@ -5,8 +5,6 @@ #include extern "C" { #endif -#include "z64actor.h" -#include "z64camera.h" #include "z64.h" #ifdef __cplusplus } @@ -47,6 +45,11 @@ typedef enum { GI_VB_SONG_AVAILABLE_TO_PLAY, GI_VB_USE_CUSTOM_CAMERA, GI_VB_DELETE_OWL_SAVE, + GI_VB_CONSIDER_BUNNY_HOOD_EQUIPPED, + GI_VB_USE_ITEM_EQUIP_MASK, + GI_VB_KALEIDO_DISPLAY_ITEM_TEXT, + GI_VB_USE_ITEM_CONSIDER_LINK_HUMAN, + GI_VB_DRAW_ITEM_EQUIPPED_OUTLINE, GI_VB_PLAY_TRANSITION_CS, GI_VB_TATL_INTERUPT_MSG3, GI_VB_TATL_INTERUPT_MSG6, @@ -257,6 +260,8 @@ class GameInteractor { DEFINE_HOOK(OnGameStateDrawFinish, ()); DEFINE_HOOK(OnGameStateUpdate, ()); DEFINE_HOOK(OnKaleidoUpdate, (PauseContext * pauseCtx)); + DEFINE_HOOK(BeforeKaleidoDrawPage, (PauseContext * pauseCtx, u16 pauseIndex)); + DEFINE_HOOK(AfterKaleidoDrawPage, (PauseContext * pauseCtx, u16 pauseIndex)); DEFINE_HOOK(OnSaveInit, (s16 fileNum)); DEFINE_HOOK(BeforeEndOfCycleSave, ()); DEFINE_HOOK(AfterEndOfCycleSave, ()); @@ -273,6 +278,7 @@ class GameInteractor { DEFINE_HOOK(ShouldActorDraw, (Actor * actor, bool* should)); DEFINE_HOOK(OnActorDraw, (Actor * actor)); DEFINE_HOOK(OnActorKill, (Actor * actor)); + DEFINE_HOOK(OnPlayerPostLimbDraw, (Player * player, s32 limbIndex)); DEFINE_HOOK(OnSceneFlagSet, (s16 sceneId, FlagType flagType, u32 flag)); DEFINE_HOOK(OnSceneFlagUnset, (s16 sceneId, FlagType flagType, u32 flag)); @@ -300,6 +306,8 @@ void GameInteractor_ExecuteOnGameStateMainFinish(); void GameInteractor_ExecuteOnGameStateDrawFinish(); void GameInteractor_ExecuteOnGameStateUpdate(); void GameInteractor_ExecuteOnKaleidoUpdate(PauseContext* pauseCtx); +void GameInteractor_ExecuteBeforeKaleidoDrawPage(PauseContext* pauseCtx, u16 pauseIndex); +void GameInteractor_ExecuteAfterKaleidoDrawPage(PauseContext* pauseCtx, u16 pauseIndex); void GameInteractor_ExecuteOnSaveInit(s16 fileNum); void GameInteractor_ExecuteBeforeEndOfCycleSave(); void GameInteractor_ExecuteAfterEndOfCycleSave(); @@ -316,6 +324,7 @@ void GameInteractor_ExecuteOnActorUpdate(Actor* actor); bool GameInteractor_ShouldActorDraw(Actor* actor); void GameInteractor_ExecuteOnActorDraw(Actor* actor); void GameInteractor_ExecuteOnActorKill(Actor* actor); +void GameInteractor_ExecuteOnPlayerPostLimbDraw(Player* player, s32 limbIndex); void GameInteractor_ExecuteOnSceneFlagSet(s16 sceneId, FlagType flagType, u32 flag); void GameInteractor_ExecuteOnSceneFlagUnset(s16 sceneId, FlagType flagType, u32 flag); diff --git a/mm/2s2h/Enhancements/Masks/PersistentMasks.cpp b/mm/2s2h/Enhancements/Masks/PersistentMasks.cpp new file mode 100644 index 0000000000..92177f9beb --- /dev/null +++ b/mm/2s2h/Enhancements/Masks/PersistentMasks.cpp @@ -0,0 +1,206 @@ +#include +#include +#include "Enhancements/GameInteractor/GameInteractor.h" +#include "Enhancements/FrameInterpolation/FrameInterpolation.h" + +extern "C" { +#include "z64.h" +#include "z64player.h" +#include "functions.h" +#include "macros.h" +#include "gfx.h" +#include "src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h" +#include "assets/interface/parameter_static/parameter_static.h" + +void func_8082E1F0(Player* player, u16 sfxId); +void Player_DrawBunnyHood(PlayState* play); +extern PlayState* gPlayState; +extern const char* D_801C0B20[28]; +extern SaveContext gSaveContext; +} + +void UpdatePersistentMasksState() { + static Vtx* persistentMasksVtx; + static HOOK_ID beforePageDrawHook = 0; + static HOOK_ID onPlayerPostLimbDrawHook = 0; + GameInteractor::Instance->UnregisterGameHook(beforePageDrawHook); + GameInteractor::Instance->UnregisterGameHookForID(onPlayerPostLimbDrawHook); + + if (!CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.Enabled", 0)) { + CVarClear("gEnhancements.Masks.PersistentBunnyHood.State"); + return; + } + + // If the mask is equipped, unequip it + if (gSaveContext.save.equippedMask == PLAYER_MASK_BUNNY) { + gSaveContext.save.equippedMask = PLAYER_MASK_NONE; + CVarSetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 1); + + if (gPlayState != NULL) { + Player* player = GET_PLAYER(gPlayState); + player->prevMask = player->currentMask; + player->currentMask = PLAYER_MASK_NONE; + } + } + + // If they don't have the mask, clear the state + if (INV_CONTENT(ITEM_MASK_BUNNY) != ITEM_MASK_BUNNY) { + CVarClear("gEnhancements.Masks.PersistentBunnyHood.State"); + } + + // This hook draws the mask on the players head when it's active and they aren't in first person + onPlayerPostLimbDrawHook = GameInteractor::Instance->RegisterGameHookForID( + PLAYER_LIMB_HEAD, [](Player* player, s32 limbIndex) { + // Ensure they aren't in first person + if (CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0) && + !(player->stateFlags1 & PLAYER_STATE1_100000)) { + OPEN_DISPS(gPlayState->state.gfxCtx); + Matrix_Push(); + Player_DrawBunnyHood(gPlayState); + gSPDisplayList(POLY_OPA_DISP++, + (Gfx*)D_801C0B20[PLAYER_MASK_BUNNY - 1]); // D_801C0B20 is an array of mask DLs + Matrix_Pop(); + CLOSE_DISPS(gPlayState->state.gfxCtx); + } + }); + + // This hook sets up the quad and draws the "active" blue border around the mask in the pause menu + beforePageDrawHook = GameInteractor::Instance->RegisterGameHookForID( + PAUSE_MASK, [](PauseContext* _, u16 __) { + GraphicsContext* gfxCtx = gPlayState->state.gfxCtx; + PauseContext* pauseCtx = &gPlayState->pauseCtx; + s16 i = 0; + s16 j = 0; + s16 k; + + OPEN_DISPS(gfxCtx); + + persistentMasksVtx = (Vtx*)GRAPH_ALLOC(gfxCtx, (4 * 4) * sizeof(Vtx)); + + if ((pauseCtx->state == PAUSE_STATE_MAIN)) { + s16 slot = SLOT_MASK_BUNNY - ITEM_NUM_SLOTS; + s16 slotX = slot % MASK_GRID_COLS; + s16 slotY = slot / MASK_GRID_COLS; + s16 initialX = 0 - (MASK_GRID_COLS * MASK_GRID_CELL_WIDTH) / 2; + s16 initialY = (MASK_GRID_ROWS * MASK_GRID_CELL_HEIGHT) / 2 - 6; + s16 vtxX = (initialX + (slotX * MASK_GRID_CELL_WIDTH)) + MASK_GRID_QUAD_MARGIN; + s16 vtxY = (initialY - (slotY * MASK_GRID_CELL_HEIGHT)) + pauseCtx->offsetY - MASK_GRID_QUAD_MARGIN; + persistentMasksVtx[i + 0].v.ob[0] = persistentMasksVtx[i + 2].v.ob[0] = + vtxX + MASK_GRID_SELECTED_QUAD_MARGIN; + persistentMasksVtx[i + 1].v.ob[0] = persistentMasksVtx[i + 3].v.ob[0] = + persistentMasksVtx[i + 0].v.ob[0] + MASK_GRID_SELECTED_QUAD_WIDTH; + persistentMasksVtx[i + 0].v.ob[1] = persistentMasksVtx[i + 1].v.ob[1] = + vtxY - MASK_GRID_SELECTED_QUAD_MARGIN; + + persistentMasksVtx[i + 2].v.ob[1] = persistentMasksVtx[i + 3].v.ob[1] = + persistentMasksVtx[i + 0].v.ob[1] - MASK_GRID_SELECTED_QUAD_HEIGHT; + + persistentMasksVtx[i + 0].v.ob[2] = persistentMasksVtx[i + 1].v.ob[2] = + persistentMasksVtx[i + 2].v.ob[2] = persistentMasksVtx[i + 3].v.ob[2] = 0; + + persistentMasksVtx[i + 0].v.flag = persistentMasksVtx[i + 1].v.flag = persistentMasksVtx[i + 2].v.flag = + persistentMasksVtx[i + 3].v.flag = 0; + + persistentMasksVtx[i + 0].v.tc[0] = persistentMasksVtx[i + 0].v.tc[1] = + persistentMasksVtx[i + 1].v.tc[1] = persistentMasksVtx[i + 2].v.tc[0] = 0; + + persistentMasksVtx[i + 1].v.tc[0] = persistentMasksVtx[i + 2].v.tc[1] = + persistentMasksVtx[i + 3].v.tc[0] = persistentMasksVtx[i + 3].v.tc[1] = + MASK_GRID_SELECTED_QUAD_TEX_SIZE * (1 << 5); + + persistentMasksVtx[i + 0].v.cn[0] = persistentMasksVtx[i + 1].v.cn[0] = + persistentMasksVtx[i + 2].v.cn[0] = persistentMasksVtx[i + 3].v.cn[0] = + persistentMasksVtx[i + 0].v.cn[1] = persistentMasksVtx[i + 1].v.cn[1] = + persistentMasksVtx[i + 2].v.cn[1] = persistentMasksVtx[i + 3].v.cn[1] = + persistentMasksVtx[i + 0].v.cn[2] = persistentMasksVtx[i + 1].v.cn[2] = + persistentMasksVtx[i + 2].v.cn[2] = persistentMasksVtx[i + 3].v.cn[2] = 255; + + persistentMasksVtx[i + 0].v.cn[3] = persistentMasksVtx[i + 1].v.cn[3] = + persistentMasksVtx[i + 2].v.cn[3] = persistentMasksVtx[i + 3].v.cn[3] = pauseCtx->alpha; + + if (CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0)) { + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 100, 200, 255, 255); + gSPVertex(POLY_OPA_DISP++, (uintptr_t)persistentMasksVtx, 4, 0); + POLY_OPA_DISP = Gfx_DrawTexQuadIA8(POLY_OPA_DISP, (TexturePtr)gEquippedItemOutlineTex, 32, 32, 0); + } + } + + CLOSE_DISPS(gfxCtx); + }); +} + +void RegisterPersistentMasks() { + UpdatePersistentMasksState(); + + // Easiest way to handle things like loading into a different file, debug warping, etc. + GameInteractor::Instance->RegisterGameHook( + [](s8 sceneId, s8 spawnNum) { UpdatePersistentMasksState(); }); + + // Speed the player up when the bunny hood state is active + REGISTER_VB_SHOULD(GI_VB_CONSIDER_BUNNY_HOOD_EQUIPPED, { + if (CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0)) { + *should = true; + } + }); + + // Overrides allowing them to equip a mask while transformed + REGISTER_VB_SHOULD(GI_VB_USE_ITEM_CONSIDER_LINK_HUMAN, { + if (CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.Enabled", 0) && + *(PlayerItemAction*)opt == PLAYER_IA_MASK_BUNNY) { + *should = true; + } + }); + + // When they do equip the mask, prevent it and instead set our state + REGISTER_VB_SHOULD(GI_VB_USE_ITEM_EQUIP_MASK, { + PlayerMask* maskId = (PlayerMask*)opt; + Player* player = GET_PLAYER(gPlayState); + + if (*maskId == PLAYER_MASK_BUNNY && CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.Enabled", 0)) { + *should = false; + + CVarSetInteger("gEnhancements.Masks.PersistentBunnyHood.State", + !CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0)); + if (CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0)) { + func_8082E1F0(player, NA_SE_PL_CHANGE_ARMS); + } else { + func_8082E1F0(player, NA_SE_PL_TAKE_OUT_SHIELD); + } + } + }); + + // Prevent the "equipped" white border from being drawn so ours shows instead (ours was drawn before it, so it's + // underneath) + REGISTER_VB_SHOULD(GI_VB_DRAW_ITEM_EQUIPPED_OUTLINE, { + if (*(ItemId*)opt == ITEM_MASK_BUNNY && CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0)) { + *should = false; + } + }); + + // Typically when you are in a transformation all masks are dimmed on the C-Buttons + REGISTER_VB_SHOULD(GI_VB_ITEM_BE_RESTRICTED, { + if (*(ItemId*)opt == ITEM_MASK_BUNNY && CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.Enabled", 0)) { + *should = false; + } + }); + + // Override "A" press behavior on kaleido scope to toggle the mask state + REGISTER_VB_SHOULD(GI_VB_KALEIDO_DISPLAY_ITEM_TEXT, { + ItemId* itemId = (ItemId*)opt; + if (CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.Enabled", 0) && *itemId == ITEM_MASK_BUNNY) { + *should = false; + CVarSetInteger("gEnhancements.Masks.PersistentBunnyHood.State", + !CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0)); + if (CVarGetInteger("gEnhancements.Masks.PersistentBunnyHood.State", 0)) { + Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_DOWN); + } else { + Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_UP); + } + } else if (CVarGetInteger("gEnhancements.Masks.PersistentGreatFairyMask.Enabled", 0) && + *itemId == ITEM_MASK_GREAT_FAIRY) { + *should = false; + CVarSetInteger("gEnhancements.Masks.PersistentGreatFairyMask.State", + !CVarGetInteger("gEnhancements.Masks.PersistentGreatFairyMask.State", 0)); + } + }); +} diff --git a/mm/2s2h/Enhancements/Masks/PersistentMasks.h b/mm/2s2h/Enhancements/Masks/PersistentMasks.h new file mode 100644 index 0000000000..db441e7b8d --- /dev/null +++ b/mm/2s2h/Enhancements/Masks/PersistentMasks.h @@ -0,0 +1,7 @@ +#ifndef MASKS_PERSISTENT_MASKS_H +#define MASKS_PERSISTENT_MASKS_H + +void RegisterPersistentMasks(); +void UpdatePersistentMasksState(); + +#endif // MASKS_PERSISTENT_MASKS_H diff --git a/mm/include/gfxprint.h b/mm/include/gfxprint.h index f6c896c016..6fb8c0e303 100644 --- a/mm/include/gfxprint.h +++ b/mm/include/gfxprint.h @@ -1,6 +1,10 @@ #ifndef GFXPRINT_H #define GFXPRINT_H +#ifdef __cplusplus +#define this thisx +#endif + #include "color.h" #include "PR/gbi.h" #include "PR/ultratypes.h" @@ -61,4 +65,8 @@ s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...); (void)0 // #endregion +#ifdef __cplusplus +#undef this +#endif + #endif diff --git a/mm/include/z64.h b/mm/include/z64.h index 64a8888c17..703edba0a8 100644 --- a/mm/include/z64.h +++ b/mm/include/z64.h @@ -2,7 +2,6 @@ #define Z64_H #ifdef __cplusplus extern "C" { -#define this thisx #endif #include "libc/math.h" #include "libc/stdarg.h" @@ -308,6 +307,5 @@ typedef enum { // #ifdef __cplusplus } -#undef this #endif #endif diff --git a/mm/src/code/z_player_lib.c b/mm/src/code/z_player_lib.c index 82a72f1ec4..73f16f13b3 100644 --- a/mm/src/code/z_player_lib.c +++ b/mm/src/code/z_player_lib.c @@ -43,6 +43,7 @@ // Assets for other actors #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" +#include "2s2h/Enhancements/GameInteractor/GameInteractor.h" void PlayerCall_Init(Actor* thisx, PlayState* play); void PlayerCall_Destroy(Actor* thisx, PlayState* play); @@ -4020,5 +4021,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G Player_SetFeetPos(play, player, limbIndex); } + GameInteractor_ExecuteOnPlayerPostLimbDraw(player, limbIndex); + func_8012536C(); } diff --git a/mm/src/overlays/actors/ovl_player_actor/z_player.c b/mm/src/overlays/actors/ovl_player_actor/z_player.c index 7dfdc0419b..e908566751 100644 --- a/mm/src/overlays/actors/ovl_player_actor/z_player.c +++ b/mm/src/overlays/actors/ovl_player_actor/z_player.c @@ -4471,7 +4471,9 @@ void Player_UseItem(PlayState* play, Player* this, ItemId item) { (itemAction == PLAYER_IA_MASK_ZORA) || ((this->currentBoots >= PLAYER_BOOTS_ZORA_UNDERWATER) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)))) { s32 var_v1 = ((itemAction >= PLAYER_IA_MASK_MIN) && (itemAction <= PLAYER_IA_MASK_MAX) && - ((this->transformation != PLAYER_FORM_HUMAN) || (itemAction >= PLAYER_IA_MASK_GIANT))); + (!GameInteractor_Should(GI_VB_USE_ITEM_CONSIDER_LINK_HUMAN, + this->transformation == PLAYER_FORM_HUMAN, &itemAction) || + (itemAction >= PLAYER_IA_MASK_GIANT))); CollisionPoly* sp5C; s32 sp58; f32 sp54; @@ -4531,20 +4533,23 @@ void Player_UseItem(PlayState* play, Player* this, ItemId item) { } else { Audio_PlaySfx(NA_SE_SY_ERROR); } - } else if ((this->transformation == PLAYER_FORM_HUMAN) && (itemAction >= PLAYER_IA_MASK_MIN) && - (itemAction < PLAYER_IA_MASK_GIANT)) { + } else if (GameInteractor_Should(GI_VB_USE_ITEM_CONSIDER_LINK_HUMAN, this->transformation == PLAYER_FORM_HUMAN, + &itemAction) && + (itemAction >= PLAYER_IA_MASK_MIN) && (itemAction < PLAYER_IA_MASK_GIANT)) { PlayerMask maskId = GET_MASK_FROM_IA(itemAction); - // Handle wearable masks - this->prevMask = this->currentMask; - if (maskId == this->currentMask) { - this->currentMask = PLAYER_MASK_NONE; - func_8082E1F0(this, NA_SE_PL_TAKE_OUT_SHIELD); - } else { - this->currentMask = maskId; - func_8082E1F0(this, NA_SE_PL_CHANGE_ARMS); + if (GameInteractor_Should(GI_VB_USE_ITEM_EQUIP_MASK, true, &maskId)) { + // Handle wearable masks + this->prevMask = this->currentMask; + if (maskId == this->currentMask) { + this->currentMask = PLAYER_MASK_NONE; + func_8082E1F0(this, NA_SE_PL_TAKE_OUT_SHIELD); + } else { + this->currentMask = maskId; + func_8082E1F0(this, NA_SE_PL_CHANGE_ARMS); + } + gSaveContext.save.equippedMask = this->currentMask; } - gSaveContext.save.equippedMask = this->currentMask; } else if ((itemAction != this->heldItemAction) || ((this->heldActor == NULL) && (Player_ExplosiveFromIA(this, itemAction) > PLAYER_EXPLOSIVE_NONE))) { u8 nextAnimType; @@ -12191,7 +12196,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->actor.shape.face = ((play->gameplayFrames & 0x20) ? 0 : 3) + this->blinkInfo.eyeTexIndex; - if (this->currentMask == PLAYER_MASK_BUNNY) { + if (GameInteractor_Should(GI_VB_CONSIDER_BUNNY_HOOD_EQUIPPED, this->currentMask == PLAYER_MASK_BUNNY, this)) { Player_UpdateBunnyEars(this); } @@ -14456,7 +14461,8 @@ void Player_Action_13(Player* this, PlayState* play) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_CURVED, play); - if (this->currentMask == PLAYER_MASK_BUNNY) { + if (GameInteractor_Should(GI_VB_CONSIDER_BUNNY_HOOD_EQUIPPED, this->currentMask == PLAYER_MASK_BUNNY, + &speedTarget)) { speedTarget *= 1.5f; } diff --git a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c index 13583678c4..7d6da43c48 100644 --- a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c +++ b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c @@ -210,8 +210,11 @@ void KaleidoScope_DrawMaskSelect(PlayState* play) { for (i = 0, j = MASK_NUM_SLOTS * 4; i < 3; i++, j += 4) { if (GET_CUR_FORM_BTN_ITEM(i + 1) != ITEM_NONE) { if (GET_CUR_FORM_BTN_SLOT(i + 1) >= ITEM_NUM_SLOTS) { - gSPVertex(POLY_OPA_DISP++, &pauseCtx->maskVtx[j], 4, 0); - POLY_OPA_DISP = Gfx_DrawTexQuadIA8(POLY_OPA_DISP, gEquippedItemOutlineTex, 32, 32, 0); + ItemId item = GET_CUR_FORM_BTN_ITEM(i + 1); + if (GameInteractor_Should(GI_VB_DRAW_ITEM_EQUIPPED_OUTLINE, true, &item)) { + gSPVertex(POLY_OPA_DISP++, &pauseCtx->maskVtx[j], 4, 0); + POLY_OPA_DISP = Gfx_DrawTexQuadIA8(POLY_OPA_DISP, gEquippedItemOutlineTex, 32, 32, 0); + } } } } @@ -220,8 +223,11 @@ void KaleidoScope_DrawMaskSelect(PlayState* play) { for (i = EQUIP_SLOT_D_RIGHT; i <= EQUIP_SLOT_D_UP; i++, j += 4) { if (DPAD_GET_CUR_FORM_BTN_ITEM(i) != ITEM_NONE) { if (DPAD_GET_CUR_FORM_BTN_SLOT(i) >= ITEM_NUM_SLOTS) { - gSPVertex(POLY_OPA_DISP++, &pauseCtx->maskVtx[j], 4, 0); - POLY_OPA_DISP = Gfx_DrawTexQuadIA8(POLY_OPA_DISP, gEquippedItemOutlineTex, 32, 32, 0); + ItemId item = DPAD_GET_CUR_FORM_BTN_ITEM(i); + if (GameInteractor_Should(GI_VB_DRAW_ITEM_EQUIPPED_OUTLINE, true, &item)) { + gSPVertex(POLY_OPA_DISP++, &pauseCtx->maskVtx[j], 4, 0); + POLY_OPA_DISP = Gfx_DrawTexQuadIA8(POLY_OPA_DISP, gEquippedItemOutlineTex, 32, 32, 0); + } } } } @@ -669,12 +675,15 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) { } else if ((pauseCtx->debugEditor == DEBUG_EDITOR_NONE) && (pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) && CHECK_BTN_ALL(input->press.button, BTN_A) && (msgCtx->msgLength == 0)) { - // Give description on item through a message box - pauseCtx->itemDescriptionOn = true; - if (pauseCtx->cursorYIndex[PAUSE_MASK] < 2) { - func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 3); - } else { - func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 1); + if (GameInteractor_Should(GI_VB_KALEIDO_DISPLAY_ITEM_TEXT, true, + &pauseCtx->cursorItem[PAUSE_MASK])) { + // Give description on item through a message box + pauseCtx->itemDescriptionOn = true; + if (pauseCtx->cursorYIndex[PAUSE_MASK] < 2) { + func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 3); + } else { + func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 1); + } } } } diff --git a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c index 0ba1082f28..4bfe0019a2 100644 --- a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c +++ b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c @@ -19,6 +19,7 @@ #include "archives/map_name_static/map_name_static.h" #include "2s2h/Enhancements/FrameInterpolation/FrameInterpolation.h" #include "2s2h/Enhancements/Saving/SavingEnhancements.h" +#include "2s2h/Enhancements/GameInteractor/GameInteractor.h" #include "2s2h_assets.h" @@ -817,7 +818,9 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) { POLY_OPA_DISP = KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->itemPageVtx, sItemPageBgTextures); + GameInteractor_ExecuteBeforeKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); KaleidoScope_DrawItemSelect(play); + GameInteractor_ExecuteAfterKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); } break; @@ -838,6 +841,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) { POLY_OPA_DISP = KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->mapPageVtx, sMapPageBgTextures); + GameInteractor_ExecuteBeforeKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); if (sInDungeonScene) { KaleidoScope_DrawDungeonMap(play); Gfx_SetupDL42_Opa(gfxCtx); @@ -867,6 +871,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) { KaleidoScope_DrawWorldMap(play); } + GameInteractor_ExecuteAfterKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); break; case PAUSE_QUEST: @@ -889,7 +894,9 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) { POLY_OPA_DISP = KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->questPageVtx, sQuestPageBgTextures); + GameInteractor_ExecuteBeforeKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); KaleidoScope_DrawQuestStatus(play); + GameInteractor_ExecuteAfterKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); break; case PAUSE_MASK: @@ -910,7 +917,9 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) { POLY_OPA_DISP = KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->maskPageVtx, sMaskPageBgTextures); + GameInteractor_ExecuteBeforeKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); KaleidoScope_DrawMaskSelect(play); + GameInteractor_ExecuteAfterKaleidoDrawPage(pauseCtx, pauseCtx->pageIndex); break; } } From 2194bc62554d9d13ed8a3af4032cc9780a9a4962 Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:42:18 -0300 Subject: [PATCH 02/10] Adds option for HW styled Young Link --- mm/2s2h/BenGui/BenMenuBar.cpp | 4 ++ mm/2s2h/Enhancements/Enhancements.cpp | 1 + mm/2s2h/Enhancements/Enhancements.h | 1 + .../Enhancements/Graphics/HWStyledLink.cpp | 67 +++++++++++++++++++ mm/2s2h/Enhancements/Graphics/HWStyledLink.h | 7 ++ 5 files changed, 80 insertions(+) create mode 100644 mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp create mode 100644 mm/2s2h/Enhancements/Graphics/HWStyledLink.h diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index e9e9d95290..4b278db10a 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -10,6 +10,7 @@ #include "2s2h/Enhancements/Enhancements.h" #include "2s2h/Enhancements/Graphics/MotionBlur.h" #include "2s2h/Enhancements/Graphics/PlayAsKafei.h" +#include "2s2h/Enhancements/Graphics/HWStyledLink.h" #include "2s2h/Enhancements/Modes/TimeMovesWhenYouMove.h" #include "2s2h/DeveloperTools/DeveloperTools.h" #include "2s2h/DeveloperTools/WarpPoint.h" @@ -533,6 +534,9 @@ void DrawEnhancementsMenu() { { .tooltip = "Disables Black Bar Letterboxes during cutscenes and Z-targeting\nNote: there may be " "minor visual glitches that were covered up by the black bars\nPlease disable this " "setting before reporting a bug" }); + UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gEnhancements.Graphics.HWStyledLink", + { .tooltip = "When acquired, places the Keaton and Fierce Deity masks on Link " + "similarly to how he wears them in Hyrule Warriors" }); ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255, 255, 0, 255)); ImGui::SeparatorText("Unstable"); diff --git a/mm/2s2h/Enhancements/Enhancements.cpp b/mm/2s2h/Enhancements/Enhancements.cpp index 91d4518179..e110f697b2 100644 --- a/mm/2s2h/Enhancements/Enhancements.cpp +++ b/mm/2s2h/Enhancements/Enhancements.cpp @@ -29,6 +29,7 @@ void InitEnhancements() { // Graphics RegisterDisableBlackBars(); + RegisterHWStyledLink(); // Masks RegisterFastTransformation(); diff --git a/mm/2s2h/Enhancements/Enhancements.h b/mm/2s2h/Enhancements/Enhancements.h index c3ad8155bc..1a124b4f41 100644 --- a/mm/2s2h/Enhancements/Enhancements.h +++ b/mm/2s2h/Enhancements/Enhancements.h @@ -30,6 +30,7 @@ #include "Saving/SavingEnhancements.h" #include "Graphics/DisableBlackBars.h" #include "Modes/TimeMovesWhenYouMove.h" +#include "Graphics/HWStyledLink.h" enum AlwaysWinDoggyRaceOptions { ALWAYS_WIN_DOGGY_RACE_OFF, diff --git a/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp b/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp new file mode 100644 index 0000000000..b073855b65 --- /dev/null +++ b/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp @@ -0,0 +1,67 @@ +#include "HWStyledLink.h" +#include "libultraship/libultraship.h" +#include "2s2h/Enhancements/GameInteractor/GameInteractor.h" +#include "Enhancements/FrameInterpolation/FrameInterpolation.h" + +extern "C" { +#include "z64.h" +#include "z64player.h" +#include "functions.h" +#include "macros.h" +#include "src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h" + +extern PlayState* gPlayState; +extern const char* D_801C0B20[28]; +extern SaveContext gSaveContext; +#include "objects/object_link_child/object_link_child.h" +void ResourceMgr_PatchGfxByName(const char* path, const char* patchName, int index, Gfx instruction); +void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName); +} + +void UpdateHWStyledLink() { + GameInteractor::Instance->RegisterGameHookForID( + PLAYER_LIMB_HEAD, [](Player* player, s32 limbIndex) { + if (CVarGetInteger("gEnhancements.Graphics.HWStyledLink", 0)){ + if (player->currentMask == PLAYER_MASK_NONE && + player->transformation == PLAYER_FORM_HUMAN && + INV_CONTENT(ITEM_MASK_KEATON) == ITEM_MASK_KEATON) { + OPEN_DISPS(gPlayState->state.gfxCtx); + Matrix_Push(); + Matrix_RotateYS(14563, MTXMODE_APPLY); + Matrix_RotateZS(-4854, MTXMODE_APPLY); + Matrix_Translate(300.0f, -250.0f, 77.7f, MTXMODE_APPLY); + Matrix_Scale(0.648f, 0.648f, 0.648f, MTXMODE_APPLY); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_KEATON - 1]); + Matrix_Pop(); + CLOSE_DISPS(gPlayState->state.gfxCtx); + } + } + }); + GameInteractor::Instance->RegisterGameHookForID( + PLAYER_LIMB_WAIST, [](Player* player, s32 limbIndex) { + if (CVarGetInteger("gEnhancements.Graphics.HWStyledLink", 0) && + player->transformation == PLAYER_FORM_HUMAN && + player->itemAction != PLAYER_IA_MASK_FIERCE_DEITY && + INV_CONTENT(ITEM_MASK_FIERCE_DEITY) == ITEM_MASK_FIERCE_DEITY) { + OPEN_DISPS(gPlayState->state.gfxCtx); + Matrix_Push(); + Matrix_RotateXS(-25000, MTXMODE_APPLY); + Matrix_RotateYS(-2000, MTXMODE_APPLY); + Matrix_RotateZS(-15000, MTXMODE_APPLY); + Matrix_Translate(-85.0f, 658.0f, -165.0f, MTXMODE_APPLY); + Matrix_Scale(0.635f, 0.635f, 0.635f, MTXMODE_APPLY); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_FIERCE_DEITY - 1]); + Matrix_Pop(); + CLOSE_DISPS(gPlayState->state.gfxCtx); + } + }); +} + +void RegisterHWStyledLink() { + UpdateHWStyledLink(); + + GameInteractor::Instance->RegisterGameHook( + [](s8 sceneId, s8 spawnNum) { UpdateHWStyledLink(); }); +} \ No newline at end of file diff --git a/mm/2s2h/Enhancements/Graphics/HWStyledLink.h b/mm/2s2h/Enhancements/Graphics/HWStyledLink.h new file mode 100644 index 0000000000..e5809727e2 --- /dev/null +++ b/mm/2s2h/Enhancements/Graphics/HWStyledLink.h @@ -0,0 +1,7 @@ +#ifndef GRAPHICS_HW_STYLED_LINK +#define GRAPHICS_HW_STYLED_LINK + +void RegisterHWStyledLink(); +void UpdateHWStyledLink(); + +#endif // GRAPHICS_HW_STYLED_LINK From 7d5030b58025ce75b36db8b11a33406373aaccc7 Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:53:55 -0300 Subject: [PATCH 03/10] Moves the enhancement to Modes --- mm/2s2h/BenGui/BenMenuBar.cpp | 6 ++-- .../Enhancements/Graphics/HWStyledLink.cpp | 33 +++++++++---------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index 4b278db10a..b3a8124e6d 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -534,9 +534,6 @@ void DrawEnhancementsMenu() { { .tooltip = "Disables Black Bar Letterboxes during cutscenes and Z-targeting\nNote: there may be " "minor visual glitches that were covered up by the black bars\nPlease disable this " "setting before reporting a bug" }); - UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gEnhancements.Graphics.HWStyledLink", - { .tooltip = "When acquired, places the Keaton and Fierce Deity masks on Link " - "similarly to how he wears them in Hyrule Warriors" }); ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255, 255, 0, 255)); ImGui::SeparatorText("Unstable"); @@ -597,6 +594,9 @@ void DrawEnhancementsMenu() { if (UIWidgets::BeginMenu("Modes")) { UIWidgets::CVarCheckbox("Play As Kafei", "gModes.PlayAsKafei", { .tooltip = "Requires scene reload to take effect." }); + UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gModes.HWStyledLink", + { .tooltip = "When acquired, places the Keaton and Fierce Deity masks on Link " + "similarly to how he wears them in Hyrule Warriors" }); if (UIWidgets::CVarCheckbox("Time Moves When You Move", "gModes.TimeMovesWhenYouMove")) { RegisterTimeMovesWhenYouMove(); } diff --git a/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp b/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp index b073855b65..9ff762d052 100644 --- a/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp +++ b/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp @@ -21,26 +21,25 @@ void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName); void UpdateHWStyledLink() { GameInteractor::Instance->RegisterGameHookForID( PLAYER_LIMB_HEAD, [](Player* player, s32 limbIndex) { - if (CVarGetInteger("gEnhancements.Graphics.HWStyledLink", 0)){ - if (player->currentMask == PLAYER_MASK_NONE && - player->transformation == PLAYER_FORM_HUMAN && - INV_CONTENT(ITEM_MASK_KEATON) == ITEM_MASK_KEATON) { - OPEN_DISPS(gPlayState->state.gfxCtx); - Matrix_Push(); - Matrix_RotateYS(14563, MTXMODE_APPLY); - Matrix_RotateZS(-4854, MTXMODE_APPLY); - Matrix_Translate(300.0f, -250.0f, 77.7f, MTXMODE_APPLY); - Matrix_Scale(0.648f, 0.648f, 0.648f, MTXMODE_APPLY); - gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_KEATON - 1]); - Matrix_Pop(); - CLOSE_DISPS(gPlayState->state.gfxCtx); - } + if (CVarGetInteger("gModes.HWStyledLink", 0) && + player->currentMask == PLAYER_MASK_NONE && + player->transformation == PLAYER_FORM_HUMAN && + INV_CONTENT(ITEM_MASK_KEATON) == ITEM_MASK_KEATON){ + OPEN_DISPS(gPlayState->state.gfxCtx); + Matrix_Push(); + Matrix_RotateYS(14563, MTXMODE_APPLY); + Matrix_RotateZS(-4854, MTXMODE_APPLY); + Matrix_Translate(300.0f, -250.0f, 77.7f, MTXMODE_APPLY); + Matrix_Scale(0.648f, 0.648f, 0.648f, MTXMODE_APPLY); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_KEATON - 1]); + Matrix_Pop(); + CLOSE_DISPS(gPlayState->state.gfxCtx); } }); GameInteractor::Instance->RegisterGameHookForID( PLAYER_LIMB_WAIST, [](Player* player, s32 limbIndex) { - if (CVarGetInteger("gEnhancements.Graphics.HWStyledLink", 0) && + if (CVarGetInteger("gModes.HWStyledLink", 0) && player->transformation == PLAYER_FORM_HUMAN && player->itemAction != PLAYER_IA_MASK_FIERCE_DEITY && INV_CONTENT(ITEM_MASK_FIERCE_DEITY) == ITEM_MASK_FIERCE_DEITY) { @@ -55,7 +54,7 @@ void UpdateHWStyledLink() { gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_FIERCE_DEITY - 1]); Matrix_Pop(); CLOSE_DISPS(gPlayState->state.gfxCtx); - } + } }); } From f9737f6aa772b72fbfda98a3b686e75390f08ce3 Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:17:45 -0300 Subject: [PATCH 04/10] Formatting --- mm/2s2h/BenGui/BenMenuBar.cpp | 4 +- .../Enhancements/Graphics/HWStyledLink.cpp | 49 +++++++++---------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index b3a8124e6d..13fd2966a3 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -595,8 +595,8 @@ void DrawEnhancementsMenu() { UIWidgets::CVarCheckbox("Play As Kafei", "gModes.PlayAsKafei", { .tooltip = "Requires scene reload to take effect." }); UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gModes.HWStyledLink", - { .tooltip = "When acquired, places the Keaton and Fierce Deity masks on Link " - "similarly to how he wears them in Hyrule Warriors" }); + { .tooltip = "When acquired, places the Keaton and Fierce Deity masks on Link " + "similarly to how he wears them in Hyrule Warriors" }); if (UIWidgets::CVarCheckbox("Time Moves When You Move", "gModes.TimeMovesWhenYouMove")) { RegisterTimeMovesWhenYouMove(); } diff --git a/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp b/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp index 9ff762d052..7c4078c37e 100644 --- a/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp +++ b/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp @@ -20,29 +20,27 @@ void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName); void UpdateHWStyledLink() { GameInteractor::Instance->RegisterGameHookForID( - PLAYER_LIMB_HEAD, [](Player* player, s32 limbIndex) { - if (CVarGetInteger("gModes.HWStyledLink", 0) && - player->currentMask == PLAYER_MASK_NONE && - player->transformation == PLAYER_FORM_HUMAN && - INV_CONTENT(ITEM_MASK_KEATON) == ITEM_MASK_KEATON){ - OPEN_DISPS(gPlayState->state.gfxCtx); - Matrix_Push(); - Matrix_RotateYS(14563, MTXMODE_APPLY); - Matrix_RotateZS(-4854, MTXMODE_APPLY); - Matrix_Translate(300.0f, -250.0f, 77.7f, MTXMODE_APPLY); - Matrix_Scale(0.648f, 0.648f, 0.648f, MTXMODE_APPLY); - gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_KEATON - 1]); - Matrix_Pop(); - CLOSE_DISPS(gPlayState->state.gfxCtx); - } - }); + PLAYER_LIMB_HEAD, [](Player* player, s32 limbIndex) { + if (CVarGetInteger("gModes.HWStyledLink", 0) && player->currentMask == PLAYER_MASK_NONE && + player->transformation == PLAYER_FORM_HUMAN && INV_CONTENT(ITEM_MASK_KEATON) == ITEM_MASK_KEATON) { + OPEN_DISPS(gPlayState->state.gfxCtx); + Matrix_Push(); + Matrix_RotateYS(14563, MTXMODE_APPLY); + Matrix_RotateZS(-4854, MTXMODE_APPLY); + Matrix_Translate(300.0f, -250.0f, 77.7f, MTXMODE_APPLY); + Matrix_Scale(0.648f, 0.648f, 0.648f, MTXMODE_APPLY); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_KEATON - 1]); + Matrix_Pop(); + CLOSE_DISPS(gPlayState->state.gfxCtx); + } + }); GameInteractor::Instance->RegisterGameHookForID( - PLAYER_LIMB_WAIST, [](Player* player, s32 limbIndex) { - if (CVarGetInteger("gModes.HWStyledLink", 0) && - player->transformation == PLAYER_FORM_HUMAN && - player->itemAction != PLAYER_IA_MASK_FIERCE_DEITY && - INV_CONTENT(ITEM_MASK_FIERCE_DEITY) == ITEM_MASK_FIERCE_DEITY) { + PLAYER_LIMB_WAIST, [](Player* player, s32 limbIndex) { + if (CVarGetInteger("gModes.HWStyledLink", 0) && player->transformation == PLAYER_FORM_HUMAN && + player->itemAction != PLAYER_IA_MASK_FIERCE_DEITY && + INV_CONTENT(ITEM_MASK_FIERCE_DEITY) == ITEM_MASK_FIERCE_DEITY) { OPEN_DISPS(gPlayState->state.gfxCtx); Matrix_Push(); Matrix_RotateXS(-25000, MTXMODE_APPLY); @@ -50,12 +48,13 @@ void UpdateHWStyledLink() { Matrix_RotateZS(-15000, MTXMODE_APPLY); Matrix_Translate(-85.0f, 658.0f, -165.0f, MTXMODE_APPLY); Matrix_Scale(0.635f, 0.635f, 0.635f, MTXMODE_APPLY); - gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, (Gfx*)D_801C0B20[PLAYER_MASK_FIERCE_DEITY - 1]); Matrix_Pop(); CLOSE_DISPS(gPlayState->state.gfxCtx); - } - }); + } + }); } void RegisterHWStyledLink() { From 6772e2149572d9538169c51268470252a86c7b48 Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:16:23 -0300 Subject: [PATCH 05/10] Renamed HW>Hyrule Warriors/Changed rotate angles to hex --- mm/2s2h/BenGui/BenMenuBar.cpp | 4 ++-- mm/2s2h/Enhancements/Enhancements.cpp | 2 +- mm/2s2h/Enhancements/Enhancements.h | 2 +- mm/2s2h/Enhancements/Graphics/HWStyledLink.h | 7 ------ ...dLink.cpp => HyruleWarriorsStyledLink.cpp} | 24 +++++++++---------- .../Graphics/HyruleWarriorsStyledLink.h | 7 ++++++ 6 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 mm/2s2h/Enhancements/Graphics/HWStyledLink.h rename mm/2s2h/Enhancements/Graphics/{HWStyledLink.cpp => HyruleWarriorsStyledLink.cpp} (76%) create mode 100644 mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index 13fd2966a3..ee8a73c164 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -10,7 +10,7 @@ #include "2s2h/Enhancements/Enhancements.h" #include "2s2h/Enhancements/Graphics/MotionBlur.h" #include "2s2h/Enhancements/Graphics/PlayAsKafei.h" -#include "2s2h/Enhancements/Graphics/HWStyledLink.h" +#include "2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h" #include "2s2h/Enhancements/Modes/TimeMovesWhenYouMove.h" #include "2s2h/DeveloperTools/DeveloperTools.h" #include "2s2h/DeveloperTools/WarpPoint.h" @@ -594,7 +594,7 @@ void DrawEnhancementsMenu() { if (UIWidgets::BeginMenu("Modes")) { UIWidgets::CVarCheckbox("Play As Kafei", "gModes.PlayAsKafei", { .tooltip = "Requires scene reload to take effect." }); - UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gModes.HWStyledLink", + UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gModes.HyruleWarriorsStyledLink", { .tooltip = "When acquired, places the Keaton and Fierce Deity masks on Link " "similarly to how he wears them in Hyrule Warriors" }); if (UIWidgets::CVarCheckbox("Time Moves When You Move", "gModes.TimeMovesWhenYouMove")) { diff --git a/mm/2s2h/Enhancements/Enhancements.cpp b/mm/2s2h/Enhancements/Enhancements.cpp index e110f697b2..3dad8824c8 100644 --- a/mm/2s2h/Enhancements/Enhancements.cpp +++ b/mm/2s2h/Enhancements/Enhancements.cpp @@ -29,7 +29,7 @@ void InitEnhancements() { // Graphics RegisterDisableBlackBars(); - RegisterHWStyledLink(); + RegisterHyruleWarriorsStyledLink(); // Masks RegisterFastTransformation(); diff --git a/mm/2s2h/Enhancements/Enhancements.h b/mm/2s2h/Enhancements/Enhancements.h index 1a124b4f41..b537314a4e 100644 --- a/mm/2s2h/Enhancements/Enhancements.h +++ b/mm/2s2h/Enhancements/Enhancements.h @@ -30,7 +30,7 @@ #include "Saving/SavingEnhancements.h" #include "Graphics/DisableBlackBars.h" #include "Modes/TimeMovesWhenYouMove.h" -#include "Graphics/HWStyledLink.h" +#include "Graphics/HyruleWarriorsStyledLink.h" enum AlwaysWinDoggyRaceOptions { ALWAYS_WIN_DOGGY_RACE_OFF, diff --git a/mm/2s2h/Enhancements/Graphics/HWStyledLink.h b/mm/2s2h/Enhancements/Graphics/HWStyledLink.h deleted file mode 100644 index e5809727e2..0000000000 --- a/mm/2s2h/Enhancements/Graphics/HWStyledLink.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef GRAPHICS_HW_STYLED_LINK -#define GRAPHICS_HW_STYLED_LINK - -void RegisterHWStyledLink(); -void UpdateHWStyledLink(); - -#endif // GRAPHICS_HW_STYLED_LINK diff --git a/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp b/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp similarity index 76% rename from mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp rename to mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp index 7c4078c37e..8f76217b50 100644 --- a/mm/2s2h/Enhancements/Graphics/HWStyledLink.cpp +++ b/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp @@ -1,4 +1,4 @@ -#include "HWStyledLink.h" +#include "HyruleWarriorsStyledLink.h" #include "libultraship/libultraship.h" #include "2s2h/Enhancements/GameInteractor/GameInteractor.h" #include "Enhancements/FrameInterpolation/FrameInterpolation.h" @@ -18,15 +18,15 @@ void ResourceMgr_PatchGfxByName(const char* path, const char* patchName, int ind void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName); } -void UpdateHWStyledLink() { +void UpdateHyruleWarriorsStyledLink() { GameInteractor::Instance->RegisterGameHookForID( PLAYER_LIMB_HEAD, [](Player* player, s32 limbIndex) { - if (CVarGetInteger("gModes.HWStyledLink", 0) && player->currentMask == PLAYER_MASK_NONE && + if (CVarGetInteger("gModes.HyruleWarriorsStyledLink", 0) && player->currentMask == PLAYER_MASK_NONE && player->transformation == PLAYER_FORM_HUMAN && INV_CONTENT(ITEM_MASK_KEATON) == ITEM_MASK_KEATON) { OPEN_DISPS(gPlayState->state.gfxCtx); Matrix_Push(); - Matrix_RotateYS(14563, MTXMODE_APPLY); - Matrix_RotateZS(-4854, MTXMODE_APPLY); + Matrix_RotateYS(0x38e3, MTXMODE_APPLY); + Matrix_RotateZS(-0x12F6, MTXMODE_APPLY); Matrix_Translate(300.0f, -250.0f, 77.7f, MTXMODE_APPLY); Matrix_Scale(0.648f, 0.648f, 0.648f, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), @@ -38,14 +38,14 @@ void UpdateHWStyledLink() { }); GameInteractor::Instance->RegisterGameHookForID( PLAYER_LIMB_WAIST, [](Player* player, s32 limbIndex) { - if (CVarGetInteger("gModes.HWStyledLink", 0) && player->transformation == PLAYER_FORM_HUMAN && + if (CVarGetInteger("gModes.HyruleWarriorsStyledLink", 0) && player->transformation == PLAYER_FORM_HUMAN && player->itemAction != PLAYER_IA_MASK_FIERCE_DEITY && INV_CONTENT(ITEM_MASK_FIERCE_DEITY) == ITEM_MASK_FIERCE_DEITY) { OPEN_DISPS(gPlayState->state.gfxCtx); Matrix_Push(); - Matrix_RotateXS(-25000, MTXMODE_APPLY); - Matrix_RotateYS(-2000, MTXMODE_APPLY); - Matrix_RotateZS(-15000, MTXMODE_APPLY); + Matrix_RotateXS(-0x61A8, MTXMODE_APPLY); + Matrix_RotateYS(-0x7D0, MTXMODE_APPLY); + Matrix_RotateZS(-0x3A98, MTXMODE_APPLY); Matrix_Translate(-85.0f, 658.0f, -165.0f, MTXMODE_APPLY); Matrix_Scale(0.635f, 0.635f, 0.635f, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx), @@ -57,9 +57,9 @@ void UpdateHWStyledLink() { }); } -void RegisterHWStyledLink() { - UpdateHWStyledLink(); +void RegisterHyruleWarriorsStyledLink() { + UpdateHyruleWarriorsStyledLink(); GameInteractor::Instance->RegisterGameHook( - [](s8 sceneId, s8 spawnNum) { UpdateHWStyledLink(); }); + [](s8 sceneId, s8 spawnNum) { UpdateHyruleWarriorsStyledLink(); }); } \ No newline at end of file diff --git a/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h b/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h new file mode 100644 index 0000000000..e232197997 --- /dev/null +++ b/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h @@ -0,0 +1,7 @@ +#ifndef GRAPHICS_HYRULE_WARRIORS_STYLED_LINK +#define GRAPHICS_HYRULE_WARRIORS_STYLED_LINK + +void RegisterHyruleWarriorsStyledLink(); +void UpdateHyruleWarriorsStyledLink(); + +#endif // GRAPHICS_HYRULE_WARRIORS_STYLED_LINK From a1822189c4e44d185d4a6006f84df82754534894 Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:59:13 -0300 Subject: [PATCH 06/10] Formatting again --- mm/src/overlays/actors/ovl_player_actor/z_player.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/src/overlays/actors/ovl_player_actor/z_player.c b/mm/src/overlays/actors/ovl_player_actor/z_player.c index 3af63329a3..16e9c9ca72 100644 --- a/mm/src/overlays/actors/ovl_player_actor/z_player.c +++ b/mm/src/overlays/actors/ovl_player_actor/z_player.c @@ -14463,7 +14463,6 @@ void Player_Action_13(Player* this, PlayState* play) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_CURVED, play); - if (GameInteractor_Should(GI_VB_CONSIDER_BUNNY_HOOD_EQUIPPED, this->currentMask == PLAYER_MASK_BUNNY, this)) { speedTarget *= 1.5f; } From e84fb6751bd869e24e8211c2dd6d19bf3244b4fb Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:24:01 -0300 Subject: [PATCH 07/10] updated includes and stuff dealing with a crash on my machine, gotta figure out what's up with that --- mm/2s2h/Enhancements/Graphics/Graphics.h | 1 + mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp | 3 +-- mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h | 7 ------- .../kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h diff --git a/mm/2s2h/Enhancements/Graphics/Graphics.h b/mm/2s2h/Enhancements/Graphics/Graphics.h index 917c6aa74a..04871e33a2 100644 --- a/mm/2s2h/Enhancements/Graphics/Graphics.h +++ b/mm/2s2h/Enhancements/Graphics/Graphics.h @@ -7,6 +7,7 @@ void RegisterDisableBlackBars(); void MotionBlur_RenderMenuOptions(); void RegisterPlayAsKafei(); void RegisterTextBasedClock(); +void RegisterHyruleWarriorsStyledLink(); #ifdef __cplusplus #include diff --git a/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp b/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp index 8f76217b50..275c827889 100644 --- a/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp +++ b/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.cpp @@ -1,6 +1,5 @@ -#include "HyruleWarriorsStyledLink.h" #include "libultraship/libultraship.h" -#include "2s2h/Enhancements/GameInteractor/GameInteractor.h" +#include "2s2h/GameInteractor/GameInteractor.h" #include "Enhancements/FrameInterpolation/FrameInterpolation.h" extern "C" { diff --git a/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h b/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h deleted file mode 100644 index e232197997..0000000000 --- a/mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef GRAPHICS_HYRULE_WARRIORS_STYLED_LINK -#define GRAPHICS_HYRULE_WARRIORS_STYLED_LINK - -void RegisterHyruleWarriorsStyledLink(); -void UpdateHyruleWarriorsStyledLink(); - -#endif // GRAPHICS_HYRULE_WARRIORS_STYLED_LINK diff --git a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c index 7b1dd9f27d..1c7df59bce 100644 --- a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c +++ b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c @@ -19,7 +19,7 @@ #include "archives/map_name_static/map_name_static.h" #include "2s2h/Enhancements/FrameInterpolation/FrameInterpolation.h" #include "2s2h/Enhancements/Saving/SavingEnhancements.h" -#include "2s2h/Enhancements/GameInteractor/GameInteractor.h" +#include "2s2h/GameInteractor/GameInteractor.h" #include "2s2h_assets.h" From cf0b86e9a1ae976eb19eddc79242267f30024ffb Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Sat, 12 Oct 2024 00:04:01 -0300 Subject: [PATCH 08/10] Added the enhancement toggle to the modern menu Ok, I think that's just about everything once again, should be ready to go --- mm/2s2h/BenGui/SearchableMenuItems.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/2s2h/BenGui/SearchableMenuItems.h b/mm/2s2h/BenGui/SearchableMenuItems.h index 4131b5941a..15fa74d2dc 100644 --- a/mm/2s2h/BenGui/SearchableMenuItems.h +++ b/mm/2s2h/BenGui/SearchableMenuItems.h @@ -1033,6 +1033,8 @@ void AddEnhancements() { WIDGET_CVAR_CHECKBOX } }, { { .widgetName = "Modes", .widgetType = WIDGET_SEPARATOR_TEXT }, { "Play as Kafei", "gModes.PlayAsKafei", "Requires scene reload to take effect.", WIDGET_CVAR_CHECKBOX }, + { "Hyrule Warriors Styled Link", "gModes.HyruleWarriorsStyledLink", + "When acquired, places the Keaton and Fierce Deity masks on Link\nsimilarly to how he wears them in Hyrule Warriors", WIDGET_CVAR_CHECKBOX}, { "Time Moves when you Move", "gModes.TimeMovesWhenYouMove", "Time only moves when Link is not standing still.", From e3f85868cf18bd1c31a4f8a4ff1a5523be3fa6fa Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Sat, 12 Oct 2024 00:17:15 -0300 Subject: [PATCH 09/10] Formatting --- mm/2s2h/BenGui/SearchableMenuItems.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/2s2h/BenGui/SearchableMenuItems.h b/mm/2s2h/BenGui/SearchableMenuItems.h index 15fa74d2dc..3069e1205b 100644 --- a/mm/2s2h/BenGui/SearchableMenuItems.h +++ b/mm/2s2h/BenGui/SearchableMenuItems.h @@ -1034,7 +1034,9 @@ void AddEnhancements() { { { .widgetName = "Modes", .widgetType = WIDGET_SEPARATOR_TEXT }, { "Play as Kafei", "gModes.PlayAsKafei", "Requires scene reload to take effect.", WIDGET_CVAR_CHECKBOX }, { "Hyrule Warriors Styled Link", "gModes.HyruleWarriorsStyledLink", - "When acquired, places the Keaton and Fierce Deity masks on Link\nsimilarly to how he wears them in Hyrule Warriors", WIDGET_CVAR_CHECKBOX}, + "When acquired, places the Keaton and Fierce Deity masks on Link similarly to how he wears them in " + "Hyrule Warriors", + WIDGET_CVAR_CHECKBOX }, { "Time Moves when you Move", "gModes.TimeMovesWhenYouMove", "Time only moves when Link is not standing still.", From 6a8bd95bafaf5915e006a6437b3bfad0a6c6b03b Mon Sep 17 00:00:00 2001 From: OtherBlue <93625085+OtherBlue@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:10:59 -0300 Subject: [PATCH 10/10] removed unnecessary header include --- .../kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c index 1c7df59bce..078491f2af 100644 --- a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c +++ b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c @@ -19,7 +19,6 @@ #include "archives/map_name_static/map_name_static.h" #include "2s2h/Enhancements/FrameInterpolation/FrameInterpolation.h" #include "2s2h/Enhancements/Saving/SavingEnhancements.h" -#include "2s2h/GameInteractor/GameInteractor.h" #include "2s2h_assets.h"