Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSK_MQ_DUNGEON_COUNT Value defined using #define in header file #4206

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions soh/soh/Enhancements/randomizer/randomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2967,11 +2967,11 @@ void GenerateRandomizerImgui(std::string seed = "") {
if (OTRGlobals::Instance->HasMasterQuest() && OTRGlobals::Instance->HasOriginal()) {
// If both OTRs are loaded.
cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE);
cvarSettings[RSK_MQ_DUNGEON_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 12);
cvarSettings[RSK_MQ_DUNGEON_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), RSK_MQ_DUNGEON_COUNT_VALUE);
} else if (OTRGlobals::Instance->HasMasterQuest()) {
// If only Master Quest is loaded.
cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = RO_MQ_DUNGEONS_SET_NUMBER;
cvarSettings[RSK_MQ_DUNGEON_COUNT] = 12;
cvarSettings[RSK_MQ_DUNGEON_COUNT] = RSK_MQ_DUNGEON_COUNT_VALUE;
} else {
// If only Original Quest is loaded.
cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = RO_MQ_DUNGEONS_NONE;
Expand Down Expand Up @@ -5518,7 +5518,7 @@ CustomMessage Randomizer::GetMapGetItemMessageWithHint(GetItemEntry itemEntry) {

if (this->randoSettings[RSK_RANDOM_MQ_DUNGEONS] == RO_MQ_DUNGEONS_NONE ||
(this->randoSettings[RSK_RANDOM_MQ_DUNGEONS] == RO_MQ_DUNGEONS_SET_NUMBER &&
this->randoSettings[RSK_MQ_DUNGEON_COUNT] == 12)
this->randoSettings[RSK_MQ_DUNGEON_COUNT] == RSK_MQ_DUNGEON_COUNT_VALUE)
) {
messageEntry.Replace("{{typeHint}}", "");
} else if (ResourceMgr_IsSceneMasterQuest(sceneNum)) {
Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/randomizer/randomizerTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "randomizer_inf.h"

#define MAX_TRICK_NAME_SIZE 50
#define RSK_MQ_DUNGEON_COUNT 12

// This should probably go in a less rando-specific location
// but the best location will probably be in the modding engine
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ void CheckTrackerLoadGame(int32_t fileNum) {
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_RANDOM_MQ_DUNGEONS) == RO_MQ_DUNGEONS_NONE ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_RANDOM_MQ_DUNGEONS) == RO_MQ_DUNGEONS_SELECTION ||
(OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_RANDOM_MQ_DUNGEONS) == RO_MQ_DUNGEONS_SET_NUMBER &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) == 12))) {
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) == RSK_MQ_DUNGEON_COUNT_VALUE))) {
SetAreaSpoiled(static_cast<RandomizerCheckArea>(i));
}
}
Expand All @@ -524,7 +524,7 @@ void CheckTrackerLoadGame(int32_t fileNum) {

showVOrMQ = (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_RANDOM_MQ_DUNGEONS) == RO_MQ_DUNGEONS_RANDOM_NUMBER ||
(OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_RANDOM_MQ_DUNGEONS) == RO_MQ_DUNGEONS_SET_NUMBER &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) < 12));
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) < RSK_MQ_DUNGEON_COUNT_VALUE));
LinksPocket();
SongFromImpa();
GiftFromSages();
Expand Down