Quest Cleanup (#3178)

* Change most n64ddFlag checks to IS_RANDO checks

* Change most isMasterQuest checks to IS_MASTER_QUEST checks

* Change most isBossRush checks to IS_BOSS_RUSH checks

* Replace isMasterQuest & isBossRush with questId

* Replace n64ddFlag with questId

Also restore authentic n64ddFlag behavior except savefile saving/loading

* Move quest enum from file_choose.h to z64save.h

* Update macros to not take gSaveContext
This commit is contained in:
Pepe20129 2023-09-26 16:20:33 +02:00 committed by GitHub
parent 6dd3437ad4
commit d63c9d1774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
133 changed files with 677 additions and 628 deletions

View File

@ -284,8 +284,7 @@ typedef struct {
/* 0x1428 */ u16 pendingSaleMod;
// #region SOH [General]
// Upstream TODO: Move these to their own struct or name to more obviously specific to SoH
/* */ uint32_t isMasterQuest;
/* */ uint32_t isBossRush;
/* */ uint8_t questId;
/* */ uint32_t isBossRushPaused;
/* */ uint8_t bossRushOptions[BOSSRUSH_OPTIONS_AMOUNT];
/* */ u8 mqDungeonCount;
@ -328,6 +327,18 @@ typedef struct {
// #endregion
} SaveContext; // size = 0x1428
typedef enum {
/* 00 */ QUEST_NORMAL,
/* 01 */ QUEST_MASTER,
/* 02 */ QUEST_RANDOMIZER,
/* 03 */ QUEST_BOSSRUSH,
} Quest;
#define IS_VANILLA (gSaveContext.questId == QUEST_NORMAL)
#define IS_MASTER_QUEST (gSaveContext.questId == QUEST_MASTER)
#define IS_RANDO (gSaveContext.questId == QUEST_RANDOMIZER)
#define IS_BOSS_RUSH (gSaveContext.questId == QUEST_BOSSRUSH)
typedef enum {
/* 0x00 */ BTN_ENABLED,
/* 0xFF */ BTN_DISABLED = 0xFF

View File

@ -235,7 +235,7 @@ void BossRush_HandleBlueWarpHeal(PlayState* play) {
}
void BossRush_HandleCompleteBoss(PlayState* play) {
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
return;
}

View File

@ -708,7 +708,7 @@ void DrawInventoryTab() {
ImVec2(0, 0), ImVec2(1, 1), 0)) {
gSaveContext.inventory.items[selectedIndex] = slotEntry.id;
// Set adult trade item flag if you're playing adult trade shuffle in rando
if (gSaveContext.n64ddFlag &&
if (IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE) &&
selectedIndex == SLOT_TRADE_ADULT &&
slotEntry.id >= ITEM_POCKET_EGG && slotEntry.id <= ITEM_CLAIM_CHECK) {
@ -753,7 +753,7 @@ void DrawInventoryTab() {
// Trade quest flags are only used when shuffling the trade sequence, so
// don't show this if it isn't needed.
if (gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE)
if (IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE)
&& ImGui::TreeNode("Adult trade quest items")) {
for (int i = ITEM_POCKET_EGG; i <= ITEM_CLAIM_CHECK; i++) {
DrawBGSItemFlag(i);
@ -1080,7 +1080,7 @@ void DrawFlagsTab() {
// If playing a Randomizer Save with Shuffle Skull Tokens on anything other than "Off" we don't want to keep
// GS Token Count updated, since Gold Skulltulas killed will not correlate to GS Tokens Collected.
if (!(gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
if (!(IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
static bool keepGsCountUpdated = true;
ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated);
UIWidgets::InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags.");
@ -1096,7 +1096,7 @@ void DrawFlagsTab() {
for (int i = 0; i < flagTables.size(); i++) {
const FlagTable& flagTable = flagTables[i];
if (flagTable.flagTableType == RANDOMIZER_INF && !gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
if (flagTable.flagTableType == RANDOMIZER_INF && !IS_RANDO && !IS_BOSS_RUSH) {
continue;
}
@ -1290,7 +1290,7 @@ void DrawEquipmentTab() {
"Giant (500)",
};
// only display Tycoon wallet if you're in a save file that would allow it.
if (gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS) {
if (IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS) {
const std::string walletName = "Tycoon (999)";
walletNamesImpl.push_back(walletName);
}

View File

@ -234,7 +234,7 @@ extern "C" uint8_t GetRandomizedEnemy(PlayState* play, int16_t *actorId, f32 *po
EnemyEntry GetRandomizedEnemyEntry(uint32_t seed) {
if (CVarGetInteger("gRandomizedEnemies", ENEMY_RANDOMIZER_OFF) == ENEMY_RANDOMIZER_RANDOM_SEEDED) {
uint32_t finalSeed = seed + (gSaveContext.n64ddFlag ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
uint32_t finalSeed = seed + (IS_RANDO ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
Random_Init(finalSeed);
}

View File

@ -231,9 +231,9 @@ void RegisterOcarinaTimeTravel() {
gPlayState->msgCtx.lastPlayedSong == OCARINA_SONG_TIME && !nearbyTimeBlockEmpty && !nearbyTimeBlock &&
!nearbyOcarinaSpot && !nearbyFrogs) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
CVarSetInteger("gSwitchTimeline", 1);
} else if (!gSaveContext.n64ddFlag && !nearbyDoorOfTime) {
} else if (!IS_RANDO && !nearbyDoorOfTime) {
// This check is made for when Link is learning the Song Of Time in a vanilla save file that load a
// Temple of Time scene where the only object present is the Door of Time
CVarSetInteger("gSwitchTimeline", 1);
@ -469,7 +469,7 @@ void RegisterHyperBosses() {
uint8_t hyperBossesActive =
CVarGetInteger("gHyperBosses", 0) ||
(gSaveContext.isBossRush &&
(IS_BOSS_RUSH &&
gSaveContext.bossRushOptions[BR_OPTIONS_HYPERBOSSES] == BR_CHOICE_HYPERBOSSES_YES);
// Don't apply during cutscenes because it causes weird behaviour and/or crashes on some bosses.
@ -581,7 +581,7 @@ void UpdateMirrorModeState(int32_t sceneNum) {
(sceneNum == SCENE_GANON_BOSS);
if (mirroredMode == MIRRORED_WORLD_RANDOM_SEEDED || mirroredMode == MIRRORED_WORLD_DUNGEONS_RANDOM_SEEDED) {
uint32_t seed = sceneNum + (gSaveContext.n64ddFlag ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
uint32_t seed = sceneNum + (IS_RANDO ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
Random_Init(seed);
}

View File

@ -380,63 +380,63 @@ bool fortressFast;
bool fortressNormal;
void LoadSettings() {
//If in randomzer (n64ddFlag), then get the setting and check if in general we should be showing the settings
//If in randomzer, then get the setting and check if in general we should be showing the settings
//If in vanilla, _try_ to show items that at least are needed for 100%
showShops = gSaveContext.n64ddFlag ? (
showShops = IS_RANDO ? (
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_ZERO_ITEMS)
: false;
showBeans = gSaveContext.n64ddFlag ?
showBeans = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MAGIC_BEANS) == RO_GENERIC_YES
: true;
showScrubs = gSaveContext.n64ddFlag ?
showScrubs = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) != RO_SCRUBS_OFF
: false;
showMerchants = gSaveContext.n64ddFlag ?
showMerchants = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF
: true;
showCows = gSaveContext.n64ddFlag ?
showCows = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_COWS) == RO_GENERIC_YES
: false;
showAdultTrade = gSaveContext.n64ddFlag ?
showAdultTrade = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_YES
: true;
showKokiriSword = gSaveContext.n64ddFlag ?
showKokiriSword = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_KOKIRI_SWORD) == RO_GENERIC_YES
: true;
showWeirdEgg = gSaveContext.n64ddFlag ?
showWeirdEgg = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_WEIRD_EGG) == RO_GENERIC_YES
: true;
showGerudoCard = gSaveContext.n64ddFlag ?
showGerudoCard = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) == RO_GENERIC_YES
: true;
showFrogSongRupees = gSaveContext.n64ddFlag ?
showFrogSongRupees = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_FROG_SONG_RUPEES) == RO_GENERIC_YES
: false;
showStartingMapsCompasses = gSaveContext.n64ddFlag ?
showStartingMapsCompasses = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_STARTING_MAPS_COMPASSES) != RO_DUNGEON_ITEM_LOC_VANILLA
: false;
showKeysanity = gSaveContext.n64ddFlag ?
showKeysanity = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_KEYSANITY) != RO_DUNGEON_ITEM_LOC_VANILLA
: false;
showBossKeysanity = gSaveContext.n64ddFlag ?
showBossKeysanity = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BOSS_KEYSANITY) != RO_DUNGEON_ITEM_LOC_VANILLA
: false;
showGerudoFortressKeys = gSaveContext.n64ddFlag ?
showGerudoFortressKeys = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GERUDO_KEYS) != RO_GERUDO_KEYS_VANILLA
: false;
showGanonBossKey = gSaveContext.n64ddFlag ?
showGanonBossKey = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_VANILLA
: false;
showOcarinas = gSaveContext.n64ddFlag ?
showOcarinas = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_OCARINA) == RO_GENERIC_YES
: false;
show100SkullReward = gSaveContext.n64ddFlag ?
show100SkullReward = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_100_GS_REWARD) == RO_GENERIC_YES
: false;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
switch (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS)) {
case RO_TOKENSANITY_ALL:
showOverworldTokens = true;
@ -747,7 +747,7 @@ bool HasItemBeenCollected(RandomizerCheckObject obj) {
case SpoilerCollectionCheckType::SPOILER_CHK_GRAVEDIGGER:
// Gravedigger has a fix in place that means one of two save locations. Check both.
return (gSaveContext.itemGetInf[1] & 0x1000) || // vanilla flag
((gSaveContext.n64ddFlag || CVarGetInteger("gGravediggingTourFix", 0)) &&
((IS_RANDO || CVarGetInteger("gGravediggingTourFix", 0)) &&
gSaveContext.sceneFlags[scene].collect & (1 << flag)); // rando/fix flag
default:
return false;
@ -831,7 +831,7 @@ void DrawLocation(RandomizerCheckObject rcObj, RandomizerCheckShow* thisCheckSta
case RCSHOW_SAVED:
case RCSHOW_CHECKED:
case RCSHOW_SCUMMED:
if (gSaveContext.n64ddFlag)
if (IS_RANDO)
txt = OTRGlobals::Instance->gRandomizer
->EnumToSpoilerfileGetName[gSaveContext.itemLocations[rcObj.rc].get.rgID][gSaveContext.language];
else if (gSaveContext.language == LANGUAGE_ENG)
@ -843,7 +843,7 @@ void DrawLocation(RandomizerCheckObject rcObj, RandomizerCheckShow* thisCheckSta
txt = "Skipped"; //TODO language
break;
case RCSHOW_SEEN:
if (gSaveContext.n64ddFlag)
if (IS_RANDO)
txt = OTRGlobals::Instance->gRandomizer
->EnumToSpoilerfileGetName[gSaveContext.itemLocations[rcObj.rc].get.fakeRgID][gSaveContext.language];
else if (gSaveContext.language == LANGUAGE_ENG)

View File

@ -722,22 +722,22 @@ void RegisterOnUpdateMainMenuSelection() {
if (!CVarGetInteger("gA11yTTS", 0)) return;
switch (questIndex) {
case FS_QUEST_NORMAL: {
case QUEST_NORMAL: {
auto translation = GetParameritizedText("quest_sel_vanilla", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;
}
case FS_QUEST_MASTER: {
case QUEST_MASTER: {
auto translation = GetParameritizedText("quest_sel_mq", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;
}
case FS_QUEST_RANDOMIZER: {
case QUEST_RANDOMIZER: {
auto translation = GetParameritizedText("quest_sel_randomizer", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;
}
case FS_QUEST_BOSSRUSH: {
case QUEST_BOSSRUSH: {
auto translation = GetParameritizedText("quest_sel_boss_rush", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;

View File

@ -1110,11 +1110,11 @@ uint32_t IsSceneMasterQuest(s16 sceneNum) {
if (OTRGlobals::Instance->HasMasterQuest()) {
if (!OTRGlobals::Instance->HasOriginal()) {
value = 1;
} else if (gSaveContext.isMasterQuest) {
} else if (IS_MASTER_QUEST) {
value = 1;
} else {
value = 0;
if (gSaveContext.n64ddFlag &&
if (IS_RANDO &&
!OTRGlobals::Instance->gRandomizer->masterQuestDungeons.empty() &&
OTRGlobals::Instance->gRandomizer->masterQuestDungeons.contains(sceneNum)) {
value = 1;
@ -1966,7 +1966,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
const int maxBufferSize = sizeof(font->msgBuf);
CustomMessage messageEntry;
s16 actorParams = 0;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Player* player = GET_PLAYER(play);
if (textId == TEXT_RANDOMIZER_CUSTOM_ITEM) {
if (player->getItemEntry.getItemId == RG_ICE_TRAP) {
@ -2131,14 +2131,14 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
// RANDOTODO: Implement a way to determine if an item came from a skulltula and
// inject the auto-dismiss control code if it did.
if (CVarGetInteger("gSkulltulaFreeze", 0) != 0 &&
!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
textId = TEXT_GS_NO_FREEZE;
} else {
textId = TEXT_GS_FREEZE;
}
// In vanilla, GS token count is incremented prior to the text box displaying
// In rando we need to bump the token count by one to show the correct count
s16 gsCount = gSaveContext.inventory.gsTokens + (gSaveContext.n64ddFlag ? 1 : 0);
s16 gsCount = gSaveContext.inventory.gsTokens + (IS_RANDO ? 1 : 0);
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId);
messageEntry.Replace("{{gsCount}}", std::to_string(gsCount));
}

View File

@ -286,7 +286,7 @@ void SaveManager::LoadRandomizerVersion2() {
void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool fullSave) {
if(!saveContext->n64ddFlag) return;
if(saveContext->questId != QUEST_RANDOMIZER) return;
SaveManager::Instance->SaveArray("itemLocations", RC_MAX, [&](size_t i) {
SaveManager::Instance->SaveStruct("", [&]() {
@ -456,12 +456,12 @@ void SaveManager::InitMeta(int fileNum) {
fileMetaInfo[fileNum].seedHash[i] = gSaveContext.seedIcons[i];
}
fileMetaInfo[fileNum].randoSave = gSaveContext.n64ddFlag;
fileMetaInfo[fileNum].randoSave = IS_RANDO;
// If the file is marked as a Master Quest file or if we're randomized and have at least one master quest dungeon, we need the mq otr.
fileMetaInfo[fileNum].requiresMasterQuest = gSaveContext.isMasterQuest > 0 || (gSaveContext.n64ddFlag && gSaveContext.mqDungeonCount > 0);
fileMetaInfo[fileNum].requiresMasterQuest = IS_MASTER_QUEST || (IS_RANDO && gSaveContext.mqDungeonCount > 0);
// If the file is not marked as Master Quest, it could still theoretically be a rando save with all 12 MQ dungeons, in which case
// we don't actually require a vanilla OTR.
fileMetaInfo[fileNum].requiresOriginal = !gSaveContext.isMasterQuest && (!gSaveContext.n64ddFlag || gSaveContext.mqDungeonCount < 12);
fileMetaInfo[fileNum].requiresOriginal = !IS_MASTER_QUEST && (!IS_RANDO || gSaveContext.mqDungeonCount < 12);
fileMetaInfo[fileNum].buildVersionMajor = gSaveContext.sohStats.buildVersionMajor;
fileMetaInfo[fileNum].buildVersionMinor = gSaveContext.sohStats.buildVersionMinor;
@ -617,7 +617,7 @@ void SaveManager::InitFileNormal() {
gSaveContext.pendingSale = ITEM_NONE;
gSaveContext.pendingSaleMod = MOD_NONE;
if (gSaveContext.isBossRush) {
if (IS_BOSS_RUSH) {
BossRush_InitSave();
}
@ -897,8 +897,8 @@ void SaveManager::SaveFileThreaded(int fileNum, SaveContext* saveContext, int se
nlohmann::json& sectionBlock = saveBlock["sections"][saveFuncInfo.name];
sectionBlock["version"] = sectionHandlerPair.second.version;
// If any save file is loaded for medatata, or a spoiler log is loaded (not sure which at this point), there is still data in the "randomizer" section
// This clears the randomizer data block if and only if the section being called is "randomizer" and n64ddFlag is false.
if (sectionHandlerPair.second.name == "randomizer" && !gSaveContext.n64ddFlag) {
// This clears the randomizer data block if and only if the section being called is "randomizer" and the current save file is not a randomizer save file.
if (sectionHandlerPair.second.name == "randomizer" && !IS_RANDO) {
sectionBlock["data"] = nlohmann::json::object();
continue;
}
@ -1119,7 +1119,11 @@ void SaveManager::LoadBaseVersion1() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
int isRando = 0;
SaveManager::Instance->LoadData("n64ddFlag", isRando);
if (isRando) {
gSaveContext.questId = QUEST_RANDOMIZER;
}
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@ -1260,7 +1264,11 @@ void SaveManager::LoadBaseVersion2() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
int isRando = 0;
SaveManager::Instance->LoadData("n64ddFlag", isRando);
if (isRando) {
gSaveContext.questId = QUEST_RANDOMIZER;
}
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@ -1426,7 +1434,11 @@ void SaveManager::LoadBaseVersion2() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
});
SaveManager::Instance->LoadData("isMasterQuest", gSaveContext.isMasterQuest);
int isMQ = 0;
SaveManager::Instance->LoadData("isMasterQuest", isMQ);
if (isMQ) {
gSaveContext.questId = QUEST_MASTER;
}
// Workaround for breaking save compatibility from 5.0.2 -> 5.1.0 in commit d7c35221421bf712b5ead56a360f81f624aca4bc
if (!gSaveContext.isMagicAcquired) {
@ -1468,7 +1480,11 @@ void SaveManager::LoadBaseVersion3() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
int isRando = 0;
SaveManager::Instance->LoadData("n64ddFlag", isRando);
if (isRando) {
gSaveContext.questId = QUEST_RANDOMIZER;
}
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@ -1656,7 +1672,11 @@ void SaveManager::LoadBaseVersion3() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
});
SaveManager::Instance->LoadData("isMasterQuest", gSaveContext.isMasterQuest);
int isMQ = 0;
SaveManager::Instance->LoadData("isMasterQuest", isMQ);
if (isMQ) {
gSaveContext.questId = QUEST_MASTER;
}
SaveManager::Instance->LoadStruct("backupFW", []() {
SaveManager::Instance->LoadStruct("pos", []() {
SaveManager::Instance->LoadData("x", gSaveContext.backupFW.pos.x);
@ -1686,7 +1706,11 @@ void SaveManager::LoadBaseVersion4() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
int isRando = 0;
SaveManager::Instance->LoadData("n64ddFlag", isRando);
if (isRando) {
gSaveContext.questId = QUEST_RANDOMIZER;
}
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@ -1829,7 +1853,11 @@ void SaveManager::LoadBaseVersion4() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
});
SaveManager::Instance->LoadData("isMasterQuest", gSaveContext.isMasterQuest);
int isMQ = 0;
SaveManager::Instance->LoadData("isMasterQuest", isMQ);
if (isMQ) {
gSaveContext.questId = QUEST_MASTER;
}
SaveManager::Instance->LoadStruct("backupFW", []() {
SaveManager::Instance->LoadStruct("pos", []() {
SaveManager::Instance->LoadData("x", gSaveContext.backupFW.pos.x);
@ -1859,7 +1887,7 @@ void SaveManager::SaveBase(SaveContext* saveContext, int sectionID, bool fullSav
SaveManager::Instance->SaveArray("playerName", ARRAY_COUNT(saveContext->playerName), [&](size_t i) {
SaveManager::Instance->SaveData("", saveContext->playerName[i]);
});
SaveManager::Instance->SaveData("n64ddFlag", saveContext->n64ddFlag);
SaveManager::Instance->SaveData("n64ddFlag", saveContext->questId == QUEST_RANDOMIZER);
SaveManager::Instance->SaveData("healthCapacity", saveContext->healthCapacity);
SaveManager::Instance->SaveData("health", saveContext->health);
SaveManager::Instance->SaveData("magicLevel", saveContext->magicLevel);
@ -1998,7 +2026,7 @@ void SaveManager::SaveBase(SaveContext* saveContext, int sectionID, bool fullSav
SaveManager::Instance->SaveArray("randomizerInf", ARRAY_COUNT(saveContext->randomizerInf), [&](size_t i) {
SaveManager::Instance->SaveData("", saveContext->randomizerInf[i]);
});
SaveManager::Instance->SaveData("isMasterQuest", saveContext->isMasterQuest);
SaveManager::Instance->SaveData("isMasterQuest", saveContext->questId == QUEST_MASTER);
SaveManager::Instance->SaveStruct("backupFW", [&]() {
SaveManager::Instance->SaveStruct("pos", [&]() {
SaveManager::Instance->SaveData("x", saveContext->backupFW.pos.x);
@ -2155,7 +2183,7 @@ void SaveManager::DeleteZeldaFile(int fileNum) {
}
bool SaveManager::IsRandoFile() {
return gSaveContext.n64ddFlag != 0 ? true : false;
return IS_RANDO;
}
// Functionality required to convert old saves into versioned saves

View File

@ -527,7 +527,7 @@ void DrawEnhancementsMenu() {
UIWidgets::PaddedEnhancementCheckbox("Better Owl", "gBetterOwl", true, false);
UIWidgets::Tooltip("The default response to Kaepora Gaebora is always that you understood what he said");
UIWidgets::PaddedEnhancementCheckbox("Fast Ocarina Playback", "gFastOcarinaPlayback", true, false);
bool forceSkipScarecrow = gSaveContext.n64ddFlag &&
bool forceSkipScarecrow = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SKIP_SCARECROWS_SONG);
static const char* forceSkipScarecrowText =
"This setting is forcefully enabled because a savefile\nwith \"Skip Scarecrow Song\" is loaded";
@ -645,7 +645,7 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Respawn with full health instead of 3 Hearts");
UIWidgets::PaddedEnhancementCheckbox("No Random Drops", "gNoRandomDrops", true, false);
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
bool forceEnableBombchuDrops = gSaveContext.n64ddFlag &&
bool forceEnableBombchuDrops = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1;
static const char* forceEnableBombchuDropsText =
"This setting is forcefully enabled because a savefile\nwith \"Enable Bombchu Drops\" is loaded.";
@ -849,7 +849,7 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Removes the input requirement on textboxes after defeating Ganon, allowing Credits sequence to continue to progress");
// Blue Fire Arrows
bool forceEnableBlueFireArrows = gSaveContext.n64ddFlag &&
bool forceEnableBlueFireArrows = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BLUE_FIRE_ARROWS);
static const char* forceEnableBlueFireArrowsText =
"This setting is forcefully enabled because a savefile\nwith \"Blue Fire Arrows\" is loaded.";
@ -858,7 +858,7 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Allows Ice Arrows to melt red ice.\nMay require a room reload if toggled during gameplay.");
// Sunlight Arrows
bool forceEnableSunLightArrows = gSaveContext.n64ddFlag &&
bool forceEnableSunLightArrows = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SUNLIGHT_ARROWS);
static const char* forceEnableSunLightArrowsText =
"This setting is forcefully enabled because a savefile\nwith \"Sunlight Arrows\" is loaded.";
@ -1518,7 +1518,7 @@ void DrawRandomizerMenu() {
(OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_VANILLA &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_OWN_DUNGEON &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_STARTWITH) ||
!gSaveContext.n64ddFlag) {
!IS_RANDO) {
disableKeyColors = false;
}

View File

@ -76,7 +76,7 @@ void OTRPlay_InitScene(PlayState* play, s32 spawn) {
OTRScene_ExecuteCommands(play, (LUS::Scene*)play->sceneSegment);
Play_InitEnvironment(play, play->skyboxId);
// Unpause the timer for Boss Rush when the scene loaded isn't the Chamber of Sages.
if (gSaveContext.isBossRush && play->sceneNum != SCENE_CHAMBER_OF_THE_SAGES) {
if (IS_BOSS_RUSH && play->sceneNum != SCENE_CHAMBER_OF_THE_SAGES) {
gSaveContext.isBossRushPaused = 0;
}
/* auto data = static_cast<LUS::Vertex*>(LUS::Context::GetInstance()

View File

@ -1988,7 +1988,7 @@ s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
(gSaveContext.n64ddFlag && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
(IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
(!(player->stateFlags1 & 0x20000800))) {
if ((getItemEntry.getItemId != GI_NONE)) {
player->getItemEntry = getItemEntry;
@ -2024,8 +2024,8 @@ s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEn
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
((!gSaveContext.n64ddFlag && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
(gSaveContext.n64ddFlag && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
(IS_RANDO && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & 0x20000800))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
@ -2066,7 +2066,7 @@ s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
((!gSaveContext.n64ddFlag && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (gSaveContext.n64ddFlag && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & 0x20000800))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;

View File

@ -246,7 +246,7 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
case 3:
if (sp3F != 0) {
Flags_SetEnv(play, 0);
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
Flags_SetEnv(play, 2);
}
}
@ -497,7 +497,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
// cmd->base == 8: Traveling back/forward in time cutscene
// cmd->base == 24: Dropping a fish for Jabu Jabu
// cmd->base == 33: Zelda escaping with impa cutscene
bool randoCsSkip = (gSaveContext.n64ddFlag && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
bool randoCsSkip = (IS_RANDO && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
bool debugCsSkip = (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger("gDebugEnabled", 0));
@ -2113,7 +2113,7 @@ void Cutscene_HandleEntranceTriggers(PlayState* play) {
u8 requiredAge;
s16 i;
if (gSaveContext.n64ddFlag &&
if (IS_RANDO &&
// don't skip epona escape cutscenes
gSaveContext.entranceIndex != 650 &&
gSaveContext.entranceIndex != 654 &&
@ -2151,9 +2151,9 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
const bool bShouldTowerRandoSkip =
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
(IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
gSaveContext.entranceIndex = 0x0123;
gSaveContext.cutsceneIndex = 0xFFF0;
@ -2161,12 +2161,12 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
} else if ((gSaveContext.entranceIndex == 0x00DB) && LINK_IS_ADULT && (Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) &&
(Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) && (Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) &&
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
gSaveContext.cutsceneIndex = 0xFFF0;
}
} else if ((gSaveContext.entranceIndex == 0x05E0) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
Item_Give(play, ITEM_OCARINA_FAIRY);
gSaveContext.entranceIndex = 0x011E;
@ -2175,7 +2175,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
} else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
gSaveContext.entranceIndex = 0x0053;
gSaveContext.cutsceneIndex = 0xFFF8;
@ -2187,7 +2187,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
gSaveContext.entranceIndex = 0x0517;
// In rando, skip the cutscene for the tower falling down after the escape.
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
return;
}
gSaveContext.cutsceneIndex = 0xFFF0;

View File

@ -381,7 +381,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f;
// Offset keys in randomizer slightly higher for their GID replacement
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
yOffset = 350.0f;
} else {
yOffset = 430.0f;
@ -488,7 +488,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
if (gSaveContext.n64ddFlag && randoCheck != RC_UNKNOWN_CHECK) {
if (IS_RANDO && randoCheck != RC_UNKNOWN_CHECK) {
this->randoGiEntry =
Randomizer_GetItemFromKnownCheck(randoCheck, getItemId);
this->randoGiEntry.getItemFrom = ITEM_FROM_FREESTANDING;
@ -578,7 +578,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
if (!Actor_HasParent(&this->actor, play)) {
if (getItemId != GI_NONE) {
if (!gSaveContext.n64ddFlag || this->randoGiEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->randoGiEntry.getItemId == GI_NONE) {
func_8002F554(&this->actor, play, getItemId);
} else {
GiveItemEntryFromActorWithFixedRange(&this->actor, play, this->randoGiEntry);
@ -731,7 +731,7 @@ void func_8001E5C8(EnItem00* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (this->getItemId != GI_NONE) {
if (!Actor_HasParent(&this->actor, play)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->getItemId, 50.0f, 80.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->randoGiEntry, 50.0f, 80.0f);
@ -783,7 +783,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
this->actor.params == ITEM00_BOMBS_SPECIAL || this->actor.params == ITEM00_BOMBCHU) {
if (CVarGetInteger("gNewDrops", 0) ||
// Keys in randomizer need to always rotate for their GID replacement
(gSaveContext.n64ddFlag && this->actor.params == ITEM00_SMALL_KEY)) {
(IS_RANDO && this->actor.params == ITEM00_SMALL_KEY)) {
this->actor.shape.rot.y += 960;
} else {
this->actor.shape.rot.y = 0;
@ -951,7 +951,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
params = &this->actor.params;
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
if (!gSaveContext.n64ddFlag || this->randoGiEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->randoGiEntry.getItemId == GI_NONE) {
func_8002F554(&this->actor, play, getItemId);
} else {
getItemId = this->randoGiEntry.getItemId;
@ -1046,7 +1046,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
}
break;
case ITEM00_HEART_PIECE:
if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
mtxScale = 21.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_HEART_PIECE);
@ -1156,7 +1156,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
break;
}
case ITEM00_SMALL_KEY:
if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
mtxScale = 8.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_KEY_SMALL);
@ -1362,7 +1362,7 @@ static const Vtx customDropVtx[] = {
* Draw Function used for most collectible types of En_Item00 (ammo, bombs, sticks, nuts, magic...).
*/
void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
if (gSaveContext.n64ddFlag && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
if (IS_RANDO && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
@ -1456,7 +1456,7 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
* Draw Function used for the Piece of Heart type of En_Item00.
*/
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
@ -1533,7 +1533,7 @@ s16 func_8001F404(s16 dropId) {
}
if ((CVarGetInteger("gBombchuDrops", 0) ||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
(IS_RANDO && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) {
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
}

View File

@ -33,7 +33,7 @@ void GameOver_Update(PlayState* play) {
gSaveContext.eventInf[1] &= ~1;
// search inventory for spoiling items and revert if necessary
if (!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
if (!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
if (INV_CONTENT(ITEM_POCKET_EGG) == gSpoilingItems[i]) {
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];

View File

@ -73,8 +73,8 @@ void func_8006D0EC(PlayState* play, Player* player) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true);
assert(horseActor != NULL);
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!gSaveContext.n64ddFlag ||
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!IS_RANDO ||
(IS_RANDO && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
// "Set by existence of horse %d %d %d"
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),

View File

@ -57,7 +57,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
PauseContext* pauseCtx = &play->pauseCtx;
if (!gSaveContext.sohStats.gameComplete &&
(!gSaveContext.isBossRush || !gSaveContext.isBossRushPaused)) {
(!IS_BOSS_RUSH || !gSaveContext.isBossRushPaused)) {
gSaveContext.sohStats.pauseTimer++;
}

View File

@ -394,8 +394,8 @@ void Map_InitData(PlayState* play, s16 room) {
}
} else if (play->sceneNum == SCENE_LAKE_HYLIA) {
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) &&
((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) ||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)))) {
((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) ||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)))) {
extendedMapIndex = 0x15;
}
} else if (play->sceneNum == SCENE_GERUDO_VALLEY) {
@ -403,8 +403,8 @@ void Map_InitData(PlayState* play, s16 room) {
extendedMapIndex = 0x16;
}
} else if (play->sceneNum == SCENE_GERUDOS_FORTRESS) {
if ((!gSaveContext.n64ddFlag && GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) ||
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
if ((!IS_RANDO && GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) ||
(IS_RANDO && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
extendedMapIndex = 0x17;
}
}

View File

@ -1617,9 +1617,9 @@ void Message_OpenText(PlayState* play, u16 textId) {
// Increments text id based on piece of heart count, assumes the piece of heart text is all
// in order and that you don't have more than the intended amount of heart pieces.
textId += (gSaveContext.inventory.questItems & 0xF0000000 & 0xF0000000) >> 0x1C;
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
} else if (!IS_RANDO && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
textId = 0xB; // Traded Giant's Knife for Biggoron Sword
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xB4 && (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE)))) {
} else if (!IS_RANDO && (msgCtx->textId == 0xB4 && (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE)))) {
textId = 0xB5; // Destroyed Gold Skulltula
}
// Ocarina Staff + Dialog
@ -2517,7 +2517,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->lastPlayedSong < OCARINA_SONG_SARIAS &&
(msgCtx->ocarinaAction < OCARINA_ACTION_PLAYBACK_MINUET ||
msgCtx->ocarinaAction >= OCARINA_ACTION_PLAYBACK_SARIA)) {
if (msgCtx->disableWarpSongs || (interfaceCtx->restrictions.warpSongs == 3 && !gSaveContext.n64ddFlag)) {
if (msgCtx->disableWarpSongs || (interfaceCtx->restrictions.warpSongs == 3 && !IS_RANDO)) {
Message_StartTextbox(play, 0x88C, NULL); // "You can't warp here!"
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if ((gSaveContext.eventInf[0] & 0xF) != 1) {
@ -2603,7 +2603,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->lastPlayedSong = msgCtx->ocarinaStaff->state;
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_SUCCESS;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
Item_Give(play, ITEM_SONG_MINUET + gOcarinaSongItemMap[msgCtx->ocarinaStaff->state]);
}

View File

@ -792,7 +792,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
case 4100:
csInfo->keyFrames = D_801225D4;
// RANDO: Waterfall opening cutscene skips to the end of the cutscene data earlier by doing this
if (!(gSaveContext.n64ddFlag)) {
if (!(IS_RANDO)) {
csInfo->keyFrameCnt = 5;
} else {
csInfo->keyFrameCnt = 2;

View File

@ -884,7 +884,7 @@ void func_80083108(PlayState* play) {
}
}
// Don't hide the HUD in the Chamber of Sages when in Boss Rush.
} else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !gSaveContext.isBossRush) {
} else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !IS_BOSS_RUSH) {
Interface_ChangeAlpha(1);
} else if (play->sceneNum == SCENE_FISHING_POND) {
gSaveContext.unk_13E7 = 2;
@ -1413,7 +1413,7 @@ void Inventory_SwapAgeEquipment(void) {
// When becoming adult, remove swordless flag since we'll get master sword
// Only in rando to keep swordless link bugs in vanilla
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Flags_UnsetInfTable(INFTABLE_SWORDLESS);
}
@ -1467,7 +1467,7 @@ void Inventory_SwapAgeEquipment(void) {
} else {
// When becoming child, set swordless flag if player doesn't have kokiri sword
// Only in rando to keep swordless link bugs in vanilla
if (gSaveContext.n64ddFlag && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
if (IS_RANDO && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
Flags_SetInfTable(INFTABLE_SWORDLESS);
}
@ -1533,7 +1533,7 @@ void Inventory_SwapAgeEquipment(void) {
gSaveContext.equips.equipment = gSaveContext.childEquips.equipment;
gSaveContext.equips.equipment &= 0xFFF0;
gSaveContext.equips.equipment |= 0x0001;
} else if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_STARTING_AGE) == RO_AGE_ADULT) {
} else if (IS_RANDO && Randomizer_GetSettingValue(RSK_STARTING_AGE) == RO_AGE_ADULT) {
/*If in rando and starting age is adult, childEquips is not initialized and buttonItems[0]
will be ITEM_NONE. When changing age from adult -> child, reset equips to "default"
(only kokiri tunic/boots equipped, no sword, no C-button items, no D-Pad items).
@ -1837,7 +1837,7 @@ u8 Item_Give(PlayState* play, u8 item) {
// In rando, when buying Giant's Knife, also check
// for 0xE in case we don't have Kokiri Sword
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (IS_RANDO && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD];
@ -1944,13 +1944,13 @@ u8 Item_Give(PlayState* play, u8 item) {
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_WALLET_ADULT) {
Inventory_ChangeUpgrade(UPG_WALLET, 1);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(200);
}
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_WALLET_GIANT) {
Inventory_ChangeUpgrade(UPG_WALLET, 2);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(500);
}
return Return_Item(item, MOD_NONE, ITEM_NONE);
@ -1994,7 +1994,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
}
// update the adult/child equips when rando'd (accounting for equp swapped hookshot as child)
if (gSaveContext.n64ddFlag && LINK_IS_CHILD) {
if (IS_RANDO && LINK_IS_CHILD) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.adultEquips.buttonItems); i++) {
if (gSaveContext.adultEquips.buttonItems[i] == ITEM_HOOKSHOT) {
gSaveContext.adultEquips.buttonItems[i] = ITEM_LONGSHOT;
@ -2004,7 +2004,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
}
}
if (gSaveContext.n64ddFlag && LINK_IS_ADULT) {
if (IS_RANDO && LINK_IS_ADULT) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); i++) {
if (gSaveContext.childEquips.buttonItems[i] == ITEM_HOOKSHOT) {
gSaveContext.childEquips.buttonItems[i] = ITEM_LONGSHOT;
@ -2149,7 +2149,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
// update the adult/child equips when rando'd
if (gSaveContext.n64ddFlag && LINK_IS_CHILD) {
if (IS_RANDO && LINK_IS_CHILD) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.adultEquips.buttonItems); i++) {
if (gSaveContext.adultEquips.buttonItems[i] == ITEM_OCARINA_FAIRY) {
gSaveContext.adultEquips.buttonItems[i] = ITEM_OCARINA_TIME;
@ -2159,7 +2159,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
}
}
if (gSaveContext.n64ddFlag && LINK_IS_ADULT) {
if (IS_RANDO && LINK_IS_ADULT) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); i++) {
if (gSaveContext.childEquips.buttonItems[i] == ITEM_OCARINA_FAIRY) {
gSaveContext.childEquips.buttonItems[i] = ITEM_OCARINA_TIME;
@ -2515,7 +2515,7 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
if (item == RG_TYCOON_WALLET) {
Inventory_ChangeUpgrade(UPG_WALLET, 3);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(999);
}
return Return_Item_Entry(giEntry, RG_NONE);
@ -2576,7 +2576,7 @@ u8 Item_CheckObtainability(u8 item) {
osSyncPrintf("item_get_non_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.inventory.items[slot]);
osSyncPrintf(VT_RST);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (item == ITEM_SINGLE_MAGIC || item == ITEM_DOUBLE_MAGIC || item == ITEM_DOUBLE_DEFENSE) {
return ITEM_NONE;
}
@ -2593,25 +2593,25 @@ u8 Item_CheckObtainability(u8 item) {
return ITEM_NONE;
} else if ((gBitFlags[item - ITEM_SWORD_KOKIRI] << gEquipShifts[EQUIP_SWORD]) &
gSaveContext.inventory.equipment) {
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
} else if ((item >= ITEM_SHIELD_DEKU) && (item <= ITEM_SHIELD_MIRROR)) {
if ((gBitFlags[item - ITEM_SHIELD_DEKU] << gEquipShifts[EQUIP_SHIELD]) & gSaveContext.inventory.equipment) {
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
} else if ((item >= ITEM_TUNIC_KOKIRI) && (item <= ITEM_TUNIC_ZORA)) {
if ((gBitFlags[item - ITEM_TUNIC_KOKIRI] << gEquipShifts[EQUIP_TUNIC]) & gSaveContext.inventory.equipment) {
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
} else if ((item >= ITEM_BOOTS_KOKIRI) && (item <= ITEM_BOOTS_HOVER)) {
if ((gBitFlags[item - ITEM_BOOTS_KOKIRI] << gEquipShifts[EQUIP_BOOTS]) & gSaveContext.inventory.equipment) {
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
@ -2828,7 +2828,7 @@ s32 Inventory_ConsumeFairy(PlayState* play) {
}
bool Inventory_HatchPocketCucco(PlayState* play) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
return Inventory_ReplaceItem(play, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
}
@ -5096,7 +5096,7 @@ void Interface_Draw(PlayState* play) {
}
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor.r, rColor.g, rColor.b, interfaceCtx->magicAlpha);
// Draw Rupee icon. Hide in Boss Rush.
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, PosX_RC, PosY_RC, 16, 16, 1 << 10, 1 << 10);
}
@ -5214,7 +5214,7 @@ void Interface_Draw(PlayState* play) {
svar5 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)];
// Draw Rupee Counter. Hide in Boss Rush.
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
for (svar1 = 0, svar3 = 16; svar1 < svar5; svar1++, svar2++, svar3 += 8) {
OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]),
8, 16, PosX_RC + svar3, PosY_RC, 8, 16, 1 << 10, 1 << 10);
@ -6152,7 +6152,7 @@ void Interface_Draw(PlayState* play) {
void Interface_DrawTotalGameplayTimer(PlayState* play) {
// Draw timer based on the Gameplay Stats total time.
if ((gSaveContext.isBossRush && gSaveContext.bossRushOptions[BR_OPTIONS_TIMER] == BR_CHOICE_TIMER_YES) ||
if ((IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_TIMER] == BR_CHOICE_TIMER_YES) ||
(CVarGetInteger("gGameplayStats.ShowIngameTimer", 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2)) {
s32 X_Margins_Timer = 0;
@ -6639,7 +6639,7 @@ void Interface_Update(PlayState* play) {
play->nextEntranceIndex = gSaveContext.entranceIndex;
// In ER, handle sun song respawn from last entrance from grottos
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_ForceGrottoReturn();
}

View File

@ -179,7 +179,7 @@ void Play_Destroy(GameState* thisx) {
}
// In ER, remove link from epona when entering somewhere that doesn't support epona
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
Entrance_HandleEponaState();
}
@ -469,7 +469,7 @@ void Play_Init(GameState* thisx) {
// eventChkInf[5] & 0x200 = Got Impa's reward
// entranceIndex 0x7A, Castle Courtyard - Day from crawlspace
// entranceIndex 0x400, Zelda's Courtyard
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
if (gSaveContext.entranceIndex == 0x7A) {
gSaveContext.entranceIndex = 0x400;
@ -1181,7 +1181,7 @@ void Play_Update(PlayState* play) {
play->gameplayFrames++;
// Gameplay stat tracking
if (!gSaveContext.sohStats.gameComplete &&
(!gSaveContext.isBossRush || (gSaveContext.isBossRush && !gSaveContext.isBossRushPaused))) {
(!IS_BOSS_RUSH || (IS_BOSS_RUSH && !gSaveContext.isBossRushPaused))) {
gSaveContext.sohStats.playTimer++;
gSaveContext.sohStats.sceneTimer++;
gSaveContext.sohStats.roomTimer++;
@ -1419,7 +1419,7 @@ skip:
Environment_Update(play, &play->envCtx, &play->lightCtx, &play->pauseCtx, &play->msgCtx,
&play->gameOverCtx, play->state.gfxCtx);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GivePlayerRandoRewardSariaGift(play, RC_LW_GIFT_FROM_SARIA);
GivePlayerRandoRewardSongOfTime(play, RC_SONG_FROM_OCARINA_OF_TIME);
GivePlayerRandoRewardZeldaLightArrowsGift(play, RC_TOT_LIGHT_ARROWS_CUTSCENE);
@ -1918,7 +1918,7 @@ void* Play_LoadFile(PlayState* play, RomFile* file) {
void Play_InitEnvironment(PlayState* play, s16 skyboxId) {
// For entrance rando, ensure the correct weather state and sky mode is applied
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Entrance_OverrideWeatherState();
}
Skybox_Init(&play->state, &play->skyboxCtx, skyboxId);
@ -1955,7 +1955,7 @@ void Play_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn) {
OTRPlay_SpawnScene(play, sceneNum, spawn);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Entrance_OverrideSpawnScene(sceneNum, spawn);
}
}

View File

@ -579,7 +579,7 @@ s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
size_t size;
// In ER, override roomNum to load based on scene and spawn
if (gSaveContext.n64ddFlag && gSaveContext.respawnFlag <= 0 &&
if (IS_RANDO && gSaveContext.respawnFlag <= 0 &&
Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
roomNum = Entrance_OverrideSpawnSceneRoom(play->sceneNum, play->curSpawn, roomNum);
}

View File

@ -2091,7 +2091,7 @@ void func_8009EE44(PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
bool playerHasCojiro = INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO;
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
playerHasCojiro = PLAYER_HAS_SHUFFLED_ADULT_TRADE_ITEM(ITEM_COJIRO);
}
if ((play->roomCtx.unk_74[0] == 0) && playerHasCojiro) {

View File

@ -155,7 +155,7 @@ void Sram_OpenSave() {
}
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !gSaveContext.n64ddFlag) {
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !IS_RANDO) {
i = gSaveContext.eventChkInf[4] & ~1;
gSaveContext.eventChkInf[4] = i;
@ -176,7 +176,7 @@ void Sram_OpenSave() {
gSaveContext.equips.equipment |= 2;
}
if (!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
if (!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[i]) {
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
@ -218,11 +218,10 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset];
}
gSaveContext.n64ddFlag = fileChooseCtx->n64ddFlag;
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
// Set N64DD Flags for save file
fileChooseCtx->n64ddFlags[fileChooseCtx->buttonIndex] = 1;
fileChooseCtx->n64ddFlag = 1;
gSaveContext.n64ddFlag = 1;
gSaveContext.questId = 2;
Randomizer_InitSaveFile();
}

View File

@ -106,7 +106,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) {
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
// Initialize this with the mud wall, so it can't be affected by toggling while the actor is loaded
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
@ -275,7 +275,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
}
// Break the floor immediately in Boss Rush so the player can jump in the hole immediately.
if (this->collider.base.acFlags & 2 || blueFireArrowHit || gSaveContext.isBossRush) {
if (this->collider.base.acFlags & 2 || blueFireArrowHit || IS_BOSS_RUSH) {
Vec3f effectPos;
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;

View File

@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
if (Flags_GetSwitch(play, 0x38)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
if(gSaveContext.n64ddFlag) {
if(IS_RANDO) {
gSaveContext.healthAccumulator = 0x140;
Magic_Fill(play);
if(Flags_GetTreasure(play, this->fountainType + 1)) {

View File

@ -45,8 +45,8 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
this->somePos.y = thisx->world.pos.y;
this->somePos.z = thisx->world.pos.z;
if (((Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) ||
(!gSaveContext.n64ddFlag && (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) ||
(gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
(!IS_RANDO && (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) ||
(IS_RANDO && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
(play->sceneNum == SCENE_KAKARIKO_VILLAGE)) {
thisx->world.pos.x = -89.0f;
thisx->world.pos.z = -1375.0f;

View File

@ -51,7 +51,7 @@ void BgGjyoBridge_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
int bridge = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE);
if (Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT) || (gSaveContext.n64ddFlag && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
if (Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT) || (IS_RANDO && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
this->actionFunc = func_808787A4;
} else {
this->dyna.actor.draw = NULL;
@ -84,7 +84,7 @@ u8 CheckPlayerPosition(Player* player, PlayState* play) {
void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
(INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) && CheckPlayerPosition(player, play)) {
LaunchBridgeCutscene(this, play);
@ -146,7 +146,7 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play) {
}
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) {
if (gSaveContext.n64ddFlag || (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) &&
if (IS_RANDO || (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) &&
(play->csCtx.npcActions[2]->action == 2)) {
this->dyna.actor.draw = BgGjyoBridge_Draw;
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);

View File

@ -105,7 +105,7 @@ void func_80890740(BgIceShelter* this, PlayState* play) {
s32 type = (this->dyna.actor.params >> 8) & 7;
// Initialize this with the red ice, so it can't be affected by toggling while the actor is loaded
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
Collider_InitCylinder(play, &this->cylinder1);
// If "Blue Fire Arrows" is enabled, set up a collider on the red ice that responds to them

View File

@ -82,7 +82,7 @@ void BgSpot00Hanebasi_Init(Actor* thisx, PlayState* play) {
if (gSaveContext.sceneSetupIndex != 6) {
// Don't close the bridge in rando to accomodate hyrule castle exit
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && !(gSaveContext.n64ddFlag)) {
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && !(IS_RANDO)) {
this->dyna.actor.shape.rot.x = -0x4000;
}
}

View File

@ -49,7 +49,7 @@ void BgSpot01Idosoko_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
// If dungeon entrance randomizer is on, remove the well stone as adult Link when
// child Link has drained the water to the well
if (!LINK_IS_ADULT || (gSaveContext.n64ddFlag &&
if (!LINK_IS_ADULT || (IS_RANDO &&
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO))) {
Actor_Kill(&this->dyna.actor);

View File

@ -131,7 +131,7 @@ void func_808AC908(BgSpot02Objects* this, PlayState* play) {
// We want to do most of the same things in rando, but we're not in a cutscene and the flag for
// destroying the royal tombstone is already set.
if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
if (IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
this->timer = 25;
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
@ -174,7 +174,7 @@ void func_808ACA08(BgSpot02Objects* this, PlayState* play) {
// This shouldn't execute in rando even without the check since we never
// enter the cutscene context.
if (play->csCtx.frames == 402 && !(gSaveContext.n64ddFlag)) {
if (play->csCtx.frames == 402 && !(IS_RANDO)) {
if (!LINK_IS_ADULT) {
Player_PlaySfx(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE_KID);
} else {
@ -220,7 +220,7 @@ void func_808ACC34(BgSpot02Objects* this, PlayState* play) {
// This is the actionFunc that the game settles on when you load the Graveyard
// When we're in rando and the flag for the gravestone being destroyed gets set,
// set the actionFunc to the function where the gravestone explodes.
if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
if (IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
this->actionFunc = func_808AC908;
}

View File

@ -217,7 +217,7 @@ void BgSpot06Objects_Destroy(Actor* thisx, PlayState* play) {
// Due to Ships resource caching, the water box collisions for the river have to be manually reset
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z;
if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)) {
if (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)) {
// For randomizer when leaving lake hylia while the water level is lowered,
// reset the "raise lake hylia water" flag back to on if the water temple is cleared
Flags_SetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER);
@ -451,7 +451,7 @@ void BgSpot06Objects_Update(Actor* thisx, PlayState* play) {
}
// Bail early for water control system for child or non-rando
if (LINK_IS_CHILD || !gSaveContext.n64ddFlag) {
if (LINK_IS_CHILD || !IS_RANDO) {
return;
}
@ -596,7 +596,7 @@ void BgSpot06Objects_WaterPlaneCutsceneRise(BgSpot06Objects* this, PlayState* pl
this->actionFunc = BgSpot06Objects_DoNothing;
// On rando, this is used with the water control system switch to finalize raising the water
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
this->lakeHyliaWaterLevel = 0;
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_RAISED;
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z;

View File

@ -60,7 +60,7 @@ void BgSpot12Saku_Init(Actor* thisx, PlayState* play) {
// If ER is on, force the gate to always use its permanent flag
// (which it only uses in Child Gerudo Fortress in the vanilla game)
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) {
thisx->params = 0x0002;
}
@ -132,7 +132,7 @@ void BgSpot12Saku_Update(Actor* thisx, PlayState* play) {
BgSpot12Saku* this = (BgSpot12Saku*)thisx;
// If ER is on, when the guard opens the GtG gate its permanent flag will be set.
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
Flags_GetSwitch(play, 0x3A)) {
Flags_SetSwitch(play, 0x2);
}

View File

@ -74,7 +74,7 @@ void BgTokiSwd_Init(Actor* thisx, PlayState* play) {
BgTokiSwd_SetupAction(this, func_808BAF40);
if (LINK_IS_ADULT) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (!CUR_UPG_VALUE(UPG_BOMB_BAG)) {
for (size_t i = 0; i < 8; i++) {
if (gSaveContext.equips.buttonItems[i] == ITEM_BOMB) {
@ -84,7 +84,7 @@ void BgTokiSwd_Init(Actor* thisx, PlayState* play) {
}
}
this->actor.draw = NULL;
} else if (gSaveContext.n64ddFlag) {
} else if (IS_RANDO) {
// don't give child link a kokiri sword if we don't have one
uint32_t kokiriSwordBitMask = 1 << 0;
if (!(gSaveContext.inventory.equipment & kokiriSwordBitMask)) {
@ -119,7 +119,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
gSaveContext.cutsceneTrigger = 1;
}
if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !gSaveContext.n64ddFlag) || gSaveContext.n64ddFlag) {
if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !IS_RANDO) || IS_RANDO) {
if (Actor_HasParent(&this->actor, play)) {
if (!LINK_IS_ADULT) {
Item_Give(play, ITEM_SWORD_MASTER);
@ -135,7 +135,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
} else {
Player* player = GET_PLAYER(play);
if (Actor_IsFacingPlayer(&this->actor, 0x2000) &&
(!gSaveContext.n64ddFlag || (gSaveContext.n64ddFlag && player->getItemId == GI_NONE))) {
(!IS_RANDO || (IS_RANDO && player->getItemId == GI_NONE))) {
func_8002F580(&this->actor, play);
}
}

View File

@ -75,7 +75,7 @@ void BgTreemouth_Init(Actor* thisx, PlayState* play) {
BgTreemouth_SetupAction(this, func_808BC8B8);
// If dungeon entrance randomizer is on, keep the tree mouth open
// when Link is adult and sword & shield have been shown to Mido
} else if ((LINK_IS_ADULT && (!gSaveContext.n64ddFlag ||
} else if ((LINK_IS_ADULT && (!IS_RANDO ||
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) == RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) ||
!Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) || (gSaveContext.sceneSetupIndex == 7)) {
this->unk_168 = 0.0f;

View File

@ -1631,7 +1631,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
if (this->unk_1DA == 820) {
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_Spawn(
&play->actorCtx, play, ACTOR_ITEM_B_HEART,
Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x, this->actor.world.pos.y,
@ -1650,7 +1650,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD);
} else {
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_ADULT, false);

View File

@ -913,7 +913,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->actionFunc = BossFd_Wait;
this->actor.world.pos.y -= 1000.0f;
}
if (this->timers[0] == 7 && !gSaveContext.isBossRush) {
if (this->timers[0] == 7 && !IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
}

View File

@ -789,7 +789,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) {
this->deathCamera = 0;
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0,
0, WARP_DUNGEON_ADULT);
} else {

View File

@ -570,7 +570,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
this->csCamFov = 60.0f;
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE) || gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE) || IS_RANDO || IS_BOSS_RUSH) {
// watched cutscene already, skip most of it
this->csState = 17;
this->csTimer = 0;
@ -581,7 +581,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
BossGanon_SetIntroCsCamera(this, 11);
this->unk_198 = 2;
this->timers[2] = 110;
if (!(gSaveContext.isBossRush && gSaveContext.bossRushOptions[BR_OPTIONS_HEAL] == BR_CHOICE_HEAL_NEVER)) {
if (!(IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_HEAL] == BR_CHOICE_HEAL_NEVER)) {
gSaveContext.healthAccumulator = 0x140;
}
Audio_QueueSeqCmd(NA_BGM_STOP);
@ -904,7 +904,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csTimer = 0;
this->csCamFov = 60.0f;
BossGanon_SetIntroCsCamera(this, 12);
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
if (!IS_RANDO && !IS_BOSS_RUSH) {
Message_StartTextbox(play, 0x70CB, NULL);
}
}
@ -928,7 +928,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csState = 19;
this->csTimer = 0;
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Message_StartTextbox(play, 0x70CC, NULL);
}
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfRaiseHandStartAnim, -5.0f);
@ -972,7 +972,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if ((this->csTimer > 80) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
// In rando, skip past dark waves section straight to title card phase of the cutscene.
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
if (IS_RANDO || IS_BOSS_RUSH) {
this->timers[2] = 30;
this->csCamAt.x = this->unk_1FC.x - 10.0f;
this->csCamAt.y = this->unk_1FC.y + 30.0f;
@ -1282,7 +1282,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
// Skip Ganondorf dying and go straight to next scene.
// The cutscene skip met a mixed reaction, so until we figure out a better way of doing it,
// it will stay not-skipped outside of Boss Rush (originally implemented for randomizer).
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
this->csState = 1;
this->csTimer = 0;
} else {
@ -1539,7 +1539,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 180) {
play->sceneLoadFlag = 0x14;
if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || gSaveContext.isBossRush)) {
if ((IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || IS_BOSS_RUSH)) {
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
play->nextEntranceIndex = 0x517;
}
@ -1562,7 +1562,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
sBossGanonZelda = (EnZl3*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ZL3, 0.0f,
6000.0f, 0.0f, 0, 0, 0, 0x2000);
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
if (!IS_RANDO && !IS_BOSS_RUSH) {
this->csState = 101;
} else {
this->skelAnime.playSpeed = 1.0f;
@ -1690,7 +1690,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
// fallthrough
case 104:
// In rando, fade out the white here as the earlier part is skipped.
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
if (IS_RANDO || IS_BOSS_RUSH) {
Math_ApproachZeroF(&this->whiteFillAlpha, 1.0f, 10.0f);
}
@ -1712,7 +1712,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 50) {
// In rando, skip the rest of the cutscene after the crystal around Zelda dissapears.
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
if (!IS_RANDO && !IS_BOSS_RUSH) {
sBossGanonZelda->unk_3C8 = 4;
} else {
this->csState = 108;

View File

@ -234,7 +234,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
sBossGanon2Zelda->actor.shape.rot.y = -0x7000;
// In rando, skip past the cutscene to the part where the player takes control again.
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
if (!IS_RANDO && !IS_BOSS_RUSH) {
this->csState = 1;
this->csTimer = 0;
} else {

View File

@ -959,12 +959,12 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
case DEATH_THROES:
switch (this->work[GND_ACTION_STATE]) {
case DEATH_SPASM:
if (Animation_OnFrame(&this->skelAnime, this->fwork[GND_END_FRAME]) && !gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
if (Animation_OnFrame(&this->skelAnime, this->fwork[GND_END_FRAME]) && !IS_RANDO && !IS_BOSS_RUSH) {
this->fwork[GND_END_FRAME] = Animation_GetLastFrame(&gPhantomGanonAirDamageAnim);
Animation_Change(&this->skelAnime, &gPhantomGanonAirDamageAnim, 0.5f, 0.0f,
this->fwork[GND_END_FRAME], ANIMMODE_ONCE_INTERP, 0.0f);
this->work[GND_ACTION_STATE] = DEATH_LIMP;
} else if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
} else if (IS_RANDO || IS_BOSS_RUSH) {
// Skip to death scream animation and move ganondrof to middle
this->deathState = DEATH_SCREAM;
this->timers[0] = 50;
@ -991,7 +991,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
bodyDecayLevel = 1;
break;
}
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
if (IS_RANDO || IS_BOSS_RUSH) {
break;
}
Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8);
@ -1105,7 +1105,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
this->deathCamera = 0;
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0, true);
}

View File

@ -1118,7 +1118,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
this->timer = 70;
this->decayingProgress = 0;
this->subCameraFollowSpeed = 0.0f;
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
}
@ -1152,7 +1152,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
}
}
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, childPos.x,
this->actor.world.pos.y, childPos.z, 0, 0, 0, WARP_DUNGEON_CHILD);
} else {

View File

@ -1116,7 +1116,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
BossMo_SpawnDroplet(MO_FX_DROPLET, (BossMoEffect*)play->specialEffects, &spD4, &spE0,
((300 - indS1) * .0015f) + 0.13f);
}
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1,
this->actor.world.pos.x, -280.0f, this->actor.world.pos.z, 0, 0, 0,
WARP_DUNGEON_ADULT);

View File

@ -1204,7 +1204,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) {
} else if (this->effects[0].alpha == 0) {
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y, ROOM_CENTER_Z, 0, 0, 0,
WARP_DUNGEON_ADULT, true);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART,
(Math_SinS(this->actor.shape.rot.y) * 200.0f) + ROOM_CENTER_X, ROOM_CENTER_Y,
Math_CosS(this->actor.shape.rot.y) * 200.0f + ROOM_CENTER_Z, 0, 0, 0, 0, true);

View File

@ -2365,7 +2365,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
sp35 = 0;
// Skip ahead to last part of the cutscene in rando
if (this->work[CS_TIMER_2] == 10 && (gSaveContext.n64ddFlag || gSaveContext.isBossRush)) {
if (this->work[CS_TIMER_2] == 10 && (IS_RANDO || IS_BOSS_RUSH)) {
this->work[CS_TIMER_2] = 860;
}
@ -2550,7 +2550,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
// Add separate timings for the "beam" that opens and closes around the sisters
// Needed because we skip ahead in cutscene timer value so it never gets called otherwise
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
if (IS_RANDO || IS_BOSS_RUSH) {
if (this->work[CS_TIMER_2] < 900) {
Math_ApproachF(&this->workf[UNK_F18], 255.0f, 0.1f, 5.0f);
} else if (this->work[CS_TIMER_2] > 910) {
@ -2795,7 +2795,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0,
0, 0, WARP_DUNGEON_ADULT);
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0, true);

View File

@ -1653,7 +1653,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
func_8002DF54(play, &this->actor, 7);
sCsState++;
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
}
@ -1665,7 +1665,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
}
}
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RU1, sWarpPos[sp7C].x, sWarpPos[sp7C].y,
sWarpPos[sp7C].z, 0, 0, 0, 0, true);
} else {

View File

@ -142,7 +142,7 @@ f32 DemoEffect_InterpolateCsFrames(PlayState* play, s32 csActionId) {
*/
void DemoEffect_InitJewel(PlayState* play, DemoEffect* this) {
this->initDrawFunc = DemoEffect_DrawJewel;
if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) {
if (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) {
this->initDrawFunc = DemoEffect_DrawGetItem;
}
if (!LINK_IS_ADULT) {
@ -156,7 +156,7 @@ void DemoEffect_InitJewel(PlayState* play, DemoEffect* this) {
Actor_SetScale(&this->actor, 0.10f);
}
this->csActionId = 1;
this->actor.shape.rot.x = (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) ? 0 : 16384;
this->actor.shape.rot.x = (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) ? 0 : 16384;
DemoEffect_InitJewelColor(this);
this->jewel.alpha = 0;
this->jewelCsRotation.x = this->jewelCsRotation.y = this->jewelCsRotation.z = 0;
@ -635,7 +635,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
Actor_SetScale(thisx, 0.20f);
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
switch (play->csCtx.npcActions[this->csActionId]->action) {
case 2:
DemoEffect_MedalSparkle(this, play, 0);
@ -648,7 +648,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
switch (play->csCtx.npcActions[this->csActionId]->action) {
case 2:
if (gSaveContext.entranceIndex == 0x0053 ||
(gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
(IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
} else {
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
@ -664,7 +664,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
this->actor.shape.rot.y += this->getItem.rotation;
}
if (gSaveContext.entranceIndex == 0x0053 ||
(gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
(IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
} else {
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
@ -1545,7 +1545,7 @@ void DemoEffect_UpdateJewelAdult(DemoEffect* this, PlayState* play) {
this->actor.shape.rot.y += 0x0400;
DemoEffect_PlayJewelSfx(this, play);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
switch (this->jewel.type) {
case DEMO_EFFECT_JEWEL_KOKIRI:
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
@ -1615,14 +1615,14 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
default:
DemoEffect_MoveToCsEndpoint(this, play, this->csActionId, 0);
if (gSaveContext.entranceIndex == 0x0053 ||
(gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
(IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
DemoEffect_MoveJewelSplit(&thisx->world, this);
}
break;
}
}
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
if (!Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
hasCmdAction = play->csCtx.state && play->csCtx.npcActions[this->csActionId];
if (!hasCmdAction) {
@ -1636,7 +1636,7 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
DemoEffect_PlayJewelSfx(this, play);
this->effectFlags &= ~1;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
switch (this->jewel.type) {
case DEMO_EFFECT_JEWEL_KOKIRI:
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
@ -2087,7 +2087,7 @@ void DemoEffect_DrawGetItem(Actor* thisx, PlayState* play) {
this->getItem.isLoaded = 1;
return;
}
if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) {
if (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_BARINADE, RG_ZORA_SAPPHIRE);
this->getItem.drawId = getItemEntry.gid;
func_8002EBCC(thisx, play, 0);

View File

@ -868,7 +868,7 @@ void func_80986B2C(PlayState* play) {
Player* player = GET_PLAYER(play);
// In entrance rando have impa bring link back to the front of castle grounds
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
play->nextEntranceIndex = 0x0138;
} else {
play->nextEntranceIndex = 0xCD;
@ -928,7 +928,7 @@ void GivePlayerRandoRewardImpa(Actor* impa, PlayState* play, RandomizerCheck che
void func_80986C30(DemoIm* this, PlayState* play) {
if (func_80986A5C(this, play)) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GivePlayerRandoRewardImpa(this, play, RC_SONG_FROM_IMPA);
} else {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardLullabyCs);
@ -960,7 +960,7 @@ void func_80986D40(DemoIm* this, PlayState* play) {
if (gSaveContext.sceneSetupIndex == 6) {
this->action = 19;
this->drawConfig = 1;
} else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !gSaveContext.n64ddFlag) {
} else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !IS_RANDO) {
Actor_Kill(&this->actor);
} else if (!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
this->action = 23;

View File

@ -428,7 +428,7 @@ void DemoKankyo_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
// In ER, override the warp song locations. Also removes the warp song cutscene
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) &&
thisx->params == 0x000F) { // Warp Song particles
Entrance_SetWarpSongEntrance();
}
@ -808,7 +808,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_23 = 0;
// Skip the first part of warp song cutscenes in rando
if (gSaveContext.n64ddFlag && this->actor.params == DEMOKANKYO_WARP_OUT) {
if (IS_RANDO && this->actor.params == DEMOKANKYO_WARP_OUT) {
this->unk_150[i].unk_22 = 2;
} else {
this->unk_150[i].unk_22++;

View File

@ -88,7 +88,7 @@ s32 DemoKekkai_CheckEventFlag(s32 params) {
if ((params < KEKKAI_TOWER) || (params > KEKKAI_FOREST)) {
return true;
}
if (gSaveContext.n64ddFlag && params > KEKKAI_TOWER) {
if (IS_RANDO && params > KEKKAI_TOWER) {
return Flags_GetRandomizerInf(trialParamToRandInf(params));
}
return Flags_GetEventChkInf(eventFlags[params]);
@ -148,7 +148,7 @@ void DemoKekkai_Init(Actor* thisx, PlayState* play) {
this->collider2.dim.height = thisx->scale.y * 5000.0f;
this->collider2.dim.yShift = 300;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (TrialsDoneCount() == NUM_TRIALS) {
Actor_Kill(thisx);
return;
@ -161,7 +161,7 @@ void DemoKekkai_Init(Actor* thisx, PlayState* play) {
case KEKKAI_SHADOW:
case KEKKAI_SPIRIT:
case KEKKAI_FOREST:
if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(trialParamToRandInf(thisx->params))) {
if (IS_RANDO && Flags_GetRandomizerInf(trialParamToRandInf(thisx->params))) {
Actor_Kill(thisx);
return;
}
@ -270,7 +270,7 @@ void DemoKekkai_TrialBarrierDispel(Actor* thisx, PlayState* play) {
s32 pad;
DemoKekkai* this = (DemoKekkai*)thisx;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Flags_SetRandomizerInf(trialParamToRandInf(thisx->params));
// May or may not be needed. Not sure if needed for anything
// that randoInf isn't already covering. Leaving it for safety.

View File

@ -254,7 +254,7 @@ void func_8098E960(DemoSa* this, PlayState* play) {
if ((gSaveContext.chamberCutsceneNum == 0) && (gSaveContext.sceneSetupIndex < 4)) {
player = GET_PLAYER(play);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
this->action = 1;
play->csCtx.segment = D_8099010C;
gSaveContext.cutsceneTrigger = 2;

View File

@ -146,7 +146,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
play->nextEntranceIndex = entrances[destinationIdx];
// In ER, load the correct entrance based on the grotto link is falling into
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_OverrideActorEntrance(&this->actor);
}

View File

@ -252,7 +252,7 @@ void DoorWarp1_SetupBlueCrystal(DoorWarp1* this, PlayState* play) {
-255;
}
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
play->envCtx.adjFogNear = -500;
this->warpTimer = 30;
} else {
@ -299,7 +299,7 @@ void DoorWarp1_SetPlayerPos(DoorWarp1* this, PlayState* play) {
player->actor.velocity.y = 0.0f;
player->actor.world.pos.x = this->actor.world.pos.x;
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
player->actor.world.pos.y = this->actor.world.pos.y + 55.0f;
} else {
player->actor.world.pos.y = this->actor.world.pos.y;
@ -323,7 +323,7 @@ void func_80999214(DoorWarp1* this, PlayState* play) {
Math_SmoothStepToF(&this->crystalAlpha, 255.0f, 0.2f, 5.0f, 0.1f);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
darkness = (f32)(40 - this->warpTimer) / 40.0f;
darkness = CLAMP_MIN(darkness, 0);
} else {
@ -366,7 +366,7 @@ void func_80999348(DoorWarp1* this, PlayState* play) {
void DoorWarp1_FloatPlayer(DoorWarp1* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!gSaveContext.isBossRush) {
if (!IS_BOSS_RUSH) {
player->actor.gravity = -0.1f;
}
}
@ -533,7 +533,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) {
if (DoorWarp1_PlayerInRange(this, play)) {
player = GET_PLAYER(play);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GivePlayerRandoReward(this, player, play, 0, 0);
return;
}
@ -573,7 +573,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
Flags_SetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x47A;
gSaveContext.nextCutsceneIndex = 0;
} else {
@ -586,11 +586,11 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
} else if (play->sceneNum == SCENE_DEKU_TREE_BOSS) {
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) || gSaveContext.n64ddFlag) {
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) || IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD);
Flags_SetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x0457;
gSaveContext.nextCutsceneIndex = 0;
// Skip Mido complaining about dead Deku tree
@ -609,7 +609,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}
@ -636,7 +636,7 @@ void DoorWarp1_RutoWarpIdle(DoorWarp1* this, PlayState* play) {
if (this->rutoWarpState != WARP_BLUE_RUTO_STATE_INITIAL && DoorWarp1_PlayerInRange(this, play)) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GivePlayerRandoReward(this, GET_PLAYER(play), play, 1, 0);
return;
}
@ -670,7 +670,7 @@ void func_80999EE0(DoorWarp1* this, PlayState* play) {
Play_CameraSetAtEye(play, sRutoWarpSubCamId, &at, &eye);
Play_CameraSetFov(play, sRutoWarpSubCamId, 90.0f);
this->rutoWarpState = WARP_BLUE_RUTO_STATE_TALKING;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
Message_StartTextbox(play, 0x4022, NULL);
}
DoorWarp1_SetupAction(this, func_80999FE4);
@ -707,7 +707,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x10E;
gSaveContext.nextCutsceneIndex = 0;
} else {
@ -716,7 +716,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0xFFF0;
}
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}
@ -761,13 +761,13 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, PlayState* play) {
if (DoorWarp1_PlayerInRange(this, play)) {
// Heal player in Boss Rush
if (gSaveContext.isBossRush) {
if (IS_BOSS_RUSH) {
BossRush_HandleBlueWarpHeal(play);
}
player = GET_PLAYER(play);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GivePlayerRandoReward(this, player, play, 0, 1);
return;
}
@ -826,14 +826,14 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
this->warpTimer++;
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
if (gSaveContext.isBossRush) {
if (IS_BOSS_RUSH) {
BossRush_HandleBlueWarp(play, this->actor.world.pos.x, this->actor.world.pos.z);
} else if (play->sceneNum == SCENE_FOREST_TEMPLE_BOSS) {
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) {
Flags_SetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x608;
gSaveContext.nextCutsceneIndex = 0;
} else {
@ -855,7 +855,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x564;
gSaveContext.nextCutsceneIndex = 0;
// Change Death Mountain cloud since we aren't warping to the cutscene
@ -878,7 +878,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x60C;
gSaveContext.nextCutsceneIndex = 0;
// Fill Lake Hylia since we aren't warping to the cutscene
@ -898,10 +898,10 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
} else if (play->sceneNum == SCENE_SPIRIT_TEMPLE_BOSS) {
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) || gSaveContext.n64ddFlag) {
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) || IS_RANDO) {
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x610;
gSaveContext.nextCutsceneIndex = 0;
} else {
@ -919,10 +919,10 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
} else if (play->sceneNum == SCENE_SHADOW_TEMPLE_BOSS) {
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) || gSaveContext.n64ddFlag) {
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) || IS_RANDO) {
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
play->nextEntranceIndex = 0x580;
gSaveContext.nextCutsceneIndex = 0;
} else {
@ -941,7 +941,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
}
}
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}

View File

@ -128,7 +128,7 @@ void func_809B0558(EnAni* this, PlayState* play) {
}
Flags_SetItemGetInf(ITEMGETINF_15);
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
@ -142,7 +142,7 @@ void func_809B05F0(EnAni* this, PlayState* play) {
EnAni_SetupAction(this, func_809B0558);
}
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);

View File

@ -83,7 +83,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
}
}
this->prizeSelect = gSaveContext.n64ddFlag ? 0 : (s16)Rand_ZeroFloat(4.99f);
this->prizeSelect = IS_RANDO ? 0 : (s16)Rand_ZeroFloat(4.99f);
this->actor.targetMode = 1;
this->actionFunc = EnBomBowMan_SetupWaitAsleep;
}
@ -142,7 +142,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
this->dialogState = TEXT_STATE_EVENT;
// Check for beaten Dodongo's Cavern if Rando is disabled
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
if ((Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) || BREG(2)) {
this->actor.textId = 0xBF;
} else {
@ -152,7 +152,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
// In randomizer, only check for bomb bag when bombchus aren't in logic
// and only check for bombchus when bombchus are in logic
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
u8 bombchusInLogic = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC);
if ((!bombchusInLogic && INV_CONTENT(ITEM_BOMB) == ITEM_NONE) ||
(bombchusInLogic && INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE)) {
@ -187,7 +187,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, PlayState* play) {
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
bool bombchuBowlingClosed;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
// when rando'd, check if we have bombchus if chus are in logic
// and check if we have a bomb bag if chus aren't in logic
u8 explosive = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) ? ITEM_BOMBCHU : ITEM_BOMB;
@ -431,7 +431,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
}
break;
case 1:
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
} else {
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
@ -444,7 +444,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
prizeTemp = EXITEM_BOMBCHUS_BOWLING;
break;
case 3:
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
if (Flags_GetItemGetInf(ITEMGETINF_12)) {
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;

View File

@ -183,7 +183,7 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) {
this->getItemId = GI_BOMB_BAG_40;
}
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
switch (this->prizeIndex) {
case EXITEM_BOMB_BAG_BOWLING:
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20);
@ -202,7 +202,7 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) {
player->stateFlags1 &= ~0x20000000;
this->actor.parent = NULL;
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
@ -215,7 +215,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = EnBomBowlPit_Reset;
} else {
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
@ -226,7 +226,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) {
void EnBomBowlPit_Reset(EnBomBowlPit* this, PlayState* play) {
if (((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) &&
Message_ShouldAdvance(play)) ||
(gSaveContext.n64ddFlag && this->getItemId == GI_ICE_TRAP)) {
(IS_RANDO && this->getItemId == GI_ICE_TRAP)) {
// "Normal termination"/"completion"
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
if (this->getItemId == GI_HEART_PIECE) {

View File

@ -192,7 +192,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
SkelAnime_Init(play, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
this->getItemEntry = Randomizer_GetItemFromActor(this->dyna.actor.id, play->sceneNum, this->dyna.actor.params, this->dyna.actor.params >> 5 & 0x7F);
} else {
this->getItemEntry = ItemTable_RetrieveEntry(MOD_NONE, this->dyna.actor.params >> 5 & 0x7F);
@ -206,7 +206,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
}
// Delete chests in Boss Rush. Mainly for the chest in King Dodongo's boss room.
if (gSaveContext.isBossRush) {
if (IS_BOSS_RUSH) {
EnBox_SetupAction(this, EnBox_Destroy);
}
}
@ -448,7 +448,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
// treasure chest game rando
if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
if (gSaveContext.n64ddFlag && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if (IS_RANDO && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if((this->dyna.actor.params & 0xF) < 2) {
Flags_SetCollectible(play, 0x1B);
}
@ -476,7 +476,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
// RANDOTODO treasure chest game rando
if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
if (gSaveContext.n64ddFlag && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if (IS_RANDO && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if((this->dyna.actor.params & 0xF) < 2) {
if(Flags_GetCollectible(play, 0x1B)) {
sItem = blueRupee;
@ -506,7 +506,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
}
// Chests need to have a negative getItemId in order to not immediately give their item
// when approaching.
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
sItem.getItemId = 0 - sItem.getItemId;
sItem.getItemFrom = ITEM_FROM_CHEST;
GiveItemEntryFromActorWithFixedRange(&this->dyna.actor, play, sItem);
@ -626,8 +626,8 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
Actor_SetFocus(&this->dyna.actor, 40.0f);
}
if (((!gSaveContext.n64ddFlag && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
(gSaveContext.n64ddFlag && ABS(sItem.getItemId) == RG_ICE_TRAP)) &&
if (((!IS_RANDO && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
(IS_RANDO && ABS(sItem.getItemId) == RG_ICE_TRAP)) &&
this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 && this->iceSmokeTimer < 100) {
if (!CVarGetInteger("gAddTraps.enabled", 0)) {
EnBox_SpawnIceSmoke(this, play);

View File

@ -107,7 +107,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
EnCow* this = (EnCow*)thisx;
s32 pad;
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_COWS)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_COWS)) {
EnCow_MoveForRandomizer(thisx, play);
}
@ -311,7 +311,7 @@ void func_809DF96C(EnCow* this, PlayState* play) {
// when randomized with cowsanity, if we haven't gotten the
// reward from this cow yet, give that, otherwise use the
// vanilla cow behavior
if (gSaveContext.n64ddFlag &&
if (IS_RANDO &&
Randomizer_GetSettingValue(RSK_SHUFFLE_COWS) &&
!EnCow_HasBeenMilked(this, play)) {
EnCow_SetCowMilked(this, play);

View File

@ -455,7 +455,7 @@ void func_809EEA00(EnDivingGame* this, PlayState* play) {
if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) {
Message_CloseTextbox(play);
this->actor.parent = NULL;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
@ -470,7 +470,7 @@ void func_809EEA90(EnDivingGame* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = func_809EEAF8;
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);

View File

@ -168,7 +168,7 @@ void EnDns_Init(Actor* thisx, PlayState* play) {
this->actor.gravity = -1.0f;
this->actor.textId = D_809F040C[this->actor.params];
this->dnsItemEntry = sItemEntries[this->actor.params];
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
// Ugly, but the best way we can identify which grotto we are in, same method 3DRando uses, but we'll need to account for entrance rando
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
this->scrubIdentity = Randomizer_IdentifyScrub(play->sceneNum, this->actor.params, respawnData);
@ -412,7 +412,7 @@ void EnDns_Talk(EnDns* this, PlayState* play) {
void func_809EFDD0(EnDns* this, PlayState* play) {
u16 pendingGetItemId;
if (!gSaveContext.n64ddFlag || !this->scrubIdentity.isShuffled) {
if (!IS_RANDO || !this->scrubIdentity.isShuffled) {
if (this->actor.params == 0x9) {
if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
pendingGetItemId = GI_STICK_UPGRADE_20;
@ -533,7 +533,7 @@ void EnDns_Update(Actor* thisx, PlayState* play) {
this->dustTimer++;
this->actor.textId = D_809F040C[this->actor.params];
if (gSaveContext.n64ddFlag && this->scrubIdentity.isShuffled) {
if (IS_RANDO && this->scrubIdentity.isShuffled) {
this->actor.textId = 0x9000 + (this->scrubIdentity.randomizerInf - RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT);
}
Actor_SetFocus(&this->actor, 60.0f);

View File

@ -135,7 +135,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
this->judgeTimer = 0;
}
} else {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Player* player = GET_PLAYER(play);
switch (Player_GetMask(play)) {
case PLAYER_MASK_SKULL:

View File

@ -252,7 +252,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
if (!LINK_IS_ADULT && !Flags_GetItemGetInf(ITEMGETINF_1D)) {
this->hitCounter++;
if (this->hitCounter >= 3) {
if(gSaveContext.n64ddFlag) {
if(IS_RANDO) {
this->actionFunc = EnDntNomal_TargetGivePrize;
} else {
OnePointCutscene_Init(play, 4140, -99, &this->actor, MAIN_CAM);

View File

@ -96,7 +96,7 @@ void EnDs_GiveOddPotion(EnDs* this, PlayState* play) {
gSaveContext.timer2State = 0;
} else {
u32 itemId = GI_ODD_POTION;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_ODD_MUSHROOM, GI_ODD_POTION);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_MUSHROOM);
@ -111,7 +111,7 @@ void EnDs_TalkAfterBrewOddPotion(EnDs* this, PlayState* play) {
Message_CloseTextbox(play);
this->actionFunc = EnDs_GiveOddPotion;
u32 itemId = GI_ODD_POTION;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_ODD_MUSHROOM, GI_ODD_POTION);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_MUSHROOM);
@ -138,7 +138,7 @@ void EnDs_BrewOddPotion2(EnDs* this, PlayState* play) {
this->brewTimer -= 1;
} else {
this->actionFunc = EnDs_BrewOddPotion3;
this->brewTimer = gSaveContext.n64ddFlag ? 0 : 60;
this->brewTimer = IS_RANDO ? 0 : 60;
Flags_UnsetSwitch(play, 0x3F);
}
}
@ -148,7 +148,7 @@ void EnDs_BrewOddPotion1(EnDs* this, PlayState* play) {
this->brewTimer -= 1;
} else {
this->actionFunc = EnDs_BrewOddPotion2;
this->brewTimer = gSaveContext.n64ddFlag ? 0 : 20;
this->brewTimer = IS_RANDO ? 0 : 20;
}
Math_StepToF(&this->unk_1E4, 1.0f, 0.01f);
@ -162,7 +162,7 @@ void EnDs_OfferOddPotion(EnDs* this, PlayState* play) {
switch (play->msgCtx.choiceIndex) {
case 0: // yes
this->actionFunc = EnDs_BrewOddPotion1;
this->brewTimer = gSaveContext.n64ddFlag ? 0 : 60;
this->brewTimer = IS_RANDO ? 0 : 60;
Flags_SetSwitch(play, 0x3F);
play->msgCtx.msgMode = MSGMODE_PAUSED;
player->exchangeItemId = EXCH_ITEM_NONE;
@ -175,7 +175,7 @@ void EnDs_OfferOddPotion(EnDs* this, PlayState* play) {
}
u8 EnDs_RandoCanGetGrannyItem() {
return gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
return IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_GRANNYS_SHOP) &&
// Traded odd mushroom when adult trade is on
((Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) && Flags_GetItemGetInf(ITEMGETINF_30)) ||
@ -263,7 +263,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
this->actionFunc = EnDs_OfferOddPotion;
} else if (
// Always offer blue potion when adult trade is off
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
Flags_GetItemGetInf(ITEMGETINF_30)) { // Traded odd mushroom
player->actor.textId = 0x500C;
this->actionFunc = EnDs_OfferBluePotion;

View File

@ -344,7 +344,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
EnDu_SetupAction(this, func_809FE3C0);
} else if (play->msgCtx.ocarinaMode >= OCARINA_MODE_06) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
gSaveContext.cutsceneTrigger = 1;
}
@ -353,7 +353,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
gSaveContext.cutsceneTrigger = 1;
}
@ -442,8 +442,8 @@ void func_809FE890(EnDu* this, PlayState* play) {
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
CsCmdActorAction* csAction;
if (play->csCtx.state == CS_STATE_IDLE || gSaveContext.n64ddFlag) {
if (gSaveContext.n64ddFlag) {
if (play->csCtx.state == CS_STATE_IDLE || IS_RANDO) {
if (IS_RANDO) {
play->csCtx.state = CS_STATE_IDLE;
}
func_8002DF54(play, &this->actor, 1);
@ -518,9 +518,9 @@ void func_809FEB08(EnDu* this, PlayState* play) {
EnDu_SetupAction(this, func_809FE3C0);
return;
}
if ((!gSaveContext.n64ddFlag && CUR_UPG_VALUE(UPG_STRENGTH) <= 0) ||
(gSaveContext.n64ddFlag && !Flags_GetTreasure(play, 0x1E))) {
if (gSaveContext.n64ddFlag) {
if ((!IS_RANDO && CUR_UPG_VALUE(UPG_STRENGTH) <= 0) ||
(IS_RANDO && !Flags_GetTreasure(play, 0x1E))) {
if (IS_RANDO) {
Flags_SetTreasure(play, 0x1E);
}
this->actor.textId = 0x301C;
@ -548,7 +548,7 @@ void func_809FEC70(EnDu* this, PlayState* play) {
EnDu_SetupAction(this, func_809FECE4);
} else {
f32 xzRange = this->actor.xzDistToPlayer + 1.0f;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_DARUNIAS_JOY, GI_BRACELET);

View File

@ -137,7 +137,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
onCounter = true;
case EXITEM_BOMB_BAG_BOWLING:
this->unk_17C = func_8002EBCC;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
this->giDrawId =
Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20).gid;
} else {
@ -150,7 +150,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
this->actionFunc = EnExItem_BowlPrize;
} else {
this->actionFunc = EnExItem_SetupBowlCounter;
this->actor.shape.yOffset = gSaveContext.n64ddFlag ? -10.0f : -18.0f;
this->actor.shape.yOffset = IS_RANDO ? -10.0f : -18.0f;
}
break;
case EXITEM_HEART_PIECE_COUNTER:
@ -172,7 +172,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
onCounter = true;
case EXITEM_BOMBCHUS_BOWLING:
this->unk_17C = func_8002EBCC;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
this->giDrawId = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10).gid;
} else {
this->giDrawId = GID_BOMBCHU;
@ -228,7 +228,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
this->scale = 0.5f;
this->unkFloat = 0.5f;
this->actor.velocity.y = 10.0f;
if (!gSaveContext.n64ddFlag || !Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
if (!IS_RANDO || !Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
switch (this->type) {
case EXITEM_GREEN_RUPEE_CHEST:
this->giDrawId = GID_RUPEE_GREEN;
@ -376,7 +376,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, -0x4000, 5, 0x1000, 0);
}
if (!gSaveContext.n64ddFlag && this->timer != 0) {
if (!IS_RANDO && this->timer != 0) {
if (this->prizeRotateTimer != 0) {
tmpf1 = play->view.lookAt.x - play->view.eye.x;
tmpf2 = play->view.lookAt.y - 10.0f - play->view.eye.y;
@ -402,7 +402,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
this->actor.draw = NULL;
func_8002DF54(play, NULL, 7);
this->actor.parent = NULL;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GET_PLAYER(play)->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD);
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50);
getItemId = getItemEntry.getItemId;
@ -414,7 +414,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
}
}
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 2000.0f, 1000.0f);
@ -427,7 +427,7 @@ void EnExItem_TargetPrizeGive(EnExItem* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = EnExItem_TargetPrizeFinish;
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
s32 getItemId = (CUR_UPG_VALUE(UPG_BULLET_BAG) == 2) ? GI_BULLET_BAG_50 : GI_BULLET_BAG_40;
func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f);
} else {
@ -510,7 +510,7 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) {
}
if (this) {}
func_8002ED80(&this->actor, play, 0);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry randoGetItem = (GetItemEntry)GET_ITEM_NONE;
switch (this->type) {
case EXITEM_BOMB_BAG_BOWLING:
@ -539,7 +539,7 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) {
void EnExItem_DrawHeartPiece(EnExItem* this, PlayState* play) {
func_8002ED80(&this->actor, play, 0);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry randoGetItem =
Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem);

View File

@ -968,7 +968,7 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
this->reward = GI_RUPEE_PURPLE;
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(EnFr_RandomizerCheckFromSongIndex(songIndex), GI_RUPEE_PURPLE);
@ -981,7 +981,7 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
this->reward = GI_HEART_PIECE;
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_FROGS_IN_THE_RAIN, GI_HEART_PIECE);
@ -994,7 +994,7 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
this->reward = GI_HEART_PIECE;
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_FROGS_OCARINA_GAME, GI_HEART_PIECE);
@ -1049,7 +1049,7 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) {
this->actionFunc = EnFr_Idle;
} else {
this->actionFunc = EnFr_GiveReward;
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 30.0f, 100.0f);
@ -1062,7 +1062,7 @@ void EnFr_GiveReward(EnFr* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnFr_SetIdle;
} else {
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 30.0f, 100.0f);
@ -1071,7 +1071,7 @@ void EnFr_GiveReward(EnFr* this, PlayState* play) {
}
void EnFr_SetIdle(EnFr* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || (gSaveContext.n64ddFlag && this->reward == RG_ICE_TRAP)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || (IS_RANDO && this->reward == RG_ICE_TRAP)) {
this->actionFunc = EnFr_Idle;
}
}

View File

@ -172,7 +172,7 @@ void func_80A1DB60(EnFu* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
this->actionFunc = func_WaitForSongGive;
}
}
@ -186,7 +186,7 @@ void func_80A1DBA0(EnFu* this, PlayState* play) {
void func_80A1DBD4(EnFu* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (gSaveContext.n64ddFlag && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
if (IS_RANDO && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
}
@ -199,7 +199,7 @@ void func_80A1DBD4(EnFu* this, PlayState* play) {
this->actionFunc = func_80A1DB60;
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs);
gSaveContext.cutsceneTrigger = 1;
Item_Give(play, ITEM_SONG_STORMS);
@ -249,7 +249,7 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) {
} else if (player->stateFlags2 & 0x1000000) {
this->actor.textId = 0x5035;
Message_StartTextbox(play, this->actor.textId, NULL);
this->actionFunc = gSaveContext.n64ddFlag ? func_80A1DBD4 : EnFu_TeachSong;
this->actionFunc = IS_RANDO ? func_80A1DBD4 : EnFu_TeachSong;
this->behaviorFlags |= FU_WAIT;
} else if (Actor_ProcessTalkRequest(&this->actor, play)) {
this->actionFunc = func_80A1DBA0;

View File

@ -359,7 +359,7 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
void func_80A2FB40(EnGb* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
@ -374,7 +374,7 @@ void func_80A2FBB0(EnGb* this, PlayState* play) {
this->dyna.actor.parent = NULL;
this->actionFunc = func_80A2FC0C;
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);

View File

@ -95,7 +95,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
EnGe1* this = (EnGe1*)thisx;
// When spawning the gate operator, also spawn an extra gate operator on the wasteland side
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) ||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) ||
Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) && (this->actor.params & 0xFF) == GE1_TYPE_GATE_OPERATOR) {
// Spawn the extra gaurd with params matching the custom type added (0x0300 + 0x02)
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_GE1, -1358.0f, 88.0f, -3018.0f, 0, 0x95B0, 0,
@ -185,7 +185,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
if (EnGe1_CheckCarpentersFreed()) {
// If the gtg gate is permanently open, don't let the gaurd charge to open it again
if (gSaveContext.n64ddFlag && gSaveContext.sceneFlags[93].swch & 0x00000004) {
if (IS_RANDO && gSaveContext.sceneFlags[93].swch & 0x00000004) {
this->actionFunc = EnGe1_SetNormalText;
} else {
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
@ -235,7 +235,7 @@ void EnGe1_SetAnimationIdle(EnGe1* this) {
}
s32 EnGe1_CheckCarpentersFreed(void) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_GERUDO_CARD)) {
return 1;
} else {
@ -269,7 +269,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}
@ -532,7 +532,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
s32 getItemId;
if (Actor_HasParent(&this->actor, play)) {
if (gSaveContext.n64ddFlag && gSaveContext.minigameScore >= 1500 && !Flags_GetInfTable(INFTABLE_190)) {
if (IS_RANDO && gSaveContext.minigameScore >= 1500 && !Flags_GetInfTable(INFTABLE_190)) {
Flags_SetItemGetInf(ITEMGETINF_0F);
Flags_SetInfTable(INFTABLE_190);
this->stateFlags |= GE1_STATE_GIVE_QUIVER;
@ -549,7 +549,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
}
} else {
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
switch (CUR_UPG_VALUE(UPG_QUIVER)) {
//! @bug Asschest. See next function for details
case 1:
@ -564,7 +564,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
getItemId = getItemEntry.getItemId;
}
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
getItemId = GI_HEART_PIECE;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
@ -572,7 +572,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
}
}
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@ -590,7 +590,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
}
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
switch (CUR_UPG_VALUE(UPG_QUIVER)) {
//! @bug Asschest. See next function for details
case 1:
@ -605,7 +605,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
getItemId = getItemEntry.getItemId;
}
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
getItemId = GI_HEART_PIECE;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
@ -613,7 +613,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
}
}
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);

View File

@ -227,7 +227,7 @@ s32 Ge2_DetectPlayerInUpdate(PlayState* play, EnGe2* this, Vec3f* pos, s16 yRot,
}
s32 EnGe2_CheckCarpentersFreed(void) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_GERUDO_CARD)) {
return 1;
} else {
@ -259,7 +259,7 @@ void EnGe2_CaptureClose(EnGe2* this, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}
@ -289,7 +289,7 @@ void EnGe2_CaptureCharge(EnGe2* this, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}
@ -471,7 +471,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnGe2_SetActionAfterTalk;
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
@ -485,7 +485,7 @@ void EnGe2_GiveCard(EnGe2* this, PlayState* play) {
Message_CloseTextbox(play);
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
this->actionFunc = EnGe2_WaitTillCardGiven;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);

View File

@ -144,7 +144,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnGe3_Wait;
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
@ -158,7 +158,7 @@ void EnGe3_GiveCard(EnGe3* this, PlayState* play) {
Message_CloseTextbox(play);
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
this->actionFunc = EnGe3_WaitTillCardGiven;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);

View File

@ -1575,7 +1575,7 @@ void EnGeldB_Draw(Actor* thisx, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}

View File

@ -416,7 +416,7 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
return;
}
if (!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF) {
if (!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF) {
this->objBankIndex = Object_GetIndex(&play->objectCtx, shopItemEntries[params].objID);
} else {
s16 objectId = shopItemEntries[params].objID;
@ -474,7 +474,7 @@ s32 EnGirlA_CanBuy_Arrows(PlayState* play, EnGirlA* this) {
}
s32 EnGirlA_CanBuy_Bombs(PlayState* play, EnGirlA* this) {
if (!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
if (!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if (AMMO(ITEM_BOMB) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
@ -605,7 +605,7 @@ s32 EnGirlA_CanBuy_DekuShield(PlayState* play, EnGirlA* this) {
s32 EnGirlA_CanBuy_GoronTunic(PlayState* play, EnGirlA* this) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD &&
(!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
(!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if (gBitFlags[9] & gSaveContext.inventory.equipment) {
@ -622,7 +622,7 @@ s32 EnGirlA_CanBuy_GoronTunic(PlayState* play, EnGirlA* this) {
s32 EnGirlA_CanBuy_ZoraTunic(PlayState* play, EnGirlA* this) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD &&
(!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
(!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if (gBitFlags[10] & gSaveContext.inventory.equipment) {
@ -678,7 +678,7 @@ s32 EnGirlA_CanBuy_Unk20(PlayState* play, EnGirlA* this) {
s32 EnGirlA_CanBuy_Bombchus(PlayState* play, EnGirlA* this) {
// When in rando, don't allow buying bombchus when the player doesn't have required explosives
// If bombchus are in logic, the player needs to have bombchus; otherwise they need a bomb bag
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
u8 bombchusInLogic = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC);
if ((!bombchusInLogic && CUR_CAPACITY(UPG_BOMB_BAG) == 0) ||
(bombchusInLogic && INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE)) {
@ -1027,7 +1027,7 @@ void EnGirlA_BuyEvent_ObtainBombchuPack(PlayState* play, EnGirlA* this) {
// Normally, buying a bombchu pack sets a flag indicating the pack is now sold out
// If they're in logic for rando, skip setting that flag so they can be purchased repeatedly
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC)) {
return;
}
@ -1254,7 +1254,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
this->itemGiveFunc = itemEntry->itemGiveFunc;
this->buyEventFunc = itemEntry->buyEventFunc;
// If chus are in logic, make the 10 pack affordable without a wallet upgrade
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) &&
this->getItemId == GI_BOMBCHUS_10) {
this->basePrice = 99;
} else {

View File

@ -96,7 +96,7 @@ void EnGm_Destroy(Actor* thisx, PlayState* play) {
s32 func_80A3D7C8(void) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
return 0;
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
} else if ((IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
return 1;
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) { // Don't have giant's knife
@ -215,7 +215,7 @@ void func_80A3DC44(EnGm* this, PlayState* play) {
return;
case 1:
Flags_SetInfTable(INFTABLE_B1);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
//Resets "Talked to Medigoron" flag in infTable to restore initial conversation state
Flags_UnsetInfTable(INFTABLE_B1);
@ -256,7 +256,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
} else {
GetItemEntry itemEntry;
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
@ -281,7 +281,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
void func_80A3DF00(EnGm* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
}
@ -289,7 +289,7 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = func_80A3DF60;
} else {
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);

View File

@ -95,7 +95,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
switch (thisx->params & 0xF0) {
case 0x90:
if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
if (!IS_RANDO && gSaveContext.bgsFlag) {
return 0x305E;
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
@ -113,8 +113,8 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
return 0x3053;
}
case 0x00:
if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
if (Flags_GetInfTable(INFTABLE_10F)) {
return 0x3042;
} else {
@ -859,7 +859,7 @@ void func_80A405CC(EnGo* this, PlayState* play) {
void EnGo_BiggoronActionFunc(EnGo* this, PlayState* play) {
if (((this->actor.params & 0xF0) == 0x90) && (this->interactInfo.talkState == NPC_TALK_STATE_ACTION)) {
if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
if (!IS_RANDO && gSaveContext.bgsFlag) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
} else {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {
@ -958,7 +958,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
this->unk_20C = 0;
if ((this->actor.params & 0xF0) == 0x90) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
getItemId = GI_SWORD_BGS;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS);
@ -967,7 +967,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
this->unk_20C = 1;
}
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_EYEDROPS, GI_CLAIM_CHECK);
getItemId = getItemEntry.getItemId;
Randomizer_ConsumeAdultTradeItem(play, ITEM_EYEDROPS);
@ -976,7 +976,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
}
}
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_SWORD_BROKEN) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_BROKEN_SWORD, GI_PRESCRIPTION);
Randomizer_ConsumeAdultTradeItem(play, ITEM_SWORD_BROKEN);
getItemId = getItemEntry.getItemId;
@ -992,7 +992,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
yDist = fabsf(this->actor.yDistToPlayer) + 1.0f;
xzDist = this->actor.xzDistToPlayer + 1.0f;
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, xzDist, yDist);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, xzDist, yDist);

View File

@ -335,7 +335,7 @@ u16 EnGo2_GoronFireGenericGetTextId(EnGo2* this) {
u16 EnGo2_GetTextIdGoronCityRollingBig(PlayState* play, EnGo2* this) {
if (Flags_GetInfTable(INFTABLE_11E)) {
return 0x3013;
} else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || gSaveContext.n64ddFlag) && this->waypoint > 7 && this->waypoint < 12) {
} else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || IS_RANDO) && this->waypoint > 7 && this->waypoint < 12) {
return 0x3012;
} else {
return 0x3011;
@ -350,7 +350,7 @@ s16 EnGo2_UpdateTalkStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
if (Message_ShouldAdvance(play)) {
if (this->actor.textId == 0x3012) {
this->actionFunc = EnGo2_SetupGetItem;
if(!gSaveContext.n64ddFlag) {
if(!IS_RANDO) {
EnGo2_GetItem(this, play, CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30);
} else {
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_GC_ROLLING_GORON_AS_CHILD, GI_BOMB_BAG_40));
@ -416,11 +416,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE) ? 0x3021 : Flags_GetInfTable(INFTABLE_E0) ? 0x302A : 0x3008;
@ -439,11 +439,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronCityEntrance(PlayState* play, EnGo2* this) {
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return Flags_GetInfTable(INFTABLE_F0) ? 0x3015 : 0x3014;
@ -462,11 +462,11 @@ s16 EnGo2_UpdateTalkStateGoronCityEntrance(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronCityIsland(PlayState* play, EnGo2* this) {
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return Flags_GetInfTable(INFTABLE_F4) ? 0x3017 : 0x3016;
@ -485,11 +485,11 @@ s16 EnGo2_UpdateTalkStateGoronCityIsland(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
@ -513,7 +513,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLowestFloor(PlayState* play, EnGo2* this) {
u16 EnGo2_GetTextIdGoronCityLink(PlayState* play, EnGo2* this) {
// For rando, prioritize opening the doors in GC when Link the goron has been stopped when
// the doors are not opened, otherwise let him talk about the DMC exit or that gorons are saved
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (!Flags_GetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING)) {
return 0x3030;
} else if (!Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
@ -543,7 +543,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
case TEXT_STATE_CLOSING:
switch (this->actor.textId) {
case 0x3036:
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
EnGo2_GetItem(this, play, GI_TUNIC_GORON);
this->actionFunc = EnGo2_SetupGetItem;
return NPC_TALK_STATE_ACTION;
@ -605,7 +605,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
u16 EnGo2_GetTextIdGoronDmtBiggoron(PlayState* play, EnGo2* this) {
Player* player = GET_PLAYER(play);
if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
if (!IS_RANDO && gSaveContext.bgsFlag) {
player->exchangeItemId = EXCH_ITEM_CLAIM_CHECK;
return 0x305E;
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
@ -627,11 +627,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
switch (EnGo2_GetDialogState(this, play)) {
case TEXT_STATE_DONE:
if (this->actor.textId == 0x305E) {
if((!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) || (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F))) {
if((!IS_RANDO && gSaveContext.bgsFlag) || (IS_RANDO && Flags_GetTreasure(play, 0x1F))) {
return NPC_TALK_STATE_IDLE;
}
if(gSaveContext.n64ddFlag) {
if(IS_RANDO) {
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS));
Flags_SetTreasure(play, 0x1F);
} else {
@ -663,7 +663,7 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
if (Message_ShouldAdvance(play)) {
if ((this->actor.textId == 0x3054) || (this->actor.textId == 0x3055)) {
if (play->msgCtx.choiceIndex == 0) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_BROKEN_SWORD, GI_PRESCRIPTION);
Randomizer_ConsumeAdultTradeItem(play, ITEM_SWORD_BROKEN);
EnGo2_GetItemEntry(this, play, getItemEntry);
@ -1070,7 +1070,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
u16 textId;
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
if ((!gSaveContext.n64ddFlag && gSaveContext.bgsFlag)) {
if ((!IS_RANDO && gSaveContext.bgsFlag)) {
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
this->actor.textId = 0x3003;
} else {
@ -1080,7 +1080,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
} else if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
if (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F)) {
if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
textId = 0x3003;
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
textId = 0x305E;
@ -1089,7 +1089,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
}
this->actor.textId = textId;
} else {
if (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F)) {
if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
textId = 0x305E;
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
textId = 0x3002;
@ -1219,8 +1219,8 @@ s32 EnGo2_IsCameraModified(EnGo2* this, PlayState* play) {
(this->actor.params & 0x1F) == GORON_CITY_STAIRWELL || (this->actor.params & 0x1F) == GORON_DMT_BIGGORON ||
(this->actor.params & 0x1F) == GORON_MARKET_BAZAAR) {
return true;
} else if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
} else if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
return true;
} else {
@ -1278,8 +1278,8 @@ void EnGo2_SelectGoronWakingUp(EnGo2* this) {
EnGo2_BiggoronWakingUp(this);
break;
case GORON_CITY_LINK:
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
EnGo2_WakingUp(this);
break;
@ -1624,8 +1624,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
case GORON_CITY_LOWEST_FLOOR:
case GORON_CITY_STAIRWELL:
case GORON_CITY_LOST_WOODS:
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
Actor_Kill(&this->actor);
}
this->actionFunc = EnGo2_CurledUp;
@ -1640,8 +1640,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
if ((Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED))) {
Path_CopyLastPoint(this->path, &this->actor.world.pos);
this->actor.home.pos = this->actor.world.pos;
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
EnGo2_GetItemAnimation(this, play);
} else {
@ -1862,7 +1862,7 @@ void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnGo2_SetGetItem;
} else {
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
@ -1876,7 +1876,7 @@ void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
// For randomizer, handle updating the states for the gorons after receiving the item based on
// the goron type rather then the item being received
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
switch (this->actor.params & 0x1F) {
case GORON_DMT_BIGGORON:
// Resolves #1301. unk_13EE is used to set the opacity of the HUD. The trade sequence discussion with Biggoron
@ -1925,12 +1925,12 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->actor.shape.rot.y += 0x5B0;
this->trackingMode = NPC_TRACKING_NONE;
this->animTimer = gSaveContext.n64ddFlag ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
this->animTimer = IS_RANDO ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
this->eyeMouthTexState = 2;
this->unk_20C = 0;
this->goronState++;
func_800F483C(0x28, 5);
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
OnePointCutscene_Init(play, 4190, -99, &this->actor, MAIN_CAM);
}
break;
@ -1959,7 +1959,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
this->skelAnime.playSpeed = 0.0f;
this->skelAnime.curFrame = this->skelAnime.endFrame;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_EYEDROPS, GI_CLAIM_CHECK);
Randomizer_ConsumeAdultTradeItem(play, ITEM_EYEDROPS);
EnGo2_GetItemEntry(this, play, getItemEntry);

View File

@ -189,7 +189,7 @@ void func_80A4E648(EnGs* this, PlayState* play) {
Actor_GetScreenPos(play, &this->actor, &sp26, &sp24);
if ((sp26 >= 0) && (sp26 <= SCREEN_WIDTH) && (sp24 >= 0) && (sp24 <= SCREEN_HEIGHT) && (this->unk_19C != 3)) {
if (func_8002F2CC(&this->actor, play, 40.0f) == 1) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
// if we're rando'd, always use the non-mask text id
this->actor.textId = 0x2053;
} else {

View File

@ -124,16 +124,16 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play) {
if (this->type != 5) {
if ((gSaveContext.dayTime < 0xB888 || IS_DAY) &&
((!gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
(gSaveContext.n64ddFlag && !metZelda))) {
((!IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
(IS_RANDO && !metZelda))) {
this->actionFunc = EnHeishi1_SetupWalk;
} else {
Actor_Kill(&this->actor);
}
} else {
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY ||
(!gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
(gSaveContext.n64ddFlag && metZelda)) {
(!IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
(IS_RANDO && metZelda)) {
this->actionFunc = EnHeishi1_SetupWaitNight;
} else {
Actor_Kill(&this->actor);

View File

@ -357,7 +357,7 @@ void EnHeishi4_MarketSneak(EnHeishi4* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0: //yes
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES) != RO_GENERIC_OFF){
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES) != RO_GENERIC_OFF){
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x01FD); // Market Entrance -> HF
} else {
play->nextEntranceIndex = 0x00CD; // HF Near bridge (OoT cutscene entrance) to not fall in the water

View File

@ -81,7 +81,7 @@ void EnHs_Init(Actor* thisx, PlayState* play) {
func_80A6E3A0(this, func_80A6E9AC);
bool shouldSpawn;
bool tradedMushroom = Flags_GetItemGetInf(ITEMGETINF_30);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
// To explain the logic because Fado and Grog are linked:
// - If you have Cojiro, then spawn Grog and not Fado.
// - If you don't have Cojiro but do have Odd Potion, spawn Fado and not Grog.
@ -148,7 +148,7 @@ void func_80A6E5EC(EnHs* this, PlayState* play) {
void func_80A6E630(EnHs* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_80088AA0(180);
}
func_80A6E3A0(this, func_80A6E6B0);
@ -179,7 +179,7 @@ void func_80A6E740(EnHs* this, PlayState* play) {
this->actor.parent = NULL;
func_80A6E3A0(this, func_80A6E630);
} else {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TRADE_COJIRO, GI_ODD_MUSHROOM);
Randomizer_ConsumeAdultTradeItem(play, ITEM_COJIRO);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
@ -198,7 +198,7 @@ void func_80A6E7BC(EnHs* this, PlayState* play) {
switch (play->msgCtx.choiceIndex) {
case 0:
func_80A6E3A0(this, func_80A6E740);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TRADE_COJIRO, GI_ODD_MUSHROOM);
Randomizer_ConsumeAdultTradeItem(play, ITEM_COJIRO);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);

View File

@ -662,7 +662,7 @@ s16 func_80A70058(PlayState* play, Actor* thisx) {
if (Flags_GetInfTable(INFTABLE_191)) { // Already brought the lost dog back
func_80A6F7CC(this, play, GI_RUPEE_BLUE);
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_80A6F7CC(this, play, GI_HEART_PIECE);
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_LOST_DOG, GI_HEART_PIECE);
@ -1068,7 +1068,7 @@ void func_80A714C4(EnHy* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = func_80A71530;
} else {
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->unkGetItemId, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
@ -1078,7 +1078,7 @@ void func_80A714C4(EnHy* this, PlayState* play) {
void func_80A71530(EnHy* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (!Flags_GetInfTable(INFTABLE_191)) {
Flags_SetInfTable(INFTABLE_191);
}

View File

@ -1440,7 +1440,7 @@ void func_80A781CC(Actor* thisx, PlayState* play) {
this->actor.update = EnIk_Update;
this->actor.draw = EnIk_Draw;
// Don't initiate nabooru defeat CS in rando
if (!(gSaveContext.n64ddFlag)) {
if (!(IS_RANDO)) {
Cutscene_SetSegment(play, gSpiritBossNabooruKnuckleDefeatCs);
gSaveContext.cutsceneTrigger = 1;
Actor_SetScale(&this->actor, 0.01f);

View File

@ -332,7 +332,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) {
}
// If dungeon entrance randomizer is on, remove the grey boulders that normally
// block child Link from reaching the Fire Temple entrance.
if (type == ROCK_LARGE && gSaveContext.n64ddFlag &&
if (type == ROCK_LARGE && IS_RANDO &&
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
play->sceneNum == 0x061) { // Death Mountain Creater
Actor_Kill(&this->actor);

View File

@ -131,7 +131,7 @@ void func_80A89160(EnJs* this, PlayState* play) {
this->actor.parent = NULL;
En_Js_SetupAction(this, func_80A8910C);
} else {
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_WASTELAND_BOMBCHU_SALESMAN, GI_BOMBCHUS_10);
gSaveContext.pendingSale = itemEntry.itemId;

View File

@ -119,7 +119,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
bool skipScarecrow = play->msgCtx.msgMode == MSGMODE_OCARINA_PLAYING &&
((CVarGetInteger("gSkipScarecrow", 0) && gSaveContext.scarecrowSpawnSongSet) ||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG)));
(IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG)));
if ((BREG(1) != 0) || skipScarecrow && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y)) {

View File

@ -1027,7 +1027,7 @@ s32 EnKo_CanSpawn(EnKo* this, PlayState* play) {
}
case SCENE_LOST_WOODS:
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
// To explain the logic because Fado and Grog are linked:
// - If you have Cojiro, then spawn Grog and not Fado.
// - If you don't have Cojiro but do have Odd Potion, spawn Fado and not Grog.
@ -1186,7 +1186,7 @@ void func_80A99048(EnKo* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ELF, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 3);
if (ENKO_TYPE == ENKO_TYPE_CHILD_3) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
if (!CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
this->collider.dim.height += 200;
this->actionFunc = func_80A995CC;
@ -1234,7 +1234,7 @@ void func_80A99504(EnKo* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = func_80A99560;
} else {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TRADE_ODD_POTION, GI_SAW);
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_POTION);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 120.0f, 10.0f);

View File

@ -278,7 +278,7 @@ void EnKusa_Destroy(Actor* thisx, PlayState* play2) {
void EnKusa_SetupWaitObject(EnKusa* this) {
// Kill bushes in Boss Rush. Used in Gohma's arena.
if (gSaveContext.isBossRush) {
if (IS_BOSS_RUSH) {
Actor_Kill(this);
}

View File

@ -73,10 +73,10 @@ static AnimationInfo sAnimationInfo[] = {
u16 EnKz_GetTextNoMaskChild(PlayState* play, EnKz* this) {
Player* player = GET_PLAYER(play);
if ((gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY)) ||
(!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE))) {
if ((IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY)) ||
(!IS_RANDO && CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE))) {
// Allow turning in Ruto's letter even if you have already rescued her
if (gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
if (IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
player->exchangeItemId = EXCH_ITEM_LETTER_RUTO;
}
return 0x402B;
@ -94,7 +94,7 @@ u16 EnKz_GetTextNoMaskAdult(PlayState* play, EnKz* this) {
// this works because both ITEM_NONE and later trade items are > ITEM_FROG
if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_FROG) {
if (!Flags_GetInfTable(INFTABLE_139)) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
return CHECK_OWNED_EQUIP(EQUIP_TUNIC, 2) ? 0x401F : 0x4012;
} else {
return 0x4012;
@ -243,7 +243,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (func_80A9C95C(play, this, &this->interactInfo.talkState, 340.0f, EnKz_GetText, func_80A9C6C0)) {
if (((gSaveContext.n64ddFlag && LINK_IS_CHILD) || this->actor.textId == 0x401A) && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
if (((IS_RANDO && LINK_IS_CHILD) || this->actor.textId == 0x401A) && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
if (func_8002F368(play) == EXCH_ITEM_LETTER_RUTO) {
this->actor.textId = 0x401B;
this->sfxPlayed = false;
@ -257,7 +257,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
if (LINK_IS_ADULT) {
if ((INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_PRESCRIPTION) &&
(func_8002F368(play) == EXCH_ITEM_PRESCRIPTION)) {
if (!gSaveContext.n64ddFlag || !Flags_GetTreasure(play, 0x1F)) {
if (!IS_RANDO || !Flags_GetTreasure(play, 0x1F)) {
this->actor.textId = 0x4014;
this->sfxPlayed = false;
player->actor.textId = this->actor.textId;
@ -271,7 +271,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
this->actor.textId = CHECK_QUEST_ITEM(QUEST_SONG_SERENADE) ? 0x4045 : 0x401A;
player->actor.textId = this->actor.textId;
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
this->actor.textId = CHECK_OWNED_EQUIP(EQUIP_TUNIC, 2) ? 0x401F : 0x4012;
} else {
this->actor.textId = 0x4012;
@ -344,7 +344,7 @@ void EnKz_Init(Actor* thisx, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_0);
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
if (Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
EnKz_SetMovedPos(this, play);
}
@ -470,7 +470,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
this->actionFunc = EnKz_StartTimer;
} else {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (this->isTrading) {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_TRADE_PRESCRIPTION, GI_FROG);
getItemId = getItemEntry.getItemId;
@ -485,7 +485,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
}
yRange = fabsf(this->actor.yDistToPlayer) + 1.0f;
xzRange = this->actor.xzDistToPlayer + 1.0f;
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, xzRange, yRange);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, xzRange, yRange);
@ -495,7 +495,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
void EnKz_StartTimer(EnKz* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG && !gSaveContext.n64ddFlag) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG && !IS_RANDO) {
func_80088AA0(180); // start timer2 with 3 minutes
gSaveContext.eventInf[1] &= ~1;
}

View File

@ -97,7 +97,7 @@ bool Randomizer_ObtainedMalonHCReward() {
u16 EnMa1_GetText(PlayState* play, Actor* thisx) {
// Special case for Malon Hyrule Castle Text. Placing it here at the beginning
// has the added benefit of circumventing mask text if wearing bunny hood.
if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_HYRULE_CASTLE) {
if (IS_RANDO && play->sceneNum == SCENE_HYRULE_CASTLE) {
return Randomizer_ObtainedMalonHCReward() ? 0x2044 : 0x2043;
}
u16 faceReaction = Text_GetFaceReaction(play, 0x17);
@ -105,7 +105,7 @@ u16 EnMa1_GetText(PlayState* play, Actor* thisx) {
if (faceReaction != 0) {
return faceReaction;
}
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
return 0x204A;
}
@ -207,7 +207,7 @@ s32 func_80AA08C4(EnMa1* this, PlayState* play) {
}
if ((play->sceneNum == SCENE_HYRULE_CASTLE) && // if we're at hyrule castle
(!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || // and talon hasn't left
(gSaveContext.n64ddFlag &&
(IS_RANDO &&
!Randomizer_ObtainedMalonHCReward()))) { // or we're rando'd and haven't gotten malon's HC check
if (Flags_GetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE)) { // if we've met malon
return 1; // make her appear at the castle
@ -227,7 +227,7 @@ s32 func_80AA08C4(EnMa1* this, PlayState* play) {
// If we've gotten this far, we're in Lon Lon Ranch. Spawn Malon if it is daytime, Talon has left Hyrule Castle, and
// either we are not randomized, or we are and we have received Malon's item at Hyrule Castle.
if ((this->actor.shape.rot.z == 3) && IS_DAY && (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) &&
((gSaveContext.n64ddFlag && Randomizer_ObtainedMalonHCReward()) || !gSaveContext.n64ddFlag)) {
((IS_RANDO && Randomizer_ObtainedMalonHCReward()) || !IS_RANDO)) {
return 1;
}
return 0;
@ -292,7 +292,7 @@ void EnMa1_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(22), &sColChkInfoInit);
if (gSaveContext.n64ddFlag) { // Skip Malon's multiple textboxes before getting an item
if (IS_RANDO) { // Skip Malon's multiple textboxes before getting an item
Flags_SetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE);
Flags_SetInfTable(INFTABLE_MET_CHILD_MALON_AT_CASTLE_OR_MARKET);
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_CASTLE_OR_MARKET);
@ -313,13 +313,13 @@ void EnMa1_Init(Actor* thisx, PlayState* play) {
// 1. Talon has not left Hyrule Castle.
// 2. We are Randomized and have not obtained Malon's Weird Egg Check.
// 3. We are not Randomized and have obtained Epona's Song
if (!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (gSaveContext.n64ddFlag && !Randomizer_ObtainedMalonHCReward()) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag) ||
(gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F))) {
if (!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (IS_RANDO && !Randomizer_ObtainedMalonHCReward()) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !IS_RANDO) ||
(IS_RANDO && Flags_GetTreasure(play, 0x1F))) {
this->actionFunc = func_80AA0D88;
EnMa1_ChangeAnim(this, ENMA1_ANIM_2);
// If none of the above conditions were true, set Malon up to teach Epona's Song.
} else {
if (gSaveContext.n64ddFlag) { // Skip straight to "let's sing it together" textbox in the ranch
if (IS_RANDO) { // Skip straight to "let's sing it together" textbox in the ranch
Flags_SetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON);
}
@ -349,13 +349,13 @@ void func_80AA0D88(EnMa1* this, PlayState* play) {
// We want to Kill Malon's Actor outside of randomizer when Talon is freed. In Randomizer we don't kill Malon's
// Actor here, otherwise if we wake up Talon first and then get her check she will spontaneously
// disappear.
if ((play->sceneNum == SCENE_HYRULE_CASTLE) && (!gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE))) {
if ((play->sceneNum == SCENE_HYRULE_CASTLE) && (!IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE))) {
Actor_Kill(&this->actor);
// We want Malon to give the Weird Egg Check (see function below) in the following situations:
// 1. Talon as not left Hyrule Castle (Vanilla) OR
// 2. We haven't obtained Malon's Weird Egg Check (Randomizer only) OR
// 3. We have Epona's Song? (Vanilla only, not sure why it's here but I didn't write that one)
} else if ((!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (gSaveContext.n64ddFlag && !Randomizer_ObtainedMalonHCReward())) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag)) {
} else if ((!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (IS_RANDO && !Randomizer_ObtainedMalonHCReward())) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !IS_RANDO)) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
this->actionFunc = func_80AA0EA0;
play->msgCtx.stateTimer = 4;
@ -369,7 +369,7 @@ void func_80AA0EA0(EnMa1* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = func_80AA0EFC;
} else {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_WEIRD_EGG, 120.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_HC_MALON_EGG, GI_WEIRD_EGG);
@ -428,7 +428,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
this->actor.flags |= ACTOR_FLAG_WILL_TALK;
// when rando'ed, skip to the Item Giving. Otherwise go to the song teaching code.
this->actionFunc = gSaveContext.n64ddFlag ? func_80AA1150 : func_80AA106C;
this->actionFunc = IS_RANDO ? func_80AA1150 : func_80AA106C;
} else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) {
// somehow flags that the player is close to malon so that pulling out the Ocarina
// triggers the code above this.
@ -436,7 +436,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
}
// If rando'ed, a textbox is closing, it's malon's 'my mom wrote this song' text, AND we do have an ocarina
// in our inventory. This allows us to grant the check when talking to malon with the ocarina in our inventory.
if (gSaveContext.n64ddFlag && (Actor_TextboxIsClosing(&this->actor, play) && play->msgCtx.textId == 0x2049) &&
if (IS_RANDO && (Actor_TextboxIsClosing(&this->actor, play) && play->msgCtx.textId == 0x2049) &&
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE || INV_CONTENT(ITEM_OCARINA_TIME) != ITEM_NONE)) {
this->actionFunc = EnMa1_WaitForSongGive;
}
@ -474,7 +474,7 @@ void EnMa1_EndTeachSong(EnMa1* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
// Transition to the giving the song check on the next update run.
this->actionFunc = EnMa1_WaitForSongGive;
}
@ -484,12 +484,12 @@ void func_80AA1150(EnMa1* this, PlayState* play) {
GET_PLAYER(play)->stateFlags2 |= 0x800000;
// When rando'ed, trigger the "song learned" Ocarina mode.
if (gSaveContext.n64ddFlag && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
if (IS_RANDO && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
}
if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
play->nextEntranceIndex = 0x157;
gSaveContext.nextCutsceneIndex = 0xFFF1;
play->fadeTransition = 42;

View File

@ -373,8 +373,8 @@ u16 EnMd_GetTextKokiriForest(PlayState* play, EnMd* this) {
this->unk_209 = TEXT_STATE_NONE;
// In rando, skip talking about the tree being dead so we can have the prompt for sword and shield instead
if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
(gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) &&
if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
(IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) &&
Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
!Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH))) {
return 0x1045;
@ -489,7 +489,7 @@ u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) {
// He will spawn in the forest if you haven't showed the sword and shield, and will remain
// in the forest until you've obtained Zelda's letter or Deku Tree dies
// This is to ensure Deku Tree can still be opened in dungeon entrance rando even if Ghoma is defeated
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (play->sceneNum == SCENE_LOST_WOODS) {
return 1;
}
@ -681,8 +681,8 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
if (((play->sceneNum == SCENE_KOKIRI_FOREST) && !Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) ||
((play->sceneNum == SCENE_KOKIRI_FOREST) && (Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) &&
((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE)))) ||
((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE)))) ||
((play->sceneNum == SCENE_LOST_WOODS) && !Flags_GetEventChkInf(EVENTCHKINF_PLAYED_SARIAS_SONG_FOR_MIDO_AS_ADULT))) {
this->actor.home.pos = this->actor.world.pos;
this->actionFunc = func_80AAB948;
@ -745,8 +745,8 @@ void func_80AAB948(EnMd* this, PlayState* play) {
}
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH) &&
(play->sceneNum == SCENE_KOKIRI_FOREST)) {
play->msgCtx.msgMode = MSGMODE_PAUSED;
@ -814,8 +814,8 @@ void func_80AABD0C(EnMd* this, PlayState* play) {
return;
}
if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH) &&
(play->sceneNum == SCENE_KOKIRI_FOREST)) {
Message_CloseTextbox(play);

View File

@ -96,12 +96,12 @@ void func_80AACA94(EnMk* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play) != 0) {
this->actor.parent = NULL;
this->actionFunc = func_80AACA40;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_80088AA0(240);
gSaveContext.eventInf[1] &= ~1;
}
} else {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_TRADE_FROG, GI_EYEDROPS);
Randomizer_ConsumeAdultTradeItem(play, ITEM_FROG);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@ -116,7 +116,7 @@ void func_80AACA94(EnMk* this, PlayState* play) {
void func_80AACB14(EnMk* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->actionFunc = func_80AACA94;
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_TRADE_FROG, GI_EYEDROPS);
Randomizer_ConsumeAdultTradeItem(play, ITEM_FROG);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@ -150,7 +150,7 @@ void func_80AACC04(EnMk* this, PlayState* play) {
if (this->timer > 0) {
this->timer--;
} else {
this->timer = gSaveContext.n64ddFlag ? 0 : 16;
this->timer = IS_RANDO ? 0 : 16;
this->actionFunc = func_80AACBAC;
Animation_Change(&this->skelAnime, &object_mk_Anim_000D88, 1.0f, 0.0f,
Animation_GetLastFrame(&object_mk_Anim_000D88), ANIMMODE_LOOP, -4.0f);
@ -163,7 +163,7 @@ void func_80AACCA0(EnMk* this, PlayState* play) {
this->timer--;
this->actor.shape.rot.y += 0x800;
} else {
this->timer = gSaveContext.n64ddFlag ? 0 : 120;
this->timer = IS_RANDO ? 0 : 120;
this->actionFunc = func_80AACC04;
Animation_Change(&this->skelAnime, &object_mk_Anim_000724, 1.0f, 0.0f,
Animation_GetLastFrame(&object_mk_Anim_000724), ANIMMODE_LOOP, -4.0f);
@ -179,7 +179,7 @@ void func_80AACD48(EnMk* this, PlayState* play) {
this->actionFunc = func_80AACCA0;
play->msgCtx.msgMode = MSGMODE_PAUSED;
player->exchangeItemId = EXCH_ITEM_NONE;
this->timer = gSaveContext.n64ddFlag ? 0 : 16;
this->timer = IS_RANDO ? 0 : 16;
Animation_Change(&this->skelAnime, &object_mk_Anim_000D88, 1.0f, 0.0f,
Animation_GetLastFrame(&object_mk_Anim_000D88), ANIMMODE_LOOP, -4.0f);
this->flags &= ~2;
@ -219,7 +219,7 @@ void func_80AACFA0(EnMk* this, PlayState* play) {
Flags_SetItemGetInf(ITEMGETINF_10);
} else {
// not sure when/how/if this is getting called
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE);
@ -231,7 +231,7 @@ void func_80AACFA0(EnMk* this, PlayState* play) {
void func_80AAD014(EnMk* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->actionFunc = func_80AACFA0;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE);
@ -257,7 +257,7 @@ void EnMk_Wait(EnMk* this, PlayState* play) {
} else {
// Skip eye drop text on rando if Link went in the water, so you can still receive the dive check
if (INV_CONTENT(ITEM_ODD_MUSHROOM) == ITEM_EYEDROPS &&
(!gSaveContext.n64ddFlag || this->swimFlag == 0)) {
(!IS_RANDO || this->swimFlag == 0)) {
player->actor.textId = 0x4032;
this->actionFunc = func_80AACA40;
} else {

View File

@ -128,13 +128,13 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
switch (play->msgCtx.choiceIndex) {
case 0: // yes
if (gSaveContext.rupees <
((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS))
((IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS))
? 60
: sPrices[BEANS_BOUGHT])) {
Message_ContinueTextbox(play, 0x4069); // not enough rupees text
return;
}
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
GiveItemEntryFromActor(&this->actor, play,
Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f);
} else {
@ -152,12 +152,12 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
void EnMs_Sell(EnMs* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
Rupees_ChangeBy((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? -60 : -sPrices[BEANS_BOUGHT]);
Rupees_ChangeBy((IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? -60 : -sPrices[BEANS_BOUGHT]);
this->actor.parent = NULL;
this->actionFunc =
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase;
(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase;
} else {
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN);
gSaveContext.pendingSale = itemEntry.itemId;
gSaveContext.pendingSaleMod = itemEntry.modIndex;

View File

@ -1100,7 +1100,7 @@ void EnNb_LookUp(EnNb* this, PlayState* play) {
}
void EnNb_CrawlspaceSpawnCheck(EnNb* this, PlayState* play) {
if (!gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_NABOORU_CAPTURED_BY_TWINROVA) && LINK_IS_CHILD) {
if (!IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_NABOORU_CAPTURED_BY_TWINROVA) && LINK_IS_CHILD) {
EnNb_UpdatePath(this, play);
// looking into crawlspace

View File

@ -204,7 +204,7 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
EnNiw* currentCucco;
s32 phi_s1;
this->cuccosInPen = gSaveContext.n64ddFlag ? (7 - Randomizer_GetSettingValue(RSK_CUCCO_COUNT)) : 0;
this->cuccosInPen = IS_RANDO ? (7 - Randomizer_GetSettingValue(RSK_CUCCO_COUNT)) : 0;
currentCucco = (EnNiw*)play->actorCtx.actorLists[ACTORCAT_PROP].head;
while (currentCucco != NULL) {
if (currentCucco->actor.id == ACTOR_EN_NIW) {
@ -308,7 +308,7 @@ void func_80ABA654(EnNiwLady* this, PlayState* play) {
if (!Flags_GetItemGetInf(ITEMGETINF_0C)) {
this->actor.parent = NULL;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
this->getItemId = GI_BOTTLE;
func_8002F434(&this->actor, play, GI_BOTTLE, 100.0f, 50.0f);
} else {
@ -398,7 +398,7 @@ void func_80ABA9B8(EnNiwLady* this, PlayState* play) {
Message_CloseTextbox(play);
this->actor.parent = NULL;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_POCKET_EGG, 200.0f, 100.0f);
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG);
@ -433,7 +433,7 @@ void func_80ABAB08(EnNiwLady* this, PlayState* play) {
case 0:
Message_CloseTextbox(play);
this->actor.parent = NULL;
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_COJIRO, 200.0f, 100.0f);
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_POCKET_CUCCO, GI_COJIRO);
@ -462,7 +462,7 @@ void func_80ABAC00(EnNiwLady* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = func_80ABAC84;
} else {
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
getItemId = this->getItemEntry.getItemId;
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 200.0f, 100.0f);
return;
@ -483,7 +483,7 @@ void func_80ABAC84(EnNiwLady* this, PlayState* play) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
if (LINK_IS_ADULT) {
// Flags for randomizer gives are set in the original message prompt choice handling
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
if (!Flags_GetItemGetInf(ITEMGETINF_2C)) {
Flags_SetItemGetInf(ITEMGETINF_2C);
} else {

View File

@ -234,7 +234,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
if (play->msgCtx.ocarinaMode == OCARINA_MODE_04) {
this->actionFunc = func_80ABF28C;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
if (!gSaveContext.n64ddFlag || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_DOOR_OF_TIME) != RO_DOOROFTIME_CLOSED)) {
if (!IS_RANDO || (IS_RANDO && Randomizer_GetSettingValue(RSK_DOOR_OF_TIME) != RO_DOOROFTIME_CLOSED)) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
}
if (this->switchFlag >= 0) {
@ -246,7 +246,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_OPENED_ZORAS_DOMAIN);
break;
case 2:
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
play->csCtx.segment = D_80ABF9D0;
gSaveContext.cutsceneTrigger = 1;
} else {
@ -256,7 +256,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
func_800F574C(1.18921f, 0x5A);
break;
case 4:
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (Randomizer_GetSettingValue(RSK_DOOR_OF_TIME) == RO_DOOROFTIME_CLOSED &&
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_OCARINA_TIME ||
!CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || !CHECK_QUEST_ITEM(QUEST_GORON_RUBY) ||
@ -274,7 +274,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
break;
case 6:
// Don't start the cutscene in a rando save.
if (!(gSaveContext.n64ddFlag)) {
if (!(IS_RANDO)) {
play->csCtx.segment = LINK_IS_ADULT ? SEGMENTED_TO_VIRTUAL(&spot02_scene_Cs_003C80)
: SEGMENTED_TO_VIRTUAL(&spot02_scene_Cs_005020);
gSaveContext.cutsceneTrigger = 1;
@ -311,7 +311,7 @@ void func_80ABF708(EnOkarinaTag* this, PlayState* play) {
yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
this->unk_15A++;
if (!(this->actor.xzDistToPlayer > 120.0f)) {
if (CHECK_QUEST_ITEM(QUEST_SONG_SUN) || gSaveContext.n64ddFlag) {
if (CHECK_QUEST_ITEM(QUEST_SONG_SUN) || IS_RANDO) {
this->actor.textId = 0x5021;
}
yawDiffNew = ABS(yawDiff);
@ -335,10 +335,10 @@ void func_80ABF7CC(EnOkarinaTag* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
if (!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
if (!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gSunSongGraveSunSongTeachCs);
gSaveContext.cutsceneTrigger = 1;
} else if (gSaveContext.n64ddFlag && !Flags_GetTreasure(play, 0x1F)) {
} else if (IS_RANDO && !Flags_GetTreasure(play, 0x1F)) {
GivePlayerRandoRewardSunSong(this, play, RC_SONG_FROM_ROYAL_FAMILYS_TOMB);
}
this->actionFunc = func_80ABF708;

View File

@ -430,7 +430,7 @@ void EnOssan_SpawnItemsOnShelves(EnOssan* this, PlayState* play, ShopItem* shopI
this->shelfSlots[i] = NULL;
} else {
itemParams = sShopItemReplaceFunc[shopItems->shopItemIndex](shopItems->shopItemIndex);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, i);
if (shopItemIdentity.randomizerCheck != RC_UNKNOWN_CHECK) {
itemParams = shopItemIdentity.enGirlAShopItem;
@ -450,7 +450,7 @@ void EnOssan_SpawnItemsOnShelves(EnOssan* this, PlayState* play, ShopItem* shopI
shelves->actor.world.pos.y + shopItems->yOffset, shelves->actor.world.pos.z + shopItems->zOffset,
shelves->actor.shape.rot.x, shelves->actor.shape.rot.y + sItemShelfRot[i],
shelves->actor.shape.rot.z, itemParams, true);
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
this->shelfSlots[i]->randoSlotIndex = i;
}
}
@ -533,8 +533,8 @@ void EnOssan_TalkGoronShopkeeper(PlayState* play) {
} else {
Message_ContinueTextbox(play, 0x300F);
}
} else if ((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
} else if ((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
Message_ContinueTextbox(play, 0x3057);
} else {
Message_ContinueTextbox(play, 0x305B);
@ -607,7 +607,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
// If you haven't given Zelda's Letter to the Kakariko Guard
// or are rando'd and haven't gotten gotten the letter from zelda yet
if (this->actor.params == OSSAN_TYPE_MASK && (!Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD) ||
(gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)))) {
(IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)))) {
Actor_Kill(&this->actor);
return;
}
@ -619,7 +619,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
// Don't kill bombchu shop actor in rando, making it so the shop is immediately open
// Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) - Completed Dodongo's Cavern
if (this->actor.params == OSSAN_TYPE_BOMBCHUS && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && !gSaveContext.n64ddFlag) {
if (this->actor.params == OSSAN_TYPE_BOMBCHUS && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && !IS_RANDO) {
Actor_Kill(&this->actor);
return;
}
@ -946,7 +946,7 @@ void EnOssan_State_StartConversation(EnOssan* this, PlayState* play, Player* pla
return;
case OSSAN_HAPPY_STATE_ANGRY:
// In ER, handle happy mask throwing link out with not enough rupees
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x1D1);
} else {
play->nextEntranceIndex = 0x1D1;
@ -1383,7 +1383,7 @@ void EnOssan_GiveItemWithFanfare(PlayState* play, EnOssan* this) {
Player* player = GET_PLAYER(play);
osSyncPrintf("\n" VT_FGCOL(YELLOW) "初めて手にいれた!!" VT_RST "\n\n");
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f);
} else {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->cursorIndex);
@ -1538,7 +1538,7 @@ void EnOssan_BuyGoronCityBombs(PlayState* play, EnOssan* this) {
// Let players buy the right side of the goron shop in rando regardless of DC completion
// Players will still need a bomb bag to buy bombs (handled by vanilla behaviour)
// Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) - Completed Dodongo's Cavern
if (!gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
if (!IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
if (Flags_GetInfTable(INFTABLE_FC)) {
EnOssan_SetStateCantGetItem(play, this, 0x302E);
} else {
@ -1730,7 +1730,7 @@ void EnOssan_State_GiveItemWithFanfare(EnOssan* this, PlayState* play, Player* p
this->stateFlag = OSSAN_STATE_ITEM_PURCHASED;
return;
}
if (!gSaveContext.n64ddFlag) {
if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f);
} else {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->cursorIndex);

View File

@ -139,7 +139,7 @@ void EnOwl_Init(Actor* thisx, PlayState* play) {
if (((owlType != OWL_DEFAULT) && (switchFlag < 0x20) && Flags_GetSwitch(play, switchFlag)) ||
// Owl shortcuts at SPOT06: Lake Hylia and SPOT16: Death Mountain Trail
(gSaveContext.n64ddFlag && !(play->sceneNum == SCENE_LAKE_HYLIA || play->sceneNum == SCENE_DEATH_MOUNTAIN_TRAIL))) {
(IS_RANDO && !(play->sceneNum == SCENE_LAKE_HYLIA || play->sceneNum == SCENE_DEATH_MOUNTAIN_TRAIL))) {
osSyncPrintf("savebitでフクロウ退避\n"); // "Save owl with savebit"
Actor_Kill(&this->actor);
return;
@ -634,7 +634,7 @@ void func_80ACB274(EnOwl* this, PlayState* play) {
void EnOwl_WaitDeathMountainShortcut(EnOwl* this, PlayState* play) {
EnOwl_LookAtLink(this, play);
if (!gSaveContext.isMagicAcquired && !gSaveContext.n64ddFlag) {
if (!gSaveContext.isMagicAcquired && !IS_RANDO) {
if (func_80ACA558(this, play, 0x3062)) {
Audio_PlayFanfare(NA_BGM_OWL);
this->actionFunc = func_80ACB274;
@ -961,7 +961,7 @@ void func_80ACC00C(EnOwl* this, PlayState* play) {
osSyncPrintf(VT_FGCOL(CYAN));
osSyncPrintf("SPOT 06 の デモがはしった\n"); // "Demo of SPOT 06 has been completed"
osSyncPrintf(VT_RST);
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (Randomizer_GetSettingValue(RSK_SHUFFLE_OWL_DROPS)) {
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x027E);
} else {
@ -976,7 +976,7 @@ void func_80ACC00C(EnOwl* this, PlayState* play) {
break;
case 8:
case 9:
if (gSaveContext.n64ddFlag) {
if (IS_RANDO) {
if (Randomizer_GetSettingValue(RSK_SHUFFLE_OWL_DROPS)) {
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x0554);
} else {

View File

@ -143,8 +143,8 @@ void EnPoRelay_SetupRace(EnPoRelay* this) {
EnPoRelay_Vec3sToVec3f(&vec, &D_80AD8C30[this->pathIndex]);
this->actionTimer = ((s16)(this->actor.shape.rot.y - this->actor.world.rot.y - 0x8000) >> 0xB) % 32U;
func_80088B34(0);
this->hookshotSlotFull = (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE && !gSaveContext.n64ddFlag) ||
(gSaveContext.n64ddFlag && Flags_GetTreasure(gPlayState, 0x1E));
this->hookshotSlotFull = (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE && !IS_RANDO) ||
(IS_RANDO && Flags_GetTreasure(gPlayState, 0x1E));
this->unk_19A = Actor_WorldYawTowardPoint(&this->actor, &vec);
this->actor.flags |= ACTOR_FLAG_NO_LOCKON;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH);
@ -331,7 +331,7 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) {
}
}
if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.001f) != 0) {
if(!gSaveContext.n64ddFlag) {
if(!IS_RANDO) {
if (this->hookshotSlotFull != 0) {
sp60.x = this->actor.world.pos.x;
sp60.y = this->actor.floorHeight;

Some files were not shown because too many files have changed in this diff Show More