Address rando pr comments (#742)

* prefix randomizer methods with Randomizer_

* make filename a local var

* remove unused file, update malon to use new names

* move randomizertypes to randomizer directory

* rename to Randomizer_GetSettingValue

Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
briaguya 2022-07-18 19:20:07 -04:00 committed by GitHub
parent 93bea4c151
commit d45968270a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 197 additions and 217 deletions

View File

@ -229,9 +229,8 @@ static void onkeyup(WPARAM w_param, LPARAM l_param) {
} }
} }
char fileName[256];
static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_param, LPARAM l_param) { static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_param, LPARAM l_param) {
char fileName[256];
SohImGui::EventImpl event_impl; SohImGui::EventImpl event_impl;
event_impl.win32 = { h_wnd, static_cast<int>(message), static_cast<int>(w_param), static_cast<int>(l_param) }; event_impl.win32 = { h_wnd, static_cast<int>(message), static_cast<int>(w_param), static_cast<int>(l_param) };
SohImGui::Update(event_impl); SohImGui::Update(event_impl);

View File

@ -3,7 +3,7 @@
#include "ultra64.h" #include "ultra64.h"
#include "z64math.h" #include "z64math.h"
#include <randomizerTypes.h> #include "soh/Enhancements/randomizer/randomizerTypes.h"
typedef struct { typedef struct {
/* 0x00 */ u8 buttonItems[8]; /* 0x00 */ u8 buttonItems[8];

View File

@ -1,19 +0,0 @@
#include <Lib/spdlog/include/spdlog/spdlog.h>
void GenerateRandomizer() {
int ret = Playthrough::Playthrough_Init(std::hash<std::string>{}(Settings::seed));
if (ret < 0) {
if (ret == -1) { // Failed to generate after 5 tries
SPDLOG_ERROR(
"\n\nFailed to generate after 5 tries.\nPress B to go back to the menu.\nA different seed might be "
"successful.");
return;
} else {
SPDLOG_ERROR("\n\nError %d with fill.\nPress Select to exit or B to go back to the menu.\n", ret);
return;
}
}
const auto& randomizerHash = GetRandomizerHash();
}

View File

@ -983,7 +983,7 @@
<ClInclude Include="soh\Enhancements\randomizer\3drando\tinyxml2.h" /> <ClInclude Include="soh\Enhancements\randomizer\3drando\tinyxml2.h" />
<ClInclude Include="soh\Enhancements\randomizer\3drando\trial.hpp" /> <ClInclude Include="soh\Enhancements\randomizer\3drando\trial.hpp" />
<ClInclude Include="soh\Enhancements\randomizer\3drando\utils.hpp" /> <ClInclude Include="soh\Enhancements\randomizer\3drando\utils.hpp" />
<ClInclude Include="randomizerTypes.h" /> <ClInclude Include="soh\Enhancements\randomizer\randomizerTypes.h" />
<ClInclude Include="soh\Enhancements\randomizer\randomizer_item_tracker.h" /> <ClInclude Include="soh\Enhancements\randomizer\randomizer_item_tracker.h" />
<ClInclude Include="soh\frame_interpolation.h" /> <ClInclude Include="soh\frame_interpolation.h" />
<ClInclude Include="include\alloca.h" /> <ClInclude Include="include\alloca.h" />

View File

@ -4052,7 +4052,7 @@
<ClInclude Include="soh\Enhancements\randomizer\3drando\utils.hpp"> <ClInclude Include="soh\Enhancements\randomizer\3drando\utils.hpp">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="randomizerTypes.h"> <ClInclude Include="soh\Enhancements\randomizer\randomizerTypes.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="soh\Enhancements\gfx.h"> <ClInclude Include="soh\Enhancements\gfx.h">

View File

@ -14,7 +14,7 @@
#include "location_access.hpp" #include "location_access.hpp"
#include "debug.hpp" #include "debug.hpp"
#include <Lib/spdlog/include/spdlog/spdlog.h> #include <Lib/spdlog/include/spdlog/spdlog.h>
#include "randomizerTypes.h" #include "soh/Enhancements/randomizer/randomizerTypes.h"
namespace { namespace {
bool seedChanged; bool seedChanged;

View File

@ -2,7 +2,7 @@
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include "randomizerTypes.h" #include "soh/Enhancements/randomizer/randomizerTypes.h"
#define MAIN_MENU 0 #define MAIN_MENU 0
#define OPTION_SUB_MENU 1 #define OPTION_SUB_MENU 1

View File

@ -6,7 +6,7 @@
#include "logic.hpp" #include "logic.hpp"
#include "random.hpp" #include "random.hpp"
#include "spoiler_log.hpp" #include "spoiler_log.hpp"
#include "randomizerTypes.h" #include "soh/Enhancements/randomizer/randomizerTypes.h"
namespace Playthrough { namespace Playthrough {

View File

@ -4,7 +4,7 @@
#include <string> #include <string>
#include "../../../include/ultra64.h" #include "../../../include/ultra64.h"
#include "../../../include/z64item.h" #include "../../../include/z64item.h"
#include <randomizerTypes.h> #include "soh/Enhancements/randomizer/randomizerTypes.h"
class Randomizer { class Randomizer {
private: private:

View File

@ -1367,23 +1367,23 @@ extern "C" void* getN64WeirdFrame(s32 i) {
return &weirdFrameBytes[i + sizeof(n64WeirdFrames)]; return &weirdFrameBytes[i + sizeof(n64WeirdFrames)];
} }
extern "C" s16 GetItemModelFromId(s16 itemId) { extern "C" s16 Randomizer_GetItemModelFromId(s16 itemId) {
return OTRGlobals::Instance->gRandomizer->GetItemModelFromId(itemId); return OTRGlobals::Instance->gRandomizer->GetItemModelFromId(itemId);
} }
extern "C" s32 GetItemIDFromGetItemID(s32 getItemId) { extern "C" s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId) {
return OTRGlobals::Instance->gRandomizer->GetItemIDFromGetItemID(getItemId); return OTRGlobals::Instance->gRandomizer->GetItemIDFromGetItemID(getItemId);
} }
extern "C" void LoadRandomizerSettings(const char* spoilerFileName) { extern "C" void Randomizer_LoadSettings(const char* spoilerFileName) {
OTRGlobals::Instance->gRandomizer->LoadRandomizerSettings(spoilerFileName); OTRGlobals::Instance->gRandomizer->LoadRandomizerSettings(spoilerFileName);
} }
extern "C" void LoadHintLocations(const char* spoilerFileName) { extern "C" void Randomizer_LoadHintLocations(const char* spoilerFileName) {
OTRGlobals::Instance->gRandomizer->LoadHintLocations(spoilerFileName); OTRGlobals::Instance->gRandomizer->LoadHintLocations(spoilerFileName);
} }
extern "C" void LoadItemLocations(const char* spoilerFileName, bool silent) { extern "C" void Randomizer_LoadItemLocations(const char* spoilerFileName, bool silent) {
OTRGlobals::Instance->gRandomizer->LoadItemLocations(spoilerFileName, silent); OTRGlobals::Instance->gRandomizer->LoadItemLocations(spoilerFileName, silent);
} }
@ -1391,11 +1391,11 @@ extern "C" bool SpoilerFileExists(const char* spoilerFileName) {
return OTRGlobals::Instance->gRandomizer->SpoilerFileExists(spoilerFileName); return OTRGlobals::Instance->gRandomizer->SpoilerFileExists(spoilerFileName);
} }
extern "C" u8 GetRandoSettingValue(RandomizerSettingKey randoSettingKey) { extern "C" u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey) {
return OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(randoSettingKey); return OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(randoSettingKey);
} }
extern "C" RandomizerCheck GetCheckFromActor(s16 sceneNum, s16 actorId, s16 actorParams) { extern "C" RandomizerCheck Randomizer_GetCheckFromActor(s16 sceneNum, s16 actorId, s16 actorParams) {
return OTRGlobals::Instance->gRandomizer->GetCheckFromActor(sceneNum, actorId, actorParams); return OTRGlobals::Instance->gRandomizer->GetCheckFromActor(sceneNum, actorId, actorParams);
} }
@ -1471,33 +1471,33 @@ extern "C" int CopyScrubMessage(u16 scrubTextId, char* buffer, const int maxBuff
return CopyStringToCharBuffer(scrubText, buffer, maxBufferSize); return CopyStringToCharBuffer(scrubText, buffer, maxBufferSize);
} }
extern "C" int CopyAltarMessage(char* buffer, const int maxBufferSize) { extern "C" int Randomizer_CopyAltarMessage(char* buffer, const int maxBufferSize) {
const std::string& altarText = (LINK_IS_ADULT) ? OTRGlobals::Instance->gRandomizer->GetAdultAltarText() const std::string& altarText = (LINK_IS_ADULT) ? OTRGlobals::Instance->gRandomizer->GetAdultAltarText()
: OTRGlobals::Instance->gRandomizer->GetChildAltarText(); : OTRGlobals::Instance->gRandomizer->GetChildAltarText();
return CopyStringToCharBuffer(altarText, buffer, maxBufferSize); return CopyStringToCharBuffer(altarText, buffer, maxBufferSize);
} }
extern "C" int CopyGanonText(char* buffer, const int maxBufferSize) { extern "C" int Randomizer_CopyGanonText(char* buffer, const int maxBufferSize) {
const std::string& ganonText = OTRGlobals::Instance->gRandomizer->GetGanonText(); const std::string& ganonText = OTRGlobals::Instance->gRandomizer->GetGanonText();
return CopyStringToCharBuffer(ganonText, buffer, maxBufferSize); return CopyStringToCharBuffer(ganonText, buffer, maxBufferSize);
} }
extern "C" int CopyGanonHintText(char* buffer, const int maxBufferSize) { extern "C" int Randomizer_CopyGanonHintText(char* buffer, const int maxBufferSize) {
const std::string& ganonText = OTRGlobals::Instance->gRandomizer->GetGanonHintText(); const std::string& ganonText = OTRGlobals::Instance->gRandomizer->GetGanonHintText();
return CopyStringToCharBuffer(ganonText, buffer, maxBufferSize); return CopyStringToCharBuffer(ganonText, buffer, maxBufferSize);
} }
extern "C" int CopyHintFromCheck(RandomizerCheck check, char* buffer, const int maxBufferSize) { extern "C" int Randomizer_CopyHintFromCheck(RandomizerCheck check, char* buffer, const int maxBufferSize) {
// we don't want to make a copy of the std::string returned from GetHintFromCheck // we don't want to make a copy of the std::string returned from GetHintFromCheck
// so we're just going to let RVO take care of it // so we're just going to let RVO take care of it
const std::string& hintText = OTRGlobals::Instance->gRandomizer->GetHintFromCheck(check); const std::string& hintText = OTRGlobals::Instance->gRandomizer->GetHintFromCheck(check);
return CopyStringToCharBuffer(hintText, buffer, maxBufferSize); return CopyStringToCharBuffer(hintText, buffer, maxBufferSize);
} }
extern "C" s32 GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum) { extern "C" s32 Randomizer_GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum) {
return OTRGlobals::Instance->gRandomizer->GetRandomizedItemId(ogId, actorId, actorParams, sceneNum); return OTRGlobals::Instance->gRandomizer->GetRandomizedItemId(ogId, actorId, actorParams, sceneNum);
} }
extern "C" s32 GetRandomizedItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId) { extern "C" s32 Randomizer_GetItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId) {
return OTRGlobals::Instance->gRandomizer->GetRandomizedItemIdFromKnownCheck(randomizerCheck, ogId); return OTRGlobals::Instance->gRandomizer->GetRandomizedItemIdFromKnownCheck(randomizerCheck, ogId);
} }

View File

