Files
Shipwright/soh/soh/Enhancements/cosmetics/TimeFlowFileSelect.cpp
T
Jordan Longstaff 2dd51f1288 [Enhancement] Hide quests in File Select (#7093)
Migrate File Select CVars

Co-authored-by: Unreference <87878910+unreference@users.noreply.github.com>
2026-08-31 14:03:04 +00:00

23 lines
759 B
C++

#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64save.h"
}
extern "C" SaveContext gSaveContext;
static constexpr int32_t CVAR_TIMEFLOWFILESELECT_DEFAULT = 0;
#define CVAR_TIMEFLOWFILESELECT_NAME CVAR_ENHANCEMENT("FileSelect.TimeFlow")
#define CVAR_TIMEFLOWFILESELECT_VALUE CVarGetInteger(CVAR_TIMEFLOWFILESELECT_NAME, CVAR_TIMEFLOWFILESELECT_DEFAULT)
void OnFileChooseMainTimeFlowFileSelect(void* gameState) {
gSaveContext.skyboxTime += 0x10;
}
void RegisterTimeFlowFileSelect() {
COND_HOOK(OnFileChooseMain, CVAR_TIMEFLOWFILESELECT_VALUE, OnFileChooseMainTimeFlowFileSelect);
}
static RegisterShipInitFunc initFunc(RegisterTimeFlowFileSelect, { CVAR_TIMEFLOWFILESELECT_NAME });