set all letters obtained when skip minor cutscenes is on

This commit is contained in:
gymnast86
2026-05-08 16:00:42 -07:00
parent 2dea7375ef
commit 38031e2545
6 changed files with 35 additions and 14 deletions
+9
View File
@@ -1853,7 +1853,16 @@ inline u8 dComIfGs_getGetNumber(int i_no) {
inline void dComIfGs_setGetNumber(int i_no, u8 i_value) {
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setGetNumber(i_no, i_value);
}
#if TARGET_PC
// For rando
inline void dComIfGs_setAllLetterGet() {
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setAllLetterGet();
}
inline void dComIfGs_setAllLetterRead() {
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setAllLetterRead();
}
#endif
inline void dComIfGs_addFishNum(u8 param_0) {
g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().addFishCount(param_0);
}
+5
View File
@@ -481,6 +481,11 @@ public:
int isLetterReadFlag(int i_no) const;
u8 getGetNumber(int i_no) { return mGetNumber[i_no]; }
void setGetNumber(int i_no, u8 i_value) { mGetNumber[i_no] = i_value; }
#if TARGET_PC
// For rando
void setAllLetterGet() { mLetterGetFlags[0] |= 0xFFFF;}
void setAllLetterRead() { mLetterReadFlags[0] |= 0xFFFF;}
#endif
/* 0x00 */ BE(u32) mLetterGetFlags[2];
/* 0x08 */ BE(u32) mLetterReadFlags[2];
+5 -5
View File
@@ -2923,11 +2923,11 @@ void dComIfGs_setupRandomizerSave() {
execItemGet(dItemNo_Randomizer_DROP_CONTAINER03_e);
}
// if (skipMinorCutscenes())
// {
// dComIfGs_setAllLetterGet();
// dComIfGs_setAllLetterRead();
// }
if (randoData.mSettings[RandomizerContext::SKIP_MINOR_CUTSCENES] == RandomizerContext::ON)
{
dComIfGs_setAllLetterGet();
dComIfGs_setAllLetterRead();
}
if (dComIfGs_isEventBit(MIDNAS_DESPERATE_HOUR_COMPLETED))
{
@@ -258,8 +258,8 @@ std::string RandomizerContext::GetSeedDataPath() const {
return std::string(SDL_GetPrefPath(dusk::OrgName, dusk::AppName)) + "randomizer/seeds/" + this->mHash + "/seed.dat";
}
s32 RandomizerContext::settingToEnum(const std::string& settingName) {
static const std::unordered_map<std::string, s32> nameToEnum = {
int RandomizerContext::SettingToEnum(const std::string& settingName) {
static const std::unordered_map<std::string, int> nameToEnum = {
{"Hyrule Barrier Dungeons", HYRULE_BARRIER_DUNGEONS},
{"Hyrule Barrier Requirements", HYRULE_BARRIER_REQUIREMENTS},
{"Hyrule Barrier Fused Shadows", HYRULE_BARRIER_FUSED_SHADOWS},
@@ -273,6 +273,7 @@ s32 RandomizerContext::settingToEnum(const std::string& settingName) {
{"Hyrule Castle Big Key Poe Souls", HYRULE_BIG_KEY_POE_SOULS},
{"Hyrule Castle Big Key Hearts", HYRULE_BIG_KEY_HEARTS},
{"Palace of Twilight Requirements", PALACE_OF_TWILIGHT_REQUIREMENTS},
{"Skip Minor Cutscenes", SKIP_MINOR_CUTSCENES},
};
if (nameToEnum.contains(settingName)) {
@@ -282,8 +283,10 @@ s32 RandomizerContext::settingToEnum(const std::string& settingName) {
return -1;
}
s32 RandomizerContext::optionToEnum(const std::string& optionName) {
static const std::unordered_map<std::string, s32> nameToEnum = {
int RandomizerContext::OptionToEnum(const std::string& optionName) {
static const std::unordered_map<std::string, int> nameToEnum = {
{"On", ON},
{"Off", OFF},
{"None", NONE},
{"Vanilla", VANILLA},
{"Open", OPEN},
@@ -731,7 +734,7 @@ RandomizerContext WriteSeedData(const std::unique_ptr<randomizer::logic::world::
// Settings we need to check ingame
for (const auto& [setting, info] : *randomizer::seedgen::settings::GetAllSettingsInfo()) {
if (info->NeedInGame()) {
auto settingEnum = RandomizerContext::settingToEnum(setting);
auto settingEnum = RandomizerContext::SettingToEnum(setting);
if (settingEnum == -1) {
throw std::runtime_error("Setting \"" + setting + "\" does not have an associated enum value");
}
@@ -741,7 +744,7 @@ RandomizerContext WriteSeedData(const std::unique_ptr<randomizer::logic::world::
if (info->OptionsAreNumbers()) {
optionEnum = world->Setting(setting).GetCurrentOptionAsNumber();
} else {
optionEnum = RandomizerContext::optionToEnum(option);
optionEnum = RandomizerContext::OptionToEnum(option);
}
if (optionEnum == -1) {
throw std::runtime_error("Option \"" + option + "\" for setting \"" + setting + "\" does not have an associated enum value");
@@ -71,9 +71,12 @@ public:
HYRULE_BIG_KEY_HEARTS,
HYRULE_BIG_KEY_DUNGEONS,
PALACE_OF_TWILIGHT_REQUIREMENTS,
SKIP_MINOR_CUTSCENES,
};
enum Options {
ON,
OFF,
NONE,
VANILLA,
OPEN,
@@ -84,9 +87,9 @@ public:
DUNGEONS,
};
static int settingToEnum(const std::string& settingName);
static int SettingToEnum(const std::string& settingName);
static int optionToEnum(const std::string& optionName);
static int OptionToEnum(const std::string& optionName);
};
/*
@@ -143,7 +146,7 @@ public:
// Used to store an item id for a flow message override so that we can give the item
// once the textbox is closed instead of when the message appears. This lines up
// more naturally with how the timing of how the game normally gives items and affects
// more naturally with the timing of when the game normally gives items and affects
// things like the sound of the rupee counter going up.
u8 mFlowMessageItemId{0};
};
@@ -316,6 +316,7 @@
- Name: Skip Minor Cutscenes
Tracker Important: True
Need In Game: True
Default Option: "Off"
Options:
- "Off": description