@ -84,19 +84,19 @@ void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples);
int Controller_ShouldRumble(size_t i); int Controller_ShouldRumble(size_t i);
void* getN64WeirdFrame(s32 i); void* getN64WeirdFrame(s32 i);
Sprite* GetSeedTexture(uint8_t index); Sprite* GetSeedTexture(uint8_t index);
void LoadRandomizerSettings(const char* spoilerFileName); void Randomizer_LoadSettings(const char* spoilerFileName);
u8 GetRandoSettingValue(RandomizerSettingKey randoSettingKey); u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey);
RandomizerCheck GetCheckFromActor(s16 actorId, s16 actorParams, s16 sceneNum); RandomizerCheck Randomizer_GetCheckFromActor(s16 actorId, s16 actorParams, s16 sceneNum);
int CopyAltarMessage(char* buffer, const int maxBufferSize); int Randomizer_CopyAltarMessage(char* buffer, const int maxBufferSize);
int CopyHintFromCheck(RandomizerCheck check, char* buffer, const int maxBufferSize); int Randomizer_CopyHintFromCheck(RandomizerCheck check, char* buffer, const int maxBufferSize);
int CopyGanonText(char* buffer, const int maxBufferSize); int Randomizer_CopyGanonText(char* buffer, const int maxBufferSize);
int CopyGanonHintText(char* buffer, const int maxBufferSize); int Randomizer_CopyGanonHintText(char* buffer, const int maxBufferSize);
void LoadHintLocations(const char* spoilerFileName); void Randomizer_LoadHintLocations(const char* spoilerFileName);
void LoadItemLocations(const char* spoilerFileName, bool silent); void Randomizer_LoadItemLocations(const char* spoilerFileName, bool silent);
s16 GetItemModelFromId(s16 itemId); s16 Randomizer_GetItemModelFromId(s16 itemId);
s32 GetItemIDFromGetItemID(s32 getItemId); s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId);
s32 GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum); s32 Randomizer_GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
s32 GetRandomizedItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId); s32 Randomizer_GetItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
#endif #endif
#endif #endif

View File

@ -5983,7 +5983,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
} }
s32 GetChestGameRandoGetItemId(s8 room, s16 ogDrawId, GlobalContext* globalCtx) { s32 GetChestGameRandoGetItemId(s8 room, s16 ogDrawId, GlobalContext* globalCtx) {
if (GetRandoSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) { if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
// RANDOTODO update this logic when we implement keysanity // RANDOTODO update this logic when we implement keysanity
// because 3drando replaces the keys not the rupees // because 3drando replaces the keys not the rupees
if (ogDrawId == GID_RUPEE_GREEN || if (ogDrawId == GID_RUPEE_GREEN ||
@ -5993,27 +5993,27 @@ s32 GetChestGameRandoGetItemId(s8 room, s16 ogDrawId, GlobalContext* globalCtx)
switch(room) { switch(room) {
case 1: case 1:
if(!Flags_GetCollectible(globalCtx, 0x1B)) { if(!Flags_GetCollectible(globalCtx, 0x1B)) {
return GetRandomizedItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_1, GI_RUPEE_GREEN); return Randomizer_GetItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_1, GI_RUPEE_GREEN);
} }
break; break;
case 2: case 2:
if(!Flags_GetCollectible(globalCtx, 0x1C)) { if(!Flags_GetCollectible(globalCtx, 0x1C)) {
return GetRandomizedItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_2, GI_RUPEE_GREEN); return Randomizer_GetItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_2, GI_RUPEE_GREEN);
} }
break; break;
case 3: case 3:
if(!Flags_GetCollectible(globalCtx, 0x1D)) { if(!Flags_GetCollectible(globalCtx, 0x1D)) {
return GetRandomizedItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_3, GI_RUPEE_BLUE); return Randomizer_GetItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_3, GI_RUPEE_BLUE);
} }
break; break;
case 4: case 4:
if(!Flags_GetCollectible(globalCtx, 0x1E)) { if(!Flags_GetCollectible(globalCtx, 0x1E)) {
return GetRandomizedItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_4, GI_RUPEE_BLUE); return Randomizer_GetItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_4, GI_RUPEE_BLUE);
} }
break; break;
case 5: case 5:
if(!Flags_GetCollectible(globalCtx, 0x1F)) { if(!Flags_GetCollectible(globalCtx, 0x1F)) {
return GetRandomizedItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_5, GI_RUPEE_RED); return Randomizer_GetItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_5, GI_RUPEE_RED);
} }
break; break;
} }
@ -6021,7 +6021,7 @@ s32 GetChestGameRandoGetItemId(s8 room, s16 ogDrawId, GlobalContext* globalCtx)
} }
if(ogDrawId == GID_HEART_PIECE) { if(ogDrawId == GID_HEART_PIECE) {
return GetRandomizedItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_REWARD, GI_HEART_PIECE); return Randomizer_GetItemIdFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_REWARD, GI_HEART_PIECE);
} }
return GI_NONE; return GI_NONE;
@ -6031,7 +6031,7 @@ s16 GetChestGameRandoGiDrawId(s8 room, s16 ogDrawId, GlobalContext* globalCtx) {
s32 randoGetItemId = GetChestGameRandoGetItemId(room, ogDrawId, globalCtx); s32 randoGetItemId = GetChestGameRandoGetItemId(room, ogDrawId, globalCtx);
if(randoGetItemId != GI_NONE) { if(randoGetItemId != GI_NONE) {
return GetItemModelFromId(randoGetItemId); return Randomizer_GetItemModelFromId(randoGetItemId);
} }
return ogDrawId; return ogDrawId;

View File

@ -2124,7 +2124,7 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
// If we are rando and tower escape skip is on, then set the flag to say we saw the towers fall // If we are rando and tower escape skip is on, then set the flag to say we saw the towers fall
// and exit. // and exit.
if (gSaveContext.n64ddFlag && GetRandoSettingValue(RSK_SKIP_TOWER_ESCAPE)) { if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE)) {
return; return;
} }
gSaveContext.cutsceneIndex = 0xFFF0; gSaveContext.cutsceneIndex = 0xFFF0;

View File

