No longer hijacks CustomLogoTitle

This commit is contained in:
nclok1405 2025-06-13 14:20:18 +09:00
commit 1c44574e38
2 changed files with 14 additions and 10 deletions

View file

@ -24,9 +24,22 @@ void OnFileChooseMainBootToDebugWarpScreen(void* gameState) {
fileChooseContext->selectMode = SM_LOAD_GAME; fileChooseContext->selectMode = SM_LOAD_GAME;
} }
void OnZTitleUpdateBootToDebugWarpScreen(void* gameState) {
TitleContext* titleContext = (TitleContext*)gameState;
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.natureAmbienceId = 0xFF;
gSaveContext.gameMode = GAMEMODE_FILE_SELECT;
titleContext->state.running = false;
SET_NEXT_GAMESTATE(&titleContext->state, FileChoose_Init, FileChooseContext);
}
void RegisterBootToDebugWarpScreen() { void RegisterBootToDebugWarpScreen() {
COND_HOOK(OnFileChooseMain, CVAR_DEBUG_ENABLED_VALUE && CVAR_BOOT_TO_DEBUG_WARP_SCREEN_VALUE, COND_HOOK(OnFileChooseMain, CVAR_DEBUG_ENABLED_VALUE && CVAR_BOOT_TO_DEBUG_WARP_SCREEN_VALUE,
OnFileChooseMainBootToDebugWarpScreen); OnFileChooseMainBootToDebugWarpScreen);
COND_HOOK(OnZTitleUpdate, CVAR_DEBUG_ENABLED_VALUE && CVAR_BOOT_TO_DEBUG_WARP_SCREEN_VALUE,
OnZTitleUpdateBootToDebugWarpScreen);
} }
static RegisterShipInitFunc initFunc_BootToDebugWarpScreen(RegisterBootToDebugWarpScreen, static RegisterShipInitFunc initFunc_BootToDebugWarpScreen(RegisterBootToDebugWarpScreen,

View file

@ -183,16 +183,7 @@ void OnZTitleInitReplaceTitleMainWithCustom(void* gameState) {
void OnZTitleUpdatePressButtonToSkip(void* gameState) { void OnZTitleUpdatePressButtonToSkip(void* gameState) {
TitleContext* titleContext = (TitleContext*)gameState; TitleContext* titleContext = (TitleContext*)gameState;
if ((CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) != 0) && if (CHECK_BTN_ANY(titleContext->state.input->press.button, BTN_A | BTN_B | BTN_START)) {
(CVarGetInteger(CVAR_DEVELOPER_TOOLS("BootToDebugWarpScreen"), 0) != 0)) {
// Boot to Debug Warp Screen
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.natureAmbienceId = 0xFF;
gSaveContext.gameMode = GAMEMODE_FILE_SELECT;
titleContext->state.running = false;
SET_NEXT_GAMESTATE(&titleContext->state, FileChoose_Init, FileChooseContext);
} else if (CHECK_BTN_ANY(titleContext->state.input->press.button, BTN_A | BTN_B | BTN_START)) {
// Force the title state to start fading to black and to last roughly 5 frames based on current fade in/out // Force the title state to start fading to black and to last roughly 5 frames based on current fade in/out
titleContext->visibleDuration = 0; titleContext->visibleDuration = 0;
titleContext->addAlpha = std::max<int16_t>((255 - titleContext->coverAlpha) / 5, 1); titleContext->addAlpha = std::max<int16_t>((255 - titleContext->coverAlpha) / 5, 1);