From a8d29a2ae31a68b0055bd646a8959e60678f5794 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 22 Jan 2025 01:11:53 -0500 Subject: [PATCH] vb should let it snow --- soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp | 11 ++++++++++- soh/soh/Enhancements/game-interactor/GameInteractor.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp b/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp index 957223936..7c7038516 100644 --- a/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp +++ b/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp @@ -98,7 +98,7 @@ extern "C" void CustomLogoTitle_Draw(TitleContext* titleContext, uint8_t logoToD } // Draw ice block around spinning N or ship. - if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) { + if (GameInteractor_Should(VB_DRAW_ICE_ON_LOGO, false)) { f32 scale = 0.4f; gSPSegment(POLY_OPA_DISP++, 0x08, @@ -205,3 +205,12 @@ static RegisterShipInitFunc initFuncBootsequence(RegisterCustomLogoTitleBootsequ // Let it Snow // +#define CVAR_LETITSNOW_NAME CVAR_GENERAL("LetItSnow") +#define CVAR_LETITSNOW_DEFAULT 0 +#define CVAR_LETITSNOW_VALUE CVarGetInteger(CVAR_LETITSNOW_NAME, CVAR_LETITSNOW_DEFAULT) + +void RegisterCustomLogoTitleLetItSnow() { + COND_VB_SHOULD(VB_DRAW_ICE_ON_LOGO, CVAR_LETITSNOW_VALUE != CVAR_LETITSNOW_DEFAULT, { *should = true; }); +} + +static RegisterShipInitFunc initFuncLetItSnow(RegisterCustomLogoTitleLetItSnow, { CVAR_LETITSNOW_NAME }); diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor.h b/soh/soh/Enhancements/game-interactor/GameInteractor.h index 8c449ccdb..41daa781f 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor.h @@ -64,6 +64,7 @@ typedef enum { } GITeleportDestinations; typedef enum { + VB_DRAW_ICE_ON_LOGO, // Vanilla condition: gSaveContext.showTitleCard VB_SHOW_TITLE_CARD, // Opt: *EnWonderTalk2