@ -509,7 +509,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
} }
if ((gSaveContext.n64ddFlag || getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) { if ((gSaveContext.n64ddFlag || getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) {
getItemId = GetRandomizedItemId(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum); getItemId = Randomizer_GetRandomizedItemId(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
func_8002F554(&this->actor, globalCtx, getItemId); func_8002F554(&this->actor, globalCtx, getItemId);
} }
@ -548,7 +548,7 @@ void func_8001DFC8(EnItem00* this, GlobalContext* globalCtx) {
} }
if (this->actor.params == ITEM00_HEART_PIECE) { if (this->actor.params == ITEM00_HEART_PIECE) {
if ((CVar_GetS32("gNewDrops", 0) !=0) && !gSaveContext.n64ddFlag) { if (CVar_GetS32("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
this->actor.shape.yOffset = Math_SinS(this->actor.shape.rot.y) * 20.0f + 50.0f; this->actor.shape.yOffset = Math_SinS(this->actor.shape.rot.y) * 20.0f + 50.0f;
} else { } else {
this->actor.shape.yOffset = Math_SinS(this->actor.shape.rot.y) * 150.0f + 850.0f; this->actor.shape.yOffset = Math_SinS(this->actor.shape.rot.y) * 150.0f + 850.0f;
@ -881,7 +881,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) { if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
getItemId = GetRandomizedItemId(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum); getItemId = Randomizer_GetRandomizedItemId(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
} }
func_8002F554(&this->actor, globalCtx, getItemId); func_8002F554(&this->actor, globalCtx, getItemId);
} }
@ -1300,11 +1300,11 @@ void EnItem00_DrawCollectible(EnItem00* this, GlobalContext* globalCtx) {
if ((gSaveContext.n64ddFlag && this->getItemId != GI_NONE) || this->actor.params == ITEM00_SMALL_KEY) { if ((gSaveContext.n64ddFlag && this->getItemId != GI_NONE) || this->actor.params == ITEM00_SMALL_KEY) {
f32 mtxScale = 16.0f; f32 mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
s32 randoGetItemId = GetRandomizedItemId(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum); s32 randoGetItemId = Randomizer_GetRandomizedItemId(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
} else { } else {
s32 texIndex = this->actor.params - 3; s32 texIndex = this->actor.params - 3;
@ -1360,11 +1360,11 @@ void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
f32 mtxScale = 16.0f; f32 mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
s32 randoGetItemId = GetRandomizedItemId(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum); s32 randoGetItemId = Randomizer_GetRandomizedItemId(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
} else { } else {
s32 pad; s32 pad;

View File

@ -1676,11 +1676,11 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
// if we're rando'd and talking to a gossip stone // if we're rando'd and talking to a gossip stone
if (gSaveContext.n64ddFlag && if (gSaveContext.n64ddFlag &&
textId == 0x2053 && textId == 0x2053 &&
GetRandoSettingValue(RSK_GOSSIP_STONE_HINTS) != 0 && Randomizer_GetSettingValue(RSK_GOSSIP_STONE_HINTS) != 0 &&
(GetRandoSettingValue(RSK_GOSSIP_STONE_HINTS) == 1 || (Randomizer_GetSettingValue(RSK_GOSSIP_STONE_HINTS) == 1 ||
(GetRandoSettingValue(RSK_GOSSIP_STONE_HINTS) == 2 && (Randomizer_GetSettingValue(RSK_GOSSIP_STONE_HINTS) == 2 &&
Player_GetMask(globalCtx) == PLAYER_MASK_TRUTH) || Player_GetMask(globalCtx) == PLAYER_MASK_TRUTH) ||
(GetRandoSettingValue(RSK_GOSSIP_STONE_HINTS) == 3 && (Randomizer_GetSettingValue(RSK_GOSSIP_STONE_HINTS) == 3 &&
CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)))) { CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)))) {
s16 actorParams = msgCtx->talkActor->params; s16 actorParams = msgCtx->talkActor->params;
@ -1700,14 +1700,14 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
} }
} }
RandomizerCheck hintCheck = GetCheckFromActor(globalCtx->sceneNum, msgCtx->talkActor->id, actorParams); RandomizerCheck hintCheck = Randomizer_GetCheckFromActor(globalCtx->sceneNum, msgCtx->talkActor->id, actorParams);
// Pass the sizeof the message buffer so we don't hardcode any sizes and can rely on globals. // Pass the sizeof the message buffer so we don't hardcode any sizes and can rely on globals.
// If no hint can be found, this just returns 0 size and doesn't modify the buffer, so no worries. // If no hint can be found, this just returns 0 size and doesn't modify the buffer, so no worries.
msgCtx->msgLength = font->msgLength = CopyHintFromCheck(hintCheck, font->msgBuf, sizeof(font->msgBuf)); msgCtx->msgLength = font->msgLength = Randomizer_CopyHintFromCheck(hintCheck, font->msgBuf, sizeof(font->msgBuf));
} else if (gSaveContext.n64ddFlag && (textId == 0x7040 || textId == 0x7088)) { } else if (gSaveContext.n64ddFlag && (textId == 0x7040 || textId == 0x7088)) {
// rando hints at altar // rando hints at altar
msgCtx->msgLength = font->msgLength = CopyAltarMessage(font->msgBuf, sizeof(font->msgBuf)); msgCtx->msgLength = font->msgLength = Randomizer_CopyAltarMessage(font->msgBuf, sizeof(font->msgBuf));
} else if (textId == 0x00b4 && CVar_GetS32("gInjectSkulltulaCount", 0) != 0) { } else if (textId == 0x00b4 && CVar_GetS32("gInjectSkulltulaCount", 0) != 0) {
switch (gSaveContext.language) { switch (gSaveContext.language) {
case LANGUAGE_FRA: case LANGUAGE_FRA:
@ -1731,9 +1731,9 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
msgCtx->msgLength = font->msgLength = CopyScrubMessage(textId, font->msgBuf, sizeof(font->msgBuf)); msgCtx->msgLength = font->msgLength = CopyScrubMessage(textId, font->msgBuf, sizeof(font->msgBuf));
} else if (gSaveContext.n64ddFlag && textId == 0x70CC) { } else if (gSaveContext.n64ddFlag && textId == 0x70CC) {
if (INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) { if (INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) {
msgCtx->msgLength = font->msgLength = CopyGanonText(font->msgBuf, sizeof(font->msgBuf)); msgCtx->msgLength = font->msgLength = Randomizer_CopyGanonText(font->msgBuf, sizeof(font->msgBuf));
} else { } else {
msgCtx->msgLength = font->msgLength = CopyGanonHintText(font->msgBuf, sizeof(font->msgBuf)); msgCtx->msgLength = font->msgLength = Randomizer_CopyGanonHintText(font->msgBuf, sizeof(font->msgBuf));
} }
} else { } else {
msgCtx->msgLength = font->msgLength; msgCtx->msgLength = font->msgLength;

View File

@ -1810,13 +1810,13 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
return ITEM_NONE; return ITEM_NONE;
} else if (item == ITEM_WALLET_ADULT) { } else if (item == ITEM_WALLET_ADULT) {
Inventory_ChangeUpgrade(UPG_WALLET, 1); Inventory_ChangeUpgrade(UPG_WALLET, 1);
if (gSaveContext.n64ddFlag && GetRandoSettingValue(RSK_FULL_WALLETS)) { if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(200); Rupees_ChangeBy(200);
} }
return ITEM_NONE; return ITEM_NONE;
} else if (item == ITEM_WALLET_GIANT) { } else if (item == ITEM_WALLET_GIANT) {
Inventory_ChangeUpgrade(UPG_WALLET, 2); Inventory_ChangeUpgrade(UPG_WALLET, 2);
if (gSaveContext.n64ddFlag && GetRandoSettingValue(RSK_FULL_WALLETS)) { if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(500); Rupees_ChangeBy(500);
} }
return ITEM_NONE; return ITEM_NONE;

View File

@ -198,7 +198,7 @@ void GivePlayerRandoRewardSongOfTime(GlobalContext* globalCtx, RandomizerCheck c
if (gSaveContext.entranceIndex == 0x050F && player != NULL && !Player_InBlockingCsMode(globalCtx, player) && if (gSaveContext.entranceIndex == 0x050F && player != NULL && !Player_InBlockingCsMode(globalCtx, player) &&
!Flags_GetTreasure(globalCtx, 0x1F) && gSaveContext.nextTransition == 0xFF) { !Flags_GetTreasure(globalCtx, 0x1F) && gSaveContext.nextTransition == 0xFF) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_SONG_OF_TIME); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_SONG_OF_TIME);
GiveItemWithoutActor(globalCtx, getItemId); GiveItemWithoutActor(globalCtx, getItemId);
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
} }
@ -212,7 +212,7 @@ void GivePlayerRandoRewardNocturne(GlobalContext* globalCtx, RandomizerCheck che
gSaveContext.entranceIndex == 0x0195) && LINK_IS_ADULT && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) && gSaveContext.entranceIndex == 0x0195) && LINK_IS_ADULT && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) &&
CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER) && player != NULL && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER) && player != NULL &&
!Player_InBlockingCsMode(globalCtx, player) && !Flags_GetEventChkInf(0xAA)) { !Player_InBlockingCsMode(globalCtx, player) && !Flags_GetEventChkInf(0xAA)) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_NOCTURNE_OF_SHADOW); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_NOCTURNE_OF_SHADOW);
GiveItemWithoutActor(globalCtx, getItemId); GiveItemWithoutActor(globalCtx, getItemId);
Flags_SetEventChkInf(0xAA); Flags_SetEventChkInf(0xAA);
} }
@ -224,7 +224,7 @@ void GivePlayerRandoRewardRequiem(GlobalContext* globalCtx, RandomizerCheck chec
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) { if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC) && player != NULL && if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC) && player != NULL &&
!Player_InBlockingCsMode(globalCtx, player)) { !Player_InBlockingCsMode(globalCtx, player)) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_SONG_OF_TIME); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_SONG_OF_TIME);
GiveItemWithoutActor(globalCtx, getItemId); GiveItemWithoutActor(globalCtx, getItemId);
Flags_SetEventChkInf(0xAC); Flags_SetEventChkInf(0xAC);
} }
@ -238,7 +238,7 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(GlobalContext* globalCtx, Randomi
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA) && (gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA) &&
!Flags_GetTreasure(globalCtx, 0x1E) && player != NULL && !Player_InBlockingCsMode(globalCtx, player) && !Flags_GetTreasure(globalCtx, 0x1E) && player != NULL && !Player_InBlockingCsMode(globalCtx, player) &&
globalCtx->sceneLoadFlag == 0 && player->getItemId == GI_NONE) { globalCtx->sceneLoadFlag == 0 && player->getItemId == GI_NONE) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_ARROW_LIGHT); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_ARROW_LIGHT);
GiveItemWithoutActor(globalCtx, getItemId); GiveItemWithoutActor(globalCtx, getItemId);
Flags_SetTreasure(globalCtx, 0x1E); Flags_SetTreasure(globalCtx, 0x1E);
} }
@ -247,7 +247,7 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(GlobalContext* globalCtx, Randomi
void GivePlayerRandoRewardSariaGift(GlobalContext* globalCtx, RandomizerCheck check) { void GivePlayerRandoRewardSariaGift(GlobalContext* globalCtx, RandomizerCheck check) {
Player* player = GET_PLAYER(globalCtx); Player* player = GET_PLAYER(globalCtx);
if (gSaveContext.entranceIndex == 0x05E0) { if (gSaveContext.entranceIndex == 0x05E0) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_ZELDAS_LULLABY); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_ZELDAS_LULLABY);
if ((!Flags_GetEventChkInf(0xC1) || (player->getItemId == getItemId && getItemId != GI_ICE_TRAP)) && if ((!Flags_GetEventChkInf(0xC1) || (player->getItemId == getItemId && getItemId != GI_ICE_TRAP)) &&
player != NULL && !Player_InBlockingCsMode(globalCtx, player)) { player != NULL && !Player_InBlockingCsMode(globalCtx, player)) {
@ -271,7 +271,7 @@ void Gameplay_Init(GameState* thisx) {
u8 tempSetupIndex; u8 tempSetupIndex;
s32 pad[2]; s32 pad[2];
if (gSaveContext.n64ddFlag && GetRandoSettingValue(RSK_SKIP_CHILD_STEALTH)) { if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH)) {
if (gSaveContext.entranceIndex == 0x7A) { if (gSaveContext.entranceIndex == 0x7A) {
gSaveContext.entranceIndex = 0x400; gSaveContext.entranceIndex = 0x400;
} else if (gSaveContext.entranceIndex == 0x296) { } else if (gSaveContext.entranceIndex == 0x296) {

View File

@ -416,7 +416,7 @@ void GiveLinkDungeonReward(GetItemID getItemId) {
} }
void GiveLinksPocketMedallion() { void GiveLinksPocketMedallion() {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(RC_LINKS_POCKET, RG_NONE); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(RC_LINKS_POCKET, RG_NONE);
GiveLinkDungeonReward(getItemId); GiveLinkDungeonReward(getItemId);
} }
@ -644,7 +644,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
// Give Link's pocket item // Give Link's pocket item
GiveLinksPocketMedallion(); GiveLinksPocketMedallion();
int openForest = GetRandoSettingValue(RSK_FOREST); int openForest = Randomizer_GetSettingValue(RSK_FOREST);
switch (openForest) { switch (openForest) {
case 0: // closed case 0: // closed
break; break;
@ -657,28 +657,28 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
break; break;
} }
int doorOfTime = GetRandoSettingValue(RSK_DOOR_OF_TIME); int doorOfTime = Randomizer_GetSettingValue(RSK_DOOR_OF_TIME);
switch (doorOfTime) { switch (doorOfTime) {
case 0: // open case 0: // open
gSaveContext.eventChkInf[4] |= 0x800; gSaveContext.eventChkInf[4] |= 0x800;
break; break;
} }
int kakGate = GetRandoSettingValue(RSK_KAK_GATE); int kakGate = Randomizer_GetSettingValue(RSK_KAK_GATE);
switch (kakGate) { switch (kakGate) {
case 1: // open case 1: // open
gSaveContext.infTable[7] |= 0x40; gSaveContext.infTable[7] |= 0x40;
break; break;
} }
if(GetRandoSettingValue(RSK_STARTING_KOKIRI_SWORD)) GiveLinkKokiriSword(); if(Randomizer_GetSettingValue(RSK_STARTING_KOKIRI_SWORD)) GiveLinkKokiriSword();
if(GetRandoSettingValue(RSK_STARTING_DEKU_SHIELD)) GiveLinkDekuShield(); if(Randomizer_GetSettingValue(RSK_STARTING_DEKU_SHIELD)) GiveLinkDekuShield();
if(GetRandoSettingValue(RSK_STARTING_OCARINA)) { if(Randomizer_GetSettingValue(RSK_STARTING_OCARINA)) {
INV_CONTENT(ITEM_OCARINA_FAIRY) = ITEM_OCARINA_FAIRY; INV_CONTENT(ITEM_OCARINA_FAIRY) = ITEM_OCARINA_FAIRY;
} }
if(GetRandoSettingValue(RSK_STARTING_MAPS_COMPASSES)) { if(Randomizer_GetSettingValue(RSK_STARTING_MAPS_COMPASSES)) {
uint32_t mapBitMask = 1 << 1; uint32_t mapBitMask = 1 << 1;
uint32_t compassBitMask = 1 << 2; uint32_t compassBitMask = 1 << 2;
uint32_t startingDungeonItemsBitMask = mapBitMask | compassBitMask; uint32_t startingDungeonItemsBitMask = mapBitMask | compassBitMask;
@ -687,13 +687,13 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
} }
} }
if (GetRandoSettingValue(RSK_STARTING_CONSUMABLES)) { if (Randomizer_GetSettingValue(RSK_STARTING_CONSUMABLES)) {
GiveLinkDekuSticks(10); GiveLinkDekuSticks(10);
GiveLinkDekuNuts(20); GiveLinkDekuNuts(20);
} }
if(GetRandoSettingValue(RSK_SKIP_CHILD_ZELDA)) { if(Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA)) {
s32 giid = GetRandomizedItemIdFromKnownCheck(RC_SONG_FROM_IMPA, GI_ZELDAS_LULLABY); s32 giid = Randomizer_GetItemIdFromKnownCheck(RC_SONG_FROM_IMPA, GI_ZELDAS_LULLABY);
if(giid >= GI_ZELDAS_LULLABY && giid <= GI_PRELUDE_OF_LIGHT) { if(giid >= GI_ZELDAS_LULLABY && giid <= GI_PRELUDE_OF_LIGHT) {
GiveLinkSong(giid); GiveLinkSong(giid);
@ -780,7 +780,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
} else if (giid == GI_DOUBLE_DEFENSE) { } else if (giid == GI_DOUBLE_DEFENSE) {
GiveLinkDoubleDefense(); GiveLinkDoubleDefense();
} else { } else {
s32 iid = GetItemIDFromGetItemID(giid); s32 iid = Randomizer_GetItemIDFromGetItemID(giid);
if (iid != -1) INV_CONTENT(iid) = iid; if (iid != -1) INV_CONTENT(iid) = iid;
} }
@ -801,18 +801,18 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
INV_CONTENT(ITEM_LETTER_ZELDA) = ITEM_LETTER_ZELDA; INV_CONTENT(ITEM_LETTER_ZELDA) = ITEM_LETTER_ZELDA;
} }
if (GetRandoSettingValue(RSK_FULL_WALLETS)) { if (Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
GiveLinkRupees(9001); GiveLinkRupees(9001);
} }
// For Ganon's boss key "Start With" is 0 // For Ganon's boss key "Start With" is 0
if(GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == 0) { if(Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY) == 0) {
gSaveContext.inventory.dungeonItems[10] |= 1; gSaveContext.inventory.dungeonItems[10] |= 1;
} }
HIGH_SCORE(HS_POE_POINTS) = 1000 - (100 * GetRandoSettingValue(RSK_BIG_POE_COUNT)); HIGH_SCORE(HS_POE_POINTS) = 1000 - (100 * Randomizer_GetSettingValue(RSK_BIG_POE_COUNT));
if(GetRandoSettingValue(RSK_SKIP_EPONA_RACE)) { if(Randomizer_GetSettingValue(RSK_SKIP_EPONA_RACE)) {
gSaveContext.eventChkInf[1] |= (1 << 8); gSaveContext.eventChkInf[1] |= (1 << 8);
} }
@ -839,7 +839,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.infTable[25] |= 0x20; gSaveContext.infTable[25] |= 0x20;
// fast gerudo fortress // fast gerudo fortress
if (GetRandoSettingValue(RSK_GERUDO_FORTRESS) == 1 || GetRandoSettingValue(RSK_GERUDO_FORTRESS) == 2) { if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 1 || Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 2) {
gSaveContext.eventChkInf[9] |= 2; gSaveContext.eventChkInf[9] |= 2;
gSaveContext.eventChkInf[9] |= 4; gSaveContext.eventChkInf[9] |= 4;
gSaveContext.eventChkInf[9] |= 8; gSaveContext.eventChkInf[9] |= 8;
@ -858,14 +858,14 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
} }
// open gerudo fortress // open gerudo fortress
if (GetRandoSettingValue(RSK_GERUDO_FORTRESS) == 2) { if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 2) {
gSaveContext.eventChkInf[9] |= 1; gSaveContext.eventChkInf[9] |= 1;
gSaveContext.sceneFlags[12].swch |= (1 << 0x01); gSaveContext.sceneFlags[12].swch |= (1 << 0x01);
gSaveContext.sceneFlags[12].swch |= (1 << 0x05); gSaveContext.sceneFlags[12].swch |= (1 << 0x05);
gSaveContext.sceneFlags[12].swch |= (1 << 0x11); gSaveContext.sceneFlags[12].swch |= (1 << 0x11);
gSaveContext.sceneFlags[12].collect |= (1 << 0x0C); gSaveContext.sceneFlags[12].collect |= (1 << 0x0C);
if (!GetRandoSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD)) { if (!Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD)) {
GiveLinkGerudoCard(); GiveLinkGerudoCard();
} }
} }

