Merge branch 'HarbourMasters:develop' into rando-quest-item-fanfares

This commit is contained in:
Sarge-117 2022-07-18 16:48:01 -07:00 committed by GitHub
commit b4291516b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
76 changed files with 408 additions and 260 deletions

View File

@ -12,7 +12,7 @@
8. Build the solution. 8. Build the solution.
9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`. 9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`.
10. Run `soh/soh.sln` 10. Run `soh/soh.sln`
11. Switch the solution to `Release x86`. 11. Switch the solution to `Release x86` or `Release x64`.
12. Build the solution. 12. Build the solution.
13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`. 13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`.
14. Launch `soh.exe`. 14. Launch `soh.exe`.

9
Jenkinsfile vendored
View File

@ -125,6 +125,11 @@ pipeline {
agent { agent {
label "SoH-Mac-Builders" label "SoH-Mac-Builders"
} }
environment {
CC = 'clang -arch arm64 -arch x86_64'
CXX = 'clang++ -arch arm64 -arch x86_64'
MACOSX_DEPLOYMENT_TARGET = 10.15
}
steps { steps {
checkout([ checkout([
$class: 'GitSCM', $class: 'GitSCM',
@ -137,8 +142,8 @@ pipeline {
sh ''' sh '''
cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64
cd soh cd soh
export CC="clang -arch arm64 -arch x86_64"; export CXX="clang++ -arch arm64 -arch x86_64"; make setup -j4 OPTFLAGS=-O2 DEBUG=0 LD="ld" make setup -j4 OPTFLAGS=-O2 DEBUG=0 LD="ld"
export CC="clang -arch arm64 -arch x86_64"; export CXX="clang++ -arch arm64 -arch x86_64"; make -j4 DEBUG=0 OPTFLAGS=-O2 LD="ld" make -j4 DEBUG=0 OPTFLAGS=-O2 LD="ld"
make -j4 appbundle make -j4 appbundle
mv ../README.md readme.txt mv ../README.md readme.txt
7z a soh-mac.7z soh.app readme.txt 7z a soh-mac.7z soh.app readme.txt

View File

@ -4,10 +4,15 @@ import os, sys, shutil
import shutil import shutil
from rom_info import Z64Rom from rom_info import Z64Rom
import rom_chooser import rom_chooser
import struct
def BuildOTR(xmlPath, rom): def BuildOTR(xmlPath, rom):
shutil.copytree("assets", "Extract/assets") shutil.copytree("assets", "Extract/assets")
checksum = int(Z64Rom(rom).checksum.value, 16)
with open("Extract/version", "wb") as f:
f.write(struct.pack('<L', checksum))
execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPDTR/ZAPD.out" execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPDTR/ZAPD.out"
execStr += " ed -i %s -b %s -fl CFG/filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom) execStr += " ed -i %s -b %s -fl CFG/filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom)

View File

@ -64,7 +64,7 @@ Other shortcuts:
| Alt+Enter | Fullscreen (DirectX) | | Alt+Enter | Fullscreen (DirectX) |
| Ctrl+R | Reset | | Ctrl+R | Reset |
Currently, DirectX 11 and OpenGL are supported. Change the renderer by opening the `shipofharkinian.ini` configuration file in notepad and add `sdl` to `gfx backend` for OpenGL or leave blank for DirectX. Currently, DirectX 11 and OpenGL are supported. Change the renderer by opening the `shipofharkinian.json` configuration file in notepad and add `sdl` to the quotes in `"GfxBackend": ""` for OpenGL or leave blank for DirectX.
## Take The Survey ## Take The Survey
Want to use cartridge readers in tandem with the OTRGui? Want to use cartridge readers in tandem with the OTRGui?

View File

@ -45,8 +45,8 @@ ifneq ($(DEPRECATION_ON),0)
endif endif
# CXXFLAGS += -DTEXTURE_DEBUG # CXXFLAGS += -DTEXTURE_DEBUG
LDFLAGS := -lm -ldl \ LDFLAGS := -Llib/libgfxd -L../libultraship -L../StormLib/build \
-L../StormLib/build -L../libultraship -lbz2 -pthread -lultraship -lstorm -pthread -lgfxd -lultraship ZAPDUtils/ZAPDUtils.a -lstorm -lbz2 -lm -ldl
ifeq ($(UNAME), Darwin) ifeq ($(UNAME), Darwin)
LDFLAGS += $(shell pkg-config --libs glew libpng zlib) $(shell sdl2-config --libs) -framework OpenGL -framework Foundation LDFLAGS += $(shell pkg-config --libs glew libpng zlib) $(shell sdl2-config --libs) -framework OpenGL -framework Foundation
@ -137,4 +137,4 @@ ZAPDUtils:
# Linking # Linking
ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a ExporterTest ZAPDUtils StormLib ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a ExporterTest ZAPDUtils StormLib
$(CXX) $(CXXFLAGS) $(O_FILES) lib/libgfxd/libgfxd.a ZAPDUtils/ZAPDUtils.a ../StormLib/build/libstorm.a $(EXPORTERS) $(LDFLAGS) $(OUTPUT_OPTION) $(CXX) $(CXXFLAGS) $(O_FILES) $(EXPORTERS) $(LDFLAGS) $(OUTPUT_OPTION)

View File

@ -2,8 +2,8 @@
curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod a+x linuxdeploy*.AppImage chmod a+x linuxdeploy*.AppImage
curl -sSfLO "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" curl -sSfL https://github.com$(curl https://github.com/probonopd/go-appimage/releases | grep "mkappimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -o mkappimage.AppImage
chmod a+x appimagetool*.AppImage chmod a+x mkappimage.AppImage
mkdir -p AppDir/usr/bin mkdir -p AppDir/usr/bin
cp appimage/{soh.desktop,soh.sh} AppDir/ cp appimage/{soh.desktop,soh.sh} AppDir/
@ -30,5 +30,5 @@ export UPD_INFO="gh-releases-zsync|HarbourMasters|Shipwright-linux|develop|SOH-L
cd /soh cd /soh
./appimagetool-x86_64.AppImage --appimage-extract-and-run ./AppDir "SOH-Linux.AppImage" VERSION=Linux ./mkappimage.AppImage --appimage-extract-and-run ./AppDir # "SOH-Linux-x86_64.AppImage"
mv SOH-Linux-x86_64.AppImage SOH-Linux.AppImage # Keep Original Name

View File

@ -3,6 +3,7 @@ HERE="$(dirname "$(readlink -f "${0}")")"/../..
export PATH="$HERE"/bin:"$HERE"/usr/bin:"$PATH" export PATH="$HERE"/bin:"$HERE"/usr/bin:"$PATH"
export LD_LIBRARY_PATH="$HERE"/usr/lib:"$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$HERE"/usr/lib:"$LD_LIBRARY_PATH"
export ZENITY=$(command -v zenity)
while [[ ! -e "$PWD"/oot.otr ]]; do while [[ ! -e "$PWD"/oot.otr ]]; do
export ASSETDIR="$(mktemp -d /tmp/assets-XXXXX)" export ASSETDIR="$(mktemp -d /tmp/assets-XXXXX)"
@ -14,16 +15,26 @@ while [[ ! -e "$PWD"/oot.otr ]]; do
ln -s "$OLDPWD"/*.*64 "$ASSETDIR"/tmp/rom.z64 ln -s "$OLDPWD"/*.*64 "$ASSETDIR"/tmp/rom.z64
cp -r "$ASSETDIR"/assets/game/ship_of_harkinian "$ASSETDIR"/Extract/assets/ cp -r "$ASSETDIR"/assets/game/ship_of_harkinian "$ASSETDIR"/Extract/assets/
cd "$ASSETDIR" cd "$ASSETDIR"
case $(sha1sum -b "$ASSETDIR"/tmp/rom.z64 | awk '{ print $1 }') in ROMHASH=$(sha1sum -b "$ASSETDIR"/tmp/rom.z64 | awk '{ print $1 }')
case "$ROMHASH" in
cee6bc3c2a634b41728f2af8da54d9bf8cc14099) cee6bc3c2a634b41728f2af8da54d9bf8cc14099)
ROM=GC_NMQ_D;; ROM=GC_NMQ_D;;
0227d7c0074f2d0ac935631990da8ec5914597b4) 0227d7c0074f2d0ac935631990da8ec5914597b4)
ROM=GC_NMQ_PAL_F;; ROM=GC_NMQ_PAL_F;;
*) *)
echo -e "\nrom hash does not match\n" if [ -n "$ZENITY" ]; then
zenity --error --timeout=10 --text="ROM hash <b>$ROMHASH</b> does not match" --title="Incorrect ROM file" --width=500 --width=200
else
echo -e "\nrom hash does not match\n"
fi
exit;; exit;;
esac esac
echo "Processing..." if [ -n "$ZENITY" ]; then
(echo "# 25%"; echo "25"; sleep 2; echo "# 50%"; echo "50"; sleep 3; echo "# 75%"; echo "75"; sleep 2; echo "# 100%"; echo "100"; sleep 3) |
zenity --progress --title="OTR Generating..." --timeout=10 --percentage=0 --icon-name=soh --window-icon=soh.png --height=80 --width=400 &
else
echo "Processing..."
fi
assets/extractor/ZAPD.out ed -eh -i assets/extractor/xmls/"${ROM}" -b tmp/rom.z64 -fl assets/extractor/filelists -o placeholder -osf placeholder -gsf 1 -rconf assets/extractor/Config_"${ROM}".xml -se OTR > /dev/null 2>&1 assets/extractor/ZAPD.out ed -eh -i assets/extractor/xmls/"${ROM}" -b tmp/rom.z64 -fl assets/extractor/filelists -o placeholder -osf placeholder -gsf 1 -rconf assets/extractor/Config_"${ROM}".xml -se OTR > /dev/null 2>&1
cp "$ASSETDIR"/oot.otr "$OLDPWD" cp "$ASSETDIR"/oot.otr "$OLDPWD"
echo "Restart $APPIMAGE to play!" echo "Restart $APPIMAGE to play!"
@ -31,7 +42,11 @@ while [[ ! -e "$PWD"/oot.otr ]]; do
rm -r "$ASSETDIR" rm -r "$ASSETDIR"
break break
else else
echo -e "\nPlace ROM in this folder\n" if [ -n "$ZENITY" ]; then
zenity --error --timeout=5 --text="Place ROM in $OWD" --title="Missing ROM file" --width=500 --width=200
else
echo -e "\nPlace ROM in this folder\n"
fi
exit exit
fi fi
done done

View File

@ -68,6 +68,7 @@ namespace SohImGui {
static ImVector<ImRect> s_GroupPanelLabelStack; static ImVector<ImRect> s_GroupPanelLabelStack;
bool p_open = false; bool p_open = false;
bool needs_save = false; bool needs_save = false;
int lastBackendID = 0;
const char* filters[3] = { const char* filters[3] = {
"Three-Point", "Three-Point",
@ -75,6 +76,14 @@ namespace SohImGui {
"None" "None"
}; };
std::pair<const char*, const char*> backends[] = {
#ifdef _WIN32
{ "dx11", "DirectX" },
#endif
{ "sdl", "OpenGL" }
};
const char* powers[9] = { const char* powers[9] = {
"Vanilla (1x)", "Vanilla (1x)",
"Double (2x)", "Double (2x)",
@ -91,6 +100,21 @@ namespace SohImGui {
std::map<std::string, std::vector<std::string>> windowCategories; std::map<std::string, std::vector<std::string>> windowCategories;
std::map<std::string, CustomWindow> customWindows; std::map<std::string, CustomWindow> customWindows;
int GetBackendID(std::shared_ptr<Mercury> cfg) {
std::string backend = cfg->getString("Window.GfxBackend");
if (backend.empty()) {
return 0;
}
for (size_t i = 0; i < (sizeof(backends) / sizeof(backends[0])); i++) {
if(backend == backends[i].first) {
return i;
}
}
return 0;
}
int ClampFloatToInt(float value, int min, int max) { int ClampFloatToInt(float value, int min, int max) {
return fmin(fmax(value, min), max); return fmin(fmax(value, min), max);
} }
@ -315,6 +339,8 @@ namespace SohImGui {
io = &ImGui::GetIO(); io = &ImGui::GetIO();
io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; io->ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io->Fonts->AddFontDefault(); io->Fonts->AddFontDefault();
lastBackendID = GetBackendID(GlobalCtx2::GetInstance()->GetConfig());
if (CVar_GetS32("gOpenMenuBar", 0) != 1) { if (CVar_GetS32("gOpenMenuBar", 0) != 1) {
SohImGui::overlay->TextDrawNotification(30.0f, true, "Press F1 to access enhancements menu"); SohImGui::overlay->TextDrawNotification(30.0f, true, "Press F1 to access enhancements menu");
} }
@ -451,11 +477,21 @@ namespace SohImGui {
} }
} }
void EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue) void EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton)
{ {
int val = CVar_GetS32(cvarName, defaultValue); int val = CVar_GetS32(cvarName, defaultValue);
ImGui::Text(text, val); ImGui::Text(text, val);
if(PlusMinusButton) {
std::string MinusBTNName = " - ##";
MinusBTNName += cvarName;
if (ImGui::Button(MinusBTNName.c_str())) {
val--;
CVar_SetS32(cvarName, val);
needs_save = true;
}
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
}
if (ImGui::SliderInt(id, &val, min, max, format)) if (ImGui::SliderInt(id, &val, min, max, format))
{ {
@ -463,6 +499,18 @@ namespace SohImGui {
needs_save = true; needs_save = true;
} }
if(PlusMinusButton) {
std::string PlusBTNName = " + ##";
PlusBTNName += cvarName;
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
if (ImGui::Button(PlusBTNName.c_str())) {
val++;
CVar_SetS32(cvarName, val);
needs_save = true;
}
}
if (val < min) if (val < min)
{ {
val = min; val = min;
@ -478,7 +526,7 @@ namespace SohImGui {
} }
} }
void EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage) void EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton)
{ {
float val = CVar_GetFloat(cvarName, defaultValue); float val = CVar_GetFloat(cvarName, defaultValue);
@ -487,12 +535,36 @@ namespace SohImGui {
else else
ImGui::Text(text, static_cast<int>(100 * val)); ImGui::Text(text, static_cast<int>(100 * val));
if(PlusMinusButton) {
std::string MinusBTNName = " - ##";
MinusBTNName += cvarName;
if (ImGui::Button(MinusBTNName.c_str())) {
val -= 0.1f;
CVar_SetFloat(cvarName, val);
needs_save = true;
}
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
}
if (ImGui::SliderFloat(id, &val, min, max, format)) if (ImGui::SliderFloat(id, &val, min, max, format))
{ {
CVar_SetFloat(cvarName, val); CVar_SetFloat(cvarName, val);
needs_save = true; needs_save = true;
} }
if(PlusMinusButton) {
std::string PlusBTNName = " + ##";
PlusBTNName += cvarName;
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
if (ImGui::Button(PlusBTNName.c_str())) {
val += 0.1f;
CVar_SetFloat(cvarName, val);
needs_save = true;
}
}
if (val < min) if (val < min)
{ {
val = min; val = min;
@ -653,6 +725,8 @@ namespace SohImGui {
ImGui::NewFrame(); ImGui::NewFrame();
const std::shared_ptr<Window> wnd = GlobalCtx2::GetInstance()->GetWindow(); const std::shared_ptr<Window> wnd = GlobalCtx2::GetInstance()->GetWindow();
const std::shared_ptr<Mercury> pConf = GlobalCtx2::GetInstance()->GetConfig();
ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoBackground |
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus | ImGuiWindowFlags_NoResize; ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus | ImGuiWindowFlags_NoResize;
@ -808,6 +882,16 @@ namespace SohImGui {
ImGui::Text("Jitter fix: >= %d FPS", fps); ImGui::Text("Jitter fix: >= %d FPS", fps);
} }
std::string MinusBTNELT = " - ##ExtraLatencyThreshold";
std::string PlusBTNELT = " + ##ExtraLatencyThreshold";
if (ImGui::Button(MinusBTNELT.c_str())) {
val--;
CVar_SetS32(cvar, val);
needs_save = true;
}
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
if (ImGui::SliderInt("##ExtraLatencyThreshold", &val, 0, 250, "", ImGuiSliderFlags_AlwaysClamp)) if (ImGui::SliderInt("##ExtraLatencyThreshold", &val, 0, 250, "", ImGuiSliderFlags_AlwaysClamp))
{ {
CVar_SetS32(cvar, val); CVar_SetS32(cvar, val);
@ -820,6 +904,26 @@ namespace SohImGui {
"to work on one frame while GPU works on the previous frame.\n" "to work on one frame while GPU works on the previous frame.\n"
"This setting should be used when your computer is too slow\n" "This setting should be used when your computer is too slow\n"
"to do CPU + GPU work in time."); "to do CPU + GPU work in time.");
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
if (ImGui::Button(PlusBTNELT.c_str())) {
val++;
CVar_SetS32(cvar, val);
needs_save = true;
}
}
ImGui::Text("Renderer API (Needs reload)");
if (ImGui::BeginCombo("##RApi", backends[lastBackendID].second)) {
for (uint8_t i = 0; i < sizeof(backends) / sizeof(backends[0]); i++) {
if (ImGui::Selectable(backends[i].second, i == lastBackendID)) {
pConf->setString("Window.GfxBackend", backends[i].first);
lastBackendID = i;
}
}
ImGui::EndCombo();
} }
EXPERIMENTAL(); EXPERIMENTAL();
@ -915,54 +1019,54 @@ namespace SohImGui {
{ {
EnhancementCheckbox("Change Red Potion Effect", "gRedPotionEffect"); EnhancementCheckbox("Change Red Potion Effect", "gRedPotionEffect");
Tooltip("Enable the following changes to the amount of health restored by Red Potions"); Tooltip("Enable the following changes to the amount of health restored by Red Potions");
EnhancementSliderInt("Red Potion Health: %d", "##REDPOTIONHEALTH", "gRedPotionHealth", 1, 100, ""); EnhancementSliderInt("Red Potion Health: %d", "##REDPOTIONHEALTH", "gRedPotionHealth", 1, 100, "", 0, true);
Tooltip("Changes the amount of health restored by Red Potions"); Tooltip("Changes the amount of health restored by Red Potions");
EnhancementCheckbox("Red Potion Percent Restore", "gRedPercentRestore"); EnhancementCheckbox("Red Potion Percent Restore", "gRedPercentRestore");
Tooltip("Toggles from Red Potions restoring a fixed amount of health to a percent of the player's current max health"); Tooltip("Toggles from Red Potions restoring a fixed amount of health to a percent of the player's current max health");
EnhancementCheckbox("Change Green Potion Effect", "gGreenPotionEffect"); EnhancementCheckbox("Change Green Potion Effect", "gGreenPotionEffect");
Tooltip("Enable the following changes to the amount of mana restored by Green Potions"); Tooltip("Enable the following changes to the amount of mana restored by Green Potions");
EnhancementSliderInt("Green Potion Mana: %d", "##GREENPOTIONMANA", "gGreenPotionMana", 1, 100, ""); EnhancementSliderInt("Green Potion Mana: %d", "##GREENPOTIONMANA", "gGreenPotionMana", 1, 100, "", 0, true);
Tooltip("Changes the amount of mana restored by Green Potions, base max mana is 48, max upgraded mana is 96"); Tooltip("Changes the amount of mana restored by Green Potions, base max mana is 48, max upgraded mana is 96");
EnhancementCheckbox("Green Potion Percent Restore", "gGreenPercentRestore"); EnhancementCheckbox("Green Potion Percent Restore", "gGreenPercentRestore");
Tooltip("Toggles from Green Potions restoring a fixed amount of mana to a percent of the player's current max mana"); Tooltip("Toggles from Green Potions restoring a fixed amount of mana to a percent of the player's current max mana");
EnhancementCheckbox("Change Blue Potion Effects", "gBluePotionEffects"); EnhancementCheckbox("Change Blue Potion Effects", "gBluePotionEffects");
Tooltip("Enable the following changes to the amount of health and mana restored by Blue Potions"); Tooltip("Enable the following changes to the amount of health and mana restored by Blue Potions");
EnhancementSliderInt("Blue Potion Health: %d", "##BLUEPOTIONHEALTH", "gBluePotionHealth", 1, 100, ""); EnhancementSliderInt("Blue Potion Health: %d", "##BLUEPOTIONHEALTH", "gBluePotionHealth", 1, 100, "", 0, true);
Tooltip("Changes the amount of health restored by Blue Potions"); Tooltip("Changes the amount of health restored by Blue Potions");
EnhancementCheckbox("Blue Potion Health Percent Restore", "gBlueHealthPercentRestore"); EnhancementCheckbox("Blue Potion Health Percent Restore", "gBlueHealthPercentRestore");
Tooltip("Toggles from Blue Potions restoring a fixed amount of health to a percent of the player's current max health"); Tooltip("Toggles from Blue Potions restoring a fixed amount of health to a percent of the player's current max health");
EnhancementSliderInt("Blue Potion Mana: %d", "##BLUEPOTIONMANA", "gBluePotionMana", 1, 100, ""); EnhancementSliderInt("Blue Potion Mana: %d", "##BLUEPOTIONMANA", "gBluePotionMana", 1, 100, "", 0, true);
Tooltip("Changes the amount of mana restored by Blue Potions, base max mana is 48, max upgraded mana is 96"); Tooltip("Changes the amount of mana restored by Blue Potions, base max mana is 48, max upgraded mana is 96");
EnhancementCheckbox("Blue Potion Mana Percent Restore", "gBlueManaPercentRestore"); EnhancementCheckbox("Blue Potion Mana Percent Restore", "gBlueManaPercentRestore");
Tooltip("Toggles from Blue Potions restoring a fixed amount of mana to a percent of the player's current max mana"); Tooltip("Toggles from Blue Potions restoring a fixed amount of mana to a percent of the player's current max mana");
EnhancementCheckbox("Change Milk Effect", "gMilkEffect"); EnhancementCheckbox("Change Milk Effect", "gMilkEffect");
Tooltip("Enable the following changes to the amount of health restored by Milk"); Tooltip("Enable the following changes to the amount of health restored by Milk");
EnhancementSliderInt("Milk Health: %d", "##MILKHEALTH", "gMilkHealth", 1, 100, ""); EnhancementSliderInt("Milk Health: %d", "##MILKHEALTH", "gMilkHealth", 1, 100, "", 0, true);
Tooltip("Changes the amount of health restored by Milk"); Tooltip("Changes the amount of health restored by Milk");
EnhancementCheckbox("Milk Percent Restore", "gMilkPercentRestore"); EnhancementCheckbox("Milk Percent Restore", "gMilkPercentRestore");
Tooltip("Toggles from Milk restoring a fixed amount of health to a percent of the player's current max health"); Tooltip("Toggles from Milk restoring a fixed amount of health to a percent of the player's current max health");
EnhancementCheckbox("Separate Half Milk Effect", "gSeparateHalfMilkEffect"); EnhancementCheckbox("Separate Half Milk Effect", "gSeparateHalfMilkEffect");
Tooltip("Enable the following changes to the amount of health restored by Half Milk\nIf this is disabled, Half Milk will behave the same as Full Milk."); Tooltip("Enable the following changes to the amount of health restored by Half Milk\nIf this is disabled, Half Milk will behave the same as Full Milk.");
EnhancementSliderInt("Half Milk Health: %d", "##HALFMILKHEALTH", "gHalfMilkHealth", 1, 100, ""); EnhancementSliderInt("Half Milk Health: %d", "##HALFMILKHEALTH", "gHalfMilkHealth", 1, 100, "", 0, true);
Tooltip("Changes the amount of health restored by Half Milk"); Tooltip("Changes the amount of health restored by Half Milk");
EnhancementCheckbox("Half Milk Percent Restore", "gHalfMilkPercentRestore"); EnhancementCheckbox("Half Milk Percent Restore", "gHalfMilkPercentRestore");
Tooltip("Toggles from Half Milk restoring a fixed amount of health to a percent of the player's current max health"); Tooltip("Toggles from Half Milk restoring a fixed amount of health to a percent of the player's current max health");
EnhancementCheckbox("Change Fairy Effect", "gFairyEffect"); EnhancementCheckbox("Change Fairy Effect", "gFairyEffect");
Tooltip("Enable the following changes to the amount of health restored by Fairies"); Tooltip("Enable the following changes to the amount of health restored by Fairies");
EnhancementSliderInt("Fairy: %d", "##FAIRYHEALTH", "gFairyHealth", 1, 100, ""); EnhancementSliderInt("Fairy: %d", "##FAIRYHEALTH", "gFairyHealth", 1, 100, "", 0, true);
Tooltip("Changes the amount of health restored by Fairies"); Tooltip("Changes the amount of health restored by Fairies");
EnhancementCheckbox("Fairy Percent Restore", "gFairyPercentRestore"); EnhancementCheckbox("Fairy Percent Restore", "gFairyPercentRestore");
Tooltip("Toggles from Fairies restoring a fixed amount of health to a percent of the player's current max health"); Tooltip("Toggles from Fairies restoring a fixed amount of health to a percent of the player's current max health");
EnhancementCheckbox("Change Fairy Revive Effect", "gFairyReviveEffect"); EnhancementCheckbox("Change Fairy Revive Effect", "gFairyReviveEffect");
Tooltip("Enable the following changes to the amount of health restored by Fairy Revivals"); Tooltip("Enable the following changes to the amount of health restored by Fairy Revivals");
EnhancementSliderInt("Fairy Revival: %d", "##FAIRYREVIVEHEALTH", "gFairyReviveHealth", 1, 100, ""); EnhancementSliderInt("Fairy Revival: %d", "##FAIRYREVIVEHEALTH", "gFairyReviveHealth", 1, 100, "", 0, true);
Tooltip("Changes the amount of health restored by Fairy Revivals"); Tooltip("Changes the amount of health restored by Fairy Revivals");
EnhancementCheckbox("Fairy Revive Percent Restore", "gFairyRevivePercentRestore"); EnhancementCheckbox("Fairy Revive Percent Restore", "gFairyRevivePercentRestore");
Tooltip("Toggles from Fairy Revivals restoring a fixed amount of health to a percent of the player's current max health"); Tooltip("Toggles from Fairy Revivals restoring a fixed amount of health to a percent of the player's current max health");
@ -1051,7 +1155,7 @@ namespace SohImGui {
EnhancementRadioButton("Random cycle", "gPauseLiveLink", 16); EnhancementRadioButton("Random cycle", "gPauseLiveLink", 16);
Tooltip("Randomize the animation played on the menu after a certain time"); Tooltip("Randomize the animation played on the menu after a certain time");
if (CVar_GetS32("gPauseLiveLink", 0) >= 16) { if (CVar_GetS32("gPauseLiveLink", 0) >= 16) {
EnhancementSliderInt("Frame to wait: %d", "##MinFrameCount", "gMinFrameCount", 1, 1000, ""); EnhancementSliderInt("Frame to wait: %d", "##MinFrameCount", "gMinFrameCount", 1, 1000, "", 0, true);
} }
ImGui::EndMenu(); ImGui::EndMenu();
@ -1123,6 +1227,16 @@ namespace SohImGui {
ImGui::Text("Frame interpolation: %d FPS", fps); ImGui::Text("Frame interpolation: %d FPS", fps);
} }
std::string MinusBTNFPSI = " - ##FPSInterpolation";
std::string PlusBTNFPSI = " + ##FPSInterpolation";
if (ImGui::Button(MinusBTNFPSI.c_str())) {
val--;
CVar_SetS32(fps_cvar, val);
needs_save = true;
}
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
if (ImGui::SliderInt("##FPSInterpolation", &val, 20, 250, "", ImGuiSliderFlags_AlwaysClamp)) if (ImGui::SliderInt("##FPSInterpolation", &val, 20, 250, "", ImGuiSliderFlags_AlwaysClamp))
{ {
CVar_SetS32(fps_cvar, val); CVar_SetS32(fps_cvar, val);
@ -1135,6 +1249,14 @@ namespace SohImGui {
"and might give a worse result.\n" "and might give a worse result.\n"
"For consistent input lag, set this value and your monitor's refresh rate to a multiple of 20\n" "For consistent input lag, set this value and your monitor's refresh rate to a multiple of 20\n"
"Ctrl+Click for keyboard input"); "Ctrl+Click for keyboard input");
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
if (ImGui::Button(PlusBTNFPSI.c_str())) {
val++;
CVar_SetS32(fps_cvar, val);
needs_save = true;
}
} }
if (impl.backend == Backend::DX11) if (impl.backend == Backend::DX11)
{ {
@ -1162,6 +1284,7 @@ namespace SohImGui {
Tooltip("Holding down B skips text\nKnown to cause a cutscene softlock in Water Temple\nSoftlock can be fixed by pressing D-Right in Debug mode"); Tooltip("Holding down B skips text\nKnown to cause a cutscene softlock in Water Temple\nSoftlock can be fixed by pressing D-Right in Debug mode");
EnhancementCheckbox("Free Camera", "gFreeCamera"); EnhancementCheckbox("Free Camera", "gFreeCamera");
Tooltip("Enables camera control\nNote: You must remap C buttons off of\nthe right stick in the controller\nconfig menu, and map the camera stick\nto the right stick.");
ImGui::EndMenu(); ImGui::EndMenu();
} }

View File

@ -70,8 +70,8 @@ namespace SohImGui {
void EnhancementRadioButton(const char* text, const char* cvarName, int id); void EnhancementRadioButton(const char* text, const char* cvarName, int id);
void EnhancementCheckbox(const char* text, const char* cvarName); void EnhancementCheckbox(const char* text, const char* cvarName);
void EnhancementButton(const char* text, const char* cvarName); void EnhancementButton(const char* text, const char* cvarName);
void EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0); void EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = false);
void EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage); void EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = false);
void EnhancementCombobox(const char* name, const char* ComboArray[], size_t arraySize, uint8_t FirstTimeValue); void EnhancementCombobox(const char* name, const char* ComboArray[], size_t arraySize, uint8_t FirstTimeValue);
void EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow = true, bool has_alpha=false, bool TitleSameLine=false); void EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow = true, bool has_alpha=false, bool TitleSameLine=false);
void EnhancementCombo(const std::string& name, const char* cvarName, const std::vector<std::string>& items, int defaultValue = 0); void EnhancementCombo(const std::string& name, const char* cvarName, const std::vector<std::string>& items, int defaultValue = 0);

View File

@ -5,6 +5,7 @@
#include "ImGuiImpl.h" #include "ImGuiImpl.h"
#include "Utils/StringHelper.h" #include "Utils/StringHelper.h"
#include "Lib/ImGui/imgui_internal.h" #include "Lib/ImGui/imgui_internal.h"
#include "Cvar.h"
namespace Ship { namespace Ship {
@ -249,13 +250,14 @@ namespace Ship {
if (!this->Opened) { if (!this->Opened) {
BtnReading = -1; BtnReading = -1;
CVar_SetS32("gControllerConfigurationEnabled", 0);
return; return;
} }
ImGui::SetNextWindowSizeConstraints(ImVec2(641, 250), ImVec2(1200, 290)); ImGui::SetNextWindowSizeConstraints(ImVec2(641, 250), ImVec2(1200, 290));
//OTRTODO: Disable this stupid workaround ( ReadRawPress() only works when the window is on the main viewport ) //OTRTODO: Disable this stupid workaround ( ReadRawPress() only works when the window is on the main viewport )
ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID); ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID);
ImGui::Begin("Controller Configuration", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize); ImGui::Begin("Controller Configuration", &this->Opened, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize);
ImGui::BeginTabBar("##Controllers"); ImGui::BeginTabBar("##Controllers");

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

@ -212,8 +212,8 @@ namespace Ship {
pConf->setString("Window.GfxBackend", ""); pConf->setString("Window.GfxBackend", "");
pConf->setBool("Window.Fullscreen.Enabled", false); pConf->setBool("Window.Fullscreen.Enabled", false);
pConf->setInt("Window.Fullscreen.Width", 640); pConf->setInt("Window.Fullscreen.Width", 1920);
pConf->setInt("Window.Fullscreen.Height", 480); pConf->setInt("Window.Fullscreen.Height", 1080);
pConf->setString("Game.SaveName", ""); pConf->setString("Game.SaveName", "");
pConf->setString("Game.Main Archive", ""); pConf->setString("Game.Main Archive", "");
@ -233,8 +233,14 @@ namespace Ship {
SetAudioPlayer(); SetAudioPlayer();
bIsFullscreen = pConf->getBool("Window.Fullscreen.Enabled", false); bIsFullscreen = pConf->getBool("Window.Fullscreen.Enabled", false);
dwWidth = pConf->getInt("Window.Fullscreen.Width", bIsFullscreen ? 1920 : 640); if (bIsFullscreen) {
dwHeight = pConf->getInt("Window.Fullscreen.Height", bIsFullscreen ? 1080 : 480); dwWidth = pConf->getInt("Window.Fullscreen.Width", 1920);
dwHeight = pConf->getInt("Window.Fullscreen.Height", 1080);
} else {
dwWidth = pConf->getInt("Window.Width", 640);
dwHeight = pConf->getInt("Window.Height", 480);
}
dwMenubar = pConf->getBool("Window.Options", false); dwMenubar = pConf->getBool("Window.Options", false);
const std::string& gfx_backend = pConf->getString("Window.GfxBackend"); const std::string& gfx_backend = pConf->getString("Window.GfxBackend");
SetWindowManager(&WmApi, &RenderingApi, gfx_backend); SetWindowManager(&WmApi, &RenderingApi, gfx_backend);

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

@ -9,7 +9,7 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>soh</string> <string>soh</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>2.0.0</string> <string>3.0.0</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>soh.icns</string> <string>soh.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@ -22,14 +22,14 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.0.0</string> <string>3.0.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>ZOoT</string> <string>ZOoT</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>2.0.0</string> <string>3.0.0</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright 2022 HarbourMasters.</string> <string>Copyright 2022 HarbourMasters.</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>10.3</string> <string>10.15</string>
</dict> </dict>
</plist> </plist>

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

@ -529,7 +529,7 @@ void DrawColCheckList(std::vector<Gfx>& dl, Collider** objects, int32_t count) {
Mtx m; Mtx m;
MtxF mt; MtxF mt;
SkinMatrix_SetTranslate(&mt, cyl->dim.pos.x, cyl->dim.pos.y, cyl->dim.pos.z); SkinMatrix_SetTranslate(&mt, cyl->dim.pos.x, cyl->dim.pos.y + cyl->dim.yShift, cyl->dim.pos.z);
MtxF ms; MtxF ms;
int32_t radius = cyl->dim.radius == 0 ? 1 : cyl->dim.radius; int32_t radius = cyl->dim.radius == 0 ? 1 : cyl->dim.radius;
SkinMatrix_SetScale(&ms, radius / 128.0f, cyl->dim.height / 128.0f, radius / 128.0f); SkinMatrix_SetScale(&ms, radius / 128.0f, cyl->dim.height / 128.0f, radius / 128.0f);

View File

@ -1561,6 +1561,18 @@ void DrawPlayerTab() {
ImGui::InputScalar("C Down", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[2], &one, NULL); ImGui::InputScalar("C Down", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[2], &one, NULL);
ImGui::SameLine(); ImGui::SameLine();
ImGui::InputScalar("C Right", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[3], &one, NULL); ImGui::InputScalar("C Right", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[3], &one, NULL);
if (CVar_GetS32("gDpadEquips", 0)) {
ImGui::NewLine();
ImGui::Text("Current D-pad Equips");
ImGui::InputScalar("D-pad Up ", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[4], &one, NULL); // Two spaces at the end for aligning, not elegant but it's working
ImGui::SameLine();
ImGui::InputScalar("D-pad Down", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[5], &one, NULL);
// Intentionnal to not put everything on the same line, else it's taking too much for lower resolution.
ImGui::InputScalar("D-pad Left", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[6], &one, NULL);
ImGui::SameLine();
ImGui::InputScalar("D-pad Right", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[7], &one, NULL);
}
}); });
} else { } else {

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);
} }
@ -1297,14 +1297,14 @@ void EnItem00_DrawRupee(EnItem00* this, GlobalContext* globalCtx) {
* Draw Function used for most collectible types of En_Item00 (ammo, bombs, sticks, nuts, magic...). * Draw Function used for most collectible types of En_Item00 (ammo, bombs, sticks, nuts, magic...).
*/ */
void EnItem00_DrawCollectible(EnItem00* this, GlobalContext* globalCtx) { 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;
@ -2237,14 +2237,14 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
} }
} else { } else {
osSyncPrintf("Na_StartOcarinaSinglePlayCheck2( message->ocarina_no );\n"); osSyncPrintf("Na_StartOcarinaSinglePlayCheck2( message->ocarina_no );\n");
func_800ECC04((1 << msgCtx->ocarinaAction) + 0x8000); func_800ECC04((1 << (msgCtx->ocarinaAction % 32)) + 0x8000);
} }
msgCtx->msgMode = MSGMODE_OCARINA_PLAYING; msgCtx->msgMode = MSGMODE_OCARINA_PLAYING;
} else if (msgCtx->msgMode == MSGMODE_SONG_DEMONSTRATION_STARTING) { } else if (msgCtx->msgMode == MSGMODE_SONG_DEMONSTRATION_STARTING) {
msgCtx->stateTimer = 20; msgCtx->stateTimer = 20;
msgCtx->msgMode = MSGMODE_SONG_DEMONSTRATION_SELECT_INSTRUMENT; msgCtx->msgMode = MSGMODE_SONG_DEMONSTRATION_SELECT_INSTRUMENT;
} else { } else {
func_800ECC04((1 << (msgCtx->ocarinaAction + 0x11)) + 0x8000); func_800ECC04((1 << ((msgCtx->ocarinaAction + 0x11) % 32)) + 0x8000);
// "Performance Check" // "Performance Check"
osSyncPrintf("演奏チェック=%d\n", msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET); osSyncPrintf("演奏チェック=%d\n", msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET);
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK; msgCtx->msgMode = MSGMODE_SONG_PLAYBACK;

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

@ -620,7 +620,7 @@ static GetItemEntry sGetItemTable[] = {
GET_ITEM(ITEM_NUT_UPGRADE_30, OBJECT_GI_NUTS, GID_NUTS, 0xA7, 0x80, CHEST_ANIM_SHORT), GET_ITEM(ITEM_NUT_UPGRADE_30, OBJECT_GI_NUTS, GID_NUTS, 0xA7, 0x80, CHEST_ANIM_SHORT),
GET_ITEM(ITEM_NUT_UPGRADE_40, OBJECT_GI_NUTS, GID_NUTS, 0xA8, 0x80, CHEST_ANIM_SHORT), GET_ITEM(ITEM_NUT_UPGRADE_40, OBJECT_GI_NUTS, GID_NUTS, 0xA8, 0x80, CHEST_ANIM_SHORT),
GET_ITEM(ITEM_BULLET_BAG_50, OBJECT_GI_DEKUPOUCH, GID_BULLET_BAG_50, 0x6C, 0x80, CHEST_ANIM_LONG), GET_ITEM(ITEM_BULLET_BAG_50, OBJECT_GI_DEKUPOUCH, GID_BULLET_BAG_50, 0x6C, 0x80, CHEST_ANIM_LONG),
GET_ITEM(ITEM_ARROW_ICE, OBJECT_GI_M_ARROW, GID_ARROW_ICE, 0x3C, 0x80, CHEST_ANIM_LONG), // Ice Traps GET_ITEM(ITEM_ARROW_ICE, OBJECT_GI_M_ARROW, GID_ARROW_ICE, 0x3C, 0x80, CHEST_ANIM_SHORT), // Ice Traps
GET_ITEM_NONE, GET_ITEM_NONE,
GET_ITEM(ITEM_MEDALLION_LIGHT, OBJECT_GI_MEDAL, GID_MEDALLION_LIGHT, 0x40, 0x80, CHEST_ANIM_LONG), GET_ITEM(ITEM_MEDALLION_LIGHT, OBJECT_GI_MEDAL, GID_MEDALLION_LIGHT, 0x40, 0x80, CHEST_ANIM_LONG),

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;