View File

@ -69,7 +69,7 @@ const ActorInit Bg_Dy_Yoseizo_InitVars = {
void GivePlayerRandoRewardGreatFairy(BgDyYoseizo* this, GlobalContext* globalCtx) { void GivePlayerRandoRewardGreatFairy(BgDyYoseizo* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx); Player* player = GET_PLAYER(globalCtx);
GetItemID getItemId = GetRandomizedItemId(GI_NONE, this->actor.id, this->fountainType + 1, globalCtx->sceneNum); GetItemID getItemId = Randomizer_GetRandomizedItemId(GI_NONE, this->actor.id, this->fountainType + 1, globalCtx->sceneNum);
if (this->actor.parent == GET_PLAYER(globalCtx) && !Flags_GetTreasure(globalCtx, this->fountainType + 1) && if (this->actor.parent == GET_PLAYER(globalCtx) && !Flags_GetTreasure(globalCtx, this->fountainType + 1) &&
!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) { !Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {

View File

@ -46,7 +46,7 @@ void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
this->somePos.z = thisx->world.pos.z; this->somePos.z = thisx->world.pos.z;
if (((gSaveContext.infTable[7] & 0x40) || if (((gSaveContext.infTable[7] & 0x40) ||
(!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[4] & 0x20)) || (!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[4] & 0x20)) ||
(gSaveContext.n64ddFlag && GetRandoSettingValue(RSK_KAK_GATE))) && (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_KAK_GATE))) &&
(globalCtx->sceneNum == SCENE_SPOT01)) { (globalCtx->sceneNum == SCENE_SPOT01)) {
thisx->world.pos.x = -89.0f; thisx->world.pos.x = -89.0f;
thisx->world.pos.z = -1375.0f; thisx->world.pos.z = -1375.0f;

View File

@ -50,7 +50,7 @@ void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx) {
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
int bridge = GetRandoSettingValue(RSK_RAINBOW_BRIDGE); int bridge = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE);
if (gSaveContext.eventChkInf[4] & 0x2000 || (gSaveContext.n64ddFlag && bridge == 0)) { if (gSaveContext.eventChkInf[4] & 0x2000 || (gSaveContext.n64ddFlag && bridge == 0)) {
this->actionFunc = func_808787A4; this->actionFunc = func_808787A4;
} else { } else {
@ -176,12 +176,12 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, GlobalContext* globalCtx)
LaunchBridgeCutscene(this, globalCtx); LaunchBridgeCutscene(this, globalCtx);
} }
} else { } else {
int bridge = GetRandoSettingValue(RSK_RAINBOW_BRIDGE); int bridge = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE);
int bridgeStoneCount = GetRandoSettingValue(RSK_RAINBOW_BRIDGE_STONE_COUNT); int bridgeStoneCount = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE_STONE_COUNT);
int bridgeMedallionCount = GetRandoSettingValue(RSK_RAINBOW_BRIDGE_MEDALLION_COUNT); int bridgeMedallionCount = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE_MEDALLION_COUNT);
int bridgeRewardCount = GetRandoSettingValue(RSK_RAINBOW_BRIDGE_REWARD_COUNT); int bridgeRewardCount = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE_REWARD_COUNT);
int bridgeDungeonCount = GetRandoSettingValue(RSK_RAINBOW_BRIDGE_DUNGEON_COUNT); int bridgeDungeonCount = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE_DUNGEON_COUNT);
int bridgeTokenCount = GetRandoSettingValue(RSK_RAINBOW_BRIDGE_TOKEN_COUNT); int bridgeTokenCount = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE_TOKEN_COUNT);
if (CheckPlayerPosition(player, globalCtx)) { if (CheckPlayerPosition(player, globalCtx)) {
switch (bridge) { switch (bridge) {

View File

@ -1504,7 +1504,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx)
if (this->csTimer == 180) { if (this->csTimer == 180) {
globalCtx->sceneLoadFlag = 0x14; globalCtx->sceneLoadFlag = 0x14;
if (gSaveContext.n64ddFlag && GetRandoSettingValue(RSK_SKIP_TOWER_ESCAPE)) { if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE)) {
Flags_SetEventChkInf(0xC7); Flags_SetEventChkInf(0xC7);
globalCtx->nextEntranceIndex = 0x517; globalCtx->nextEntranceIndex = 0x517;
} }

View File

@ -899,12 +899,12 @@ void func_80986BF8(DemoIm* this, GlobalContext* globalCtx) {
} }
void GivePlayerRandoRewardImpa(Actor* impa, GlobalContext* globalCtx, RandomizerCheck check) { void GivePlayerRandoRewardImpa(Actor* impa, GlobalContext* globalCtx, RandomizerCheck check) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_ZELDAS_LULLABY); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_ZELDAS_LULLABY);
if (impa->parent != NULL && impa->parent->id == GET_PLAYER(globalCtx)->actor.id && if (impa->parent != NULL && impa->parent->id == GET_PLAYER(globalCtx)->actor.id &&
!Flags_GetTreasure(globalCtx, 0x1F)) { !Flags_GetTreasure(globalCtx, 0x1F)) {
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
} else if (!Flags_GetTreasure(globalCtx, 0x1F) && !GetRandoSettingValue(RSK_SKIP_CHILD_ZELDA)) { } else if (!Flags_GetTreasure(globalCtx, 0x1F) && !Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA)) {
func_8002F434(impa, globalCtx, getItemId, 75.0f, 50.0f); func_8002F434(impa, globalCtx, getItemId, 75.0f, 50.0f);
} else if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) { } else if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
gSaveContext.eventChkInf[5] |= 0x200; gSaveContext.eventChkInf[5] |= 0x200;

View File

@ -128,7 +128,7 @@ void DemoKekkai_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider2.dim.yShift = 300; this->collider2.dim.yShift = 300;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
int trialsToComplete = GetRandoSettingValue(RSK_TRIAL_COUNT); int trialsToComplete = Randomizer_GetSettingValue(RSK_TRIAL_COUNT);
if (trialsToComplete <= TrialsDoneCount()) { if (trialsToComplete <= TrialsDoneCount()) {
Actor_Kill(thisx); Actor_Kill(thisx);
return; return;

View File

@ -462,7 +462,7 @@ s32 DoorWarp1_PlayerInRange(DoorWarp1* this, GlobalContext* globalCtx) {
} }
void GivePlayerRandoReward(DoorWarp1* this, Player* player, GlobalContext* globalCtx, u8 ruto, u8 adult) { void GivePlayerRandoReward(DoorWarp1* this, Player* player, GlobalContext* globalCtx, u8 ruto, u8 adult) {
GetItemID getItemId = GetRandomizedItemId(GI_NONE, this->actor.id, this->actor.params, globalCtx->sceneNum); GetItemID getItemId = Randomizer_GetRandomizedItemId(GI_NONE, this->actor.id, this->actor.params, globalCtx->sceneNum);
if (this->actor.parent != NULL && this->actor.parent->id == GET_PLAYER(globalCtx)->actor.id && if (this->actor.parent != NULL && this->actor.parent->id == GET_PLAYER(globalCtx)->actor.id &&
!Flags_GetTreasure(globalCtx, 0x1F)) { !Flags_GetTreasure(globalCtx, 0x1F)) {

View File

@ -127,7 +127,7 @@ void func_809B0558(EnAni* this, GlobalContext* globalCtx) {
gSaveContext.itemGetInf[1] |= 0x20; gSaveContext.itemGetInf[1] |= 0x20;
} else { } else {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE); s32 getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 200.0f); func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 200.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f); func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
@ -141,7 +141,7 @@ void func_809B05F0(EnAni* this, GlobalContext* globalCtx) {
} }
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE); s32 getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 200.0f); func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 200.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f); func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);

View File

@ -186,14 +186,14 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, GlobalContext* globalCtx) {
switch (this->prizeIndex) { switch (this->prizeIndex) {
case EXITEM_BOMB_BAG_BOWLING: case EXITEM_BOMB_BAG_BOWLING:
this->getItemId = this->getItemId =
GetRandomizedItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20); Randomizer_GetItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20);
break; break;
case EXITEM_HEART_PIECE_BOWLING: case EXITEM_HEART_PIECE_BOWLING:
this->getItemId = this->getItemId =
GetRandomizedItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE); Randomizer_GetItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
break; break;
case EXITEM_BOMBCHUS_BOWLING: case EXITEM_BOMBCHUS_BOWLING:
this->getItemId = GetRandomizedItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10); this->getItemId = Randomizer_GetItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10);
break; break;
} }
} }

View File

@ -421,7 +421,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
Flags_SetTreasure(globalCtx, this->dyna.actor.params & 0x1F); Flags_SetTreasure(globalCtx, this->dyna.actor.params & 0x1F);
// treasure chest game rando // treasure chest game rando
if (GetRandoSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) { if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
if (gSaveContext.n64ddFlag && globalCtx->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) { if (gSaveContext.n64ddFlag && globalCtx->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if((this->dyna.actor.params & 0xF) < 2) { if((this->dyna.actor.params & 0xF) < 2) {
Flags_SetCollectible(globalCtx, 0x1B); Flags_SetCollectible(globalCtx, 0x1B);
@ -445,10 +445,10 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos); func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos);
if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f && if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f &&
Player_IsFacingActor(&this->dyna.actor, 0x3000, globalCtx)) { Player_IsFacingActor(&this->dyna.actor, 0x3000, globalCtx)) {
int32_t item = GetRandomizedItemId(this->dyna.actor.params >> 5 & 0x7F, this->dyna.actor.id, this->dyna.actor.params, globalCtx->sceneNum); int32_t item = Randomizer_GetRandomizedItemId(this->dyna.actor.params >> 5 & 0x7F, this->dyna.actor.id, this->dyna.actor.params, globalCtx->sceneNum);
// RANDOTODO treasure chest game rando // RANDOTODO treasure chest game rando
if (GetRandoSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) { if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
if (gSaveContext.n64ddFlag && globalCtx->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) { if (gSaveContext.n64ddFlag && globalCtx->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if((this->dyna.actor.params & 0xF) < 2) { if((this->dyna.actor.params & 0xF) < 2) {
if(Flags_GetCollectible(globalCtx, 0x1B)) { if(Flags_GetCollectible(globalCtx, 0x1B)) {
@ -590,7 +590,7 @@ void EnBox_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
if (((!gSaveContext.n64ddFlag && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) || if (((!gSaveContext.n64ddFlag && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
(gSaveContext.n64ddFlag && GetRandomizedItemId(this->dyna.actor.params >> 5 & 0x7F, (gSaveContext.n64ddFlag && Randomizer_GetRandomizedItemId(this->dyna.actor.params >> 5 & 0x7F,
this->dyna.actor.id, this->dyna.actor.params, this->dyna.actor.id, this->dyna.actor.params,
globalCtx->sceneNum) == GI_ICE_TRAP)) && globalCtx->sceneNum) == GI_ICE_TRAP)) &&
this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 && this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 &&

View File

@ -453,7 +453,7 @@ void func_809EEA00(EnDivingGame* this, GlobalContext* globalCtx) {
if ((this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx))) { if ((this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx))) {
Message_CloseTextbox(globalCtx); Message_CloseTextbox(globalCtx);
this->actor.parent = NULL; this->actor.parent = NULL;
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER) : GI_SCALE_SILVER, 90.0f, 10.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER) : GI_SCALE_SILVER, 90.0f, 10.0f);
this->actionFunc = func_809EEA90; this->actionFunc = func_809EEA90;
} }
} }
@ -463,7 +463,7 @@ void func_809EEA90(EnDivingGame* this, GlobalContext* globalCtx) {
if (Actor_HasParent(&this->actor, globalCtx)) { if (Actor_HasParent(&this->actor, globalCtx)) {
this->actionFunc = func_809EEAF8; this->actionFunc = func_809EEAF8;
} else { } else {
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER) : GI_SCALE_SILVER, 90.0f, 10.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER) : GI_SCALE_SILVER, 90.0f, 10.0f);
} }
} }

View File

@ -371,7 +371,7 @@ void EnDns_Talk(EnDns* this, GlobalContext* globalCtx) {
void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) { void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) {
if (this->actor.params == 0x9) { if (this->actor.params == 0x9) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
func_8002F434(&this->actor, globalCtx, GetRandomizedItemId(GI_STICK_UPGRADE_30, this->actor.id, this->actor.params, globalCtx->sceneNum), 130.0f, 100.0f); func_8002F434(&this->actor, globalCtx, Randomizer_GetRandomizedItemId(GI_STICK_UPGRADE_30, this->actor.id, this->actor.params, globalCtx->sceneNum), 130.0f, 100.0f);
} else if (CUR_UPG_VALUE(UPG_STICKS) < 2) { } else if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
func_8002F434(&this->actor, globalCtx, GI_STICK_UPGRADE_20, 130.0f, 100.0f); func_8002F434(&this->actor, globalCtx, GI_STICK_UPGRADE_20, 130.0f, 100.0f);
} else { } else {
@ -379,14 +379,14 @@ void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) {
} }
} else if (this->actor.params == 0xA) { } else if (this->actor.params == 0xA) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
func_8002F434(&this->actor, globalCtx, GetRandomizedItemId(GI_NUT_UPGRADE_40, this->actor.id, this->actor.params, globalCtx->sceneNum), 130.0f, 100.0f); func_8002F434(&this->actor, globalCtx, Randomizer_GetRandomizedItemId(GI_NUT_UPGRADE_40, this->actor.id, this->actor.params, globalCtx->sceneNum), 130.0f, 100.0f);
} else if (CUR_UPG_VALUE(UPG_NUTS) < 2) { } else if (CUR_UPG_VALUE(UPG_NUTS) < 2) {
func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_30, 130.0f, 100.0f); func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_30, 130.0f, 100.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_40, 130.0f, 100.0f); func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_40, 130.0f, 100.0f);
} }
} else { } else {
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemId(this->dnsItemEntry->getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum) : this->dnsItemEntry->getItemId, 130.0f, 100.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetRandomizedItemId(this->dnsItemEntry->getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum) : this->dnsItemEntry->getItemId, 130.0f, 100.0f);
} }
} }

View File

@ -139,13 +139,13 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
switch (Player_GetMask(globalCtx)) { switch (Player_GetMask(globalCtx)) {
case PLAYER_MASK_SKULL: case PLAYER_MASK_SKULL:
if (!Flags_GetTreasure(globalCtx, 0x1F)) { if (!Flags_GetTreasure(globalCtx, 0x1F)) {
GiveItemWithoutActor(globalCtx, GetRandomizedItemIdFromKnownCheck(RC_DEKU_THEATER_SKULL_MASK, GI_STICK_UPGRADE_30)); GiveItemWithoutActor(globalCtx, Randomizer_GetItemIdFromKnownCheck(RC_DEKU_THEATER_SKULL_MASK, GI_STICK_UPGRADE_30));
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
} }
break; break;
case PLAYER_MASK_TRUTH: case PLAYER_MASK_TRUTH:
if (!Flags_GetTreasure(globalCtx, 0x1E)) { if (!Flags_GetTreasure(globalCtx, 0x1E)) {
GiveItemWithoutActor(globalCtx, GetRandomizedItemIdFromKnownCheck(RC_DEKU_THEATER_MASK_OF_TRUTH, GI_NUT_UPGRADE_40)); GiveItemWithoutActor(globalCtx, Randomizer_GetItemIdFromKnownCheck(RC_DEKU_THEATER_MASK_OF_TRUTH, GI_NUT_UPGRADE_40));
Flags_SetTreasure(globalCtx, 0x1E); Flags_SetTreasure(globalCtx, 0x1E);
} }
break; break;

View File

@ -548,7 +548,7 @@ void func_809FEC70(EnDu* this, GlobalContext* globalCtx) {
EnDu_SetupAction(this, func_809FECE4); EnDu_SetupAction(this, func_809FECE4);
} else { } else {
f32 xzRange = this->actor.xzDistToPlayer + 1.0f; f32 xzRange = this->actor.xzDistToPlayer + 1.0f;
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_GC_DARUNIAS_JOY, GI_BRACELET) : GI_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_GC_DARUNIAS_JOY, GI_BRACELET) : GI_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f);
} }
} }

View File

@ -138,8 +138,8 @@ void EnExItem_WaitForObject(EnExItem* this, GlobalContext* globalCtx) {
case EXITEM_BOMB_BAG_BOWLING: case EXITEM_BOMB_BAG_BOWLING:
this->unk_17C = func_8002EBCC; this->unk_17C = func_8002EBCC;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
this->giDrawId = GetItemModelFromId( this->giDrawId = Randomizer_GetItemModelFromId(
GetRandomizedItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20)); Randomizer_GetItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20));
} else { } else {
this->giDrawId = GID_BOMB_BAG_30; this->giDrawId = GID_BOMB_BAG_30;
} }
@ -173,8 +173,8 @@ void EnExItem_WaitForObject(EnExItem* this, GlobalContext* globalCtx) {
case EXITEM_BOMBCHUS_BOWLING: case EXITEM_BOMBCHUS_BOWLING:
this->unk_17C = func_8002EBCC; this->unk_17C = func_8002EBCC;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
this->giDrawId = GetItemModelFromId( this->giDrawId = Randomizer_GetItemModelFromId(
GetRandomizedItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10)); Randomizer_GetItemIdFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10));
} else { } else {
this->giDrawId = GID_BOMBCHU; this->giDrawId = GID_BOMBCHU;
} }
@ -229,7 +229,7 @@ void EnExItem_WaitForObject(EnExItem* this, GlobalContext* globalCtx) {
this->scale = 0.5f; this->scale = 0.5f;
this->unkFloat = 0.5f; this->unkFloat = 0.5f;
this->actor.velocity.y = 10.0f; this->actor.velocity.y = 10.0f;
if (!gSaveContext.n64ddFlag || !GetRandoSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) { if (!gSaveContext.n64ddFlag || !Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
switch (this->type) { switch (this->type) {
case EXITEM_GREEN_RUPEE_CHEST: case EXITEM_GREEN_RUPEE_CHEST:
this->giDrawId = GID_RUPEE_GREEN; this->giDrawId = GID_RUPEE_GREEN;
@ -404,7 +404,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
GET_PLAYER(globalCtx)->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11); GET_PLAYER(globalCtx)->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11);
getItemId = GetRandomizedItemIdFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50);
} else { } else {
if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) { if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) {
getItemId = GI_BULLET_BAG_40; getItemId = GI_BULLET_BAG_40;
@ -424,7 +424,7 @@ void EnExItem_TargetPrizeGive(EnExItem* this, GlobalContext* globalCtx) {
this->actionFunc = EnExItem_TargetPrizeFinish; this->actionFunc = EnExItem_TargetPrizeFinish;
} else { } else {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
getItemId = GetRandomizedItemIdFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50);
} else { } else {
getItemId = (CUR_UPG_VALUE(UPG_BULLET_BAG) == 2) ? GI_BULLET_BAG_50 : GI_BULLET_BAG_40; getItemId = (CUR_UPG_VALUE(UPG_BULLET_BAG) == 2) ? GI_BULLET_BAG_50 : GI_BULLET_BAG_40;
} }
@ -510,12 +510,12 @@ void EnExItem_DrawItems(EnExItem* this, GlobalContext* globalCtx) {
switch (this->type) { switch (this->type) {
case EXITEM_BOMB_BAG_BOWLING: case EXITEM_BOMB_BAG_BOWLING:
case EXITEM_BOMB_BAG_COUNTER: case EXITEM_BOMB_BAG_COUNTER:
randoGetItemId = GetRandomizedItemIdFromKnownCheck( randoGetItemId = Randomizer_GetItemIdFromKnownCheck(
RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20); RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20);
break; break;
case EXITEM_BOMBCHUS_BOWLING: case EXITEM_BOMBCHUS_BOWLING:
case EXITEM_BOMBCHUS_COUNTER: case EXITEM_BOMBCHUS_COUNTER:
randoGetItemId = GetRandomizedItemIdFromKnownCheck( randoGetItemId = Randomizer_GetItemIdFromKnownCheck(
RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10); RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10);
break; break;
} }
@ -532,12 +532,12 @@ void EnExItem_DrawHeartPiece(EnExItem* this, GlobalContext* globalCtx) {
func_8002ED80(&this->actor, globalCtx, 0); func_8002ED80(&this->actor, globalCtx, 0);
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 randoGetItemId = GetRandomizedItemIdFromKnownCheck( s32 randoGetItemId = Randomizer_GetItemIdFromKnownCheck(
RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE); RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
} else { } else {
GetItem_Draw(globalCtx, GID_HEART_PIECE); GetItem_Draw(globalCtx, GID_HEART_PIECE);
} }

View File

@ -940,7 +940,7 @@ void EnFr_SetReward(EnFr* this, GlobalContext* globalCtx) {
if (!gSaveContext.n64ddFlag) { if (!gSaveContext.n64ddFlag) {
this->reward = GI_HEART_PIECE; this->reward = GI_HEART_PIECE;
} else { } else {
this->reward = GetRandomizedItemIdFromKnownCheck(RC_ZR_FROGS_IN_THE_RAIN, GI_HEART_PIECE); this->reward = Randomizer_GetItemIdFromKnownCheck(RC_ZR_FROGS_IN_THE_RAIN, GI_HEART_PIECE);
} }
} else { } else {
this->reward = GI_RUPEE_BLUE; this->reward = GI_RUPEE_BLUE;
@ -951,7 +951,7 @@ void EnFr_SetReward(EnFr* this, GlobalContext* globalCtx) {
if (!gSaveContext.n64ddFlag) { if (!gSaveContext.n64ddFlag) {
this->reward = GI_HEART_PIECE; this->reward = GI_HEART_PIECE;
} else { } else {
this->reward = GetRandomizedItemIdFromKnownCheck(RC_ZR_FROGS_OCARINA_GAME, GI_HEART_PIECE); this->reward = Randomizer_GetItemIdFromKnownCheck(RC_ZR_FROGS_OCARINA_GAME, GI_HEART_PIECE);
} }
} else { } else {
this->reward = GI_RUPEE_PURPLE; this->reward = GI_RUPEE_PURPLE;

View File

@ -154,7 +154,7 @@ void GivePlayerRandoRewardSongOfStorms(EnFu* windmillGuy, GlobalContext* globalC
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
windmillGuy->actionFunc = func_80A1DBD4; windmillGuy->actionFunc = func_80A1DBD4;
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) { } else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_SONG_OF_STORMS); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_SONG_OF_STORMS);
func_8002F434(&windmillGuy->actor, globalCtx, getItemId, 10000.0f, 100.0f); func_8002F434(&windmillGuy->actor, globalCtx, getItemId, 10000.0f, 100.0f);
} }
} }

View File

@ -351,7 +351,7 @@ void func_80A2FA50(EnGb* this, GlobalContext* globalCtx) {
void func_80A2FB40(EnGb* this, GlobalContext* globalCtx) { void func_80A2FB40(EnGb* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
func_8002F434(&this->dyna.actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE) : GI_BOTTLE, 100.0f, 10.0f); func_8002F434(&this->dyna.actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE) : GI_BOTTLE, 100.0f, 10.0f);
this->actionFunc = func_80A2FBB0; this->actionFunc = func_80A2FBB0;
} }
} }
@ -361,7 +361,7 @@ void func_80A2FBB0(EnGb* this, GlobalContext* globalCtx) {
this->dyna.actor.parent = NULL; this->dyna.actor.parent = NULL;
this->actionFunc = func_80A2FC0C; this->actionFunc = func_80A2FC0C;
} else { } else {
func_8002F434(&this->dyna.actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE) : GI_BOTTLE, 100.0f, 10.0f); func_8002F434(&this->dyna.actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE) : GI_BOTTLE, 100.0f, 10.0f);
} }
} }

View File

@ -533,14 +533,14 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, GlobalContext* globalCtx) {
break; break;
} }
} else { } else {
getItemId = GetRandomizedItemIdFromKnownCheck( getItemId = Randomizer_GetItemIdFromKnownCheck(
RC_GF_HBA_1500_POINTS, CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50); RC_GF_HBA_1500_POINTS, CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50);
} }
} else { } else {
if (!gSaveContext.n64ddFlag) { if (!gSaveContext.n64ddFlag) {
getItemId = GI_HEART_PIECE; getItemId = GI_HEART_PIECE;
} else { } else {
getItemId = GetRandomizedItemIdFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
} }
} }
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 50.0f);
@ -567,14 +567,14 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) {
break; break;
} }
} else { } else {
getItemId = GetRandomizedItemIdFromKnownCheck(RC_GF_HBA_1500_POINTS, getItemId = Randomizer_GetItemIdFromKnownCheck(RC_GF_HBA_1500_POINTS,
CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50); CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50);
} }
} else { } else {
if (!gSaveContext.n64ddFlag) { if (!gSaveContext.n64ddFlag) {
getItemId = GI_HEART_PIECE; getItemId = GI_HEART_PIECE;
} else { } else {
getItemId = GetRandomizedItemIdFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
} }
} }

View File

@ -457,7 +457,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
this->actionFunc = EnGe2_SetActionAfterTalk; this->actionFunc = EnGe2_SetActionAfterTalk;
} else { } else {
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f);
} }
} }
@ -466,7 +466,7 @@ void EnGe2_GiveCard(EnGe2* this, GlobalContext* globalCtx) {
Message_CloseTextbox(globalCtx); Message_CloseTextbox(globalCtx);
this->actor.flags &= ~ACTOR_FLAG_16; this->actor.flags &= ~ACTOR_FLAG_16;
this->actionFunc = EnGe2_WaitTillCardGiven; this->actionFunc = EnGe2_WaitTillCardGiven;
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f);
} }
} }

View File

@ -142,7 +142,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
this->actionFunc = EnGe3_Wait; this->actionFunc = EnGe3_Wait;
} else { } else {
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f);
} }
} }
@ -151,7 +151,7 @@ void EnGe3_GiveCard(EnGe3* this, GlobalContext* globalCtx) {
Message_CloseTextbox(globalCtx); Message_CloseTextbox(globalCtx);
this->actor.flags &= ~ACTOR_FLAG_16; this->actor.flags &= ~ACTOR_FLAG_16;
this->actionFunc = EnGe3_WaitTillCardGiven; this->actionFunc = EnGe3_WaitTillCardGiven;
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD) : GI_GERUDO_CARD, 10000.0f, 50.0f);
} }
} }

View File

@ -955,7 +955,7 @@ void EnGo_GetItem(EnGo* this, GlobalContext* globalCtx) {
this->unk_20C = 0; this->unk_20C = 0;
if ((this->actor.params & 0xF0) == 0x90) { if ((this->actor.params & 0xF0) == 0x90) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) { if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
getItemId = gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS) : GI_SWORD_BGS; getItemId = gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS) : GI_SWORD_BGS;
this->unk_20C = 1; this->unk_20C = 1;
} }
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) { if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {

View File

@ -342,7 +342,7 @@ s16 EnGo2_GetStateGoronCityRollingBig(GlobalContext* globalCtx, EnGo2* this) {
if(!gSaveContext.n64ddFlag) { if(!gSaveContext.n64ddFlag) {
bombBagUpgrade = CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30; bombBagUpgrade = CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30;
} else { } else {
bombBagUpgrade = GetRandomizedItemIdFromKnownCheck(RC_GC_ROLLING_GORON_AS_CHILD, GI_BOMB_BAG_40); bombBagUpgrade = Randomizer_GetItemIdFromKnownCheck(RC_GC_ROLLING_GORON_AS_CHILD, GI_BOMB_BAG_40);
} }
EnGo2_GetItem(this, globalCtx, bombBagUpgrade); EnGo2_GetItem(this, globalCtx, bombBagUpgrade);
Message_CloseTextbox(globalCtx); Message_CloseTextbox(globalCtx);
@ -538,7 +538,7 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
} }
gSaveContext.infTable[16] |= 0x200; gSaveContext.infTable[16] |= 0x200;
EnGo2_GetItem(this, globalCtx, GetRandomizedItemIdFromKnownCheck(RC_GC_ROLLING_GORON_AS_ADULT, GI_TUNIC_GORON)); EnGo2_GetItem(this, globalCtx, Randomizer_GetItemIdFromKnownCheck(RC_GC_ROLLING_GORON_AS_ADULT, GI_TUNIC_GORON));
this->actionFunc = EnGo2_SetupGetItem; this->actionFunc = EnGo2_SetupGetItem;
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
return 2; return 2;
@ -617,7 +617,7 @@ s16 EnGo2_GetStateGoronDmtBiggoron(GlobalContext* globalCtx, EnGo2* this) {
return 0; return 0;
} }
EnGo2_GetItem(this, globalCtx, GetRandomizedItemIdFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS)); EnGo2_GetItem(this, globalCtx, Randomizer_GetItemIdFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS));
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
} else { } else {
EnGo2_GetItem(this, globalCtx, GI_SWORD_BGS); EnGo2_GetItem(this, globalCtx, GI_SWORD_BGS);

View File

@ -659,7 +659,7 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
gSaveContext.dogParams = 0; gSaveContext.dogParams = 0;
break; break;
case 0x709F: case 0x709F:
func_80A6F7CC(this, globalCtx, (gSaveContext.infTable[25] & 2) ? GI_RUPEE_BLUE : gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_MARKET_LOST_DOG, GI_HEART_PIECE) : GI_HEART_PIECE); func_80A6F7CC(this, globalCtx, (gSaveContext.infTable[25] & 2) ? GI_RUPEE_BLUE : gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_MARKET_LOST_DOG, GI_HEART_PIECE) : GI_HEART_PIECE);
this->actionFunc = func_80A714C4; this->actionFunc = func_80A714C4;
break; break;
} }

View File

@ -344,7 +344,7 @@ void EnKz_Init(Actor* thisx, GlobalContext* globalCtx) {
EnKz_SetMovedPos(this, globalCtx); EnKz_SetMovedPos(this, globalCtx);
} }
} else { } else {
int zorasFountain = GetRandoSettingValue(RSK_ZORAS_FOUNTAIN); int zorasFountain = Randomizer_GetSettingValue(RSK_ZORAS_FOUNTAIN);
switch (zorasFountain) { switch (zorasFountain) {
case 0: case 0:
if (gSaveContext.eventChkInf[3] & 8) { if (gSaveContext.eventChkInf[3] & 8) {
@ -464,10 +464,10 @@ void EnKz_SetupGetItem(EnKz* this, GlobalContext* globalCtx) {
} else { } else {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
if (this->isTrading) { if (this->isTrading) {
getItemId = GetRandomizedItemIdFromKnownCheck(RC_ZD_TRADE_PRESCRIPTION, GI_FROG); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_ZD_TRADE_PRESCRIPTION, GI_FROG);
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
} else { } else {
getItemId = GetRandomizedItemIdFromKnownCheck(RC_ZD_KING_ZORA_THAWED, GI_TUNIC_ZORA); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_ZD_KING_ZORA_THAWED, GI_TUNIC_ZORA);
} }
} else { } else {
getItemId = this->isTrading ? GI_FROG : GI_TUNIC_ZORA; getItemId = this->isTrading ? GI_FROG : GI_TUNIC_ZORA;

View File

@ -338,7 +338,7 @@ void func_80AA0EA0(EnMa1* this, GlobalContext* globalCtx) {
this->actionFunc = func_80AA0EFC; this->actionFunc = func_80AA0EFC;
} else { } else {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(RC_HC_MALON_EGG, GI_WEIRD_EGG); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(RC_HC_MALON_EGG, GI_WEIRD_EGG);
func_8002F434(&this->actor, globalCtx, getItemId, 120.0f, 10.0f); func_8002F434(&this->actor, globalCtx, getItemId, 120.0f, 10.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, GI_WEIRD_EGG, 120.0f, 10.0f); func_8002F434(&this->actor, globalCtx, GI_WEIRD_EGG, 120.0f, 10.0f);
@ -356,7 +356,7 @@ void func_80AA0EFC(EnMa1* this, GlobalContext* globalCtx) {
} }
void GivePlayerRandoRewardMalon(EnMa1* malon, GlobalContext* globalCtx, RandomizerCheck check) { void GivePlayerRandoRewardMalon(EnMa1* malon, GlobalContext* globalCtx, RandomizerCheck check) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_EPONAS_SONG); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_EPONAS_SONG);
// Prevents flag from getting set if we weren't able to get the item (i.e. Player is holding shield // Prevents flag from getting set if we weren't able to get the item (i.e. Player is holding shield
// when closing the textbox). // when closing the textbox).
if (malon->actor.parent != NULL && malon->actor.parent->id == GET_PLAYER(globalCtx)->actor.id && if (malon->actor.parent != NULL && malon->actor.parent->id == GET_PLAYER(globalCtx)->actor.id &&

View File

@ -487,7 +487,7 @@ u8 EnMd_ShouldSpawn(EnMd* this, GlobalContext* globalCtx) {
// if we have beaten deku tree or have open forest turned on // if we have beaten deku tree or have open forest turned on
// or have already shown mido we have an equipped sword/shield // or have already shown mido we have an equipped sword/shield
if (gSaveContext.dungeonsDone[1] || if (gSaveContext.dungeonsDone[1] ||
GetRandoSettingValue(RSK_FOREST) == 1 || Randomizer_GetSettingValue(RSK_FOREST) == 1 ||
gSaveContext.eventChkInf[0] & 0x10) { gSaveContext.eventChkInf[0] & 0x10) {
return 0; return 0;
} }

View File

@ -198,14 +198,14 @@ void func_80AACFA0(EnMk* this, GlobalContext* globalCtx) {
gSaveContext.itemGetInf[1] |= 1; gSaveContext.itemGetInf[1] |= 1;
} else { } else {
// not sure when/how/if this is getting called // not sure when/how/if this is getting called
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE) : GI_HEART_PIECE, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE) : GI_HEART_PIECE, 10000.0f, 50.0f);
} }
} }
void func_80AAD014(EnMk* this, GlobalContext* globalCtx) { void func_80AAD014(EnMk* this, GlobalContext* globalCtx) {
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
this->actionFunc = func_80AACFA0; this->actionFunc = func_80AACFA0;
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE) : GI_HEART_PIECE, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE) : GI_HEART_PIECE, 10000.0f, 50.0f);
} }
this->flags |= 1; this->flags |= 1;

View File

@ -200,7 +200,7 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
EnNiw* currentCucco; EnNiw* currentCucco;
s32 phi_s1; s32 phi_s1;
this->cuccosInPen = gSaveContext.n64ddFlag ? (7 - GetRandoSettingValue(RSK_CUCCO_COUNT)) : 0; this->cuccosInPen = gSaveContext.n64ddFlag ? (7 - Randomizer_GetSettingValue(RSK_CUCCO_COUNT)) : 0;
currentCucco = (EnNiw*)globalCtx->actorCtx.actorLists[ACTORCAT_PROP].head; currentCucco = (EnNiw*)globalCtx->actorCtx.actorLists[ACTORCAT_PROP].head;
while (currentCucco != NULL) { while (currentCucco != NULL) {
if (currentCucco->actor.id == ACTOR_EN_NIW) { if (currentCucco->actor.id == ACTOR_EN_NIW) {
@ -305,7 +305,7 @@ void func_80ABA654(EnNiwLady* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 itemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_ANJU_AS_CHILD, GI_BOTTLE); s32 itemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_ANJU_AS_CHILD, GI_BOTTLE);
func_8002F434(&this->actor, globalCtx, itemId, 100.0f, 50.0f); func_8002F434(&this->actor, globalCtx, itemId, 100.0f, 50.0f);
} else { } else {
this->getItemId = GI_BOTTLE; this->getItemId = GI_BOTTLE;
@ -395,7 +395,7 @@ void func_80ABA9B8(EnNiwLady* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 itemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG); s32 itemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG);
func_8002F434(&this->actor, globalCtx, itemId, 200.0f, 100.0f); func_8002F434(&this->actor, globalCtx, itemId, 200.0f, 100.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, GI_POCKET_EGG, 200.0f, 100.0f); func_8002F434(&this->actor, globalCtx, GI_POCKET_EGG, 200.0f, 100.0f);
@ -455,7 +455,7 @@ void func_80ABAC00(EnNiwLady* this, GlobalContext* globalCtx) {
getItemId = !(gSaveContext.itemGetInf[2] & 0x1000) ? GI_POCKET_EGG : GI_COJIRO; getItemId = !(gSaveContext.itemGetInf[2] & 0x1000) ? GI_POCKET_EGG : GI_COJIRO;
if (gSaveContext.n64ddFlag && getItemId == GI_POCKET_EGG) { if (gSaveContext.n64ddFlag && getItemId == GI_POCKET_EGG) {
getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG);
} }
} }
func_8002F434(&this->actor, globalCtx, getItemId, 200.0f, 100.0f); func_8002F434(&this->actor, globalCtx, getItemId, 200.0f, 100.0f);

View File

@ -234,7 +234,7 @@ void func_80ABF4C8(EnOkarinaTag* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) { if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
this->actionFunc = func_80ABF28C; this->actionFunc = func_80ABF28C;
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) { } else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
if (!gSaveContext.n64ddFlag || (gSaveContext.n64ddFlag && GetRandoSettingValue(RSK_DOOR_OF_TIME) != 2)) { if (!gSaveContext.n64ddFlag || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_DOOR_OF_TIME) != 2)) {
func_80078884(NA_SE_SY_CORRECT_CHIME); func_80078884(NA_SE_SY_CORRECT_CHIME);
} }
if (this->switchFlag >= 0) { if (this->switchFlag >= 0) {
@ -257,7 +257,7 @@ void func_80ABF4C8(EnOkarinaTag* this, GlobalContext* globalCtx) {
break; break;
case 4: case 4:
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
int doorOfTime = GetRandoSettingValue(RSK_DOOR_OF_TIME); int doorOfTime = Randomizer_GetSettingValue(RSK_DOOR_OF_TIME);
if (doorOfTime == 2 && if (doorOfTime == 2 &&
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_OCARINA_TIME || (INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_OCARINA_TIME ||
!CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || !CHECK_QUEST_ITEM(QUEST_GORON_RUBY) || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || !CHECK_QUEST_ITEM(QUEST_GORON_RUBY) ||
@ -327,7 +327,7 @@ void GivePlayerRandoRewardSunSong(EnOkarinaTag* song, GlobalContext* globalCtx,
!Flags_GetTreasure(globalCtx, 0x1F)) { !Flags_GetTreasure(globalCtx, 0x1F)) {
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) { } else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
func_8002F434(&song->actor, globalCtx, getItemId, 10000.0f, 100.0f); func_8002F434(&song->actor, globalCtx, getItemId, 10000.0f, 100.0f);
} }
} }

View File

@ -619,7 +619,7 @@ void func_80AF67D0(EnSa* this, GlobalContext* globalCtx) {
void GivePlayerRandoRewardSaria(EnSa* saria, GlobalContext* globalCtx, RandomizerCheck check) { void GivePlayerRandoRewardSaria(EnSa* saria, GlobalContext* globalCtx, RandomizerCheck check) {
GetItemID getItemId = GetItemID getItemId =
GetRandomizedItemIdFromKnownCheck(check, GI_SARIAS_SONG); Randomizer_GetItemIdFromKnownCheck(check, GI_SARIAS_SONG);
if (saria->actor.parent != NULL && saria->actor.parent->id == GET_PLAYER(globalCtx)->actor.id && if (saria->actor.parent != NULL && saria->actor.parent->id == GET_PLAYER(globalCtx)->actor.id &&
!Flags_GetTreasure(globalCtx, 0x1F)) { !Flags_GetTreasure(globalCtx, 0x1F)) {

View File

@ -1035,7 +1035,7 @@ void EnSkj_SariaSongTalk(EnSkj* this, GlobalContext* globalCtx) {
EnSkj_SetupWaitInRange(this); EnSkj_SetupWaitInRange(this);
} else { } else {
func_80AFFE24(this); func_80AFFE24(this);
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_LW_SKULL_KID, GI_HEART_PIECE) : GI_HEART_PIECE, EnSkj_GetItemXzRange(this), func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_LW_SKULL_KID, GI_HEART_PIECE) : GI_HEART_PIECE, EnSkj_GetItemXzRange(this),
EnSkj_GetItemYRange(this)); EnSkj_GetItemYRange(this));
} }
} }
@ -1050,7 +1050,7 @@ void func_80AFFE44(EnSkj* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
EnSkj_SetupPostSariasSong(this); EnSkj_SetupPostSariasSong(this);
} else { } else {
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_LW_SKULL_KID, GI_HEART_PIECE) : GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this)); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_LW_SKULL_KID, GI_HEART_PIECE) : GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this));
} }
} }
@ -1529,7 +1529,7 @@ void EnSkj_WaitToGiveReward(EnSkj* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) { if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
func_8002F434(&this->actor, globalCtx, func_8002F434(&this->actor, globalCtx,
gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3 gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3
? GetRandomizedItemIdFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE) ? Randomizer_GetItemIdFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE)
: sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], : sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum],
26.0f, 26.0f); 26.0f, 26.0f);
@ -1544,7 +1544,7 @@ void EnSkj_GiveOcarinaGameReward(EnSkj* this, GlobalContext* globalCtx) {
} else { } else {
func_8002F434(&this->actor, globalCtx, func_8002F434(&this->actor, globalCtx,
gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3 gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3
? GetRandomizedItemIdFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE) ? Randomizer_GetItemIdFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE)
: sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], : sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum],
26.0f, 26.0f); 26.0f, 26.0f);
} }

View File

@ -245,19 +245,19 @@ void EnSth_GivePlayerItem(EnSth* this, GlobalContext* globalCtx) {
case GI_RUPEE_GOLD: case GI_RUPEE_GOLD:
break; break;
case GI_WALLET_ADULT: case GI_WALLET_ADULT:
getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_10_GOLD_SKULLTULA_REWARD, GI_WALLET_ADULT); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_10_GOLD_SKULLTULA_REWARD, GI_WALLET_ADULT);
break; break;
case GI_STONE_OF_AGONY: case GI_STONE_OF_AGONY:
getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_20_GOLD_SKULLTULA_REWARD, GI_STONE_OF_AGONY); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_20_GOLD_SKULLTULA_REWARD, GI_STONE_OF_AGONY);
break; break;
case GI_WALLET_GIANT: case GI_WALLET_GIANT:
getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_30_GOLD_SKULLTULA_REWARD, GI_WALLET_GIANT); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_30_GOLD_SKULLTULA_REWARD, GI_WALLET_GIANT);
break; break;
case GI_BOMBCHUS_10: case GI_BOMBCHUS_10:
getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_40_GOLD_SKULLTULA_REWARD, GI_BOMBCHUS_10); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_40_GOLD_SKULLTULA_REWARD, GI_BOMBCHUS_10);
break; break;
case GI_HEART_PIECE: case GI_HEART_PIECE:
getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_50_GOLD_SKULLTULA_REWARD, GI_HEART_PIECE); getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_50_GOLD_SKULLTULA_REWARD, GI_HEART_PIECE);
break; break;
} }
} else { } else {

View File

@ -336,7 +336,7 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
if(gSaveContext.n64ddFlag && !Flags_GetTreasure(globalCtx, 0x1E)) { if(gSaveContext.n64ddFlag && !Flags_GetTreasure(globalCtx, 0x1E)) {
this->getItemId = GetRandomizedItemIdFromKnownCheck(RC_MARKET_SHOOTING_GALLERY_REWARD, GI_BULLET_BAG_50); this->getItemId = Randomizer_GetItemIdFromKnownCheck(RC_MARKET_SHOOTING_GALLERY_REWARD, GI_BULLET_BAG_50);
Flags_SetTreasure(globalCtx, 0x1E); Flags_SetTreasure(globalCtx, 0x1E);
} else if (!gSaveContext.n64ddFlag && !(gSaveContext.itemGetInf[0] & 0x2000)) { } else if (!gSaveContext.n64ddFlag && !(gSaveContext.itemGetInf[0] & 0x2000)) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Pachinko ☆☆☆☆☆ %d\n" VT_RST, osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Pachinko ☆☆☆☆☆ %d\n" VT_RST,
@ -351,7 +351,7 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
} }
} else { } else {
if(gSaveContext.n64ddFlag && !Flags_GetTreasure(globalCtx, 0x1F)) { if(gSaveContext.n64ddFlag && !Flags_GetTreasure(globalCtx, 0x1F)) {
this->getItemId = GetRandomizedItemIdFromKnownCheck(RC_KAK_SHOOTING_GALLERY_REWARD, GI_QUIVER_50); this->getItemId = Randomizer_GetItemIdFromKnownCheck(RC_KAK_SHOOTING_GALLERY_REWARD, GI_QUIVER_50);
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);
} else if (!gSaveContext.n64ddFlag && !(gSaveContext.itemGetInf[0] & 0x4000)) { } else if (!gSaveContext.n64ddFlag && !(gSaveContext.itemGetInf[0] & 0x4000)) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Bow ☆☆☆☆☆ %d\n" VT_RST, osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Bow ☆☆☆☆☆ %d\n" VT_RST,

View File

@ -883,7 +883,7 @@ void func_80B15F54(EnTa* this, GlobalContext* globalCtx) {
Message_CloseTextbox(globalCtx); Message_CloseTextbox(globalCtx);
this->unk_2E0 &= ~0x2; this->unk_2E0 &= ~0x2;
func_80B13AA0(this, func_80B15E80, func_80B16938); func_80B13AA0(this, func_80B15E80, func_80B16938);
func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? GetRandomizedItemIdFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE) : GI_MILK_BOTTLE, 10000.0f, 50.0f); func_8002F434(&this->actor, globalCtx, gSaveContext.n64ddFlag ? Randomizer_GetItemIdFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE) : GI_MILK_BOTTLE, 10000.0f, 50.0f);
} }
} }

View File

@ -292,7 +292,7 @@ void GivePlayerRandoRewardSheikSong(EnXc* sheik, GlobalContext* globalCtx, Rando
!(gSaveContext.eventChkInf[5] & sheikType)) { !(gSaveContext.eventChkInf[5] & sheikType)) {
gSaveContext.eventChkInf[5] |= sheikType; gSaveContext.eventChkInf[5] |= sheikType;
} else if (!(gSaveContext.eventChkInf[5] & sheikType)) { } else if (!(gSaveContext.eventChkInf[5] & sheikType)) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, ogSongId); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, ogSongId);
if (check == RC_SHEIK_AT_TEMPLE && !Flags_GetTreasure(globalCtx, 0x1F)) { if (check == RC_SHEIK_AT_TEMPLE && !Flags_GetTreasure(globalCtx, 0x1F)) {
if (func_8002F434(&sheik->actor, globalCtx, getItemId, 10000.0f, 100.0f)) { if (func_8002F434(&sheik->actor, globalCtx, getItemId, 10000.0f, 100.0f)) {
Flags_SetTreasure(globalCtx, 0x1F); Flags_SetTreasure(globalCtx, 0x1F);

View File

@ -231,9 +231,9 @@ void GivePlayerRandoRewardZeldaChild(EnZl4* zelda, GlobalContext* globalCtx, Ran
if (zelda->actor.parent != NULL && zelda->actor.parent->id == GET_PLAYER(globalCtx)->actor.id && if (zelda->actor.parent != NULL && zelda->actor.parent->id == GET_PLAYER(globalCtx)->actor.id &&
!Flags_GetTreasure(globalCtx, 0x1E)) { !Flags_GetTreasure(globalCtx, 0x1E)) {
Flags_SetTreasure(globalCtx, 0x1E); Flags_SetTreasure(globalCtx, 0x1E);
} else if (!Flags_GetTreasure(globalCtx, 0x1E) && !GetRandoSettingValue(RSK_SKIP_CHILD_ZELDA) && Actor_TextboxIsClosing(&zelda->actor, globalCtx) && } else if (!Flags_GetTreasure(globalCtx, 0x1E) && !Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA) && Actor_TextboxIsClosing(&zelda->actor, globalCtx) &&
(globalCtx->msgCtx.textId == 0x703C || globalCtx->msgCtx.textId == 0x703D)) { (globalCtx->msgCtx.textId == 0x703C || globalCtx->msgCtx.textId == 0x703D)) {
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA); GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
func_8002F434(&zelda->actor, globalCtx, getItemId, 10000.0f, 100.0f); func_8002F434(&zelda->actor, globalCtx, getItemId, 10000.0f, 100.0f);
} else if (Flags_GetTreasure(globalCtx, 0x1E) && !Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) { } else if (Flags_GetTreasure(globalCtx, 0x1E) && !Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
gSaveContext.unk_13EE = 0x32; gSaveContext.unk_13EE = 0x32;

View File

@ -5044,7 +5044,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
HIGH_SCORE(HS_FISHING) |= 0x400; HIGH_SCORE(HS_FISHING) |= 0x400;
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1; sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
getItemId = gSaveContext.n64ddFlag ? getItemId = gSaveContext.n64ddFlag ?
GetRandomizedItemIdFromKnownCheck(RC_LH_CHILD_FISHING, GI_HEART_PIECE) : Randomizer_GetItemIdFromKnownCheck(RC_LH_CHILD_FISHING, GI_HEART_PIECE) :
GI_HEART_PIECE; GI_HEART_PIECE;
} }
} }
@ -5054,7 +5054,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
HIGH_SCORE(HS_FISHING) |= 0x800; HIGH_SCORE(HS_FISHING) |= 0x800;
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1; sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
getItemId = gSaveContext.n64ddFlag ? getItemId = gSaveContext.n64ddFlag ?
GetRandomizedItemIdFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD) : Randomizer_GetItemIdFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD) :
GI_SCALE_GOLD; GI_SCALE_GOLD;
} }
} }
@ -5130,7 +5130,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
func_8002F434(&this->actor, globalCtx, GI_SCALE_GOLD, 2000.0f, 1000.0f); func_8002F434(&this->actor, globalCtx, GI_SCALE_GOLD, 2000.0f, 1000.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, func_8002F434(&this->actor, globalCtx,
GetRandomizedItemIdFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD), 2000.0f, Randomizer_GetItemIdFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD), 2000.0f,
1000.0f); 1000.0f);
} }
} }

View File

@ -60,7 +60,7 @@ void ItemBHeart_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} else { } else {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 getItemId = GetRandomizedItemId(GI_HEART_CONTAINER_2, this->actor.id, this->actor.params, globalCtx->sceneNum); s32 getItemId = Randomizer_GetRandomizedItemId(GI_HEART_CONTAINER_2, this->actor.id, this->actor.params, globalCtx->sceneNum);
func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 40.0f); func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 40.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, GI_HEART_CONTAINER_2, 30.0f, 40.0f); func_8002F434(&this->actor, globalCtx, GI_HEART_CONTAINER_2, 30.0f, 40.0f);
@ -100,7 +100,7 @@ void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
GetItem_Draw(globalCtx, GetItem_Draw(globalCtx,
GetItemModelFromId(GetRandomizedItemId(GI_HEART_CONTAINER_2, this->actor.id, this->actor.params, globalCtx->sceneNum))); Randomizer_GetItemModelFromId(Randomizer_GetRandomizedItemId(GI_HEART_CONTAINER_2, this->actor.id, this->actor.params, globalCtx->sceneNum)));
} else { } else {
if (flag) { if (flag) {
func_80093D84(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx);

View File

@ -133,7 +133,7 @@ void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx) {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} else { } else {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 getItemId = GetRandomizedItemIdFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE); s32 getItemId = Randomizer_GetItemIdFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE);
func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f); func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f); func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
@ -156,7 +156,7 @@ void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx) {
if (0) {} // Necessary to match if (0) {} // Necessary to match
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 getItemId = GetRandomizedItemIdFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO); s32 getItemId = Randomizer_GetItemIdFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO);
func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f); func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f);
} else { } else {
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f); func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
@ -234,7 +234,7 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
if (randoGetItemId != GI_NONE) { if (randoGetItemId != GI_NONE) {
GetItem_Draw(globalCtx, GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
return; return;
} }
} }
@ -250,9 +250,9 @@ void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 randoGetItemId = GI_NONE; s32 randoGetItemId = GI_NONE;
if (type == ITEM_ETC_ARROW_FIRE) { if (type == ITEM_ETC_ARROW_FIRE) {
randoGetItemId = GetRandomizedItemIdFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE); randoGetItemId = Randomizer_GetItemIdFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE);
} else if (type == ITEM_ETC_LETTER) { } else if (type == ITEM_ETC_LETTER) {
randoGetItemId = GetRandomizedItemIdFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO); randoGetItemId = Randomizer_GetItemIdFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO);
} }
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) {
@ -260,7 +260,7 @@ void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) {
} }
if (randoGetItemId != GI_NONE) { if (randoGetItemId != GI_NONE) {
this->giDrawId = GetItemModelFromId(randoGetItemId); this->giDrawId = Randomizer_GetItemModelFromId(randoGetItemId);
} }
} }

View File

@ -191,7 +191,7 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx) {
} else { } else {
func_8002F434(&this->actor, globalCtx, func_8002F434(&this->actor, globalCtx,
gSaveContext.n64ddFlag gSaveContext.n64ddFlag
? GetRandomizedItemIdFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT) ? Randomizer_GetItemIdFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT)
: GI_OCARINA_OOT, : GI_OCARINA_OOT,
30.0f, 50.0f); 30.0f, 50.0f);
@ -214,11 +214,11 @@ void ItemOcarina_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8002ED80(thisx, globalCtx, 0); func_8002ED80(thisx, globalCtx, 0);
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 randoGetItemId = GetRandomizedItemIdFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT); s32 randoGetItemId = Randomizer_GetItemIdFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
return; return;
} }

View File

@ -431,9 +431,9 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
CVar_SetString("gDroppedFile", ""); CVar_SetString("gDroppedFile", "");
fileSelectSpoilerFileLoaded = false; fileSelectSpoilerFileLoaded = false;
const char* fileLoc = CVar_GetString("gSpoilerLog", ""); const char* fileLoc = CVar_GetString("gSpoilerLog", "");
LoadRandomizerSettings(fileLoc); Randomizer_LoadSettings(fileLoc);
LoadHintLocations(fileLoc); Randomizer_LoadHintLocations(fileLoc);
LoadItemLocations(fileLoc, silent); Randomizer_LoadItemLocations(fileLoc, silent);
fileSelectSpoilerFileLoaded = true; fileSelectSpoilerFileLoaded = true;
} }
@ -1740,9 +1740,9 @@ void FileChoose_LoadGame(GameState* thisx) {
this->state.running = false; this->state.running = false;
} }
LoadRandomizerSettings(""); Randomizer_LoadSettings("");
LoadHintLocations(""); Randomizer_LoadHintLocations("");
LoadItemLocations("", true); Randomizer_LoadItemLocations("", true);
gSaveContext.respawn[0].entranceIndex = -1; gSaveContext.respawn[0].entranceIndex = -1;
gSaveContext.respawnFlag = 0; gSaveContext.respawnFlag = 0;