Merge remote-tracking branch 'upstream/develop' into mmexplosions

This commit is contained in:
splemb 2023-01-20 18:53:50 +00:00
commit 063d118611
935 changed files with 12398 additions and 6222 deletions

View File

@ -109,9 +109,9 @@ jobs:
- name: Install latest SDL - name: Install latest SDL
run: | run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz wget https://www.libsdl.org/release/SDL2-2.26.1.tar.gz
tar -xzf SDL2-2.24.1.tar.gz tar -xzf SDL2-2.26.1.tar.gz
cd SDL2-2.24.1 cd SDL2-2.26.1
./configure ./configure
make -j 10 make -j 10
sudo make install sudo make install

View File

@ -7,8 +7,8 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
project(Ship LANGUAGES C CXX project(Ship LANGUAGES C CXX
VERSION 5.1.3) VERSION 5.1.4)
set(PROJECT_BUILD_NAME "BRADLEY DELTA" CACHE STRING "") set(PROJECT_BUILD_NAME "BRADLEY ECHO" CACHE STRING "")
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "") set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "")
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh) set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)

View File

@ -1,11 +1,11 @@
#include "AnimationExporter.h" #include "AnimationExporter.h"
#include <Animation.h> #include <resource/type/Animation.h>
void OTRExporter_Animation::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) void OTRExporter_Animation::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
{ {
ZAnimation* anim = (ZAnimation*)res; ZAnimation* anim = (ZAnimation*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::Animation); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Animation);
ZNormalAnimation* normalAnim = dynamic_cast<ZNormalAnimation*>(anim); ZNormalAnimation* normalAnim = dynamic_cast<ZNormalAnimation*>(anim);
ZCurveAnimation* curveAnim = dynamic_cast<ZCurveAnimation*>(anim); ZCurveAnimation* curveAnim = dynamic_cast<ZCurveAnimation*>(anim);

View File

@ -1,6 +1,5 @@
#include "AudioExporter.h" #include "AudioExporter.h"
#include "Main.h" #include "Main.h"
#include <Animation.h>
#include <Utils/MemoryStream.h> #include <Utils/MemoryStream.h>
#include <Globals.h> #include <Globals.h>
#include <Utils/File.h> #include <Utils/File.h>
@ -30,7 +29,7 @@ void OTRExporter_Audio::WriteSampleEntryReference(ZAudio* audio, SampleEntry* en
void OTRExporter_Audio::WriteSampleEntry(SampleEntry* entry, BinaryWriter* writer) void OTRExporter_Audio::WriteSampleEntry(SampleEntry* entry, BinaryWriter* writer)
{ {
WriteHeader(nullptr, "", writer, Ship::ResourceType::AudioSample, Ship::Version::Rachael); WriteHeader(nullptr, "", writer, Ship::ResourceType::SOH_AudioSample, Ship::Version::Rachael);
writer->Write(entry->codec); writer->Write(entry->codec);
writer->Write(entry->medium); writer->Write(entry->medium);
@ -82,7 +81,7 @@ void OTRExporter_Audio::Save(ZResource* res, const fs::path& outPath, BinaryWrit
{ {
ZAudio* audio = (ZAudio*)res; ZAudio* audio = (ZAudio*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::Audio, Ship::Version::Rachael); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Audio, Ship::Version::Rachael);
// Write Samples as individual files // Write Samples as individual files
for (auto pair : audio->samples) for (auto pair : audio->samples)
@ -115,7 +114,7 @@ void OTRExporter_Audio::Save(ZResource* res, const fs::path& outPath, BinaryWrit
MemoryStream* fntStream = new MemoryStream(); MemoryStream* fntStream = new MemoryStream();
BinaryWriter fntWriter = BinaryWriter(fntStream); BinaryWriter fntWriter = BinaryWriter(fntStream);
WriteHeader(nullptr, "", &fntWriter, Ship::ResourceType::AudioSoundFont, Ship::Version::Rachael); WriteHeader(nullptr, "", &fntWriter, Ship::ResourceType::SOH_AudioSoundFont, Ship::Version::Rachael);
fntWriter.Write((uint32_t)i); fntWriter.Write((uint32_t)i);
fntWriter.Write(audio->soundFontTable[i].medium); fntWriter.Write(audio->soundFontTable[i].medium);
@ -174,7 +173,7 @@ void OTRExporter_Audio::Save(ZResource* res, const fs::path& outPath, BinaryWrit
MemoryStream* seqStream = new MemoryStream(); MemoryStream* seqStream = new MemoryStream();
BinaryWriter seqWriter = BinaryWriter(seqStream); BinaryWriter seqWriter = BinaryWriter(seqStream);
WriteHeader(nullptr, "", &seqWriter, Ship::ResourceType::AudioSequence, Ship::Version::Rachael); WriteHeader(nullptr, "", &seqWriter, Ship::ResourceType::SOH_AudioSequence, Ship::Version::Rachael);
seqWriter.Write((uint32_t)seq.size()); seqWriter.Write((uint32_t)seq.size());
seqWriter.Write(seq.data(), seq.size()); seqWriter.Write(seq.data(), seq.size());

View File

@ -5,6 +5,10 @@ void OTRExporter_Background::Save(ZResource* res, const fs::path& outPath, Binar
{ {
ZBackground* bg = (ZBackground*)res; ZBackground* bg = (ZBackground*)res;
WriteHeader(bg, outPath, writer, Ship::ResourceType::SOH_Background);
writer->Write((uint32_t)bg->GetRawDataSize());
auto data = bg->parent->GetRawData(); auto data = bg->parent->GetRawData();
writer->Write((char*)data.data() + bg->GetRawDataIndex(), bg->GetRawDataSize()); writer->Write((char*)data.data() + bg->GetRawDataIndex(), bg->GetRawDataSize());
} }

View File

@ -158,16 +158,19 @@ endif()
target_include_directories(${PROJECT_NAME} PRIVATE target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPD/ ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPD/
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/ZAPDUtils ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/include
${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/tinyxml2 # TODO: these should no longer be necessary if we were to link against LUS
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/resource
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/resource/types
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/spdlog/include ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/Mercury
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/graphic/Fast3D/U64 ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/tinyxml2
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/ZAPDUtils
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/StormLib/src ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/StormLib/src
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/spdlog/include
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/nlohmann-json/include
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/resource
${CMAKE_CURRENT_SOURCE_DIR}/../../soh/soh
. .
) )

View File

@ -1,11 +1,11 @@
#include "CollisionExporter.h" #include "CollisionExporter.h"
#include <Resource.h> #include <libultraship/bridge.h>
void OTRExporter_Collision::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) void OTRExporter_Collision::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
{ {
ZCollisionHeader* col = (ZCollisionHeader*)res; ZCollisionHeader* col = (ZCollisionHeader*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::CollisionHeader); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_CollisionHeader);
writer->Write(col->absMinX); writer->Write(col->absMinX);
writer->Write(col->absMinY); writer->Write(col->absMinY);

View File

@ -1,11 +1,11 @@
#include "CutsceneExporter.h" #include "CutsceneExporter.h"
#include <Resource.h> #include <libultraship/bridge.h>
void OTRExporter_Cutscene::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) void OTRExporter_Cutscene::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
{ {
ZCutscene* cs = (ZCutscene*)res; ZCutscene* cs = (ZCutscene*)res;
WriteHeader(cs, outPath, writer, Ship::ResourceType::Cutscene); WriteHeader(cs, outPath, writer, Ship::ResourceType::SOH_Cutscene);
//writer->Write((uint32_t)cs->commands.size() + 2 + 2); //writer->Write((uint32_t)cs->commands.size() + 2 + 2);
writer->Write((uint32_t)0); writer->Write((uint32_t)0);

View File

@ -5,7 +5,7 @@
#include <Utils/BitConverter.h> #include <Utils/BitConverter.h>
#include "StrHash64/StrHash64.h" #include "StrHash64/StrHash64.h"
#include "spdlog/spdlog.h" #include "spdlog/spdlog.h"
#include "PR/ultra64/gbi.h" #include <libultraship/libultra/gbi.h>
#include <Globals.h> #include <Globals.h>
#include <iostream> #include <iostream>
#include <string> #include <string>

View File

@ -3,7 +3,7 @@
#include "ZArray.h" #include "ZArray.h"
//#include "OTRExporter.h" //#include "OTRExporter.h"
#include <Utils/BinaryWriter.h> #include <Utils/BinaryWriter.h>
#include <Resource.h> #include <libultraship/bridge.h>
#include "VersionInfo.h" #include "VersionInfo.h"
class OTRExporter : public ZResourceExporter class OTRExporter : public ZResourceExporter

View File

@ -1,4 +1,4 @@
#include <Archive.h> #include "Main.h"
#include "BackgroundExporter.h" #include "BackgroundExporter.h"
#include "TextureExporter.h" #include "TextureExporter.h"
#include "RoomExporter.h" #include "RoomExporter.h"

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <Archive.h> #include <libultraship/bridge.h>
extern std::shared_ptr<Ship::Archive> otrArchive; extern std::shared_ptr<Ship::Archive> otrArchive;
extern std::map<std::string, std::vector<char>> files; extern std::map<std::string, std::vector<char>> files;

View File

@ -5,7 +5,7 @@ void OTRExporter_Path::Save(ZResource* res, const fs::path& outPath, BinaryWrite
{ {
ZPath* path = (ZPath*)res; ZPath* path = (ZPath*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::Path); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Path);
writer->Write((uint32_t)path->pathways.size()); writer->Write((uint32_t)path->pathways.size());

View File

@ -1,11 +1,11 @@
#include "PlayerAnimationExporter.h" #include "PlayerAnimationExporter.h"
#include <Resource.h> #include <libultraship/bridge.h>
void OTRExporter_PlayerAnimationExporter::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) void OTRExporter_PlayerAnimationExporter::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
{ {
ZPlayerAnimationData* anim = (ZPlayerAnimationData*)res; ZPlayerAnimationData* anim = (ZPlayerAnimationData*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::PlayerAnimation); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_PlayerAnimation);
auto start = std::chrono::steady_clock::now(); auto start = std::chrono::steady_clock::now();

View File

@ -23,7 +23,7 @@
#include <ZRoom/Commands/SetAlternateHeaders.h> #include <ZRoom/Commands/SetAlternateHeaders.h>
#include "CollisionExporter.h" #include "CollisionExporter.h"
#include "DisplayListExporter.h" #include "DisplayListExporter.h"
#include "Resource.h" #include <libultraship/bridge.h>
#include <Globals.h> #include <Globals.h>
#include <ZRoom/Commands/SetExitList.h> #include <ZRoom/Commands/SetExitList.h>
#include <ZRoom/Commands/SetPathways.h> #include <ZRoom/Commands/SetPathways.h>
@ -39,7 +39,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite
{ {
ZRoom* room = (ZRoom*)res; ZRoom* room = (ZRoom*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::Room); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Room);
writer->Write((uint32_t)room->commands.size()); writer->Write((uint32_t)room->commands.size());

View File

@ -1,5 +1,5 @@
#include "SkeletonExporter.h" #include "SkeletonExporter.h"
#include <Resource.h> #include <libultraship/bridge.h>
#include <Globals.h> #include <Globals.h>
#include "DisplayListExporter.h" #include "DisplayListExporter.h"
@ -7,7 +7,7 @@ void OTRExporter_Skeleton::Save(ZResource* res, const fs::path& outPath, BinaryW
{ {
ZSkeleton* skel = (ZSkeleton*)res; ZSkeleton* skel = (ZSkeleton*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::Skeleton); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Skeleton);
writer->Write((uint8_t)skel->type); writer->Write((uint8_t)skel->type);
writer->Write((uint8_t)skel->limbType); writer->Write((uint8_t)skel->limbType);

View File

@ -1,13 +1,13 @@
#include "SkeletonLimbExporter.h" #include "SkeletonLimbExporter.h"
#include "DisplayListExporter.h" #include "DisplayListExporter.h"
#include <Resource.h> #include <libultraship/bridge.h>
#include <Globals.h> #include <Globals.h>
void OTRExporter_SkeletonLimb::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) void OTRExporter_SkeletonLimb::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
{ {
ZLimb* limb = (ZLimb*)res; ZLimb* limb = (ZLimb*)res;
WriteHeader(res, outPath, writer, Ship::ResourceType::SkeletonLimb); WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_SkeletonLimb);
writer->Write((uint8_t)limb->type); writer->Write((uint8_t)limb->type);
writer->Write((uint8_t)limb->skinSegmentType); writer->Write((uint8_t)limb->skinSegmentType);

View File

@ -5,7 +5,7 @@ void OTRExporter_Text::Save(ZResource* res, const fs::path& outPath, BinaryWrite
{ {
ZText* txt = (ZText*)res; ZText* txt = (ZText*)res;
WriteHeader(txt, outPath, writer, Ship::ResourceType::Text); WriteHeader(txt, outPath, writer, Ship::ResourceType::SOH_Text);
writer->Write((uint32_t)txt->messages.size()); writer->Write((uint32_t)txt->messages.size());

View File

@ -1,27 +1,25 @@
#include "VersionInfo.h" #include "VersionInfo.h"
#include <Resource.h> #include <libultraship/bridge.h>
std::map<Ship::ResourceType, uint32_t> resourceVersions; std::map<Ship::ResourceType, uint32_t> resourceVersions;
void InitVersionInfo() void InitVersionInfo()
{ {
resourceVersions = std::map<Ship::ResourceType, uint32_t> { resourceVersions = std::map<Ship::ResourceType, uint32_t> {
{ Ship::ResourceType::Animation, 0 }, { Ship::ResourceType::SOH_Animation, 0 },
{ Ship::ResourceType::Model, 0 },
{ Ship::ResourceType::Texture, 0 }, { Ship::ResourceType::Texture, 0 },
{ Ship::ResourceType::Material, 0 }, { Ship::ResourceType::SOH_PlayerAnimation, 0 },
{ Ship::ResourceType::PlayerAnimation, 0 },
{ Ship::ResourceType::DisplayList, 0 }, { Ship::ResourceType::DisplayList, 0 },
{ Ship::ResourceType::Room, 0 }, { Ship::ResourceType::SOH_Room, 0 },
{ Ship::ResourceType::CollisionHeader, 0 }, { Ship::ResourceType::SOH_CollisionHeader, 0 },
{ Ship::ResourceType::Skeleton, 0 }, { Ship::ResourceType::SOH_Skeleton, 0 },
{ Ship::ResourceType::SkeletonLimb, 0 }, { Ship::ResourceType::SOH_SkeletonLimb, 0 },
{ Ship::ResourceType::Matrix, 0 }, { Ship::ResourceType::Matrix, 0 },
{ Ship::ResourceType::Path, 0 }, { Ship::ResourceType::SOH_Path, 0 },
{ Ship::ResourceType::Vertex, 0 }, { Ship::ResourceType::Vertex, 0 },
{ Ship::ResourceType::Cutscene, 0 }, { Ship::ResourceType::SOH_Cutscene, 0 },
{ Ship::ResourceType::Array, 0 }, { Ship::ResourceType::Array, 0 },
{ Ship::ResourceType::Text, 0 }, { Ship::ResourceType::SOH_Text, 0 },
{ Ship::ResourceType::Blob, 0 }, { Ship::ResourceType::Blob, 0 },
}; };
} }

View File

@ -1,5 +1,5 @@
#include "VtxExporter.h" #include "VtxExporter.h"
#include "Resource.h" #include <libultraship/bridge.h>
#include "VersionInfo.h" #include "VersionInfo.h"

View File

@ -2,7 +2,7 @@
#define Z64CUTSCENE_H #define Z64CUTSCENE_H
#if 0 #if 0
#include "ultra64.h" #include <libultraship/libultra.h>
typedef struct { typedef struct {
/* 0x00 */ u16 entrance; // entrance index upon which the cutscene should trigger /* 0x00 */ u16 entrance; // entrance index upon which the cutscene should trigger

View File

@ -32,17 +32,16 @@ def main():
parser.add_argument("-z", "--zapd", help="Path to ZAPD executable", dest="zapd_exe", type=str) parser.add_argument("-z", "--zapd", help="Path to ZAPD executable", dest="zapd_exe", type=str)
parser.add_argument("rom", help="Path to the rom", type=str, nargs="?") parser.add_argument("rom", help="Path to the rom", type=str, nargs="?")
parser.add_argument("--non-interactive", help="Runs the script non-interactively for use in build scripts.", dest="non_interactive", action="store_true") parser.add_argument("--non-interactive", help="Runs the script non-interactively for use in build scripts.", dest="non_interactive", action="store_true")
parser.add_argument("-v", "--verbose", help="Display rom's header checksums and their corresponding xml folder", dest="verbose", action="store_true")
args = parser.parse_args() args = parser.parse_args()
rom_paths = [ args.rom ] if args.rom else rom_chooser.chooseROM(args.non_interactive) roms = [ Z64Rom(args.rom) ] if args.rom else rom_chooser.chooseROM(args.verbose, args.non_interactive)
for rom_path in rom_paths: for rom in roms:
rom = Z64Rom(rom_path)
if (os.path.exists("Extract")): if (os.path.exists("Extract")):
shutil.rmtree("Extract") shutil.rmtree("Extract")
BuildOTR("../soh/assets/xml/" + rom.version.xml_ver + "/", rom_path, zapd_exe=args.zapd_exe) BuildOTR("../soh/assets/xml/" + rom.version.xml_ver + "/", rom.file_path, zapd_exe=args.zapd_exe)
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View File

@ -2,12 +2,13 @@ import os, sys, glob
from rom_info import Z64Rom from rom_info import Z64Rom
def chooseROM(non_interactive=False): def chooseROM(verbose=False, non_interactive=False):
roms = [] roms = []
for file in glob.glob("*.z64"): for file in glob.glob("*.z64"):
if Z64Rom.isValidRom(file): rom = Z64Rom(file)
roms.append(file) if rom.is_valid:
roms.append(rom)
if not (roms): if not (roms):
print("Error: No roms located, place one in the OTRExporter directory", file=os.sys.stderr) print("Error: No roms located, place one in the OTRExporter directory", file=os.sys.stderr)
@ -21,23 +22,28 @@ def chooseROM(non_interactive=False):
foundMq = False foundMq = False
foundOot = False foundOot = False
for rom in roms: for rom in roms:
isMq = Z64Rom.isMqRom(rom) if rom.isMq and not foundMq:
if isMq and not foundMq:
romsToExtract.append(rom) romsToExtract.append(rom)
foundMq = True foundMq = True
elif not isMq and not foundOot: elif not rom.isMq and not foundOot:
romsToExtract.append(rom) romsToExtract.append(rom)
foundOot = True foundOot = True
return romsToExtract return romsToExtract
print(str(len(roms))+ " roms found, please select one by pressing 1-"+str(len(roms))) print(f"{len(roms)} roms found, please select one by pressing 1-{len(roms)}")
print()
for i in range(len(roms)): for i in range(len(roms)):
print(str(i+1)+ ". " + roms[i]) print(f"[{i+1:>2d}] {roms[i].file_path}")
if verbose:
print(f" Checksum: {roms[i].checksum.value}, Version XML: {roms[i].version.xml_ver}")
print()
while(1): while(1):
try: try:
selection = int(input()) selection = int(input())
except KeyboardInterrupt:
sys.exit(1)
except: except:
print("Bad input. Try again with the number keys.") print("Bad input. Try again with the number keys.")
continue continue

View File

@ -59,7 +59,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
. .
) )
INSTALL(TARGETS OTRGui DESTINATION . COMPONENT ship) INSTALL(TARGETS OTRGui DESTINATION . COMPONENT ship OPTIONAL)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets
DESTINATION . DESTINATION .
COMPONENT ship COMPONENT ship

View File

@ -336,6 +336,8 @@ find_package(PNG REQUIRED)
target_include_directories(${PROJECT_NAME} PRIVATE target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/ZAPDUtils ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/ZAPDUtils
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/resource
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/include
${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/tinyxml2 ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/tinyxml2
${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/libgfxd ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/libgfxd
${PNG_PNG_INCLUDE_DIR}/ ${PNG_PNG_INCLUDE_DIR}/

View File

@ -7,8 +7,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "Declaration.h" #include "Declaration.h"
#include "Utils/BinaryWriter.h" #include <Utils/BinaryWriter.h>
#include "Utils/Directory.h" #include <Utils/Directory.h>
#include "tinyxml2.h" #include "tinyxml2.h"
#define SEGMENT_SCENE 2 #define SEGMENT_SCENE 2

@ -1 +1 @@
Subproject commit b1c75c86e902e5036ee1d36afad1a35313988fe7 Subproject commit 120c60b54a75d656e88be8027ac5430ba72ebbf5

View File

@ -123,7 +123,7 @@ set(Header_Files__include
#"include/stdbool_n64.h" #"include/stdbool_n64.h"
#"include/stddef_n64.h" #"include/stddef_n64.h"
#"include/stdlib_n64.h" #"include/stdlib_n64.h"
"include/ultra64.h" # "include/ultra64.h"
"include/unk.h" "include/unk.h"
"include/variables.h" "include/variables.h"
"include/vt.h" "include/vt.h"
@ -269,6 +269,8 @@ set(Source_Files__soh
"soh/OTRAudio.h" "soh/OTRAudio.h"
"soh/OTRGlobals.cpp" "soh/OTRGlobals.cpp"
"soh/OTRGlobals.h" "soh/OTRGlobals.h"
"soh/mixer.c"
"soh/mixer.h"
"soh/SaveManager.h" "soh/SaveManager.h"
"soh/SaveManager.cpp" "soh/SaveManager.cpp"
"soh/frame_interpolation.h" "soh/frame_interpolation.h"
@ -288,6 +290,194 @@ set(Source_Files__soh
) )
source_group("Source Files\\soh" FILES ${Source_Files__soh}) source_group("Source Files\\soh" FILES ${Source_Files__soh})
set(Header_Files__soh__resourceTypes
"soh/resource/type/Animation.h"
"soh/resource/type/AudioSample.h"
"soh/resource/type/AudioSequence.h"
"soh/resource/type/AudioSoundFont.h"
"soh/resource/type/CollisionHeader.h"
"soh/resource/type/Cutscene.h"
"soh/resource/type/Path.h"
"soh/resource/type/PlayerAnimation.h"
"soh/resource/type/Scene.h"
"soh/resource/type/Skeleton.h"
"soh/resource/type/SkeletonLimb.h"
"soh/resource/type/Text.h"
"soh/resource/type/Background.h"
)
source_group("Header Files\\soh\\resource\\type" FILES ${Header_Files__soh__resourceTypes})
set(Source_Files__soh__resourceTypes
"soh/resource/type/Animation.cpp"
"soh/resource/type/AudioSample.cpp"
"soh/resource/type/AudioSequence.cpp"
"soh/resource/type/AudioSoundFont.cpp"
"soh/resource/type/CollisionHeader.cpp"
"soh/resource/type/Cutscene.cpp"
"soh/resource/type/Path.cpp"
"soh/resource/type/PlayerAnimation.cpp"
"soh/resource/type/Scene.cpp"
"soh/resource/type/Skeleton.cpp"
"soh/resource/type/SkeletonLimb.cpp"
"soh/resource/type/Text.cpp"
"soh/resource/type/Background.cpp"
)
source_group("Source Files\\soh\\resource\\type" FILES ${Source_Files__soh__resourceTypes})
set(Header_Files__soh__resourceFactories
"soh/resource/importer/AnimationFactory.h"
"soh/resource/importer/AudioSampleFactory.h"
"soh/resource/importer/AudioSequenceFactory.h"
"soh/resource/importer/AudioSoundFontFactory.h"
"soh/resource/importer/CollisionHeaderFactory.h"
"soh/resource/importer/CutsceneFactory.h"
"soh/resource/importer/PathFactory.h"
"soh/resource/importer/PlayerAnimationFactory.h"
"soh/resource/importer/SceneFactory.h"
"soh/resource/importer/SkeletonFactory.h"
"soh/resource/importer/SkeletonLimbFactory.h"
"soh/resource/importer/TextFactory.h"
"soh/resource/importer/BackgroundFactory.h"
)
source_group("Header Files\\soh\\resource\\importer" FILES ${Header_Files__soh__resourceFactories})
set(Source_Files__soh__resourceFactories
"soh/resource/importer/AnimationFactory.cpp"
"soh/resource/importer/AudioSampleFactory.cpp"
"soh/resource/importer/AudioSequenceFactory.cpp"
"soh/resource/importer/AudioSoundFontFactory.cpp"
"soh/resource/importer/CollisionHeaderFactory.cpp"
"soh/resource/importer/CutsceneFactory.cpp"
"soh/resource/importer/PathFactory.cpp"
"soh/resource/importer/PlayerAnimationFactory.cpp"
"soh/resource/importer/SceneFactory.cpp"
"soh/resource/importer/SkeletonFactory.cpp"
"soh/resource/importer/SkeletonLimbFactory.cpp"
"soh/resource/importer/TextFactory.cpp"
"soh/resource/importer/BackgroundFactory.cpp"
)
source_group("Source Files\\soh\\resource\\importer" FILES ${Source_Files__soh__resourceFactories})
set(Header_Files__soh__scenecommandTypes
"soh/resource/type/scenecommand/EndMarker.h"
"soh/resource/type/scenecommand/RomFile.h"
"soh/resource/type/scenecommand/SceneCommand.h"
"soh/resource/type/scenecommand/SetActorList.h"
"soh/resource/type/scenecommand/SetAlternateHeaders.h"
"soh/resource/type/scenecommand/SetCameraSettings.h"
"soh/resource/type/scenecommand/SetCollisionHeader.h"
"soh/resource/type/scenecommand/SetCsCamera.h"
"soh/resource/type/scenecommand/SetCutscenes.h"
"soh/resource/type/scenecommand/SetEchoSettings.h"
"soh/resource/type/scenecommand/SetEntranceList.h"
"soh/resource/type/scenecommand/SetExitList.h"
"soh/resource/type/scenecommand/SetLightingSettings.h"
"soh/resource/type/scenecommand/SetLightList.h"
"soh/resource/type/scenecommand/SetMesh.h"
"soh/resource/type/scenecommand/SetObjectList.h"
"soh/resource/type/scenecommand/SetPathways.h"
"soh/resource/type/scenecommand/SetRoomBehavior.h"
"soh/resource/type/scenecommand/SetRoomList.h"
"soh/resource/type/scenecommand/SetSkyboxModifier.h"
"soh/resource/type/scenecommand/SetSkyboxSettings.h"
"soh/resource/type/scenecommand/SetSoundSettings.h"
"soh/resource/type/scenecommand/SetSpecialObjects.h"
"soh/resource/type/scenecommand/SetStartPositionList.h"
"soh/resource/type/scenecommand/SetTimeSettings.h"
"soh/resource/type/scenecommand/SetTransitionActorList.h"
"soh/resource/type/scenecommand/SetWindSettings.h"
)
source_group("Header Files\\soh\\resource\\type\\scenecommand" FILES ${Header_Files__soh__scenecommandTypes})
set(Source_Files__soh__scenecommandTypes
"soh/resource/type/scenecommand/EndMarker.cpp"
"soh/resource/type/scenecommand/SetActorList.cpp"
"soh/resource/type/scenecommand/SetAlternateHeaders.cpp"
"soh/resource/type/scenecommand/SetCameraSettings.cpp"
"soh/resource/type/scenecommand/SetCollisionHeader.cpp"
"soh/resource/type/scenecommand/SetCsCamera.cpp"
"soh/resource/type/scenecommand/SetCutscenes.cpp"
"soh/resource/type/scenecommand/SetEchoSettings.cpp"
"soh/resource/type/scenecommand/SetEntranceList.cpp"
"soh/resource/type/scenecommand/SetExitList.cpp"
"soh/resource/type/scenecommand/SetLightingSettings.cpp"
"soh/resource/type/scenecommand/SetLightList.cpp"
"soh/resource/type/scenecommand/SetMesh.cpp"
"soh/resource/type/scenecommand/SetObjectList.cpp"
"soh/resource/type/scenecommand/SetPathways.cpp"
"soh/resource/type/scenecommand/SetRoomBehavior.cpp"
"soh/resource/type/scenecommand/SetRoomList.cpp"
"soh/resource/type/scenecommand/SetSkyboxModifier.cpp"
"soh/resource/type/scenecommand/SetSkyboxSettings.cpp"
"soh/resource/type/scenecommand/SetSoundSettings.cpp"
"soh/resource/type/scenecommand/SetSpecialObjects.cpp"
"soh/resource/type/scenecommand/SetStartPositionList.cpp"
"soh/resource/type/scenecommand/SetTimeSettings.cpp"
"soh/resource/type/scenecommand/SetTransitionActorList.cpp"
"soh/resource/type/scenecommand/SetWindSettings.cpp"
)
source_group("Source Files\\soh\\resource\\type\\scenecommand" FILES ${Source_Files__soh__scenecommandTypes})
set(Header_Files__soh__scenecommandFactories
"soh/resource/importer/scenecommand/EndMarkerFactory.h"
"soh/resource/importer/scenecommand/SceneCommandFactory.h"
"soh/resource/importer/scenecommand/SetActorListFactory.h"
"soh/resource/importer/scenecommand/SetAlternateHeadersFactory.h"
"soh/resource/importer/scenecommand/SetCameraSettingsFactory.h"
"soh/resource/importer/scenecommand/SetCollisionHeaderFactory.h"
"soh/resource/importer/scenecommand/SetCsCameraFactory.h"
"soh/resource/importer/scenecommand/SetCutscenesFactory.h"
"soh/resource/importer/scenecommand/SetEchoSettingsFactory.h"
"soh/resource/importer/scenecommand/SetEntranceListFactory.h"
"soh/resource/importer/scenecommand/SetExitListFactory.h"
"soh/resource/importer/scenecommand/SetLightingSettingsFactory.h"
"soh/resource/importer/scenecommand/SetLightListFactory.h"
"soh/resource/importer/scenecommand/SetMeshFactory.h"
"soh/resource/importer/scenecommand/SetObjectListFactory.h"
"soh/resource/importer/scenecommand/SetPathwaysFactory.h"
"soh/resource/importer/scenecommand/SetRoomBehaviorFactory.h"
"soh/resource/importer/scenecommand/SetRoomListFactory.h"
"soh/resource/importer/scenecommand/SetSkyboxModifierFactory.h"
"soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.h"
"soh/resource/importer/scenecommand/SetSoundSettingsFactory.h"
"soh/resource/importer/scenecommand/SetSpecialObjectsFactory.h"
"soh/resource/importer/scenecommand/SetStartPositionListFactory.h"
"soh/resource/importer/scenecommand/SetTimeSettingsFactory.h"
"soh/resource/importer/scenecommand/SetTransitionActorListFactory.h"
"soh/resource/importer/scenecommand/SetWindSettingsFactory.h"
)
source_group("Header Files\\soh\\resource\\importer\\scenecommand" FILES ${Header_Files__soh__scenecommandFactories})
set(Source_Files__soh__scenecommandFactories
"soh/resource/importer/scenecommand/EndMarkerFactory.cpp"
"soh/resource/importer/scenecommand/SceneCommandFactory.cpp"
"soh/resource/importer/scenecommand/SetActorListFactory.cpp"
"soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp"
"soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp"
"soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp"
"soh/resource/importer/scenecommand/SetCsCameraFactory.cpp"
"soh/resource/importer/scenecommand/SetCutscenesFactory.cpp"
"soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp"
"soh/resource/importer/scenecommand/SetEntranceListFactory.cpp"
"soh/resource/importer/scenecommand/SetExitListFactory.cpp"
"soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp"
"soh/resource/importer/scenecommand/SetLightListFactory.cpp"
"soh/resource/importer/scenecommand/SetMeshFactory.cpp"
"soh/resource/importer/scenecommand/SetObjectListFactory.cpp"
"soh/resource/importer/scenecommand/SetPathwaysFactory.cpp"
"soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp"
"soh/resource/importer/scenecommand/SetRoomListFactory.cpp"
"soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp"
"soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp"
"soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp"
"soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp"
"soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp"
"soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp"
"soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp"
"soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp"
)
source_group("Source Files\\soh\\resource\\importer\\scenecommand" FILES ${Source_Files__soh__scenecommandFactories})
set(Source_Files__soh__Enhancements set(Source_Files__soh__Enhancements
"soh/Enhancements/bootcommands.c" "soh/Enhancements/bootcommands.c"
"soh/Enhancements/debugconsole.cpp" "soh/Enhancements/debugconsole.cpp"
@ -1655,6 +1845,14 @@ set(ALL_FILES
${Source_Files__src__overlays__gamestates__ovl_title} ${Source_Files__src__overlays__gamestates__ovl_title}
${Source_Files__src__overlays__misc__ovl_kaleido_scope} ${Source_Files__src__overlays__misc__ovl_kaleido_scope}
${Source_Files__src__overlays__misc__ovl_map_mark_data} ${Source_Files__src__overlays__misc__ovl_map_mark_data}
${Header_Files__soh__resourceTypes}
${Source_Files__soh__resourceTypes}
${Header_Files__soh__resourceFactories}
${Source_Files__soh__resourceFactories}
${Header_Files__soh__scenecommandTypes}
${Source_Files__soh__scenecommandTypes}
${Source_Files__soh__scenecommandFactories}
${Header_Files__soh__scenecommandFactories}
) )
################################################################################ ################################################################################
@ -1741,7 +1939,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/misc ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/misc
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/core ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/core
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/resource ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/resource
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/resource/types ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/resource/type
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/audio ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/audio
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/extern ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/extern
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/extern/Mercury ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/extern/Mercury
@ -1752,6 +1950,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic/Fast3D/U64/PR ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic/Fast3D/U64/PR
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD/resource/type
${SDL2-INCLUDE} ${SDL2-INCLUDE}
${SDL2-NET-INCLUDE} ${SDL2-NET-INCLUDE}
${CMAKE_CURRENT_SOURCE_DIR}/assets/ ${CMAKE_CURRENT_SOURCE_DIR}/assets/

View File

@ -1,6 +1,6 @@
#ifndef FP_H #ifndef FP_H
#define FP_H #define FP_H
#include "ultra64.h" #include <libultraship/libultra.h>
extern f32 qNaN0x3FFFFF; extern f32 qNaN0x3FFFFF;
extern f32 qNaN0x10000; extern f32 qNaN0x10000;

View File

@ -2,6 +2,7 @@
#define FUNCTIONS_H #define FUNCTIONS_H
#include "z64.h" #include "z64.h"
#include <stdarg.h>
#ifdef __cplusplus #ifdef __cplusplus
#define this thisx #define this thisx
@ -97,8 +98,6 @@ void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, s3
void LogUtils_LogThreadId(const char* name, s32 line); void LogUtils_LogThreadId(const char* name, s32 line);
void LogUtils_HungupThread(const char* name, s32 line); void LogUtils_HungupThread(const char* name, s32 line);
void LogUtils_ResetHungup(void); void LogUtils_ResetHungup(void);
s32 vsprintf(char* dst, const char* fmt, va_list args);
s32 sprintf(char* dst, const char* fmt, ...);
void __osPiCreateAccessQueue(void); void __osPiCreateAccessQueue(void);
void __osPiGetAccess(void); void __osPiGetAccess(void);
void __osPiRelAccess(void); void __osPiRelAccess(void);
@ -532,10 +531,10 @@ void func_8003424C(PlayState* play, Vec3f* arg1);
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration); void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration);
Hilite* func_800342EC(Vec3f* object, PlayState* play); Hilite* func_800342EC(Vec3f* object, PlayState* play);
Hilite* func_8003435C(Vec3f* object, PlayState* play); Hilite* func_8003435C(Vec3f* object, PlayState* play);
s32 func_800343CC(PlayState* play, Actor* actor, s16* arg2, f32 interactRange, s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interactRange,
u16 (*unkFunc1)(PlayState*, Actor*), s16 (*unkFunc2)(PlayState*, Actor*)); NpcGetTextIdFunc getTextId, NpcUpdateTalkStateFunc updateTalkState);
s16 func_800347E8(s16 arg0); s16 Npc_GetTrackingPresetMaxPlayerYaw(s16 presetIndex);
void func_80034A14(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3); void Npc_TrackPoint(Actor* actor, NpcInteractInfo* interactInfo, s16 presetIndex, s16 trackingMode);
void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha); PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,

View File

@ -9,7 +9,7 @@
#include "soh/OTRGlobals.h" #include "soh/OTRGlobals.h"
#include "soh/Enhancements/gameconsole.h" #include "soh/Enhancements/gameconsole.h"
#include "soh/Enhancements/gameplaystats.h" #include "soh/Enhancements/gameplaystats.h"
#include <Cvar.h> #include <libultraship/bridge.h>
#define _AudioseqSegmentRomStart "Audioseq" #define _AudioseqSegmentRomStart "Audioseq"
#define _AudiobankSegmentRomStart "Audiobank" #define _AudiobankSegmentRomStart "Audiobank"
@ -38,4 +38,8 @@
#define _z_select_staticSegmentRomStart 0 #define _z_select_staticSegmentRomStart 0
#define _z_select_staticSegmentRomEnd 0 #define _z_select_staticSegmentRomEnd 0
// TODO: POSIX/BSD Bug, this is a hack to fix the build compilation on any BSD system (Switch, Wii-U, Vita, etc)
// <sys/types.h> defines quad as a macro, which conflicts with the quad parameter on z_collision_check.c
#undef quad
#endif #endif

View File

@ -1,7 +1,7 @@
#ifndef MATH_H #ifndef MATH_H
#define MATH_H #define MATH_H
#include "ultra64/types.h" #include <libultraship/libultra.h>
#define M_PI 3.14159265358979323846f #define M_PI 3.14159265358979323846f
#define M_SQRT2 1.41421356237309504880f #define M_SQRT2 1.41421356237309504880f

View File

@ -1,7 +1,7 @@
#ifndef STDLIB_H #ifndef STDLIB_H
#define STDLIB_H #define STDLIB_H
#include "ultra64.h" #include <libultraship/libultra.h>
#if 0 #if 0

View File

@ -300,9 +300,9 @@ extern GraphicsContext* __gfxCtx;
// #endregion // #endregion
// #region SOH [Enhancements] // #region SOH [Enhancements]
#define CHECK_EQUIPMENT_AGE(i, j) (CVar_GetS32("gTimelessEquipment", 0) || (gEquipAgeReqs[i][j] == 9) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge))) #define CHECK_EQUIPMENT_AGE(i, j) (CVarGetInteger("gTimelessEquipment", 0) || (gEquipAgeReqs[i][j] == 9) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge)))
#define CHECK_SLOT_AGE(slotIndex) (CVar_GetS32("gTimelessEquipment", 0) || (gSlotAgeReqs[slotIndex] == 9) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge)) #define CHECK_SLOT_AGE(slotIndex) (CVarGetInteger("gTimelessEquipment", 0) || (gSlotAgeReqs[slotIndex] == 9) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge))
#define CHECK_ITEM_AGE(itemIndex) (CVar_GetS32("gTimelessEquipment", 0) || (gItemAgeReqs[itemIndex] == 9) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge)) #define CHECK_ITEM_AGE(itemIndex) (CVarGetInteger("gTimelessEquipment", 0) || (gItemAgeReqs[itemIndex] == 9) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge))
#define DPAD_ITEM(button) ((gSaveContext.buttonStatus[(button) + 5] != BTN_DISABLED) \ #define DPAD_ITEM(button) ((gSaveContext.buttonStatus[(button) + 5] != BTN_DISABLED) \
? gSaveContext.equips.buttonItems[(button) + 4] \ ? gSaveContext.equips.buttonItems[(button) + 4] \

View File

@ -1,35 +0,0 @@
#ifndef ULTRA64_H
#define ULTRA64_H
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
#include "ultra64/types.h"
#include "unk.h"
#include "libc/stdarg.h"
#include "libc/stdbool.h"
#include "libc/stddef.h"
#include "libc/stdlib.h"
#include "libc/math.h"
#include "ultra64/exception.h"
#include "ultra64/rcp.h"
#include "ultra64/rdp.h"
#include "ultra64/rsp.h"
#include "ultra64/thread.h"
#include "ultra64/convert.h"
#include "ultra64/time.h"
#include "ultra64/message.h"
#include "ultra64/sptask.h"
#include "ultra64/gu.h"
#include "ultra64/vi.h"
#include "ultra64/pi.h"
#include "ultra64/controller.h"
#include "ultra64/printf.h"
#include "ultra64/mbi.h"
#include "ultra64/pfs.h"
#include "ultra64/motor.h"
#include "ultra64/r4300.h"
#endif

View File

@ -32,4 +32,11 @@
#define VT_RST VT_SGR("") #define VT_RST VT_SGR("")
#define VT_CLS VT_ED(2) #define VT_CLS VT_ED(2)
#ifdef USE_BELL
// ASCII BEL character, plays an alert tone
#define BEL '\a'
#else
#define BEL '\0'
#endif
#endif #endif

View File

@ -1,8 +1,8 @@
#ifndef Z64_H #ifndef Z64_H
#define Z64_H #define Z64_H
#include "ultra64.h" #include <libultraship/libultra.h>
#include "ultra64/gs2dex.h" #include "unk.h" // this used to get pulled in via ultra64.h
#include "z64save.h" #include "z64save.h"
#include "z64light.h" #include "z64light.h"
#include "z64bgcheck.h" #include "z64bgcheck.h"
@ -27,7 +27,7 @@
#include "alignment.h" #include "alignment.h"
#include "sequence.h" #include "sequence.h"
#include "sfx.h" #include "sfx.h"
#include <color.h> #include <libultraship/color.h>
#include "ichain.h" #include "ichain.h"
#include "regs.h" #include "regs.h"
@ -45,6 +45,7 @@ namespace Ship
class Scene; class Scene;
class DisplayList; class DisplayList;
}; };
#include <memory>
#endif #endif
#define SCREEN_WIDTH 320 #define SCREEN_WIDTH 320
@ -948,14 +949,6 @@ typedef struct {
typedef struct { typedef struct {
/* 0x00 */ Gfx* opa; /* 0x00 */ Gfx* opa;
/* 0x04 */ Gfx* xlu; /* 0x04 */ Gfx* xlu;
#ifdef __cplusplus
Ship::DisplayList* opaDL;
Ship::DisplayList* xluDL;
#else
void* opaDL;
void* xluDL;
#endif
} PolygonDlist; // size = 0x8 } PolygonDlist; // size = 0x8
@ -1016,14 +1009,6 @@ typedef struct {
/* 0x06 */ s16 unk_06; /* 0x06 */ s16 unk_06;
/* 0x08 */ Gfx* opa; /* 0x08 */ Gfx* opa;
/* 0x0C */ Gfx* xlu; /* 0x0C */ Gfx* xlu;
#ifdef __cplusplus
Ship::DisplayList* opaDL;
Ship::DisplayList* xluDL;
#else
void* opaDL;
void* xluDL;
#endif
} PolygonDlist2; // size = 0x8 } PolygonDlist2; // size = 0x8
typedef struct { typedef struct {
@ -1087,12 +1072,7 @@ typedef struct {
/* 0x58 */ OSMesgQueue loadQueue; /* 0x58 */ OSMesgQueue loadQueue;
/* 0x70 */ OSMesg loadMsg; /* 0x70 */ OSMesg loadMsg;
/* 0x74 */ s16 unk_74[2]; // context-specific data used by the current scene draw config /* 0x74 */ s16 unk_74[2]; // context-specific data used by the current scene draw config
#ifdef __cplusplus
Ship::Scene* roomToLoad;
#else
void* roomToLoad; void* roomToLoad;
#endif
} RoomContext; // size = 0x78 } RoomContext; // size = 0x78
typedef struct { typedef struct {
@ -1310,13 +1290,7 @@ typedef struct PlayState {
/* 0x000A4 */ s16 sceneNum; /* 0x000A4 */ s16 sceneNum;
/* 0x000A6 */ u8 sceneConfig; /* 0x000A6 */ u8 sceneConfig;
/* 0x000A7 */ char unk_A7[0x9]; /* 0x000A7 */ char unk_A7[0x9];
#ifdef __cplusplus
Ship::Scene* sceneSegment;
#else
/* 0x000B0 */ void* sceneSegment; /* 0x000B0 */ void* sceneSegment;
#endif
/* 0x000B8 */ View view; /* 0x000B8 */ View view;
/* 0x001E0 */ Camera mainCamera; /* 0x001E0 */ Camera mainCamera;
/* 0x0034C */ Camera subCameras[NUM_CAMS - SUBCAM_FIRST]; /* 0x0034C */ Camera subCameras[NUM_CAMS - SUBCAM_FIRST];
@ -1532,18 +1506,6 @@ typedef struct {
/* 0x08 */ f32 morphFrames; /* 0x08 */ f32 morphFrames;
} AnimationMinimalInfo; // size = 0xC } AnimationMinimalInfo; // size = 0xC
typedef struct {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ Vec3s unk_08;
/* 0x0E */ Vec3s unk_0E;
/* 0x14 */ f32 unk_14;
/* 0x18 */ Vec3f unk_18;
/* 0x24 */ s16 unk_24;
} struct_80034A14_arg1; // size = 0x28
typedef struct { typedef struct {
/* 0x00 */ s8 scene; /* 0x00 */ s8 scene;
/* 0x01 */ s8 spawn; /* 0x01 */ s8 spawn;

View File

@ -20,8 +20,8 @@ struct Lights;
typedef void (*ActorFunc)(struct Actor*, struct PlayState*); typedef void (*ActorFunc)(struct Actor*, struct PlayState*);
typedef void (*ActorResetFunc)(void); typedef void (*ActorResetFunc)(void);
typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, struct PlayState*); typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, struct PlayState*);
typedef u16 (*callback1_800343CC)(struct PlayState*, struct Actor*); typedef u16 (*NpcGetTextIdFunc)(struct PlayState*, struct Actor*);
typedef s16 (*callback2_800343CC)(struct PlayState*, struct Actor*); typedef s16 (*NpcUpdateTalkStateFunc)(struct PlayState*, struct Actor*);
typedef struct { typedef struct {
Vec3f pos; Vec3f pos;
@ -369,4 +369,31 @@ typedef enum {
DOORLOCK_NORMAL_SPIRIT DOORLOCK_NORMAL_SPIRIT
} DoorLockType; } DoorLockType;
typedef enum {
/* 0x0 */ NPC_TALK_STATE_IDLE, // NPC not currently talking to player
/* 0x1 */ NPC_TALK_STATE_TALKING, // NPC is currently talking to player
/* 0x2 */ NPC_TALK_STATE_ACTION, // An NPC-defined action triggered in the conversation
/* 0x3 */ NPC_TALK_STATE_ITEM_GIVEN // NPC finished giving an item and text box is done
} NpcTalkState;
typedef enum {
/* 0x0 */ NPC_TRACKING_PLAYER_AUTO_TURN, // Determine tracking mode based on player position, see Npc_UpdateAutoTurn
/* 0x1 */ NPC_TRACKING_NONE, // Don't track the target (usually the player)
/* 0x2 */ NPC_TRACKING_HEAD_AND_TORSO, // Track target by turning the head and the torso
/* 0x3 */ NPC_TRACKING_HEAD, // Track target by turning the head
/* 0x4 */ NPC_TRACKING_FULL_BODY // Track target by turning the body, torso and head
} NpcTrackingMode;
typedef struct {
/* 0x00 */ s16 talkState;
/* 0x02 */ s16 trackingMode;
/* 0x04 */ s16 autoTurnTimer;
/* 0x06 */ s16 autoTurnState;
/* 0x08 */ Vec3s headRot;
/* 0x0E */ Vec3s torsoRot;
/* 0x14 */ f32 yOffset; // Y position offset to add to actor position when calculating angle to target
/* 0x18 */ Vec3f trackPos;
/* 0x24 */ char unk_24[0x4];
} NpcInteractInfo; // size = 0x28
#endif #endif

View File

@ -1,7 +1,7 @@
#ifndef Z64_ANIMATION_H #ifndef Z64_ANIMATION_H
#define Z64_ANIMATION_H #define Z64_ANIMATION_H
#include "ultra64.h" #include <libultraship/libultra.h>
#include "z64dma.h" #include "z64dma.h"
#include "z64math.h" #include "z64math.h"

View File

@ -127,7 +127,7 @@ typedef struct {
typedef struct { typedef struct {
/* 0x00 */ s32 order; /* 0x00 */ s32 order;
/* 0x04 */ s32 npredictors; /* 0x04 */ s32 npredictors;
/* 0x08 */ s16 book[]; // size 8 * order * npredictors. 8-byte aligned /* 0x08 */ s16* book; // size 8 * order * npredictors. 8-byte aligned
} AdpcmBook; // size >= 0x8 } AdpcmBook; // size >= 0x8
typedef struct typedef struct
@ -137,7 +137,7 @@ typedef struct
/* 0x00 */ u32 codec : 4; /* 0x00 */ u32 codec : 4;
/* 0x00 */ u32 medium : 2; /* 0x00 */ u32 medium : 2;
/* 0x00 */ u32 unk_bit26 : 1; /* 0x00 */ u32 unk_bit26 : 1;
/* 0x00 */ u32 unk_bit25 : 1; /* 0x00 */ u32 unk_bit25 : 1; // this has been named isRelocated in zret
/* 0x01 */ u32 size : 24; /* 0x01 */ u32 size : 24;
}; };
u32 asU32; u32 asU32;
@ -819,7 +819,7 @@ typedef struct {
/* 0x0E */ u8 ttl; // duration after which the DMA can be discarded /* 0x0E */ u8 ttl; // duration after which the DMA can be discarded
} SampleDma; // size = 0x10 } SampleDma; // size = 0x10
#include <ultra64/abi.h> #include <libultraship/libultra/abi.h>
typedef struct { typedef struct {
/* 0x0000 */ char unk_0000; /* 0x0000 */ char unk_0000;

View File

@ -1,7 +1,7 @@
#ifndef Z64CAMERA_H #ifndef Z64CAMERA_H
#define Z64CAMERA_H #define Z64CAMERA_H
#include "ultra64.h" #include <libultraship/libultra.h>
#include "z64cutscene.h" #include "z64cutscene.h"
#define CAM_STAT_CUT 0 #define CAM_STAT_CUT 0

View File

@ -1,7 +1,7 @@
#ifndef Z64CUTSCENE_H #ifndef Z64CUTSCENE_H
#define Z64CUTSCENE_H #define Z64CUTSCENE_H
#include "ultra64.h" #include <libultraship/libultra.h>
typedef struct { typedef struct {
/* 0x00 */ u16 entrance; // entrance index upon which the cutscene should trigger /* 0x00 */ u16 entrance; // entrance index upon which the cutscene should trigger

View File

@ -1,7 +1,7 @@
#ifndef Z64_DMA_H #ifndef Z64_DMA_H
#define Z64_DMA_H #define Z64_DMA_H
#include "ultra64.h" #include <libultraship/libultra.h>
typedef struct { typedef struct {
/* 0x00 */ uintptr_t vromAddr; // VROM address (source) /* 0x00 */ uintptr_t vromAddr; // VROM address (source)

View File

@ -1,7 +1,7 @@
#ifndef Z64EFFECT_H #ifndef Z64EFFECT_H
#define Z64EFFECT_H #define Z64EFFECT_H
#include <color.h> #include <libultraship/color.h>
struct GraphicsContext; struct GraphicsContext;
struct PlayState; struct PlayState;

View File

@ -1,7 +1,7 @@
#ifndef Z64ELF_MESSAGE_H #ifndef Z64ELF_MESSAGE_H
#define Z64ELF_MESSAGE_H #define Z64ELF_MESSAGE_H
#include "ultra64.h" #include <libultraship/libultra.h>
// Checks the condition and exits the script if the check passes // Checks the condition and exits the script if the check passes
#define ELF_MSG_TYPE_CHECK 0 #define ELF_MSG_TYPE_CHECK 0

View File

@ -1,10 +1,10 @@
#ifndef Z64LIGHT_H #ifndef Z64LIGHT_H
#define Z64LIGHT_H #define Z64LIGHT_H
#include "ultra64.h" #include <libultraship/libultra.h>
#include "ultra64/gbi.h" #include <libultraship/libultra/gbi.h>
#include "z64math.h" #include "z64math.h"
#include <color.h> #include <libultraship/color.h>
typedef struct { typedef struct {
/* 0x0 */ s16 x; /* 0x0 */ s16 x;

View File

@ -1,7 +1,7 @@
#ifndef Z64MAP_MARK_H #ifndef Z64MAP_MARK_H
#define Z64MAP_MARK_H #define Z64MAP_MARK_H
#include "ultra64.h" #include <libultraship/libultra.h>
#define MAP_MARK_NONE -1 #define MAP_MARK_NONE -1
#define MAP_MARK_CHEST 0 #define MAP_MARK_CHEST 0

View File

@ -1,7 +1,8 @@
#ifndef Z64MATH_H #ifndef Z64MATH_H
#define Z64MATH_H #define Z64MATH_H
#include "ultra64.h" #include <libultraship/libultra.h>
#include <include/libc/math.h>
#define VEC_SET(V,X,Y,Z) (V).x=(X);(V).y=(Y);(V).z=(Z) #define VEC_SET(V,X,Y,Z) (V).x=(X);(V).y=(Y);(V).z=(Z)

View File

@ -1,7 +1,7 @@
#ifndef Z64SAVE_H #ifndef Z64SAVE_H
#define Z64SAVE_H #define Z64SAVE_H
#include "ultra64.h" #include <libultraship/libultra.h>
#include "z64math.h" #include "z64math.h"
#include "z64audio.h" #include "z64audio.h"
#include "soh/Enhancements/randomizer/randomizerTypes.h" #include "soh/Enhancements/randomizer/randomizerTypes.h"
@ -264,6 +264,7 @@ typedef struct {
/* */ char adultAltarText[750]; /* */ char adultAltarText[750];
/* */ char ganonHintText[150]; /* */ char ganonHintText[150];
/* */ char ganonText[250]; /* */ char ganonText[250];
/* */ char dampeText[150];
/* */ char warpMinuetText[100]; /* */ char warpMinuetText[100];
/* */ char warpBoleroText[100]; /* */ char warpBoleroText[100];
/* */ char warpSerenadeText[100]; /* */ char warpSerenadeText[100];

View File

@ -1,8 +1,8 @@
#ifndef Z64TRANSITION_H #ifndef Z64TRANSITION_H
#define Z64TRANSITION_H #define Z64TRANSITION_H
#include "ultra64.h" #include <libultraship/libultra.h>
#include <color.h> #include <libultraship/color.h>
typedef struct { typedef struct {
f32 unk_0; f32 unk_0;

View File

@ -29,6 +29,8 @@
<string>@CMAKE_PROJECT_VERSION@</string> <string>@CMAKE_PROJECT_VERSION@</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright 2022 HarbourMasters.</string> <string>Copyright 2022 HarbourMasters.</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>10.15</string> <string>10.15</string>
</dict> </dict>

View File

@ -1,4 +1,4 @@
#include <CrashHandler.h> #include <libultraship/bridge.h>
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -2,15 +2,13 @@
#include "gameconsole.h" #include "gameconsole.h"
#include <macros.h> #include <macros.h>
#include <z64.h> #include <z64.h>
#include <ultra64.h> #include <libultraship/libultra.h>
#include <libultraship/bridge.h>
#include <functions.h> #include <functions.h>
#include <variables.h> #include <variables.h>
#include <string.h> #include <string.h>
#include <stdarg.h> #include <stdarg.h>
#include <z64.h> #include <z64.h>
#include <ultra64/gbi.h>
#include <ultra64/gs2dex.h>
#include <ultra64/controller.h>
uint8_t gLoadFileSelect = 0, gSkipLogoTest = 0; uint8_t gLoadFileSelect = 0, gSkipLogoTest = 0;
@ -22,12 +20,12 @@ static BootCommand sCommands[] = { { "--skiplogo", BootCommands_Command_SkipLogo
void BootCommands_Init() void BootCommands_Init()
{ {
CVar_RegisterS32("gDebugEnabled", 0); CVarRegisterInteger("gDebugEnabled", 0);
CVar_RegisterS32("gLanguages", LANGUAGE_ENG); CVarRegisterInteger("gLanguages", LANGUAGE_ENG);
CVar_RegisterS32("gInvertYAxis", 1); CVarRegisterInteger("gInvertYAxis", 1);
CVar_SetS32("gRandoGenerating", 0); // Clear when a crash happened during rando seed generation CVarSetInteger("gRandoGenerating", 0); // Clear when a crash happened during rando seed generation
#if defined(__SWITCH__) || defined(__WIIU__) #if defined(__SWITCH__) || defined(__WIIU__)
CVar_RegisterS32("gControlNav", 1); // always enable controller nav on switch/wii u CVarRegisterInteger("gControlNav", 1); // always enable controller nav on switch/wii u
#endif #endif
} }

View File

@ -1,6 +1,6 @@
#ifndef _BOOTCOMMANDS_H_ #ifndef _BOOTCOMMANDS_H_
#define _BOOTCOMMANDS_H_ #define _BOOTCOMMANDS_H_
#include <ultra64.h> #include <libultraship/libultra.h>
#include <z64.h> #include <z64.h>
typedef s32 (*BootCommandFunc)(char** argv, s32 argc); // Returns the number of arguments it read typedef s32 (*BootCommandFunc)(char** argv, s32 argc); // Returns the number of arguments it read

View File

@ -8,8 +8,8 @@
#include <ImGui/imgui.h> #include <ImGui/imgui.h>
#include <ImGui/imgui_internal.h> #include <ImGui/imgui_internal.h>
#include <Cvar.h> #include <libultraship/bridge.h>
#include <UltraController.h> #include <libultraship/libultra/controller.h>
#include <Utils/StringHelper.h> #include <Utils/StringHelper.h>
#include <ImGuiImpl.h> #include <ImGuiImpl.h>
@ -109,7 +109,7 @@ namespace GameControlEditor {
// Draw a button mapping setting consisting of a padded label and button dropdown. // Draw a button mapping setting consisting of a padded label and button dropdown.
// excludedButtons indicates which buttons are unavailable to choose from. // excludedButtons indicates which buttons are unavailable to choose from.
void DrawMapping(CustomButtonMap& mapping, float labelWidth, N64ButtonMask excludedButtons) { void DrawMapping(CustomButtonMap& mapping, float labelWidth, N64ButtonMask excludedButtons) {
N64ButtonMask currentButton = CVar_GetS32(mapping.cVarName, mapping.defaultBtn); N64ButtonMask currentButton = CVarGetInteger(mapping.cVarName, mapping.defaultBtn);
const char* preview; const char* preview;
if (buttonNames.contains(currentButton)) { if (buttonNames.contains(currentButton)) {
@ -134,7 +134,7 @@ namespace GameControlEditor {
continue; continue;
} }
if (ImGui::Selectable(i->second, i->first == currentButton)) { if (ImGui::Selectable(i->second, i->first == currentButton)) {
CVar_SetS32(mapping.cVarName, i->first); CVarSetInteger(mapping.cVarName, i->first);
} }
} }
ImGui::EndCombo(); ImGui::EndCombo();
@ -158,11 +158,11 @@ namespace GameControlEditor {
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
UIWidgets::EnhancementCheckbox("Customize Ocarina Controls", "gCustomOcarinaControls"); UIWidgets::EnhancementCheckbox("Customize Ocarina Controls", "gCustomOcarinaControls");
if (CVar_GetS32("gCustomOcarinaControls", 0) == 1) { if (CVarGetInteger("gCustomOcarinaControls", 0) == 1) {
if (ImGui::BeginTable("tableCustomMainOcarinaControls", 2, ImGuiTableFlags_SizingStretchProp)) { if (ImGui::BeginTable("tableCustomMainOcarinaControls", 2, ImGuiTableFlags_SizingStretchProp)) {
float labelWidth; float labelWidth;
N64ButtonMask disableMask = BTN_B; N64ButtonMask disableMask = BTN_B;
if (CVar_GetS32("gDpadOcarina", 0)) { if (CVarGetInteger("gDpadOcarina", 0)) {
disableMask |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT; disableMask |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT;
} }
@ -242,11 +242,11 @@ namespace GameControlEditor {
UIWidgets::PaddedEnhancementCheckbox("Disable Auto-Centering in First-Person View", "gDisableAutoCenterViewFirstPerson"); UIWidgets::PaddedEnhancementCheckbox("Disable Auto-Centering in First-Person View", "gDisableAutoCenterViewFirstPerson");
DrawHelpIcon("Prevents the C-Up view from auto-centering, allowing for Gyro Aiming"); DrawHelpIcon("Prevents the C-Up view from auto-centering, allowing for Gyro Aiming");
UIWidgets::PaddedEnhancementCheckbox("Enable Custom Aiming/First-Person sensitivity", "gEnableFirstPersonSensitivity", true, false); UIWidgets::PaddedEnhancementCheckbox("Enable Custom Aiming/First-Person sensitivity", "gEnableFirstPersonSensitivity", true, false);
if (CVar_GetS32("gEnableFirstPersonSensitivity", 0)) { if (CVarGetInteger("gEnableFirstPersonSensitivity", 0)) {
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Sensitivity: %d %%", "##FirstPersonSensitivity", UIWidgets::EnhancementSliderFloat("Aiming/First-Person Sensitivity: %d %%", "##FirstPersonSensitivity",
"gFirstPersonCameraSensitivity", 0.01f, 5.0f, "", 1.0f, true, true); "gFirstPersonCameraSensitivity", 0.01f, 5.0f, "", 1.0f, true, true);
} else { } else {
CVar_SetFloat("gFirstPersonCameraSensitivity", 1.0f); CVarSetFloat("gFirstPersonCameraSensitivity", 1.0f);
} }
SohImGui::EndGroupPanel(); SohImGui::EndGroupPanel();
@ -298,7 +298,7 @@ namespace GameControlEditor {
SohImGui::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail()); SohImGui::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail());
UIWidgets::PaddedEnhancementCheckbox("Enable walk speed modifiers", "gEnableWalkModify", true, false); UIWidgets::PaddedEnhancementCheckbox("Enable walk speed modifiers", "gEnableWalkModify", true, false);
DrawHelpIcon("Hold the assigned button to change the maximum walking speed\nTo change the assigned button, go into the Ports tabs above"); DrawHelpIcon("Hold the assigned button to change the maximum walking speed\nTo change the assigned button, go into the Ports tabs above");
if (CVar_GetS32("gEnableWalkModify", 0)) { if (CVarGetInteger("gEnableWalkModify", 0)) {
UIWidgets::Spacer(5); UIWidgets::Spacer(5);
SohImGui::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail()); SohImGui::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail());
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false); UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
@ -317,7 +317,7 @@ namespace GameControlEditor {
void DrawUI(bool& open) { void DrawUI(bool& open) {
if (!open) { if (!open) {
CVar_SetS32("gGameControlEditorEnabled", false); CVarSetInteger("gGameControlEditorEnabled", false);
return; return;
} }

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
#include <ImGuiImpl.h> #include <ImGuiImpl.h>
#define PATCH_GFX(path, name, cvar, index, instruction) \ #define PATCH_GFX(path, name, cvar, index, instruction) \
if (CVar_GetS32(cvar, 0)) { \ if (CVarGetInteger(cvar, 0)) { \
ResourceMgr_PatchGfxByName(path, name, index, instruction); \ ResourceMgr_PatchGfxByName(path, name, index, instruction); \
} else { \ } else { \
ResourceMgr_UnpatchGfxByName(path, name); \ ResourceMgr_UnpatchGfxByName(path, name); \

View File

@ -1,7 +1,7 @@
#ifdef ENABLE_CROWD_CONTROL #ifdef ENABLE_CROWD_CONTROL
#include "CrowdControl.h" #include "CrowdControl.h"
#include <Cvar.h> #include <libultraship/bridge.h>
#include <Console.h> #include <Console.h>
#include <ImGuiImpl.h> #include <ImGuiImpl.h>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
@ -101,7 +101,7 @@ void CrowdControl::Disable() {
void CrowdControl::ListenToServer() { void CrowdControl::ListenToServer() {
while (isEnabled) { while (isEnabled) {
while (!connected) { while (!connected && isEnabled) {
SPDLOG_TRACE("[CrowdControl] Attempting to make connection to server..."); SPDLOG_TRACE("[CrowdControl] Attempting to make connection to server...");
tcpsock = SDLNet_TCP_Open(&ip); tcpsock = SDLNet_TCP_Open(&ip);
@ -112,8 +112,10 @@ void CrowdControl::ListenToServer() {
} }
} }
auto socketSet = SDLNet_AllocSocketSet(1); SDLNet_SocketSet socketSet = SDLNet_AllocSocketSet(1);
if (tcpsock) {
SDLNet_TCP_AddSocket(socketSet, tcpsock); SDLNet_TCP_AddSocket(socketSet, tcpsock);
}
// Listen to socket messages // Listen to socket messages
while (connected && tcpsock && isEnabled) { while (connected && tcpsock && isEnabled) {

View File

@ -1,6 +1,8 @@
#pragma once #pragma once
typedef enum { typedef enum {
TEXT_CURSED_SKULLTULA_PEOPLE = 0x22,
TEXT_DAMPES_DIARY = 0x5003,
TEXT_BUY_BOMBCHU_10_PROMPT = 0x8C, TEXT_BUY_BOMBCHU_10_PROMPT = 0x8C,
TEXT_BUY_BOMBCHU_10_DESC = 0xBC, TEXT_BUY_BOMBCHU_10_DESC = 0xBC,
TEXT_GS_NO_FREEZE = 0xB4, TEXT_GS_NO_FREEZE = 0xB4,

View File

@ -27,7 +27,7 @@ extern "C" {
extern PlayState* gPlayState; extern PlayState* gPlayState;
} }
#include <Cvar.h> #include <libultraship/bridge.h>
#include "overlays/actors/ovl_En_Niw/z_en_niw.h" #include "overlays/actors/ovl_En_Niw/z_en_niw.h"
#define CMD_REGISTER SohImGui::GetConsole()->AddCommand #define CMD_REGISTER SohImGui::GetConsole()->AddCommand
@ -944,9 +944,9 @@ static bool SetCVarHandler(std::shared_ptr<Ship::Console> Console, const std::ve
int vType = CheckVarType(args[2]); int vType = CheckVarType(args[2]);
if (vType == VARTYPE_STRING) if (vType == VARTYPE_STRING)
CVar_SetString(args[1].c_str(), args[2].c_str()); CVarSetString(args[1].c_str(), args[2].c_str());
else if (vType == VARTYPE_FLOAT) else if (vType == VARTYPE_FLOAT)
CVar_SetFloat((char*)args[1].c_str(), std::stof(args[2])); CVarSetFloat((char*)args[1].c_str(), std::stof(args[2]));
else if (vType == VARTYPE_RGBA) else if (vType == VARTYPE_RGBA)
{ {
uint32_t val = std::stoul(&args[2].c_str()[1], nullptr, 16); uint32_t val = std::stoul(&args[2].c_str()[1], nullptr, 16);
@ -955,12 +955,12 @@ static bool SetCVarHandler(std::shared_ptr<Ship::Console> Console, const std::ve
clr.g = val >> 16; clr.g = val >> 16;
clr.b = val >> 8; clr.b = val >> 8;
clr.a = val & 0xFF; clr.a = val & 0xFF;
CVar_SetRGBA((char*)args[1].c_str(), clr); CVarSetColor((char*)args[1].c_str(), clr);
} }
else else
CVar_SetS32(args[1].c_str(), std::stoi(args[2])); CVarSetInteger(args[1].c_str(), std::stoi(args[2]));
CVar_Save(); CVarSave();
//SohImGui::GetConsole()->SendInfoMessage("[SOH] Updated player position to [ %.2f, %.2f, %.2f ]", pos.x, pos.y, pos.z); //SohImGui::GetConsole()->SendInfoMessage("[SOH] Updated player position to [ %.2f, %.2f, %.2f ]", pos.x, pos.y, pos.z);
return CMD_SUCCESS; return CMD_SUCCESS;
@ -970,18 +970,18 @@ static bool GetCVarHandler(std::shared_ptr<Ship::Console> Console, const std::ve
if (args.size() < 2) if (args.size() < 2)
return CMD_FAILED; return CMD_FAILED;
CVar* cvar = CVar_Get(args[1].c_str()); auto cvar = CVarGet(args[1].c_str());
if (cvar != nullptr) if (cvar != nullptr)
{ {
if (cvar->Type == CVarType::S32) if (cvar->Type == Ship::ConsoleVariableType::Integer)
SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %i", args[1].c_str(), cvar->value.ValueS32); SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %i", args[1].c_str(), cvar->Integer);
else if (cvar->Type == CVarType::Float) else if (cvar->Type == Ship::ConsoleVariableType::Float)
SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %f", args[1].c_str(), cvar->value.ValueFloat); SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %f", args[1].c_str(), cvar->Float);
else if (cvar->Type == CVarType::String) else if (cvar->Type == Ship::ConsoleVariableType::String)
SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %s", args[1].c_str(), cvar->value.ValueStr); SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %s", args[1].c_str(), cvar->String.c_str());
else if (cvar->Type == CVarType::RGBA) else if (cvar->Type == Ship::ConsoleVariableType::Color)
SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %08X", args[1].c_str(), cvar->value.ValueRGBA); SohImGui::GetConsole()->SendInfoMessage("[SOH] Variable %s is %08X", args[1].c_str(), cvar->Color);
} }
else else
{ {
@ -1159,5 +1159,5 @@ void DebugConsole_Init(void) {
CMD_REGISTER("cucco_storm", { CuccoStormHandler, "Cucco Storm" }); CMD_REGISTER("cucco_storm", { CuccoStormHandler, "Cucco Storm" });
CVar_Load(); CVarLoad();
} }

View File

@ -7,7 +7,7 @@
#include <bit> #include <bit>
#include <map> #include <map>
#include <string> #include <string>
#include <Cvar.h> #include <libultraship/bridge.h>
extern "C" { extern "C" {
#include <z64.h> #include <z64.h>
@ -531,7 +531,7 @@ void PopulateActorDropdown(int i, std::vector<Actor*>& data) {
void DrawActorViewer(bool& open) { void DrawActorViewer(bool& open) {
if (!open) { if (!open) {
CVar_SetS32("gActorViewerEnabled", 0); CVarSetInteger("gActorViewerEnabled", 0);
return; return;
} }

View File

@ -6,7 +6,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <cmath> #include <cmath>
#include <Cvar.h> #include <libultraship/bridge.h>
extern "C" { extern "C" {
#include <z64.h> #include <z64.h>
@ -53,7 +53,7 @@ static std::vector<Vtx> sphereVtx;
// Draws the ImGui window for the collision viewer // Draws the ImGui window for the collision viewer
void DrawColViewerWindow(bool& open) { void DrawColViewerWindow(bool& open) {
if (!open) { if (!open) {
CVar_SetS32("gCollisionViewerEnabled", 0); CVarSetInteger("gCollisionViewerEnabled", 0);
return; return;
} }
@ -315,7 +315,7 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
alpha = 0xFF; alpha = 0xFF;
} }
if (CVar_GetS32("gColViewerDecal", 0) != 0) { if (CVarGetInteger("gColViewerDecal", 0) != 0) {
rm |= ZMODE_DEC; rm |= ZMODE_DEC;
} else if (setting == ColRenderSetting::Transparent) { } else if (setting == ColRenderSetting::Transparent) {
rm |= ZMODE_XLU; rm |= ZMODE_XLU;
@ -327,7 +327,7 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
gfx.push_back(gsDPSetCycleType(G_CYC_1CYCLE)); gfx.push_back(gsDPSetCycleType(G_CYC_1CYCLE));
gfx.push_back(gsDPSetRenderMode(rm | blc1, rm | blc2)); gfx.push_back(gsDPSetRenderMode(rm | blc1, rm | blc2));
if (CVar_GetS32("gColViewerShaded", 0) != 0) { if (CVarGetInteger("gColViewerShaded", 0) != 0) {
gfx.push_back(gsDPSetCombineMode(G_CC_MODULATERGB_PRIM_ENVA, G_CC_MODULATERGB_PRIM_ENVA)); gfx.push_back(gsDPSetCombineMode(G_CC_MODULATERGB_PRIM_ENVA, G_CC_MODULATERGB_PRIM_ENVA));
gfx.push_back(gsSPLoadGeometryMode(G_CULL_BACK | G_ZBUFFER | G_LIGHTING)); gfx.push_back(gsSPLoadGeometryMode(G_CULL_BACK | G_ZBUFFER | G_LIGHTING));
} else { } else {
@ -340,9 +340,9 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
// Draws a dynapoly structure (scenes or Bg Actors) // Draws a dynapoly structure (scenes or Bg Actors)
void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) { void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
uint32_t colorR = CVar_GetS32("gColViewerColorNormalR", 255); uint32_t colorR = CVarGetInteger("gColViewerColorNormalR", 255);
uint32_t colorG = CVar_GetS32("gColViewerColorNormalG", 255); uint32_t colorG = CVarGetInteger("gColViewerColorNormalG", 255);
uint32_t colorB = CVar_GetS32("gColViewerColorNormalB", 255); uint32_t colorB = CVarGetInteger("gColViewerColorNormalB", 255);
uint32_t colorA = 255; uint32_t colorA = 255;
uint32_t lastColorR = colorR; uint32_t lastColorR = colorR;
@ -359,35 +359,35 @@ void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
CollisionPoly* poly = &col->polyList[i]; CollisionPoly* poly = &col->polyList[i];
if (SurfaceType_IsHookshotSurface(&gPlayState->colCtx, poly, bgId)) { if (SurfaceType_IsHookshotSurface(&gPlayState->colCtx, poly, bgId)) {
colorR = CVar_GetS32("gColViewerColorHookshotR", 128); colorR = CVarGetInteger("gColViewerColorHookshotR", 128);
colorG = CVar_GetS32("gColViewerColorHookshotG", 128); colorG = CVarGetInteger("gColViewerColorHookshotG", 128);
colorB = CVar_GetS32("gColViewerColorHookshotB", 255); colorB = CVarGetInteger("gColViewerColorHookshotB", 255);
} else if (func_80041D94(&gPlayState->colCtx, poly, bgId) > 0x01) { } else if (func_80041D94(&gPlayState->colCtx, poly, bgId) > 0x01) {
colorR = CVar_GetS32("gColViewerColorInteractableR", 192); colorR = CVarGetInteger("gColViewerColorInteractableR", 192);
colorG = CVar_GetS32("gColViewerColorInteractableG", 0); colorG = CVarGetInteger("gColViewerColorInteractableG", 0);
colorB = CVar_GetS32("gColViewerColorInteractableB", 192); colorB = CVarGetInteger("gColViewerColorInteractableB", 192);
} else if (func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x0C) { } else if (func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x0C) {
colorR = CVar_GetS32("gColViewerColorVoidR", 255); colorR = CVarGetInteger("gColViewerColorVoidR", 255);
colorG = CVar_GetS32("gColViewerColorVoidG", 0); colorG = CVarGetInteger("gColViewerColorVoidG", 0);
colorB = CVar_GetS32("gColViewerColorVoidB", 0); colorB = CVarGetInteger("gColViewerColorVoidB", 0);
} else if (SurfaceType_GetSceneExitIndex(&gPlayState->colCtx, poly, bgId) || } else if (SurfaceType_GetSceneExitIndex(&gPlayState->colCtx, poly, bgId) ||
func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x05) { func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x05) {
colorR = CVar_GetS32("gColViewerColorEntranceR", 0); colorR = CVarGetInteger("gColViewerColorEntranceR", 0);
colorG = CVar_GetS32("gColViewerColorEntranceG", 255); colorG = CVarGetInteger("gColViewerColorEntranceG", 255);
colorB = CVar_GetS32("gColViewerColorEntranceB", 0); colorB = CVarGetInteger("gColViewerColorEntranceB", 0);
} else if (func_80041D4C(&gPlayState->colCtx, poly, bgId) != 0 || } else if (func_80041D4C(&gPlayState->colCtx, poly, bgId) != 0 ||
SurfaceType_IsWallDamage(&gPlayState->colCtx, poly, bgId)) { SurfaceType_IsWallDamage(&gPlayState->colCtx, poly, bgId)) {
colorR = CVar_GetS32("gColViewerColorSpecialSurfaceR", 192); colorR = CVarGetInteger("gColViewerColorSpecialSurfaceR", 192);
colorG = CVar_GetS32("gColViewerColorSpecialSurfaceG", 255); colorG = CVarGetInteger("gColViewerColorSpecialSurfaceG", 255);
colorB = CVar_GetS32("gColViewerColorSpecialSurfaceB", 192); colorB = CVarGetInteger("gColViewerColorSpecialSurfaceB", 192);
} else if (SurfaceType_GetSlope(&gPlayState->colCtx, poly, bgId) == 0x01) { } else if (SurfaceType_GetSlope(&gPlayState->colCtx, poly, bgId) == 0x01) {
colorR = CVar_GetS32("gColViewerColorSlopeR", 255); colorR = CVarGetInteger("gColViewerColorSlopeR", 255);
colorG = CVar_GetS32("gColViewerColorSlopeG", 255); colorG = CVarGetInteger("gColViewerColorSlopeG", 255);
colorB = CVar_GetS32("gColViewerColorSlopeB", 128); colorB = CVarGetInteger("gColViewerColorSlopeB", 128);
} else { } else {
colorR = CVar_GetS32("gColViewerColorNormalR", 255); colorR = CVarGetInteger("gColViewerColorNormalR", 255);
colorG = CVar_GetS32("gColViewerColorNormalG", 255); colorG = CVarGetInteger("gColViewerColorNormalG", 255);
colorB = CVar_GetS32("gColViewerColorNormalB", 255); colorB = CVarGetInteger("gColViewerColorNormalB", 255);
} }
if (colorR != lastColorR || colorG != lastColorG || colorB != lastColorB) { if (colorR != lastColorR || colorG != lastColorG || colorB != lastColorB) {
@ -435,9 +435,9 @@ void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
// Draws the scene // Draws the scene
void DrawSceneCollision() { void DrawSceneCollision() {
ColRenderSetting showSceneColSetting = (ColRenderSetting)CVar_GetS32("gColViewerScene", 0); ColRenderSetting showSceneColSetting = (ColRenderSetting)CVarGetInteger("gColViewerScene", 0);
if (showSceneColSetting == ColRenderSetting::Disabled || CVar_GetS32("gColViewerEnabled", 0) == 0) { if (showSceneColSetting == ColRenderSetting::Disabled || CVarGetInteger("gColViewerEnabled", 0) == 0) {
return; return;
} }
@ -450,8 +450,8 @@ void DrawSceneCollision() {
// Draws all Bg Actors // Draws all Bg Actors
void DrawBgActorCollision() { void DrawBgActorCollision() {
ColRenderSetting showBgActorSetting = (ColRenderSetting)CVar_GetS32("gColViewerBgActors", 0); ColRenderSetting showBgActorSetting = (ColRenderSetting)CVarGetInteger("gColViewerBgActors", 0);
if (showBgActorSetting == ColRenderSetting::Disabled || CVar_GetS32("gColViewerEnabled", 0) == 0) { if (showBgActorSetting == ColRenderSetting::Disabled || CVarGetInteger("gColViewerEnabled", 0) == 0) {
return; return;
} }
@ -575,8 +575,8 @@ void DrawColCheckList(std::vector<Gfx>& dl, Collider** objects, int32_t count) {
// Draws all Col Check objects // Draws all Col Check objects
void DrawColCheckCollision() { void DrawColCheckCollision() {
ColRenderSetting showColCheckSetting = (ColRenderSetting)CVar_GetS32("gColViewerColCheck", 0); ColRenderSetting showColCheckSetting = (ColRenderSetting)CVarGetInteger("gColViewerColCheck", 0);
if (showColCheckSetting == ColRenderSetting::Disabled || CVar_GetS32("gColViewerEnabled", 0) == 0) { if (showColCheckSetting == ColRenderSetting::Disabled || CVarGetInteger("gColViewerEnabled", 0) == 0) {
return; return;
} }
@ -586,14 +586,14 @@ void DrawColCheckCollision() {
CollisionCheckContext& col = gPlayState->colChkCtx; CollisionCheckContext& col = gPlayState->colChkCtx;
dl.push_back(gsDPSetPrimColor(0, 0, CVar_GetS32("gColViewerColorOCR", 255), CVar_GetS32("gColViewerColorOCG", 255), dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorOCR", 255), CVarGetInteger("gColViewerColorOCG", 255),
CVar_GetS32("gColViewerColorOCB", 255), 255)); CVarGetInteger("gColViewerColorOCB", 255), 255));
DrawColCheckList(dl, col.colOC, col.colOCCount); DrawColCheckList(dl, col.colOC, col.colOCCount);
dl.push_back(gsDPSetPrimColor(0, 0, CVar_GetS32("gColViewerColorACR", 0), CVar_GetS32("gColViewerColorACG", 0), dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorACR", 0), CVarGetInteger("gColViewerColorACG", 0),
CVar_GetS32("gColViewerColorACB", 255), 255)); CVarGetInteger("gColViewerColorACB", 255), 255));
DrawColCheckList(dl, col.colAC, col.colACCount); DrawColCheckList(dl, col.colAC, col.colACCount);
dl.push_back(gsDPSetPrimColor(0, 0, CVar_GetS32("gColViewerColorATR", 255), CVar_GetS32("gColViewerColorATG", 0), dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorATR", 255), CVarGetInteger("gColViewerColorATG", 0),
CVar_GetS32("gColViewerColorATB", 0), 255)); CVarGetInteger("gColViewerColorATB", 0), 255));
DrawColCheckList(dl, col.colAT, col.colATCount); DrawColCheckList(dl, col.colAT, col.colATCount);
} }
@ -628,8 +628,8 @@ extern "C" f32 zdWaterBoxMinY;
// Draws all waterboxes // Draws all waterboxes
void DrawWaterboxList() { void DrawWaterboxList() {
ColRenderSetting showWaterboxSetting = (ColRenderSetting)CVar_GetS32("gColViewerWaterbox", 0); ColRenderSetting showWaterboxSetting = (ColRenderSetting)CVarGetInteger("gColViewerWaterbox", 0);
if (showWaterboxSetting == ColRenderSetting::Disabled || CVar_GetS32("gColViewerEnabled", 0) == 0) { if (showWaterboxSetting == ColRenderSetting::Disabled || CVarGetInteger("gColViewerEnabled", 0) == 0) {
return; return;
} }
@ -637,9 +637,9 @@ void DrawWaterboxList() {
InitGfx(dl, showWaterboxSetting); InitGfx(dl, showWaterboxSetting);
dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH)); dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH));
dl.push_back(gsDPSetPrimColor(0, 0, CVar_GetS32("gColViewerColorWaterboxR", 0), dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorWaterboxR", 0),
CVar_GetS32("gColViewerColorWaterboxG", 0), CVarGetInteger("gColViewerColorWaterboxG", 0),
CVar_GetS32("gColViewerColorWaterboxB", 255), 255)); CVarGetInteger("gColViewerColorWaterboxB", 255), 255));
CollisionHeader* col = gPlayState->colCtx.colHeader; CollisionHeader* col = gPlayState->colCtx.colHeader;
for (int32_t waterboxIndex = 0; waterboxIndex < col->numWaterBoxes; waterboxIndex++) { for (int32_t waterboxIndex = 0; waterboxIndex < col->numWaterBoxes; waterboxIndex++) {

View File

@ -9,7 +9,7 @@
#include <bit> #include <bit>
#include <map> #include <map>
#include <string> #include <string>
#include <Cvar.h> #include <libultraship/bridge.h>
extern "C" { extern "C" {
#include <z64.h> #include <z64.h>
@ -1622,7 +1622,7 @@ void DrawPlayerTab() {
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)) { if (CVarGetInteger("gDpadEquips", 0)) {
ImGui::NewLine(); ImGui::NewLine();
ImGui::Text("Current D-pad Equips"); 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::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
@ -1663,7 +1663,7 @@ void DrawPlayerTab() {
void DrawSaveEditor(bool& open) { void DrawSaveEditor(bool& open) {
if (!open) { if (!open) {
CVar_SetS32("gSaveEditorEnabled", 0); CVarSetInteger("gSaveEditorEnabled", 0);
return; return;
} }

View File

@ -36,6 +36,7 @@ const std::vector<FlagTable> flagTables = {
{ 0x09, "Used Deku Tree Blue Warp" }, { 0x09, "Used Deku Tree Blue Warp" },
{ 0x0A, "Played Saria's Song for Mido as Adult" }, { 0x0A, "Played Saria's Song for Mido as Adult" },
{ 0x0C, "Met Deku Tree" }, { 0x0C, "Met Deku Tree" },
{ 0x0F, "Spoke to Mido about Saria's whereabouts" },
{ 0x10, "Spoke to Child Malon at Castle or Market" }, { 0x10, "Spoke to Child Malon at Castle or Market" },
{ 0x11, "Spoke to Ingo at Ranch before Talon returns" }, { 0x11, "Spoke to Ingo at Ranch before Talon returns" },
{ 0x12, "Obtained Pocket Egg" }, { 0x12, "Obtained Pocket Egg" },
@ -219,7 +220,7 @@ const std::vector<FlagTable> flagTables = {
{ 0x24, "Spoke to Kokiri Boy Cutting Grass" }, { 0x24, "Spoke to Kokiri Boy Cutting Grass" },
{ 0x26, "Spoke to Kokiri Girl on Shop Awning" }, { 0x26, "Spoke to Kokiri Girl on Shop Awning" },
{ 0x28, "Spoke to Kokiri Girl About Training Center" }, { 0x28, "Spoke to Kokiri Girl About Training Center" },
{ 0x31, "Spoke to Kokiri Boy on Bed in Mido's House" }, { 0x41, "Spoke to Kokiri Boy on Bed in Mido's House" },
{ 0x51, "Spoke to Kokiri Girl in Saria's House" }, { 0x51, "Spoke to Kokiri Girl in Saria's House" },
{ 0x59, "Spoke to Know-It-All Bro. About Temple" }, { 0x59, "Spoke to Know-It-All Bro. About Temple" },
{ 0x61, "Spoke to Know-It-All Bro. About Saria" }, { 0x61, "Spoke to Know-It-All Bro. About Saria" },

View File

@ -232,7 +232,7 @@ extern "C" uint8_t GetRandomizedEnemy(PlayState* play, int16_t *actorId, f32 *po
} }
EnemyEntry GetRandomizedEnemyEntry(uint32_t seed) { EnemyEntry GetRandomizedEnemyEntry(uint32_t seed) {
if (CVar_GetS32("gSeededRandomizedEnemies", 0) && gSaveContext.n64ddFlag) { if (CVarGetInteger("gSeededRandomizedEnemies", 0) && gSaveContext.n64ddFlag) {
uint32_t finalSeed = seed + gSaveContext.seedIcons[0] + gSaveContext.seedIcons[1] + gSaveContext.seedIcons[2] + uint32_t finalSeed = seed + gSaveContext.seedIcons[0] + gSaveContext.seedIcons[1] + gSaveContext.seedIcons[2] +
gSaveContext.seedIcons[3] + gSaveContext.seedIcons[4]; gSaveContext.seedIcons[3] + gSaveContext.seedIcons[4];
Random_Init(finalSeed); Random_Init(finalSeed);

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <Cvar.h> #include <libultraship/bridge.h>
typedef struct EnemyEntry { typedef struct EnemyEntry {
int16_t id; int16_t id;

View File

@ -2,15 +2,15 @@
#include "../OTRGlobals.h" #include "../OTRGlobals.h"
#include <macros.h> #include <macros.h>
#include <z64.h> #include <z64.h>
#include <ultra64.h> #include <libultraship/libultra.h>
#include <functions.h> #include <functions.h>
#include <variables.h> #include <variables.h>
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>
#include <z64.h> #include <z64.h>
#include <ultra64/gbi.h> #include <libultraship/libultra/gbi.h>
#include <ultra64/gs2dex.h> #include <libultraship/libultra/gs2dex.h>
#include <ultra64/controller.h> #include <libultraship/libultra/controller.h>
#include <string.h> /* memcpy */ #include <string.h> /* memcpy */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,9 +1,9 @@
#ifndef _GAMECONSOLE_H_ #ifndef _GAMECONSOLE_H_
#define _GAMECONSOLE_H_ #define _GAMECONSOLE_H_
#include <ultra64.h> #include <libultraship/libultra.h>
#include <z64.h> #include <z64.h>
#include <Cvar.h> #include <libultraship/bridge.h>
#define MAX_CVARS 2048 #define MAX_CVARS 2048

View File

@ -5,7 +5,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <Cvar.h> #include <libultraship/bridge.h>
#include <Hooks.h> #include <Hooks.h>
extern "C" { extern "C" {
@ -110,7 +110,7 @@ void DisplayStatIfNonZero(const char* text, uint32_t value) {
void DrawStatsTracker(bool& open) { void DrawStatsTracker(bool& open) {
if (!open) { if (!open) {
CVar_SetS32("gGameplayStatsEnabled", 0); CVarSetInteger("gGameplayStatsEnabled", 0);
return; return;
} }
@ -294,7 +294,7 @@ void DrawStatsTracker(bool& open) {
DisplayStat("Sword Swings: ", gSaveContext.sohStats.count[COUNT_SWORD_SWINGS]); DisplayStat("Sword Swings: ", gSaveContext.sohStats.count[COUNT_SWORD_SWINGS]);
DisplayStat("Steps Taken: ", gSaveContext.sohStats.count[COUNT_STEPS]); DisplayStat("Steps Taken: ", gSaveContext.sohStats.count[COUNT_STEPS]);
// If using MM Bunny Hood enhancement, show how long it's been equipped (not counting pause time) // If using MM Bunny Hood enhancement, show how long it's been equipped (not counting pause time)
if (CVar_GetS32("gMMBunnyHood", 0) || gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] > 0) { if (CVarGetInteger("gMMBunnyHood", 0) || gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] > 0) {
DisplayTimeHHMMSS(gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] / 2, "Bunny Hood Time: ", COLOR_WHITE); DisplayTimeHHMMSS(gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] / 2, "Bunny Hood Time: ", COLOR_WHITE);
} }
DisplayStat("Rolls: ", gSaveContext.sohStats.count[COUNT_ROLLS]); DisplayStat("Rolls: ", gSaveContext.sohStats.count[COUNT_ROLLS]);

View File

@ -3,12 +3,12 @@
#include <string> #include <string>
#include <cstdint> #include <cstdint>
#include <ImGuiImpl.h> #include <ImGuiImpl.h>
#include <Cvar.h> #include <libultraship/bridge.h>
#include "soh/UIWidgets.hpp" #include "soh/UIWidgets.hpp"
void clearCvars(std::vector<const char*> cvarsToClear) { void clearCvars(std::vector<const char*> cvarsToClear) {
for(const char* cvar : cvarsToClear) { for(const char* cvar : cvarsToClear) {
CVar_Clear(cvar); CVarClear(cvar);
} }
} }
@ -16,13 +16,13 @@ void applyPreset(std::vector<PresetEntry> entries) {
for(auto& [cvar, type, value] : entries) { for(auto& [cvar, type, value] : entries) {
switch (type) { switch (type) {
case PRESET_ENTRY_TYPE_S32: case PRESET_ENTRY_TYPE_S32:
CVar_SetS32(cvar, std::get<int32_t>(value)); CVarSetInteger(cvar, std::get<int32_t>(value));
break; break;
case PRESET_ENTRY_TYPE_FLOAT: case PRESET_ENTRY_TYPE_FLOAT:
CVar_SetFloat(cvar, std::get<float>(value)); CVarSetFloat(cvar, std::get<float>(value));
break; break;
case PRESET_ENTRY_TYPE_STRING: case PRESET_ENTRY_TYPE_STRING:
CVar_SetString(cvar, std::get<const char*>(value)); CVarSetString(cvar, std::get<const char*>(value));
break; break;
} }
} }
@ -31,7 +31,7 @@ void applyPreset(std::vector<PresetEntry> entries) {
void DrawPresetSelector(PresetType presetTypeId) { void DrawPresetSelector(PresetType presetTypeId) {
const std::string presetTypeCvar = "gPreset" + std::to_string(presetTypeId); const std::string presetTypeCvar = "gPreset" + std::to_string(presetTypeId);
const PresetTypeDefinition presetTypeDef = presetTypes.at(presetTypeId); const PresetTypeDefinition presetTypeDef = presetTypes.at(presetTypeId);
const uint16_t selectedPresetId = CVar_GetS32(presetTypeCvar.c_str(), 0); const uint16_t selectedPresetId = CVarGetInteger(presetTypeCvar.c_str(), 0);
const PresetDefinition selectedPresetDef = presetTypeDef.presets.at(selectedPresetId); const PresetDefinition selectedPresetDef = presetTypeDef.presets.at(selectedPresetId);
std::string comboboxTooltip = ""; std::string comboboxTooltip = "";
for ( auto iter = presetTypeDef.presets.begin(); iter != presetTypeDef.presets.end(); ++iter ) { for ( auto iter = presetTypeDef.presets.begin(); iter != presetTypeDef.presets.end(); ++iter ) {
@ -43,7 +43,7 @@ void DrawPresetSelector(PresetType presetTypeId) {
if (ImGui::BeginCombo("##PresetsComboBox", selectedPresetDef.label)) { if (ImGui::BeginCombo("##PresetsComboBox", selectedPresetDef.label)) {
for ( auto iter = presetTypeDef.presets.begin(); iter != presetTypeDef.presets.end(); ++iter ) { for ( auto iter = presetTypeDef.presets.begin(); iter != presetTypeDef.presets.end(); ++iter ) {
if (ImGui::Selectable(iter->second.label, iter->first == selectedPresetId)) { if (ImGui::Selectable(iter->second.label, iter->first == selectedPresetId)) {
CVar_SetS32(presetTypeCvar.c_str(), iter->first); CVarSetInteger(presetTypeCvar.c_str(), iter->first);
} }
} }
@ -55,9 +55,8 @@ void DrawPresetSelector(PresetType presetTypeId) {
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 4.0f)); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 4.0f));
if (ImGui::Button(("Apply Preset##" + presetTypeCvar).c_str())) { if (ImGui::Button(("Apply Preset##" + presetTypeCvar).c_str())) {
if (selectedPresetId == 0) {
clearCvars(presetTypeDef.cvarsToClear); clearCvars(presetTypeDef.cvarsToClear);
} else { if (selectedPresetId != 0) {
applyPreset(selectedPresetDef.entries); applyPreset(selectedPresetDef.entries);
} }
SohImGui::RequestCvarSaveOnNextTick(); SohImGui::RequestCvarSaveOnNextTick();

View File

@ -173,17 +173,25 @@ const std::vector<const char*> enhancementsCvars = {
"gBombchuBowlingNoBigCucco", "gBombchuBowlingNoBigCucco",
"gBombchuBowlingAmmunition", "gBombchuBowlingAmmunition",
"gCreditsFix", "gCreditsFix",
"gSilverRupeeJingleExtend",
"gStaticExplosionRadius" "gStaticExplosionRadius"
}; };
const std::vector<const char*> randomizerCvars = { const std::vector<const char*> randomizerCvars = {
"gRandomize10GSHint",
"gRandomize20GSHint",
"gRandomize30GSHint",
"gRandomize40GSHint",
"gRandomize50GSHint",
"gRandomizeAllLocationsReachable", "gRandomizeAllLocationsReachable",
"gRandomizeAltarHint",
"gRandomizeBigPoeTargetCount", "gRandomizeBigPoeTargetCount",
"gRandomizeBlueFireArrows", "gRandomizeBlueFireArrows",
"gRandomizeBombchusInLogic", "gRandomizeBombchusInLogic",
"gRandomizeBossKeysanity", "gRandomizeBossKeysanity",
"gRandomizeCompleteMaskQuest", "gRandomizeCompleteMaskQuest",
"gRandomizeCuccosToReturn", "gRandomizeCuccosToReturn",
"gRandomizeDampeHint",
"gRandomizeDecoupleEntrances", "gRandomizeDecoupleEntrances",
"gRandomizeDoorOfTime", "gRandomizeDoorOfTime",
"gRandomizeDungeonCount", "gRandomizeDungeonCount",
@ -209,6 +217,7 @@ const std::vector<const char*> randomizerCvars = {
"gRandomizeLacsRewardCount", "gRandomizeLacsRewardCount",
"gRandomizeLacsStoneCount", "gRandomizeLacsStoneCount",
"gRandomizeLacsTokenCount", "gRandomizeLacsTokenCount",
"gRandomizeLAHint",
"gRandomizeLinksPocket", "gRandomizeLinksPocket",
"gRandomizeLogicRules", "gRandomizeLogicRules",
"gRandomizeMedallionCount", "gRandomizeMedallionCount",
@ -221,9 +230,11 @@ const std::vector<const char*> randomizerCvars = {
"gRandomizeMqDungeons", "gRandomizeMqDungeons",
"gRandomizeRainbowBridge", "gRandomizeRainbowBridge",
"gRandomizeRewardCount", "gRandomizeRewardCount",
"gRandomizeScrubText",
"gRandomizeShopsanity", "gRandomizeShopsanity",
"gRandomizeShuffleAdultTrade", "gRandomizeShuffleAdultTrade",
"gRandomizeShuffleBeans", "gRandomizeShuffleBeans",
"gRandomizeShuffleBossEntrances",
"gRandomizeShuffleCows", "gRandomizeShuffleCows",
"gRandomizeShuffleDungeonReward", "gRandomizeShuffleDungeonReward",
"gRandomizeShuffleDungeonsEntrances", "gRandomizeShuffleDungeonsEntrances",
@ -260,14 +271,27 @@ const std::vector<const char*> randomizerCvars = {
"gRandomizeSkipTowerEscape", "gRandomizeSkipTowerEscape",
"gRandomizeStartingAge", "gRandomizeStartingAge",
"gRandomizeStartingConsumables", "gRandomizeStartingConsumables",
"gRandomizeStartingBoleroOfFire",
"gRandomizeStartingDekuShield", "gRandomizeStartingDekuShield",
"gRandomizeStartingEponasSong",
"gRandomizeStartingKokiriSword", "gRandomizeStartingKokiriSword",
"gRandomizeStartingMapsCompasses", "gRandomizeStartingMapsCompasses",
"gRandomizeStartingMinuetOfForest",
"gRandomizeStartingNocturneOfShadow",
"gRandomizeStartingOcarina", "gRandomizeStartingOcarina",
"gRandomizeStartingPreludeOfLight",
"gRandomizeStartingRequiemOfSpirit",
"gRandomizeStartingSariasSong",
"gRandomizeStartingSerenadeOfWater",
"gRandomizeStartingSkulltulaToken", "gRandomizeStartingSkulltulaToken",
"gRandomizeStartingSongOfStorms",
"gRandomizeStartingSongOfTime",
"gRandomizeStartingSunsSong",
"gRandomizeStartingZeldasLullaby",
"gRandomizeStoneCount", "gRandomizeStoneCount",
"gRandomizeSunlightArrows", "gRandomizeSunlightArrows",
"gRandomizeTokenCount", "gRandomizeTokenCount",
"gRandomizeWarpSongText",
"gRandomizeZorasFountain", "gRandomizeZorasFountain",
}; };
@ -321,6 +345,8 @@ const std::vector<PresetEntry> vanillaPlusPresetEntries = {
PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1), PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1),
// Fix Navi text HUD position // Fix Navi text HUD position
PRESET_ENTRY_S32("gNaviTextFix", 1), PRESET_ENTRY_S32("gNaviTextFix", 1),
// Extend Silver Rupee Jingle
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
// Red Ganon blood // Red Ganon blood
PRESET_ENTRY_S32("gRedGanonBlood", 1), PRESET_ENTRY_S32("gRedGanonBlood", 1),
@ -351,7 +377,7 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
// Text Speed (1 to 5) // Text Speed (1 to 5)
PRESET_ENTRY_S32("gTextSpeed", 5), PRESET_ENTRY_S32("gTextSpeed", 5),
// King Zora Speed (1 to 5) // King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 2), PRESET_ENTRY_S32("gMweepSpeed", 5),
// Faster Block Push (+0 to +5) // Faster Block Push (+0 to +5)
PRESET_ENTRY_S32("gFasterBlockPush", 5), PRESET_ENTRY_S32("gFasterBlockPush", 5),
// Better Owl // Better Owl
@ -384,6 +410,8 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1), PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1),
// Fix Navi text HUD position // Fix Navi text HUD position
PRESET_ENTRY_S32("gNaviTextFix", 1), PRESET_ENTRY_S32("gNaviTextFix", 1),
// Extend Silver Rupee Jingle
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
// Red Ganon blood // Red Ganon blood
PRESET_ENTRY_S32("gRedGanonBlood", 1), PRESET_ENTRY_S32("gRedGanonBlood", 1),
@ -395,8 +423,6 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
PRESET_ENTRY_S32("gBombchusOOB", 1), PRESET_ENTRY_S32("gBombchusOOB", 1),
// Skip save confirmation // Skip save confirmation
PRESET_ENTRY_S32("gSkipSaveConfirmation", 1), PRESET_ENTRY_S32("gSkipSaveConfirmation", 1),
// King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 5),
// Biggoron Forge Time (0 to 3) // Biggoron Forge Time (0 to 3)
PRESET_ENTRY_S32("gForgeTime", 0), PRESET_ENTRY_S32("gForgeTime", 0),
// Vine/Ladder Climb speed (+0 to +12) // Vine/Ladder Climb speed (+0 to +12)
@ -468,7 +494,7 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
// Text Speed (1 to 5) // Text Speed (1 to 5)
PRESET_ENTRY_S32("gTextSpeed", 5), PRESET_ENTRY_S32("gTextSpeed", 5),
// King Zora Speed (1 to 5) // King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 2), PRESET_ENTRY_S32("gMweepSpeed", 5),
// Faster Block Push (+0 to +5) // Faster Block Push (+0 to +5)
PRESET_ENTRY_S32("gFasterBlockPush", 5), PRESET_ENTRY_S32("gFasterBlockPush", 5),
// Better Owl // Better Owl
@ -481,9 +507,6 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
// Inject Item Counts in messages // Inject Item Counts in messages
PRESET_ENTRY_S32("gInjectItemCounts", 1), PRESET_ENTRY_S32("gInjectItemCounts", 1),
// Pause link animation (0 to 16)
PRESET_ENTRY_S32("gPauseLiveLink", 1),
// Dynamic Wallet Icon // Dynamic Wallet Icon
PRESET_ENTRY_S32("gDynamicWalletIcon", 1), PRESET_ENTRY_S32("gDynamicWalletIcon", 1),
// Always show dungeon entrances // Always show dungeon entrances
@ -501,6 +524,8 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1), PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1),
// Fix Navi text HUD position // Fix Navi text HUD position
PRESET_ENTRY_S32("gNaviTextFix", 1), PRESET_ENTRY_S32("gNaviTextFix", 1),
// Extend Silver Rupee Jingle
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
// Red Ganon blood // Red Ganon blood
PRESET_ENTRY_S32("gRedGanonBlood", 1), PRESET_ENTRY_S32("gRedGanonBlood", 1),
@ -512,8 +537,6 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
PRESET_ENTRY_S32("gBombchusOOB", 1), PRESET_ENTRY_S32("gBombchusOOB", 1),
// Skip save confirmation // Skip save confirmation
PRESET_ENTRY_S32("gSkipSaveConfirmation", 1), PRESET_ENTRY_S32("gSkipSaveConfirmation", 1),
// King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 5),
// Biggoron Forge Time (0 to 3) // Biggoron Forge Time (0 to 3)
PRESET_ENTRY_S32("gForgeTime", 0), PRESET_ENTRY_S32("gForgeTime", 0),
// Vine/Ladder Climb speed (+0 to +12) // Vine/Ladder Climb speed (+0 to +12)

View File

@ -81,12 +81,25 @@ void SetAllEntrancesData(std::vector<EntranceInfoPair>& entranceShuffleTable) {
forwardEntrance->SetBlueWarp(forwardEntry.blueWarp); forwardEntrance->SetBlueWarp(forwardEntry.blueWarp);
forwardEntrance->SetType(forwardEntry.type); forwardEntrance->SetType(forwardEntry.type);
forwardEntrance->SetAsPrimary(); forwardEntrance->SetAsPrimary();
// When decouple entrances is on, mark it for entrances except boss rooms
if (Settings::DecoupleEntrances && forwardEntry.type != EntranceType::ChildBoss &&
forwardEntry.type != EntranceType::AdultBoss) {
forwardEntrance->SetDecoupled();
}
if (returnEntry.parentRegion != NONE) { if (returnEntry.parentRegion != NONE) {
Entrance* returnEntrance = AreaTable(returnEntry.parentRegion)->GetExit(returnEntry.connectedRegion); Entrance* returnEntrance = AreaTable(returnEntry.parentRegion)->GetExit(returnEntry.connectedRegion);
returnEntrance->SetIndex(returnEntry.index); returnEntrance->SetIndex(returnEntry.index);
returnEntrance->SetBlueWarp(returnEntry.blueWarp); returnEntrance->SetBlueWarp(returnEntry.blueWarp);
returnEntrance->SetType(returnEntry.type); returnEntrance->SetType(returnEntry.type);
forwardEntrance->BindTwoWay(returnEntrance); forwardEntrance->BindTwoWay(returnEntrance);
// Mark reverse entrance as decoupled
if (Settings::DecoupleEntrances && returnEntry.type != EntranceType::ChildBoss &&
returnEntry.type != EntranceType::AdultBoss) {
returnEntrance->SetDecoupled();
}
} }
} }
} }
@ -96,7 +109,7 @@ static std::vector<Entrance*> AssumeEntrancePool(std::vector<Entrance*>& entranc
for (Entrance* entrance : entrancePool) { for (Entrance* entrance : entrancePool) {
totalRandomizableEntrances++; totalRandomizableEntrances++;
Entrance* assumedForward = entrance->AssumeReachable(); Entrance* assumedForward = entrance->AssumeReachable();
if (entrance->GetReverse() != nullptr && !Settings::DecoupleEntrances) { if (entrance->GetReverse() != nullptr && !entrance->IsDecoupled()) {
Entrance* assumedReturn = entrance->GetReverse()->AssumeReachable(); Entrance* assumedReturn = entrance->GetReverse()->AssumeReachable();
if (!(Settings::MixedEntrancePools && (Settings::ShuffleOverworldEntrances || Settings::ShuffleInteriorEntrances.Is(SHUFFLEINTERIORS_ALL)))) { if (!(Settings::MixedEntrancePools && (Settings::ShuffleOverworldEntrances || Settings::ShuffleInteriorEntrances.Is(SHUFFLEINTERIORS_ALL)))) {
auto type = entrance->GetType(); auto type = entrance->GetType();
@ -218,7 +231,7 @@ static void ChangeConnections(Entrance* entrance, Entrance* targetEntrance) {
SPDLOG_DEBUG(message); SPDLOG_DEBUG(message);
entrance->Connect(targetEntrance->Disconnect()); entrance->Connect(targetEntrance->Disconnect());
entrance->SetReplacement(targetEntrance->GetReplacement()); entrance->SetReplacement(targetEntrance->GetReplacement());
if (entrance->GetReverse() != nullptr && !Settings::DecoupleEntrances) { if (entrance->GetReverse() != nullptr && !entrance->IsDecoupled()) {
targetEntrance->GetReplacement()->GetReverse()->Connect(entrance->GetReverse()->GetAssumed()->Disconnect()); targetEntrance->GetReplacement()->GetReverse()->Connect(entrance->GetReverse()->GetAssumed()->Disconnect());
targetEntrance->GetReplacement()->GetReverse()->SetReplacement(entrance->GetReverse()); targetEntrance->GetReplacement()->GetReverse()->SetReplacement(entrance->GetReverse());
} }
@ -229,7 +242,7 @@ static void ChangeConnections(Entrance* entrance, Entrance* targetEntrance) {
static void RestoreConnections(Entrance* entrance, Entrance* targetEntrance) { static void RestoreConnections(Entrance* entrance, Entrance* targetEntrance) {
targetEntrance->Connect(entrance->Disconnect()); targetEntrance->Connect(entrance->Disconnect());
entrance->SetReplacement(nullptr); entrance->SetReplacement(nullptr);
if (entrance->GetReverse() != nullptr && !Settings::DecoupleEntrances) { if (entrance->GetReverse() != nullptr && !entrance->IsDecoupled()) {
entrance->GetReverse()->GetAssumed()->Connect(targetEntrance->GetReplacement()->GetReverse()->Disconnect()); entrance->GetReverse()->GetAssumed()->Connect(targetEntrance->GetReplacement()->GetReverse()->Disconnect());
targetEntrance->GetReplacement()->GetReverse()->SetReplacement(nullptr); targetEntrance->GetReplacement()->GetReverse()->SetReplacement(nullptr);
} }
@ -247,7 +260,7 @@ static void DeleteTargetEntrance(Entrance* targetEntrance) {
static void ConfirmReplacement(Entrance* entrance, Entrance* targetEntrance) { static void ConfirmReplacement(Entrance* entrance, Entrance* targetEntrance) {
DeleteTargetEntrance(targetEntrance); DeleteTargetEntrance(targetEntrance);
if (entrance->GetReverse() != nullptr && !Settings::DecoupleEntrances) { if (entrance->GetReverse() != nullptr && !entrance->IsDecoupled()) {
auto replacedReverse = targetEntrance->GetReplacement()->GetReverse(); auto replacedReverse = targetEntrance->GetReplacement()->GetReverse();
DeleteTargetEntrance(replacedReverse->GetReverse()->GetAssumed()); DeleteTargetEntrance(replacedReverse->GetReverse()->GetAssumed());
} }
@ -786,9 +799,9 @@ int ShuffleAllEntrances() {
{EntranceType::SpecialInterior, KAK_POTION_SHOP_BACK, KAK_BACKYARD, 0x04FF}}, {EntranceType::SpecialInterior, KAK_POTION_SHOP_BACK, KAK_BACKYARD, 0x04FF}},
// Grotto Loads use an entrance index of 0x0700 + their grotto id. The id is used as index for the // Grotto Loads use an entrance index of 0x0700 + their grotto id. The id is used as index for the
// grottoLoadTable in src/grotto.c // grottoLoadTable in soh/soh/Enhancements/randomizer/randomizer_grotto.c
// Grotto Returns use an entrance index of 0x0800 + their grotto id. The id is used as index for the // Grotto Returns use an entrance index of 0x0800 + their grotto id. The id is used as index for the
// grottoReturnTable in src/grotto.c // grottoReturnTable in soh/soh/Enhancements/randomizer/randomizer_grotto.c
{{EntranceType::GrottoGrave, DESERT_COLOSSUS, COLOSSUS_GROTTO, 0x0700}, {{EntranceType::GrottoGrave, DESERT_COLOSSUS, COLOSSUS_GROTTO, 0x0700},
{EntranceType::GrottoGrave, COLOSSUS_GROTTO, DESERT_COLOSSUS, 0x0800}}, {EntranceType::GrottoGrave, COLOSSUS_GROTTO, DESERT_COLOSSUS, 0x0800}},
{{EntranceType::GrottoGrave, LAKE_HYLIA, LH_GROTTO, 0x0701}, {{EntranceType::GrottoGrave, LAKE_HYLIA, LH_GROTTO, 0x0701},
@ -933,6 +946,23 @@ int ShuffleAllEntrances() {
{{EntranceType::WarpSong, REQUIEM_OF_SPIRIT_WARP, DESERT_COLOSSUS, 0x01F1}, NO_RETURN_ENTRANCE}, {{EntranceType::WarpSong, REQUIEM_OF_SPIRIT_WARP, DESERT_COLOSSUS, 0x01F1}, NO_RETURN_ENTRANCE},
{{EntranceType::WarpSong, NOCTURNE_OF_SHADOW_WARP, GRAVEYARD_WARP_PAD_REGION, 0x0568}, NO_RETURN_ENTRANCE}, {{EntranceType::WarpSong, NOCTURNE_OF_SHADOW_WARP, GRAVEYARD_WARP_PAD_REGION, 0x0568}, NO_RETURN_ENTRANCE},
{{EntranceType::WarpSong, PRELUDE_OF_LIGHT_WARP, TEMPLE_OF_TIME, 0x05F4}, NO_RETURN_ENTRANCE}, {{EntranceType::WarpSong, PRELUDE_OF_LIGHT_WARP, TEMPLE_OF_TIME, 0x05F4}, NO_RETURN_ENTRANCE},
{{EntranceType::ChildBoss, DEKU_TREE_BOSS_ENTRYWAY, DEKU_TREE_BOSS_ROOM, 0x040F},
{EntranceType::ChildBoss, DEKU_TREE_BOSS_ROOM, DEKU_TREE_BOSS_ENTRYWAY, 0x0252, 0x0457}},
{{EntranceType::ChildBoss, DODONGOS_CAVERN_BOSS_ENTRYWAY, DODONGOS_CAVERN_BOSS_ROOM, 0x040B},
{EntranceType::ChildBoss, DODONGOS_CAVERN_BOSS_ROOM, DODONGOS_CAVERN_BOSS_ENTRYWAY, 0x00C5, 0x047A}},
{{EntranceType::ChildBoss, JABU_JABUS_BELLY_BOSS_ENTRYWAY, JABU_JABUS_BELLY_BOSS_ROOM, 0x0301},
{EntranceType::ChildBoss, JABU_JABUS_BELLY_BOSS_ROOM, JABU_JABUS_BELLY_BOSS_ENTRYWAY, 0x0407, 0x010E}},
{{EntranceType::AdultBoss, FOREST_TEMPLE_BOSS_ENTRYWAY, FOREST_TEMPLE_BOSS_ROOM, 0x000C},
{EntranceType::AdultBoss, FOREST_TEMPLE_BOSS_ROOM, FOREST_TEMPLE_BOSS_ENTRYWAY, 0x024E, 0x0608}},
{{EntranceType::AdultBoss, FIRE_TEMPLE_BOSS_ENTRYWAY, FIRE_TEMPLE_BOSS_ROOM, 0x0305},
{EntranceType::AdultBoss, FIRE_TEMPLE_BOSS_ROOM, FIRE_TEMPLE_BOSS_ENTRYWAY, 0x0175, 0x0564}},
{{EntranceType::AdultBoss, WATER_TEMPLE_BOSS_ENTRYWAY, WATER_TEMPLE_BOSS_ROOM, 0x0417},
{EntranceType::AdultBoss, WATER_TEMPLE_BOSS_ROOM, WATER_TEMPLE_BOSS_ENTRYWAY, 0x0423, 0x060C}},
{{EntranceType::AdultBoss, SPIRIT_TEMPLE_BOSS_ENTRYWAY, SPIRIT_TEMPLE_BOSS_ROOM, 0x008D},
{EntranceType::AdultBoss, SPIRIT_TEMPLE_BOSS_ROOM, SPIRIT_TEMPLE_BOSS_ENTRYWAY, 0x02F5, 0x0610}},
{{EntranceType::AdultBoss, SHADOW_TEMPLE_BOSS_ENTRYWAY, SHADOW_TEMPLE_BOSS_ROOM, 0x0413},
{EntranceType::AdultBoss, SHADOW_TEMPLE_BOSS_ROOM, SHADOW_TEMPLE_BOSS_ENTRYWAY, 0x02B2, 0x0580}},
}; };
std::map<std::string, PriorityEntrance> priorityEntranceTable = { std::map<std::string, PriorityEntrance> priorityEntranceTable = {
@ -971,6 +1001,28 @@ int ShuffleAllEntrances() {
} }
} }
// Shuffle Bosses
if (Settings::ShuffleBossEntrances.IsNot(SHUFFLEBOSSES_OFF)) {
if (Settings::ShuffleBossEntrances.Is(SHUFFLEBOSSES_FULL)) {
entrancePools[EntranceType::Boss] = GetShuffleableEntrances(EntranceType::ChildBoss);
AddElementsToPool(entrancePools[EntranceType::Boss], GetShuffleableEntrances(EntranceType::AdultBoss));
// If forest is closed, ensure Ghoma is inside the Deku tree
// Deku tree being in its vanilla location is handled below
if (Settings::OpenForest.Is(OPENFOREST_CLOSED) && !(Settings::ShuffleOverworldEntrances || Settings::ShuffleInteriorEntrances)) {
FilterAndEraseFromPool(entrancePools[EntranceType::Boss], [](const Entrance* entrance){return entrance->GetParentRegionKey() == DEKU_TREE_BOSS_ENTRYWAY &&
entrance->GetConnectedRegionKey() == DEKU_TREE_BOSS_ROOM;});
}
} else {
entrancePools[EntranceType::ChildBoss] = GetShuffleableEntrances(EntranceType::ChildBoss);
entrancePools[EntranceType::AdultBoss] = GetShuffleableEntrances(EntranceType::AdultBoss);
// If forest is closed, ensure Ghoma is inside the Deku tree
if (Settings::OpenForest.Is(OPENFOREST_CLOSED) && !(Settings::ShuffleOverworldEntrances || Settings::ShuffleInteriorEntrances)) {
FilterAndEraseFromPool(entrancePools[EntranceType::ChildBoss], [](const Entrance* entrance){return entrance->GetParentRegionKey() == DEKU_TREE_BOSS_ENTRYWAY &&
entrance->GetConnectedRegionKey() == DEKU_TREE_BOSS_ROOM;});
}
}
}
//Shuffle Dungeon Entrances //Shuffle Dungeon Entrances
if (Settings::ShuffleDungeonEntrances.IsNot(SHUFFLEDUNGEONS_OFF)) { if (Settings::ShuffleDungeonEntrances.IsNot(SHUFFLEDUNGEONS_OFF)) {
entrancePools[EntranceType::Dungeon] = GetShuffleableEntrances(EntranceType::Dungeon); entrancePools[EntranceType::Dungeon] = GetShuffleableEntrances(EntranceType::Dungeon);

View File

@ -22,6 +22,9 @@ enum class EntranceType {
Dungeon, Dungeon,
GanonDungeon, GanonDungeon,
DungeonReverse, DungeonReverse,
Boss,
ChildBoss,
AdultBoss,
Interior, Interior,
InteriorReverse, InteriorReverse,
SpecialInterior, SpecialInterior,
@ -180,6 +183,14 @@ public:
return primary; return primary;
} }
bool IsDecoupled() const {
return decoupled;
}
void SetDecoupled() {
decoupled = true;
}
int16_t GetIndex() const { int16_t GetIndex() const {
return index; return index;
} }
@ -269,6 +280,7 @@ private:
bool shuffled = false; bool shuffled = false;
bool primary = false; bool primary = false;
bool addedToPool = false; bool addedToPool = false;
bool decoupled = false;
std::string name = ""; std::string name = "";
}; };

View File

@ -295,8 +295,8 @@ std::vector<uint32_t> GetAccessibleLocations(const std::vector<uint32_t>& allowe
if (mode == SearchMode::GeneratePlaythrough && exit.IsShuffled() && !exit.IsAddedToPool() && !noRandomEntrances) { if (mode == SearchMode::GeneratePlaythrough && exit.IsShuffled() && !exit.IsAddedToPool() && !noRandomEntrances) {
entranceSphere.push_back(&exit); entranceSphere.push_back(&exit);
exit.AddToPool(); exit.AddToPool();
// Don't list a coupled entrance from both directions // Don't list a two-way coupled entrance from both directions
if (exit.GetReplacement()->GetReverse() != nullptr && !Settings::DecoupleEntrances) { if (exit.GetReverse() != nullptr && exit.GetReplacement()->GetReverse() != nullptr && !exit.IsDecoupled()) {
exit.GetReplacement()->GetReverse()->AddToPool(); exit.GetReplacement()->GetReverse()->AddToPool();
} }
} }
@ -1074,6 +1074,14 @@ int Fill() {
if (ShuffleMerchants.Is(SHUFFLEMERCHANTS_HINTS)) { if (ShuffleMerchants.Is(SHUFFLEMERCHANTS_HINTS)) {
CreateMerchantsHints(); CreateMerchantsHints();
} }
//Always execute ganon hint generation for the funny line
CreateGanonText();
if (AltarHintText) {
CreateAltarText();
}
if (DampeHintText) {
CreateDampesDiaryText();
}
if (ShuffleWarpSongs) { if (ShuffleWarpSongs) {
CreateWarpSongTexts(); CreateWarpSongTexts();
} }

View File

@ -2519,93 +2519,61 @@ void HintTable_Init() {
| BOSS HINT TEXT | | BOSS HINT TEXT |
---------------------------*/ ---------------------------*/
hintTable[QUEEN_GOHMA] = HintText::Boss( hintTable[QUEEN_GOHMA] = HintText::Boss({
{
// obscure text // obscure text
Text{ "An #ancient tree# rewards", /*french*/ "le #vieil arbre# octroie", Text{"the #Parasitic Armored Arachnid# holds", /*french*/"le #monstre insectoïde géant# possède", /*spanish*/"el #arácnido parasitario acorazado# porta"},
/*spanish*/ "un #ancestral árbol# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "the #Deku Tree# rewards", /*french*/ "l'#Arbre Mojo# octroie", Text{"#Queen Gohma# holds", /*french*/"la #Reine Gohma# possède", /*spanish*/"la #Reina Goma# porta"});
/*spanish*/ "el #Gran Árbol Deku# premia con" });
hintTable[KING_DODONGO] = HintText::Boss( hintTable[KING_DODONGO] = HintText::Boss({
{
//obscure text //obscure text
Text{ "An #immense cavern# rewards", /*french*/ "l'#immense caverne# octroie", Text{"the #Infernal Dinosaur# holds", /*french*/"le #dinosaure infernal# possède", /*spanish*/"el #dinosaurio infernal# porta"},
/*spanish*/ "una #descomunal cueva# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "#Dodongo's Cavern# rewards", /*french*/ "la #Caverne Dodongo# octroie", Text{"#King Dodongo# holds", /*french*/"le #Roi Dodongo# possède", /*spanish*/"el #Rey Dodongo# porta"});
/*spanish*/ "la #Cueva de los Dodongos# premia con" });
hintTable[BARINADE] = HintText::Boss( hintTable[BARINADE] = HintText::Boss({
{
//obscure text //obscure text
Text{ "the #belly of a deity# rewards", /*french*/ "le #ventre du gardien# octroie", Text{"the #Bio-Electric Anemone# holds", /*french*/"l'#anémone bioélectrique# possède", /*spanish*/"la #anémona bioeléctrica# porta"},
/*spanish*/ "la #tripa de cierta deidad# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "#Jabu-Jabu's Belly# rewards", /*french*/ "le #Ventre de Jabu-Jabu# octroie", Text{"#Barinade# holds", /*french*/"#Barinade# possède", /*spanish*/"#Barinade# porta"});
/*spanish*/ "la #tripa de Jabu-Jabu# premia con" });
hintTable[PHANTOM_GANON] = HintText::Boss( hintTable[PHANTOM_GANON] = HintText::Boss({
{
//obscure text //obscure text
Text{ "a #deep forest# rewards", /*french*/ "la #profonde forêt# octroie", Text{"the #Evil Spirit from Beyond# holds", /*french*/"l'#esprit maléfique de l'au-delà# possède", /*spanish*/"el #espíritu maligno de ultratumba# porta"},
/*spanish*/ "el #profundo bosque# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "the #Forest Temple# rewards", /*french*/ "le #Temple de la Forêt# octroie", Text{"#Phantom Ganon# holds", /*french*/"#Ganon Spectral# possède", /*spanish*/"#Ganon Fantasma# porta"});
/*spanish*/ "el #Templo del Bosque# premia con" });
hintTable[VOLVAGIA] = HintText::Boss( hintTable[VOLVAGIA] = HintText::Boss({
{
//obscure text //obscure text
Text{ "a #high mountain# rewards", /*french*/ "la #grande montagne# octroie", Text{"the #Subterranean Lava Dragon# holds", /*french*/"le #dragon des profondeurs# possède", /*spanish*/"el #dragón de lava subterráneo# porta"},
/*spanish*/ "una #alta montaña# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "the #Fire Temple# rewards", /*french*/ "le #Temple du Feu# octroie", Text{"#Volvagia# holds", /*french*/"#Volvagia# possède", /*spanish*/"#Volvagia# porta"});
/*spanish*/ "el #Templo del Fuego# premia con" });
hintTable[MORPHA] = HintText::Boss( hintTable[MORPHA] = HintText::Boss({
{
//obscure text //obscure text
Text{ "a #vast lake# rewards", /*french*/ "le #vaste lac# octroie", Text{"the #Giant Aquatic Amoeba# holds", /*french*/"l'#amibe aquatique géante# possède", /*spanish*/"la #ameba acuática gigante# porta"},
/*spanish*/ "un #lago inmenso# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "the #Water Temple# rewards", /*french*/ "le #Temple de l'Eau# octroie", Text{"#Morpha# holds", /*french*/"#Morpha# possède", /*spanish*/"#Morpha# porta"});
/*spanish*/ "el #Templo del Agua# premia con" });
hintTable[BONGO_BONGO] = HintText::Boss( hintTable[BONGO_BONGO] = HintText::Boss({
{
//obscure text //obscure text
Text{ "the #house of the dead# rewards", /*french*/ "la #maison des morts# octroie", Text{"the #Phantom Shadow Beast# holds", /*french*/"le #monstre de l'ombre# possède", /*spanish*/"la #alimaña oscura espectral# porta"},
/*spanish*/ "la #casa de la muerte# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "the #Shadow Temple# rewards", /*french*/ "le #Temple de l'Ombre# octroie", Text{"#Bongo Bongo# holds", /*french*/"#Bongo Bongo# possède", /*spanish*/"#Bongo Bongo# porta"});
/*spanish*/ "el #Templo de las Sombras#" });
hintTable[TWINROVA] = HintText::Boss( hintTable[TWINROVA] = HintText::Boss({
{
//obscure text //obscure text
Text{ "a #goddess of the sand# rewards", /*french*/ "la #déesse des sables# octroie", Text{"the #Sorceress Sisters# hold", /*french*/"#les sorcières jumelles# possède", /*spanish*/"las #hermanas hechiceras# portan"},
/*spanish*/ "la #diosa de la arena# premia con" }, }, {},
},
{},
//clear text //clear text
Text{ "the #Spirit Temple# rewards", /*french*/ "le #Temple de l'Esprit# octroie", Text{"#Twinrova# holds", /*french*/"#Twinrova# possède", /*spanish*/"#Birova# porta"});
/*spanish*/ "el #Templo del Espíritu# premia con" });
// //
// [LINKS_POCKET_BOSS] = HintText::Boss({ // [LINKS_POCKET_BOSS] = HintText::Boss({
// //obscure text // //obscure text

View File

@ -418,6 +418,10 @@ void HintTable_Init_Exclude_Overworld() {
Text{"a #carpet guru# sells", /*french*/"#un marchand du désert# vend", /*spanish*/"el #genio de una alfombra# vende"}, Text{"a #carpet guru# sells", /*french*/"#un marchand du désert# vend", /*spanish*/"el #genio de una alfombra# vende"},
}); });
hintTable[GC_MEDIGORON] = HintText::Exclude({
//obscure text
Text{"#Medigoron# sells", /*french*/"#Medigoron# vend", /*spanish*/"#Medigoron# vende"},
});
hintTable[KAK_IMPAS_HOUSE_FREESTANDING_POH] = HintText::Exclude({ hintTable[KAK_IMPAS_HOUSE_FREESTANDING_POH] = HintText::Exclude({
//obscure text //obscure text

View File

@ -116,6 +116,7 @@ Text childAltarText;
Text adultAltarText; Text adultAltarText;
Text ganonText; Text ganonText;
Text ganonHintText; Text ganonHintText;
Text dampesText;
Text warpMinuetText; Text warpMinuetText;
Text warpBoleroText; Text warpBoleroText;
Text warpSerenadeText; Text warpSerenadeText;
@ -139,6 +140,10 @@ Text& GetGanonHintText() {
return ganonHintText; return ganonHintText;
} }
Text& GetDampeHintText() {
return dampesText;
}
Text& GetWarpMinuetText() { Text& GetWarpMinuetText() {
return warpMinuetText; return warpMinuetText;
} }
@ -312,17 +317,12 @@ static void CreateWothHint(uint8_t* remainingDungeonWothHints) {
Location(hintedLocation)->SetAsHinted(); Location(hintedLocation)->SetAsHinted();
uint32_t gossipStone = RandomElement(gossipStoneLocations); uint32_t gossipStone = RandomElement(gossipStoneLocations);
// form hint text
Text locationText;
if (Location(hintedLocation)->IsDungeon()) { if (Location(hintedLocation)->IsDungeon()) {
*remainingDungeonWothHints -= 1; *remainingDungeonWothHints -= 1;
uint32_t parentRegion = Location(hintedLocation)->GetParentRegionKey();
locationText = AreaTable(parentRegion)->GetHint().GetText();
} else {
uint32_t parentRegion = Location(hintedLocation)->GetParentRegionKey();
locationText = GetHintRegion(parentRegion)->GetHint().GetText();
} }
// form hint text
Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText();
Text finalWothHint = Hint(PREFIX).GetText() + "#" + locationText + "#" + Hint(WAY_OF_THE_HERO).GetText(); Text finalWothHint = Hint(PREFIX).GetText() + "#" + locationText + "#" + Hint(WAY_OF_THE_HERO).GetText();
SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG("\tMessage: ");
SPDLOG_DEBUG(finalWothHint.english); SPDLOG_DEBUG(finalWothHint.english);
@ -360,16 +360,12 @@ static void CreateBarrenHint(uint8_t* remainingDungeonBarrenHints, std::vector<u
Location(hintedLocation)->SetAsHinted(); Location(hintedLocation)->SetAsHinted();
uint32_t gossipStone = RandomElement(gossipStoneLocations); uint32_t gossipStone = RandomElement(gossipStoneLocations);
// form hint text
Text locationText;
if (Location(hintedLocation)->IsDungeon()) { if (Location(hintedLocation)->IsDungeon()) {
*remainingDungeonBarrenHints -= 1; *remainingDungeonBarrenHints -= 1;
uint32_t parentRegion = Location(hintedLocation)->GetParentRegionKey();
locationText = Hint(AreaTable(parentRegion)->hintKey).GetText();
} else {
uint32_t parentRegion = Location(hintedLocation)->GetParentRegionKey();
locationText = Hint(GetHintRegion(parentRegion)->hintKey).GetText();
} }
// form hint text
Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText();
Text finalBarrenHint = Text finalBarrenHint =
Hint(PREFIX).GetText() + Hint(PLUNDERING).GetText() + "#" + locationText + "#" + Hint(FOOLISH).GetText(); Hint(PREFIX).GetText() + Hint(PLUNDERING).GetText() + "#" + locationText + "#" + Hint(FOOLISH).GetText();
SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG("\tMessage: ");
@ -414,16 +410,15 @@ static void CreateRandomLocationHint(const bool goodItem = false) {
//form hint text //form hint text
Text itemText = Location(hintedLocation)->GetPlacedItem().GetHint().GetText(); Text itemText = Location(hintedLocation)->GetPlacedItem().GetHint().GetText();
Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText();
// RANDOTODO: reconsider dungeon vs non-dungeon item location hints when boss shuffle mixed pools happens
if (Location(hintedLocation)->IsDungeon()) { if (Location(hintedLocation)->IsDungeon()) {
uint32_t parentRegion = Location(hintedLocation)->GetParentRegionKey();
Text locationText = AreaTable(parentRegion)->GetHint().GetText();
Text finalHint = Hint(PREFIX).GetText()+"#"+locationText+"# "+Hint(HOARDS).GetText()+" #"+itemText+"#."; Text finalHint = Hint(PREFIX).GetText()+"#"+locationText+"# "+Hint(HOARDS).GetText()+" #"+itemText+"#.";
SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG("\tMessage: ");
SPDLOG_DEBUG(finalHint.english); SPDLOG_DEBUG(finalHint.english);
SPDLOG_DEBUG("\n\n"); SPDLOG_DEBUG("\n\n");
AddHint(finalHint, gossipStone, {QM_GREEN, QM_RED}); AddHint(finalHint, gossipStone, {QM_GREEN, QM_RED});
} else { } else {
Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText();
Text finalHint = Hint(PREFIX).GetText()+"#"+itemText+"# "+Hint(CAN_BE_FOUND_AT).GetText()+" #"+locationText+"#."; Text finalHint = Hint(PREFIX).GetText()+"#"+itemText+"# "+Hint(CAN_BE_FOUND_AT).GetText()+" #"+locationText+"#.";
SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG("\tMessage: ");
SPDLOG_DEBUG(finalHint.english); SPDLOG_DEBUG(finalHint.english);
@ -546,7 +541,7 @@ static void CreateTrialHints() {
} }
} }
static void CreateGanonText() { void CreateGanonText() {
//funny ganon line //funny ganon line
ganonText = RandomElement(GetHintCategory(HintCategory::GanonLine)).GetText(); ganonText = RandomElement(GetHintCategory(HintCategory::GanonLine)).GetText();
@ -680,7 +675,7 @@ static Text BuildGanonBossKeyText() {
return Text()+"$b"+ganonBossKeyText+"^"; return Text()+"$b"+ganonBossKeyText+"^";
} }
static void CreateAltarText() { void CreateAltarText() {
//Child Altar Text //Child Altar Text
childAltarText = Hint(SPIRITUAL_STONE_TEXT_START).GetText()+"^"+ childAltarText = Hint(SPIRITUAL_STONE_TEXT_START).GetText()+"^"+
@ -737,6 +732,25 @@ void CreateMerchantsHints() {
CreateMessageFromTextObject(0x6078, 0, 2, 3, AddColorsAndFormat(carpetSalesmanTextTwo, {QM_RED, QM_YELLOW, QM_RED})); CreateMessageFromTextObject(0x6078, 0, 2, 3, AddColorsAndFormat(carpetSalesmanTextTwo, {QM_RED, QM_YELLOW, QM_RED}));
} }
void CreateDampesDiaryText() {
uint32_t item = PROGRESSIVE_HOOKSHOT;
uint32_t location = FilterFromPool(allLocations, [item](const uint32_t loc){return Location(loc)->GetPlaceduint32_t() == item;})[0];
Text area = GetHintRegion(Location(location)->GetParentRegionKey())->GetHint().GetText();
Text temp1 = Text{
"Whoever reads this, please enter %g",
"Toi qui lit ce journal, rends-toi dans %g",
"Wer immer dies liest, der möge folgenden Ort aufsuchen: %g"
};
Text temp2 = {
"%w. I will let you have my stretching, shrinking keepsake.^I'm waiting for you.&--Dampé",
"%w. Et peut-être auras-tu droit à mon précieux %rtrésor%w.^Je t'attends...&--Igor",
"%w. Ihm gebe ich meinen langen, kurzen Schatz.^Ich warte!&Boris"
};
dampesText = temp1 + area + temp2;
}
void CreateWarpSongTexts() { void CreateWarpSongTexts() {
auto warpSongEntrances = GetShuffleableEntrances(EntranceType::WarpSong, false); auto warpSongEntrances = GetShuffleableEntrances(EntranceType::WarpSong, false);
@ -777,9 +791,6 @@ void CreateWarpSongTexts() {
void CreateAllHints() { void CreateAllHints() {
CreateGanonText();
CreateAltarText();
SPDLOG_DEBUG("\nNOW CREATING HINTS\n"); SPDLOG_DEBUG("\nNOW CREATING HINTS\n");
const HintSetting& hintSetting = hintSettingTable[Settings::HintDistribution.Value<uint8_t>()]; const HintSetting& hintSetting = hintSettingTable[Settings::HintDistribution.Value<uint8_t>()];

View File

@ -221,11 +221,15 @@ extern uint32_t GetHintRegionHintKey(const uint32_t area);
extern void CreateAllHints(); extern void CreateAllHints();
extern void CreateMerchantsHints(); extern void CreateMerchantsHints();
extern void CreateWarpSongTexts(); extern void CreateWarpSongTexts();
extern void CreateDampesDiaryText();
extern void CreateGanonText();
extern void CreateAltarText();
Text& GetChildAltarText(); Text& GetChildAltarText();
Text& GetAdultAltarText(); Text& GetAdultAltarText();
Text& GetGanonText(); Text& GetGanonText();
Text& GetGanonHintText(); Text& GetGanonHintText();
Text& GetDampeHintText();
Text& GetWarpMinuetText(); Text& GetWarpMinuetText();
Text& GetWarpBoleroText(); Text& GetWarpBoleroText();

View File

@ -286,6 +286,11 @@ Item& ItemFromGIID(const int giid) {
} }
index++; index++;
} }
// there are vanilla items that don't exist in the item table we're reading from here
// if we made it this far, it means we didn't find an item in the table
// if we don't return anything, the game will crash, so, as a workaround, return greg
return itemTable[GREEN_RUPEE];
} }
//This function should only be used to place items containing hint text //This function should only be used to place items containing hint text

View File

@ -1083,6 +1083,8 @@ typedef enum {
DEATH_MOUNTAIN_CRATER, DEATH_MOUNTAIN_CRATER,
//AREAS //AREAS
MARKER_AREAS_START, // Used for area key count
ROOT, ROOT,
ROOT_EXITS, ROOT_EXITS,
CHILD_SPAWN, CHILD_SPAWN,
@ -1263,6 +1265,16 @@ typedef enum {
DEKU_TREE_BASEMENT_BACK_ROOM, DEKU_TREE_BASEMENT_BACK_ROOM,
DEKU_TREE_BASEMENT_UPPER, DEKU_TREE_BASEMENT_UPPER,
DEKU_TREE_OUTSIDE_BOSS_ROOM, DEKU_TREE_OUTSIDE_BOSS_ROOM,
DEKU_TREE_MQ_LOBBY,
DEKU_TREE_MQ_COMPASS_ROOM,
DEKU_TREE_MQ_BASEMENT_WATER_ROOM_FRONT,
DEKU_TREE_MQ_BASEMENT_WATER_ROOM_BACK,
DEKU_TREE_MQ_BASEMENT_BACK_ROOM,
DEKU_TREE_MQ_BASEMENT_LEDGE,
DEKU_TREE_MQ_OUTSIDE_BOSS_ROOM,
DEKU_TREE_BOSS_ENTRYWAY,
DEKU_TREE_BOSS_ROOM, DEKU_TREE_BOSS_ROOM,
DODONGOS_CAVERN_BEGINNING, DODONGOS_CAVERN_BEGINNING,
@ -1287,6 +1299,14 @@ typedef enum {
DODONGOS_CAVERN_FAR_BRIDGE, DODONGOS_CAVERN_FAR_BRIDGE,
DODONGOS_CAVERN_BOSS_AREA, DODONGOS_CAVERN_BOSS_AREA,
DODONGOS_CAVERN_BACK_ROOM, DODONGOS_CAVERN_BACK_ROOM,
DODONGOS_CAVERN_MQ_BEGINNING,
DODONGOS_CAVERN_MQ_LOBBY,
DODONGOS_CAVERN_MQ_LOWER_RIGHT_SIDE,
DODONGOS_CAVERN_MQ_BOMB_BAG_AREA,
DODONGOS_CAVERN_MQ_BOSS_AREA,
DODONGOS_CAVERN_BOSS_ENTRYWAY,
DODONGOS_CAVERN_BOSS_ROOM, DODONGOS_CAVERN_BOSS_ROOM,
JABU_JABUS_BELLY_BEGINNING, JABU_JABUS_BELLY_BEGINNING,
@ -1306,6 +1326,13 @@ typedef enum {
JABU_JABUS_BELLY_ABOVE_BIGOCTO, JABU_JABUS_BELLY_ABOVE_BIGOCTO,
JABU_JABUS_BELLY_LIFT_UPPER, JABU_JABUS_BELLY_LIFT_UPPER,
JABU_JABUS_BELLY_NEAR_BOSS_ROOM, JABU_JABUS_BELLY_NEAR_BOSS_ROOM,
JABU_JABUS_BELLY_MQ_BEGINNING,
JABU_JABUS_BELLY_MQ_MAIN,
JABU_JABUS_BELLY_MQ_DEPTHS,
JABU_JABUS_BELLY_MQ_BOSS_AREA,
JABU_JABUS_BELLY_BOSS_ENTRYWAY,
JABU_JABUS_BELLY_BOSS_ROOM, JABU_JABUS_BELLY_BOSS_ROOM,
FOREST_TEMPLE_FIRST_ROOM, FOREST_TEMPLE_FIRST_ROOM,
@ -1335,11 +1362,24 @@ typedef enum {
FOREST_TEMPLE_GREEN_POE_ROOM, FOREST_TEMPLE_GREEN_POE_ROOM,
FOREST_TEMPLE_EAST_CORRIDOR, FOREST_TEMPLE_EAST_CORRIDOR,
FOREST_TEMPLE_BOSS_REGION, FOREST_TEMPLE_BOSS_REGION,
FOREST_TEMPLE_MQ_LOBBY,
FOREST_TEMPLE_MQ_CENTRAL_AREA,
FOREST_TEMPLE_MQ_AFTER_BLOCK_PUZZLE,
FOREST_TEMPLE_MQ_OUTDOOR_LEDGE,
FOREST_TEMPLE_MQ_NW_OUTDOORS,
FOREST_TEMPLE_MQ_NE_OUTDOORS,
FOREST_TEMPLE_MQ_OUTDOORS_TOP_LEDGES,
FOREST_TEMPLE_MQ_NE_OUTDOORS_LEDGE,
FOREST_TEMPLE_MQ_BOW_REGION,
FOREST_TEMPLE_MQ_FALLING_ROOM,
FOREST_TEMPLE_MQ_BOSS_REGION,
FOREST_TEMPLE_BOSS_ENTRYWAY,
FOREST_TEMPLE_BOSS_ROOM, FOREST_TEMPLE_BOSS_ROOM,
FIRE_TEMPLE_FIRST_ROOM, FIRE_TEMPLE_FIRST_ROOM,
FIRE_TEMPLE_NEAR_BOSS_ROOM, FIRE_TEMPLE_NEAR_BOSS_ROOM,
FIRE_TEMPLE_BOSS_ROOM,
FIRE_TEMPLE_LOOP_ENEMIES, FIRE_TEMPLE_LOOP_ENEMIES,
FIRE_TEMPLE_LOOP_TILES, FIRE_TEMPLE_LOOP_TILES,
FIRE_TEMPLE_LOOP_FLARE_DANCER, FIRE_TEMPLE_LOOP_FLARE_DANCER,
@ -1374,6 +1414,16 @@ typedef enum {
FIRE_TEMPLE_HAMMER_RETURN_PATH, FIRE_TEMPLE_HAMMER_RETURN_PATH,
FIRE_TEMPLE_ABOVE_FIRE_MAZE, FIRE_TEMPLE_ABOVE_FIRE_MAZE,
FIRE_TEMPLE_MQ_LOWER,
FIRE_TEMPLE_MQ_LOWER_LOCKED_DOOR,
FIRE_TEMPLE_MQ_BIG_LAVA_ROOM,
FIRE_TEMPLE_MQ_LOWER_MAZE,
FIRE_TEMPLE_MQ_UPPER_MAZE,
FIRE_TEMPLE_MQ_UPPER,
FIRE_TEMPLE_BOSS_ENTRYWAY,
FIRE_TEMPLE_BOSS_ROOM,
WATER_TEMPLE_LOBBY, WATER_TEMPLE_LOBBY,
WATER_TEMPLE_EAST_LOWER, WATER_TEMPLE_EAST_LOWER,
WATER_TEMPLE_MAP_ROOM, WATER_TEMPLE_MAP_ROOM,
@ -1401,6 +1451,14 @@ typedef enum {
WATER_TEMPLE_LONGSHOT_ROOM, WATER_TEMPLE_LONGSHOT_ROOM,
WATER_TEMPLE_RIVER, WATER_TEMPLE_RIVER,
WATER_TEMPLE_PRE_BOSS_ROOM, WATER_TEMPLE_PRE_BOSS_ROOM,
WATER_TEMPLE_MQ_LOBBY,
WATER_TEMPLE_MQ_DIVE,
WATER_TEMPLE_MQ_LOWERED_WATER_LEVELS,
WATER_TEMPLE_MQ_DARK_LINK_REGION,
WATER_TEMPLE_MQ_BASEMENT_GATED_AREAS,
WATER_TEMPLE_BOSS_ENTRYWAY,
WATER_TEMPLE_BOSS_ROOM, WATER_TEMPLE_BOSS_ROOM,
SPIRIT_TEMPLE_LOBBY, SPIRIT_TEMPLE_LOBBY,
@ -1411,82 +1469,7 @@ typedef enum {
SPIRIT_TEMPLE_OUTDOOR_HANDS, SPIRIT_TEMPLE_OUTDOOR_HANDS,
SPIRIT_TEMPLE_BEYOND_CENTRAL_LOCKED_DOOR, SPIRIT_TEMPLE_BEYOND_CENTRAL_LOCKED_DOOR,
SPIRIT_TEMPLE_BEYOND_FINAL_LOCKED_DOOR, SPIRIT_TEMPLE_BEYOND_FINAL_LOCKED_DOOR,
SPIRIT_TEMPLE_INSIDE_STATUE_HEAD,
SHADOW_TEMPLE_BEGINNING,
SHADOW_TEMPLE_FIRST_BEAMOS,
SHADOW_TEMPLE_HUGE_PIT,
SHADOW_TEMPLE_WIND_TUNNEL,
SHADOW_TEMPLE_BEYOND_BOAT,
BOTTOM_OF_THE_WELL,
BOTTOM_OF_THE_WELL_MAIN_AREA,
ICE_CAVERN_BEGINNING,
ICE_CAVERN_MAIN,
GERUDO_TRAINING_GROUNDS_LOBBY,
GERUDO_TRAINING_GROUNDS_CENTRAL_MAZE,
GERUDO_TRAINING_GROUNDS_CENTRAL_MAZE_RIGHT,
GERUDO_TRAINING_GROUNDS_LAVA_ROOM,
GERUDO_TRAINING_GROUNDS_HAMMER_ROOM,
GERUDO_TRAINING_GROUNDS_EYE_STATUE_LOWER,
GERUDO_TRAINING_GROUNDS_EYE_STATUE_UPPER,
GERUDO_TRAINING_GROUNDS_HEAVY_BLOCK_ROOM,
GERUDO_TRAINING_GROUNDS_LIKE_LIKE_ROOM,
GANONS_CASTLE_LOBBY,
GANONS_CASTLE_DEKU_SCRUBS,
GANONS_CASTLE_FOREST_TRIAL,
GANONS_CASTLE_FIRE_TRIAL,
GANONS_CASTLE_WATER_TRIAL,
GANONS_CASTLE_SHADOW_TRIAL,
GANONS_CASTLE_SPIRIT_TRIAL,
GANONS_CASTLE_LIGHT_TRIAL,
GANONS_CASTLE_TOWER,
DEKU_TREE_MQ_LOBBY,
DEKU_TREE_MQ_COMPASS_ROOM,
DEKU_TREE_MQ_BASEMENT_WATER_ROOM_FRONT,
DEKU_TREE_MQ_BASEMENT_WATER_ROOM_BACK,
DEKU_TREE_MQ_BASEMENT_BACK_ROOM,
DEKU_TREE_MQ_BASEMENT_LEDGE,
DODONGOS_CAVERN_MQ_BEGINNING,
DODONGOS_CAVERN_MQ_LOBBY,
DODONGOS_CAVERN_MQ_LOWER_RIGHT_SIDE,
DODONGOS_CAVERN_MQ_BOMB_BAG_AREA,
DODONGOS_CAVERN_MQ_BOSS_AREA,
JABU_JABUS_BELLY_MQ_BEGINNING,
JABU_JABUS_BELLY_MQ_MAIN,
JABU_JABUS_BELLY_MQ_DEPTHS,
JABU_JABUS_BELLY_MQ_BOSS_AREA,
FOREST_TEMPLE_MQ_LOBBY,
FOREST_TEMPLE_MQ_CENTRAL_AREA,
FOREST_TEMPLE_MQ_AFTER_BLOCK_PUZZLE,
FOREST_TEMPLE_MQ_OUTDOOR_LEDGE,
FOREST_TEMPLE_MQ_NW_OUTDOORS,
FOREST_TEMPLE_MQ_NE_OUTDOORS,
FOREST_TEMPLE_MQ_OUTDOORS_TOP_LEDGES,
FOREST_TEMPLE_MQ_NE_OUTDOORS_LEDGE,
FOREST_TEMPLE_MQ_BOW_REGION,
FOREST_TEMPLE_MQ_FALLING_ROOM,
FOREST_TEMPLE_MQ_BOSS_REGION,
FIRE_TEMPLE_MQ_LOWER,
FIRE_TEMPLE_MQ_LOWER_LOCKED_DOOR,
FIRE_TEMPLE_MQ_BIG_LAVA_ROOM,
FIRE_TEMPLE_MQ_LOWER_MAZE,
FIRE_TEMPLE_MQ_UPPER_MAZE,
FIRE_TEMPLE_MQ_UPPER,
FIRE_TEMPLE_MQ_BOSS_ROOM,
WATER_TEMPLE_MQ_LOBBY,
WATER_TEMPLE_MQ_DIVE,
WATER_TEMPLE_MQ_LOWERED_WATER_LEVELS,
WATER_TEMPLE_MQ_DARK_LINK_REGION,
WATER_TEMPLE_MQ_BASEMENT_GATED_AREAS,
SPIRIT_TEMPLE_MQ_LOBBY, SPIRIT_TEMPLE_MQ_LOBBY,
SPIRIT_TEMPLE_MQ_CHILD, SPIRIT_TEMPLE_MQ_CHILD,
@ -1496,6 +1479,16 @@ typedef enum {
SPIRIT_TEMPLE_MQ_BOSS_AREA, SPIRIT_TEMPLE_MQ_BOSS_AREA,
SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND, SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND,
SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND, SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND,
SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD,
SPIRIT_TEMPLE_BOSS_ENTRYWAY,
SPIRIT_TEMPLE_BOSS_ROOM,
SHADOW_TEMPLE_BEGINNING,
SHADOW_TEMPLE_FIRST_BEAMOS,
SHADOW_TEMPLE_HUGE_PIT,
SHADOW_TEMPLE_WIND_TUNNEL,
SHADOW_TEMPLE_BEYOND_BOAT,
SHADOW_TEMPLE_MQ_ENTRYWAY, SHADOW_TEMPLE_MQ_ENTRYWAY,
SHADOW_TEMPLE_MQ_BEGINNING, SHADOW_TEMPLE_MQ_BEGINNING,
@ -1507,15 +1500,32 @@ typedef enum {
SHADOW_TEMPLE_MQ_BEYOND_BOAT, SHADOW_TEMPLE_MQ_BEYOND_BOAT,
SHADOW_TEMPLE_MQ_INVISIBLE_MAZE, SHADOW_TEMPLE_MQ_INVISIBLE_MAZE,
BOTTOM_OF_THE_WELL_MQ, SHADOW_TEMPLE_BOSS_ENTRYWAY,
SHADOW_TEMPLE_BOSS_ROOM,
BOTTOM_OF_THE_WELL_MAIN_AREA,
BOTTOM_OF_THE_WELL_MQ_PERIMETER, BOTTOM_OF_THE_WELL_MQ_PERIMETER,
BOTTOM_OF_THE_WELL_MQ_MIDDLE, BOTTOM_OF_THE_WELL_MQ_MIDDLE,
ICE_CAVERN_BEGINNING,
ICE_CAVERN_MAIN,
ICE_CAVERN_MQ_BEGINNING, ICE_CAVERN_MQ_BEGINNING,
ICE_CAVERN_MQ_MAP_ROOM, ICE_CAVERN_MQ_MAP_ROOM,
ICE_CAVERN_MQ_IRON_BOOTS_REGION, ICE_CAVERN_MQ_IRON_BOOTS_REGION,
ICE_CAVERN_MQ_COMPASS_ROOM, ICE_CAVERN_MQ_COMPASS_ROOM,
GERUDO_TRAINING_GROUNDS_LOBBY,
GERUDO_TRAINING_GROUNDS_CENTRAL_MAZE,
GERUDO_TRAINING_GROUNDS_CENTRAL_MAZE_RIGHT,
GERUDO_TRAINING_GROUNDS_LAVA_ROOM,
GERUDO_TRAINING_GROUNDS_HAMMER_ROOM,
GERUDO_TRAINING_GROUNDS_EYE_STATUE_LOWER,
GERUDO_TRAINING_GROUNDS_EYE_STATUE_UPPER,
GERUDO_TRAINING_GROUNDS_HEAVY_BLOCK_ROOM,
GERUDO_TRAINING_GROUNDS_LIKE_LIKE_ROOM,
GERUDO_TRAINING_GROUNDS_MQ_LOBBY, GERUDO_TRAINING_GROUNDS_MQ_LOBBY,
GERUDO_TRAINING_GROUNDS_MQ_RIGHT_SIDE, GERUDO_TRAINING_GROUNDS_MQ_RIGHT_SIDE,
GERUDO_TRAINING_GROUNDS_MQ_UNDERWATER, GERUDO_TRAINING_GROUNDS_MQ_UNDERWATER,
@ -1524,6 +1534,16 @@ typedef enum {
GERUDO_TRAINING_GROUNDS_MQ_BACK_AREAS, GERUDO_TRAINING_GROUNDS_MQ_BACK_AREAS,
GERUDO_TRAINING_GROUNDS_MQ_CENTRAL_MAZE_RIGHT, GERUDO_TRAINING_GROUNDS_MQ_CENTRAL_MAZE_RIGHT,
GANONS_CASTLE_LOBBY,
GANONS_CASTLE_DEKU_SCRUBS,
GANONS_CASTLE_FOREST_TRIAL,
GANONS_CASTLE_FIRE_TRIAL,
GANONS_CASTLE_WATER_TRIAL,
GANONS_CASTLE_SHADOW_TRIAL,
GANONS_CASTLE_SPIRIT_TRIAL,
GANONS_CASTLE_LIGHT_TRIAL,
GANONS_CASTLE_TOWER,
GANONS_CASTLE_MQ_LOBBY, GANONS_CASTLE_MQ_LOBBY,
GANONS_CASTLE_MQ_DEKU_SCRUBS, GANONS_CASTLE_MQ_DEKU_SCRUBS,
GANONS_CASTLE_MQ_FOREST_TRIAL, GANONS_CASTLE_MQ_FOREST_TRIAL,
@ -1533,6 +1553,8 @@ typedef enum {
GANONS_CASTLE_MQ_SPIRIT_TRIAL, GANONS_CASTLE_MQ_SPIRIT_TRIAL,
GANONS_CASTLE_MQ_LIGHT_TRIAL, GANONS_CASTLE_MQ_LIGHT_TRIAL,
MARKER_AREAS_END, // Used for area key count
//DUNGEONS //DUNGEONS
DEKU_TREE, DEKU_TREE,
DODONGOS_CAVERN, DODONGOS_CAVERN,
@ -1542,8 +1564,8 @@ typedef enum {
WATER_TEMPLE, WATER_TEMPLE,
SPIRIT_TEMPLE, SPIRIT_TEMPLE,
SHADOW_TEMPLE, SHADOW_TEMPLE,
BOTTOM_OF_THE_WELL,
ICE_CAVERN, ICE_CAVERN,
//BOTTOM_OF_THE_WELL,
GERUDO_TRAINING_GROUNDS, GERUDO_TRAINING_GROUNDS,
GANONS_CASTLE, GANONS_CASTLE,
@ -1762,6 +1784,7 @@ typedef enum {
VALIDATION_LINE, VALIDATION_LINE,
LIGHT_ARROW_LOCATION_HINT, LIGHT_ARROW_LOCATION_HINT,
DAMPE_DIARY,
YOUR_POCKET, YOUR_POCKET,
GANON_LINE01, GANON_LINE01,

View File

@ -371,458 +371,24 @@ void AreaTable_Init() {
namespace Areas { namespace Areas {
static std::array<const uint32_t, 424> allAreas = { const auto GetAllAreas() {
ROOT, static const size_t areaCount = MARKER_AREAS_END - (MARKER_AREAS_START + 1);
ROOT_EXITS,
CHILD_SPAWN, static std::array<uint32_t, areaCount> allAreas = {};
ADULT_SPAWN,
MINUET_OF_FOREST_WARP,
BOLERO_OF_FIRE_WARP,
SERENADE_OF_WATER_WARP,
REQUIEM_OF_SPIRIT_WARP,
NOCTURNE_OF_SHADOW_WARP,
PRELUDE_OF_LIGHT_WARP,
KOKIRI_FOREST, static bool intialized = false;
KF_LINKS_HOUSE, if (!intialized) {
KF_MIDOS_HOUSE, for (size_t i = 0; i < areaCount; i++) {
KF_SARIAS_HOUSE, allAreas[i] = (MARKER_AREAS_START + 1) + i;
KF_HOUSE_OF_TWINS, }
KF_KNOW_IT_ALL_HOUSE, intialized = true;
KF_KOKIRI_SHOP, }
KF_STORMS_GROTTO,
KF_OUTSIDE_DEKU_TREE,
DEKU_TREE_ENTRYWAY,
THE_LOST_WOODS, return allAreas;
LW_BRIDGE_FROM_FOREST, }
LW_BRIDGE,
LW_FOREST_EXIT,
LW_BEYOND_MIDO,
LW_NEAR_SHORTCUTS_GROTTO,
DEKU_THEATER,
LW_SCRUBS_GROTTO,
SFM_ENTRYWAY,
SACRED_FOREST_MEADOW,
SFM_WOLFOS_GROTTO,
SFM_FAIRY_GROTTO,
SFM_STORMS_GROTTO,
FOREST_TEMPLE_ENTRYWAY,
KAKARIKO_VILLAGE,
KAK_CARPENTER_BOSS_HOUSE,
KAK_HOUSE_OF_SKULLTULA,
KAK_IMPAS_HOUSE,
KAK_IMPAS_LEDGE,
KAK_IMPAS_HOUSE_BACK,
KAK_IMPAS_HOUSE_NEAR_COW,
KAK_WINDMILL,
KAK_BAZAAR,
KAK_SHOOTING_GALLERY,
KAK_POTION_SHOP_FRONT,
KAK_POTION_SHOP_BACK,
KAK_ROOFTOP,
KAK_IMPAS_ROOFTOP,
KAK_BEHIND_GATE,
KAK_BACKYARD,
KAK_ODD_POTION_BUILDING,
KAK_REDEAD_GROTTO,
KAK_OPEN_GROTTO,
BOTTOM_OF_THE_WELL_ENTRYWAY,
THE_GRAVEYARD,
GRAVEYARD_DAMPES_GRAVE,
GRAVEYARD_DAMPES_HOUSE,
GRAVEYARD_SHIELD_GRAVE,
GRAVEYARD_COMPOSERS_GRAVE,
GRAVEYARD_HEART_PIECE_GRAVE,
GRAVEYARD_WARP_PAD_REGION,
SHADOW_TEMPLE_ENTRYWAY,
DEATH_MOUNTAIN_TRAIL,
DEATH_MOUNTAIN_SUMMIT,
DMT_OWL_FLIGHT,
DMT_GREAT_FAIRY_FOUNTAIN,
DMT_COW_GROTTO,
DMT_STORMS_GROTTO,
DODONGOS_CAVERN_ENTRYWAY,
DMC_UPPER_LOCAL,
DMC_CENTRAL_LOCAL,
DMC_LOWER_LOCAL,
DMC_LOWER_NEARBY,
DMC_UPPER_NEARBY,
DMC_CENTRAL_NEARBY,
DMC_LADDER_AREA_NEARBY,
DMC_UPPER_GROTTO,
DMC_HAMMER_GROTTO,
DMC_GREAT_FAIRY_FOUNTAIN,
FIRE_TEMPLE_ENTRYWAY,
GORON_CITY,
GC_WOODS_WARP,
GC_DARUNIAS_CHAMBER,
GC_GROTTO_PLATFORM,
GC_SHOP,
GC_GROTTO,
ZR_FRONT,
ZORAS_RIVER,
ZR_BEHIND_WATERFALL,
ZR_OPEN_GROTTO,
ZR_FAIRY_GROTTO,
ZR_STORMS_GROTTO,
ZORAS_DOMAIN,
ZD_BEHIND_KING_ZORA,
ZD_SHOP,
ZD_STORMS_GROTTO,
ZORAS_FOUNTAIN,
ZF_GREAT_FAIRY_FOUNTAIN,
JABU_JABUS_BELLY_ENTRYWAY,
ICE_CAVERN_ENTRYWAY,
HYRULE_FIELD,
HF_SOUTHEAST_GROTTO,
HF_OPEN_GROTTO,
HF_INSIDE_FENCE_GROTTO,
HF_COW_GROTTO,
HF_NEAR_MARKET_GROTTO,
HF_FAIRY_GROTTO,
HF_NEAR_KAK_GROTTO,
HF_TEKTITE_GROTTO,
LON_LON_RANCH,
LLR_TALONS_HOUSE,
LLR_STABLES,
LLR_TOWER,
LLR_GROTTO,
LAKE_HYLIA,
LH_OWL_FLIGHT,
LH_LAB,
LH_FISHING_ISLAND,
LH_FISHING_HOLE,
LH_GROTTO,
WATER_TEMPLE_ENTRYWAY,
GERUDO_VALLEY,
GV_UPPER_STREAM,
GV_LOWER_STREAM,
GV_GROTTO_LEDGE,
GV_CRATE_LEDGE,
GV_OCTOROK_GROTTO,
GV_FORTRESS_SIDE,
GV_CARPENTER_TENT,
GV_STORMS_GROTTO,
GERUDO_FORTRESS,
GF_OUTSIDE_GATE,
GF_STORMS_GROTTO,
GERUDO_TRAINING_GROUNDS_ENTRYWAY,
WASTELAND_NEAR_FORTRESS,
HAUNTED_WASTELAND,
WASTELAND_NEAR_COLOSSUS,
DESERT_COLOSSUS,
DESERT_COLOSSUS_FROM_SPIRIT_ENTRYWAY,
COLOSSUS_GREAT_FAIRY_FOUNTAIN,
COLOSSUS_GROTTO,
SPIRIT_TEMPLE_ENTRYWAY,
MARKET_ENTRANCE,
THE_MARKET,
MARKET_GUARD_HOUSE,
MARKET_BAZAAR,
MARKET_MASK_SHOP,
MARKET_SHOOTING_GALLERY,
MARKET_BOMBCHU_BOWLING,
MARKET_TREASURE_CHEST_GAME,
MARKET_POTION_SHOP,
MARKET_BACK_ALLEY,
MARKET_BOMBCHU_SHOP,
MARKET_DOG_LADY_HOUSE,
MARKET_MAN_IN_GREEN_HOUSE,
TOT_ENTRANCE,
TEMPLE_OF_TIME,
TOT_BEYOND_DOOR_OF_TIME,
CASTLE_GROUNDS,
HYRULE_CASTLE_GROUNDS,
HC_GARDEN,
HC_GREAT_FAIRY_FOUNTAIN,
HC_STORMS_GROTTO,
GANONS_CASTLE_GROUNDS,
OGC_GREAT_FAIRY_FOUNTAIN,
GANONS_CASTLE_ENTRYWAY,
DEKU_TREE_LOBBY,
DEKU_TREE_2F_MIDDLE_ROOM,
DEKU_TREE_SLINGSHOT_ROOM,
DEKU_TREE_COMPASS_ROOM,
DEKU_TREE_BASEMENT_LOWER,
DEKU_TREE_BASEMENT_SCRUB_ROOM,
DEKU_TREE_BASEMENT_WATER_ROOM,
DEKU_TREE_BASEMENT_TORCH_ROOM,
DEKU_TREE_BASEMENT_BACK_LOBBY,
DEKU_TREE_BASEMENT_BACK_ROOM,
DEKU_TREE_BASEMENT_UPPER,
DEKU_TREE_OUTSIDE_BOSS_ROOM,
DEKU_TREE_BOSS_ROOM,
DODONGOS_CAVERN_BEGINNING,
DODONGOS_CAVERN_LOBBY,
DODONGOS_CAVERN_LOBBY_SWITCH,
DODONGOS_CAVERN_SE_CORRIDOR,
DODONGOS_CAVERN_SE_ROOM,
DODONGOS_CAVERN_NEAR_LOWER_LIZALFOS,
DODONGOS_CAVERN_LOWER_LIZALFOS,
DODONGOS_CAVERN_DODONGO_ROOM,
DODONGOS_CAVERN_NEAR_DODONGO_ROOM,
DODONGOS_CAVERN_STAIRS_LOWER,
DODONGOS_CAVERN_STAIRS_UPPER,
DODONGOS_CAVERN_COMPASS_ROOM,
DODONGOS_CAVERN_ARMOS_ROOM,
DODONGOS_CAVERN_BOMB_ROOM_LOWER,
DODONGOS_CAVERN_2F_SIDE_ROOM,
DODONGOS_CAVERN_FIRST_SLINGSHOT_ROOM,
DODONGOS_CAVERN_UPPER_LIZALFOS,
DODONGOS_CAVERN_SECOND_SLINGSHOT_ROOM,
DODONGOS_CAVERN_BOMB_ROOM_UPPER,
DODONGOS_CAVERN_FAR_BRIDGE,
DODONGOS_CAVERN_BOSS_AREA,
DODONGOS_CAVERN_BACK_ROOM,
DODONGOS_CAVERN_BOSS_ROOM,
JABU_JABUS_BELLY_BEGINNING,
JABU_JABUS_BELLY_LIFT_MIDDLE,
JABU_JABUS_BELLY_MAIN_UPPER,
JABU_JABUS_BELLY_MAIN_LOWER,
JABU_JABUS_BELLY_SHABOMB_CORRIDOR,
JABU_JABUS_BELLY_LOWER_SIDE_ROOM,
JABU_JABUS_BELLY_LIFT_LOWER,
JABU_JABUS_BELLY_FORKED_CORRIDOR,
JABU_JABUS_BELLY_BOOMERANG_ROOM,
JABU_JABUS_BELLY_MAP_ROOM,
JABU_JABUS_BELLY_COMPASS_ROOM,
JABU_JABUS_BELLY_BLUE_TENTACLE,
JABU_JABUS_BELLY_GREEN_TENTACLE,
JABU_JABUS_BELLY_BIGOCTO_ROOM,
JABU_JABUS_BELLY_ABOVE_BIGOCTO,
JABU_JABUS_BELLY_LIFT_UPPER,
JABU_JABUS_BELLY_NEAR_BOSS_ROOM,
JABU_JABUS_BELLY_BOSS_ROOM,
FOREST_TEMPLE_FIRST_ROOM,
FOREST_TEMPLE_SOUTH_CORRIDOR,
FOREST_TEMPLE_LOBBY,
FOREST_TEMPLE_NORTH_CORRIDOR,
FOREST_TEMPLE_LOWER_STALFOS,
FOREST_TEMPLE_NW_OUTDOORS_LOWER,
FOREST_TEMPLE_NW_OUTDOORS_UPPER,
FOREST_TEMPLE_NE_OUTDOORS_LOWER,
FOREST_TEMPLE_NE_OUTDOORS_UPPER,
FOREST_TEMPLE_MAP_ROOM,
FOREST_TEMPLE_SEWER,
FOREST_TEMPLE_BELOW_BOSS_KEY_CHEST,
FOREST_TEMPLE_FLOORMASTER_ROOM,
FOREST_TEMPLE_WEST_CORRIDOR,
FOREST_TEMPLE_BLOCK_PUSH_ROOM,
FOREST_TEMPLE_NW_CORRIDOR_TWISTED,
FOREST_TEMPLE_NW_CORRIDOR_STRAIGHTENED,
FOREST_TEMPLE_RED_POE_ROOM,
FOREST_TEMPLE_UPPER_STALFOS,
FOREST_TEMPLE_BLUE_POE_ROOM,
FOREST_TEMPLE_NE_CORRIDOR_STRAIGHTENED,
FOREST_TEMPLE_NE_CORRIDOR_TWISTED,
FOREST_TEMPLE_FROZEN_EYE_ROOM,
FOREST_TEMPLE_FALLING_ROOM,
FOREST_TEMPLE_GREEN_POE_ROOM,
FOREST_TEMPLE_EAST_CORRIDOR,
FOREST_TEMPLE_BOSS_REGION,
FOREST_TEMPLE_BOSS_ROOM,
FIRE_TEMPLE_FIRST_ROOM,
FIRE_TEMPLE_NEAR_BOSS_ROOM,
FIRE_TEMPLE_BOSS_ROOM,
FIRE_TEMPLE_LOOP_ENEMIES,
FIRE_TEMPLE_LOOP_TILES,
FIRE_TEMPLE_LOOP_FLARE_DANCER,
FIRE_TEMPLE_LOOP_HAMMER_SWITCH,
FIRE_TEMPLE_LOOP_GORON_ROOM,
FIRE_TEMPLE_LOOP_EXIT,
FIRE_TEMPLE_BIG_LAVA_ROOM,
FIRE_TEMPLE_BIG_LAVA_ROOM_NORTH_GORON,
FIRE_TEMPLE_BIG_LAVA_ROOM_NORTH_TILES,
FIRE_TEMPLE_BIG_LAVA_ROOM_SOUTH_GORON,
FIRE_TEMPLE_FIRE_PILLAR_ROOM,
FIRE_TEMPLE_SHORTCUT_ROOM,
FIRE_TEMPLE_SHORTCUT_CLIMB,
FIRE_TEMPLE_BOULDER_MAZE_LOWER,
FIRE_TEMPLE_BOULDER_MAZE_LOWER_SIDE_ROOM,
FIRE_TEMPLE_EAST_CENTRAL_ROOM,
FIRE_TEMPLE_FIRE_WALL_CHASE,
FIRE_TEMPLE_MAP_AREA,
FIRE_TEMPLE_BOULDER_MAZE_UPPER,
FIRE_TEMPLE_SCARECROW_ROOM,
FIRE_TEMPLE_EAST_PEAK,
FIRE_TEMPLE_CORRIDOR,
FIRE_TEMPLE_FIRE_MAZE_ROOM,
FIRE_TEMPLE_FIRE_MAZE_UPPER,
FIRE_TEMPLE_FIRE_MAZE_SIDE_ROOM,
FIRE_TEMPLE_WEST_CENTRAL_LOWER,
FIRE_TEMPLE_WEST_CENTRAL_UPPER,
FIRE_TEMPLE_LATE_FIRE_MAZE,
FIRE_TEMPLE_UPPER_FLARE_DANCER,
FIRE_TEMPLE_WEST_CLIMB,
FIRE_TEMPLE_WEST_PEAK,
FIRE_TEMPLE_HAMMER_RETURN_PATH,
FIRE_TEMPLE_ABOVE_FIRE_MAZE,
WATER_TEMPLE_LOBBY,
WATER_TEMPLE_EAST_LOWER,
WATER_TEMPLE_MAP_ROOM,
WATER_TEMPLE_CRACKED_WALL,
WATER_TEMPLE_TORCH_ROOM,
WATER_TEMPLE_NORTH_LOWER,
WATER_TEMPLE_BOULDERS_LOWER,
WATER_TEMPLE_BLOCK_ROOM,
WATER_TEMPLE_JETS_ROOM,
WATER_TEMPLE_BOULDERS_UPPER,
WATER_TEMPLE_BOSS_KEY_ROOM,
WATER_TEMPLE_SOUTH_LOWER,
WATER_TEMPLE_WEST_LOWER,
WATER_TEMPLE_DRAGON_ROOM,
WATER_TEMPLE_CENTRAL_PILLAR_LOWER,
WATER_TEMPLE_CENTRAL_PILLAR_UPPER,
WATER_TEMPLE_CENTRAL_PILLAR_BASEMENT,
WATER_TEMPLE_EAST_MIDDLE,
WATER_TEMPLE_WEST_MIDDLE,
WATER_TEMPLE_HIGH_WATER,
WATER_TEMPLE_BLOCK_CORRIDOR,
WATER_TEMPLE_FALLING_PLATFORM_ROOM,
WATER_TEMPLE_DRAGON_PILLARS_ROOM,
WATER_TEMPLE_DARK_LINK_ROOM,
WATER_TEMPLE_LONGSHOT_ROOM,
WATER_TEMPLE_RIVER,
WATER_TEMPLE_PRE_BOSS_ROOM,
WATER_TEMPLE_BOSS_ROOM,
SPIRIT_TEMPLE_LOBBY,
SPIRIT_TEMPLE_CHILD,
SPIRIT_TEMPLE_CHILD_CLIMB,
SPIRIT_TEMPLE_EARLY_ADULT,
SPIRIT_TEMPLE_CENTRAL_CHAMBER,
SPIRIT_TEMPLE_OUTDOOR_HANDS,
SPIRIT_TEMPLE_BEYOND_CENTRAL_LOCKED_DOOR,
SPIRIT_TEMPLE_BEYOND_FINAL_LOCKED_DOOR,
SHADOW_TEMPLE_BEGINNING,
SHADOW_TEMPLE_FIRST_BEAMOS,
SHADOW_TEMPLE_HUGE_PIT,
SHADOW_TEMPLE_WIND_TUNNEL,
SHADOW_TEMPLE_BEYOND_BOAT,
BOTTOM_OF_THE_WELL,
BOTTOM_OF_THE_WELL_MAIN_AREA,
ICE_CAVERN_BEGINNING,
ICE_CAVERN_MAIN,
GERUDO_TRAINING_GROUNDS_LOBBY,
GERUDO_TRAINING_GROUNDS_CENTRAL_MAZE,
GERUDO_TRAINING_GROUNDS_CENTRAL_MAZE_RIGHT,
GERUDO_TRAINING_GROUNDS_LAVA_ROOM,
GERUDO_TRAINING_GROUNDS_HAMMER_ROOM,
GERUDO_TRAINING_GROUNDS_EYE_STATUE_LOWER,
GERUDO_TRAINING_GROUNDS_EYE_STATUE_UPPER,
GERUDO_TRAINING_GROUNDS_HEAVY_BLOCK_ROOM,
GERUDO_TRAINING_GROUNDS_LIKE_LIKE_ROOM,
GANONS_CASTLE_LOBBY,
GANONS_CASTLE_DEKU_SCRUBS,
GANONS_CASTLE_FOREST_TRIAL,
GANONS_CASTLE_FIRE_TRIAL,
GANONS_CASTLE_WATER_TRIAL,
GANONS_CASTLE_SHADOW_TRIAL,
GANONS_CASTLE_SPIRIT_TRIAL,
GANONS_CASTLE_LIGHT_TRIAL,
GANONS_CASTLE_TOWER,
DEKU_TREE_MQ_LOBBY,
DEKU_TREE_MQ_COMPASS_ROOM,
DEKU_TREE_MQ_BASEMENT_WATER_ROOM_FRONT,
DEKU_TREE_MQ_BASEMENT_WATER_ROOM_BACK,
DEKU_TREE_MQ_BASEMENT_BACK_ROOM,
DEKU_TREE_MQ_BASEMENT_LEDGE,
DODONGOS_CAVERN_MQ_BEGINNING,
DODONGOS_CAVERN_MQ_LOBBY,
DODONGOS_CAVERN_MQ_LOWER_RIGHT_SIDE,
DODONGOS_CAVERN_MQ_BOMB_BAG_AREA,
DODONGOS_CAVERN_MQ_BOSS_AREA,
JABU_JABUS_BELLY_MQ_BEGINNING,
JABU_JABUS_BELLY_MQ_MAIN,
JABU_JABUS_BELLY_MQ_DEPTHS,
JABU_JABUS_BELLY_MQ_BOSS_AREA,
FOREST_TEMPLE_MQ_LOBBY,
FOREST_TEMPLE_MQ_CENTRAL_AREA,
FOREST_TEMPLE_MQ_AFTER_BLOCK_PUZZLE,
FOREST_TEMPLE_MQ_OUTDOOR_LEDGE,
FOREST_TEMPLE_MQ_NW_OUTDOORS,
FOREST_TEMPLE_MQ_NE_OUTDOORS,
FOREST_TEMPLE_MQ_OUTDOORS_TOP_LEDGES,
FOREST_TEMPLE_MQ_NE_OUTDOORS_LEDGE,
FOREST_TEMPLE_MQ_BOW_REGION,
FOREST_TEMPLE_MQ_FALLING_ROOM,
FOREST_TEMPLE_MQ_BOSS_REGION,
FIRE_TEMPLE_MQ_LOWER,
FIRE_TEMPLE_MQ_LOWER_LOCKED_DOOR,
FIRE_TEMPLE_MQ_BIG_LAVA_ROOM,
FIRE_TEMPLE_MQ_LOWER_MAZE,
FIRE_TEMPLE_MQ_UPPER_MAZE,
FIRE_TEMPLE_MQ_UPPER,
FIRE_TEMPLE_MQ_BOSS_ROOM,
WATER_TEMPLE_MQ_LOBBY,
WATER_TEMPLE_MQ_DIVE,
WATER_TEMPLE_MQ_LOWERED_WATER_LEVELS,
WATER_TEMPLE_MQ_DARK_LINK_REGION,
WATER_TEMPLE_MQ_BASEMENT_GATED_AREAS,
SPIRIT_TEMPLE_MQ_LOBBY,
SPIRIT_TEMPLE_MQ_CHILD,
SPIRIT_TEMPLE_MQ_ADULT,
SPIRIT_TEMPLE_MQ_SHARED,
SPIRIT_TEMPLE_MQ_LOWER_ADULT,
SPIRIT_TEMPLE_MQ_BOSS_AREA,
SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND,
SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND,
SHADOW_TEMPLE_MQ_ENTRYWAY,
SHADOW_TEMPLE_MQ_BEGINNING,
SHADOW_TEMPLE_MQ_DEAD_HAND_AREA,
SHADOW_TEMPLE_MQ_FIRST_BEAMOS,
SHADOW_TEMPLE_MQ_UPPER_HUGE_PIT,
SHADOW_TEMPLE_MQ_LOWER_HUGE_PIT,
SHADOW_TEMPLE_MQ_WIND_TUNNEL,
SHADOW_TEMPLE_MQ_BEYOND_BOAT,
SHADOW_TEMPLE_MQ_INVISIBLE_MAZE,
BOTTOM_OF_THE_WELL_MQ,
BOTTOM_OF_THE_WELL_MQ_PERIMETER,
BOTTOM_OF_THE_WELL_MQ_MIDDLE,
ICE_CAVERN_MQ_BEGINNING,
ICE_CAVERN_MQ_MAP_ROOM,
ICE_CAVERN_MQ_IRON_BOOTS_REGION,
ICE_CAVERN_MQ_COMPASS_ROOM,
GERUDO_TRAINING_GROUNDS_MQ_LOBBY,
GERUDO_TRAINING_GROUNDS_MQ_RIGHT_SIDE,
GERUDO_TRAINING_GROUNDS_MQ_UNDERWATER,
GERUDO_TRAINING_GROUNDS_MQ_LEFT_SIDE,
GERUDO_TRAINING_GROUNDS_MQ_STALFOS_ROOM,
GERUDO_TRAINING_GROUNDS_MQ_BACK_AREAS,
GERUDO_TRAINING_GROUNDS_MQ_CENTRAL_MAZE_RIGHT,
GANONS_CASTLE_MQ_LOBBY,
GANONS_CASTLE_MQ_DEKU_SCRUBS,
GANONS_CASTLE_MQ_FOREST_TRIAL,
GANONS_CASTLE_MQ_FIRE_TRIAL,
GANONS_CASTLE_MQ_WATER_TRIAL,
GANONS_CASTLE_MQ_SHADOW_TRIAL,
GANONS_CASTLE_MQ_SPIRIT_TRIAL,
GANONS_CASTLE_MQ_LIGHT_TRIAL,
};
void AccessReset() { void AccessReset() {
for (const uint32_t area : allAreas) { for (const uint32_t area : GetAllAreas()) {
AreaTable(area)->ResetVariables(); AreaTable(area)->ResetVariables();
} }
@ -843,7 +409,7 @@ namespace Areas {
//Reset exits and clear items from locations //Reset exits and clear items from locations
void ResetAllLocations() { void ResetAllLocations() {
for (const uint32_t area : allAreas) { for (const uint32_t area : GetAllAreas()) {
AreaTable(area)->ResetVariables(); AreaTable(area)->ResetVariables();
//Erase item from every location in this exit //Erase item from every location in this exit
for (LocationAccess& locPair : AreaTable(area)->locations) { for (LocationAccess& locPair : AreaTable(area)->locations) {
@ -868,7 +434,7 @@ namespace Areas {
} }
bool HasTimePassAccess(uint8_t age) { bool HasTimePassAccess(uint8_t age) {
for (const uint32_t areaKey : allAreas) { for (const uint32_t areaKey : GetAllAreas()) {
auto area = AreaTable(areaKey); auto area = AreaTable(areaKey);
if (area->timePass && ((age == AGE_CHILD && area->Child()) || (age == AGE_ADULT && area->Adult()))) { if (area->timePass && ((age == AGE_CHILD && area->Child()) || (age == AGE_ADULT && area->Adult()))) {
return true; return true;
@ -886,7 +452,7 @@ namespace Areas {
worldGraph.open (str + ".dot"); worldGraph.open (str + ".dot");
worldGraph << "digraph {\n\tcenter=true;\n"; worldGraph << "digraph {\n\tcenter=true;\n";
for (const uint32_t areaKey : allAreas) { for (const uint32_t areaKey : GetAllAreas()) {
auto area = AreaTable(areaKey); auto area = AreaTable(areaKey);
for (auto exit : area->exits) { for (auto exit : area->exits) {
if (exit.GetConnectedRegion()->regionName != "Invalid Area") { if (exit.GetConnectedRegion()->regionName != "Invalid Area") {
@ -939,7 +505,7 @@ Area* AreaTable(const uint32_t areaKey) {
//Retrieve all the shuffable entrances of a specific type //Retrieve all the shuffable entrances of a specific type
std::vector<Entrance*> GetShuffleableEntrances(EntranceType type, bool onlyPrimary /*= true*/) { std::vector<Entrance*> GetShuffleableEntrances(EntranceType type, bool onlyPrimary /*= true*/) {
std::vector<Entrance*> entrancesToShuffle = {}; std::vector<Entrance*> entrancesToShuffle = {};
for (uint32_t area : Areas::allAreas) { for (uint32_t area : Areas::GetAllAreas()) {
for (auto& exit: AreaTable(area)->exits) { for (auto& exit: AreaTable(area)->exits) {
if ((exit.GetType() == type || type == EntranceType::All) && (exit.IsPrimary() || !onlyPrimary) && exit.GetType() != EntranceType::None) { if ((exit.GetType() == type || type == EntranceType::All) && (exit.IsPrimary() || !onlyPrimary) && exit.GetType() != EntranceType::None) {
entrancesToShuffle.push_back(&exit); entrancesToShuffle.push_back(&exit);

View File

@ -38,7 +38,7 @@ void AreaTable_Init_DekuTree() {
/*Glitched*/[]{return CanUse(MEGATON_HAMMER);}}), /*Glitched*/[]{return CanUse(MEGATON_HAMMER);}}),
Entrance(DEKU_TREE_OUTSIDE_BOSS_ROOM, {[]{return false;}, Entrance(DEKU_TREE_OUTSIDE_BOSS_ROOM, {[]{return false;},
/*Glitched*/[]{return CanDoGlitch(GlitchType::Megaflip, GlitchDifficulty::NOVICE);}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::Megaflip, GlitchDifficulty::NOVICE);}}),
Entrance(DEKU_TREE_BOSS_ROOM, {[]{return false;}, Entrance(DEKU_TREE_BOSS_ENTRYWAY, {[]{return false;},
/*Glitched*/[]{return IsChild && CanUse(KOKIRI_SWORD) && Nuts && CanDoGlitch(GlitchType::SeamWalk, GlitchDifficulty::EXPERT);}}), /*Glitched*/[]{return IsChild && CanUse(KOKIRI_SWORD) && Nuts && CanDoGlitch(GlitchType::SeamWalk, GlitchDifficulty::EXPERT);}}),
}); });
@ -72,7 +72,7 @@ void AreaTable_Init_DekuTree() {
}, { }, {
//Exits //Exits
Entrance(DEKU_TREE_LOBBY, {[]{return HasFireSourceWithTorch || CanUse(BOW);}}), Entrance(DEKU_TREE_LOBBY, {[]{return HasFireSourceWithTorch || CanUse(BOW);}}),
Entrance(DEKU_TREE_BOSS_ROOM, {[]{return false;}, Entrance(DEKU_TREE_BOSS_ENTRYWAY, {[]{return false;},
/*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::ADVANCED);}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::ADVANCED);}}),
}); });
@ -161,21 +161,7 @@ void AreaTable_Init_DekuTree() {
areaTable[DEKU_TREE_OUTSIDE_BOSS_ROOM] = Area("Deku Tree Outside Boss Room", "Deku Tree", DEKU_TREE, NO_DAY_NIGHT_CYCLE, {}, {}, { areaTable[DEKU_TREE_OUTSIDE_BOSS_ROOM] = Area("Deku Tree Outside Boss Room", "Deku Tree", DEKU_TREE, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits //Exits
Entrance(DEKU_TREE_BASEMENT_UPPER, {[]{return true;}}), Entrance(DEKU_TREE_BASEMENT_UPPER, {[]{return true;}}),
Entrance(DEKU_TREE_BOSS_ROOM, {[]{return Here(DEKU_TREE_OUTSIDE_BOSS_ROOM, []{return HasShield;});}}), Entrance(DEKU_TREE_BOSS_ENTRYWAY, {[]{return Here(DEKU_TREE_OUTSIDE_BOSS_ROOM, []{return HasShield;});}}),
});
areaTable[DEKU_TREE_BOSS_ROOM] = Area("Deku Tree Boss Room", "Deku Tree", DEKU_TREE, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&DekuTreeClear, {[]{return DekuTreeClear || ((IsAdult || KokiriSword || Sticks) && (Nuts || CanUse(SLINGSHOT) || CanUse(BOW) || HookshotOrBoomerang));},
/*Glitched*/[]{return CanDoGlitch(GlitchType::ISG, GlitchDifficulty::NOVICE);}}),
}, {
//Locations
LocationAccess(QUEEN_GOHMA, {[]{return DekuTreeClear;}}),
LocationAccess(DEKU_TREE_QUEEN_GOHMA_HEART, {[]{return DekuTreeClear;}}),
}, {
//Exits
Entrance(DEKU_TREE_OUTSIDE_BOSS_ROOM, {[]{return true;}}),
Entrance(DEKU_TREE_ENTRYWAY, {[]{return DekuTreeClear;}}),
}); });
} }
@ -261,6 +247,51 @@ void AreaTable_Init_DekuTree() {
//Exits //Exits
Entrance(DEKU_TREE_MQ_BASEMENT_BACK_ROOM, {[]{return IsChild;}}), Entrance(DEKU_TREE_MQ_BASEMENT_BACK_ROOM, {[]{return IsChild;}}),
Entrance(DEKU_TREE_MQ_LOBBY, {[]{return true;}}), Entrance(DEKU_TREE_MQ_LOBBY, {[]{return true;}}),
Entrance(DEKU_TREE_MQ_OUTSIDE_BOSS_ROOM,
{ [] { return Here(DEKU_TREE_MQ_BASEMENT_LEDGE, [] { return HasFireSourceWithTorch; }); } }),
});
areaTable[DEKU_TREE_MQ_OUTSIDE_BOSS_ROOM] =
Area("Deku Tree MQ Outside Boss Room", "Deku Tree", DEKU_TREE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(DEKU_TREE_MQ_BASEMENT_LEDGE, { [] { return true; } }),
Entrance(DEKU_TREE_BOSS_ENTRYWAY,
{ [] { return Here(DEKU_TREE_MQ_BASEMENT_LEDGE, [] { return HasShield; }); } }),
}); });
} }
/*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[DEKU_TREE_BOSS_ENTRYWAY] =
Area("Deku Tree Boss Entryway", "Deku Tree", DEKU_TREE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(DEKU_TREE_OUTSIDE_BOSS_ROOM, { [] { return Dungeon::DekuTree.IsVanilla(); } }),
Entrance(DEKU_TREE_MQ_OUTSIDE_BOSS_ROOM, { [] { return Dungeon::DekuTree.IsMQ(); } }),
Entrance(DEKU_TREE_BOSS_ROOM, { [] { return true; } }),
});
areaTable[DEKU_TREE_BOSS_ROOM] =
Area("Deku Tree Boss Room", "Deku Tree", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events
EventAccess(&DekuTreeClear, { [] {
return DekuTreeClear ||
(CanJumpslash && (Nuts || CanUse(SLINGSHOT) || CanUse(BOW) ||
HookshotOrBoomerang));
},
/*Glitched*/
[] { return CanDoGlitch(GlitchType::ISG, GlitchDifficulty::NOVICE); } }),
},
{
// Locations
LocationAccess(QUEEN_GOHMA, { [] { return DekuTreeClear; } }),
LocationAccess(DEKU_TREE_QUEEN_GOHMA_HEART, { [] { return DekuTreeClear; } }),
},
{
// Exits
Entrance(DEKU_TREE_BOSS_ENTRYWAY, { [] { return true; } }),
});
} }

View File

@ -50,7 +50,7 @@ void AreaTable_Init_DodongosCavern() {
Entrance(DODONGOS_CAVERN_FAR_BRIDGE, {[]{return HasAccessTo(DODONGOS_CAVERN_FAR_BRIDGE);}, Entrance(DODONGOS_CAVERN_FAR_BRIDGE, {[]{return HasAccessTo(DODONGOS_CAVERN_FAR_BRIDGE);},
/*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::INTERMEDIATE);}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::INTERMEDIATE);}}),
Entrance(DODONGOS_CAVERN_BOSS_AREA, {[]{return Here(DODONGOS_CAVERN_FAR_BRIDGE, []{return HasExplosives;});}}), Entrance(DODONGOS_CAVERN_BOSS_AREA, {[]{return Here(DODONGOS_CAVERN_FAR_BRIDGE, []{return HasExplosives;});}}),
Entrance(DODONGOS_CAVERN_BOSS_ROOM, {[]{return false;}, Entrance(DODONGOS_CAVERN_BOSS_ENTRYWAY,{[]{return false;},
/*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::ADVANCED);}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::ADVANCED);}}),
}); });
@ -220,7 +220,7 @@ void AreaTable_Init_DodongosCavern() {
Entrance(DODONGOS_CAVERN_LOBBY, {[]{return true;}}), Entrance(DODONGOS_CAVERN_LOBBY, {[]{return true;}}),
Entrance(DODONGOS_CAVERN_BACK_ROOM, {[]{return Here(DODONGOS_CAVERN_BOSS_AREA, []{return CanBlastOrSmash;});}, Entrance(DODONGOS_CAVERN_BACK_ROOM, {[]{return Here(DODONGOS_CAVERN_BOSS_AREA, []{return CanBlastOrSmash;});},
/*Glitched*/[]{return Here(DODONGOS_CAVERN_BOSS_AREA, []{return (GlitchBlueFireWall && BlueFire) || (CanUse(STICKS) && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::ADVANCED));});}}), /*Glitched*/[]{return Here(DODONGOS_CAVERN_BOSS_AREA, []{return (GlitchBlueFireWall && BlueFire) || (CanUse(STICKS) && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::ADVANCED));});}}),
Entrance(DODONGOS_CAVERN_BOSS_ROOM, {[]{return true;}}), Entrance(DODONGOS_CAVERN_BOSS_ENTRYWAY, {[]{return true;}}),
}); });
areaTable[DODONGOS_CAVERN_BACK_ROOM] = Area("Dodongos Cavern Back Room", "Dodongos Cavern", DODONGOS_CAVERN, NO_DAY_NIGHT_CYCLE, {}, { areaTable[DODONGOS_CAVERN_BACK_ROOM] = Area("Dodongos Cavern Back Room", "Dodongos Cavern", DODONGOS_CAVERN, NO_DAY_NIGHT_CYCLE, {}, {
@ -231,21 +231,6 @@ void AreaTable_Init_DodongosCavern() {
//Exits //Exits
Entrance(DODONGOS_CAVERN_BOSS_AREA, {[]{return true;}}), Entrance(DODONGOS_CAVERN_BOSS_AREA, {[]{return true;}}),
}); });
areaTable[DODONGOS_CAVERN_BOSS_ROOM] = Area("Dodongos Cavern Boss Room", "Dodongos Cavern", DODONGOS_CAVERN, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&DodongosCavernClear, {[]{return DodongosCavernClear || (Here(DODONGOS_CAVERN_BOSS_ROOM, []{return HasExplosives || (CanUse(MEGATON_HAMMER) && CanShield);}) && (Bombs || GoronBracelet) && (IsAdult || Sticks || KokiriSword));},
/*Glitched*/[]{return Here(DODONGOS_CAVERN_BOSS_ROOM, []{return HasExplosives || (CanUse(MEGATON_HAMMER) && CanShield) || (GlitchBlueFireWall && HasBottle && BlueFireAccess);}) && (HasExplosives || GoronBracelet) && (IsAdult || Sticks || KokiriSword || CanUse(MEGATON_HAMMER));}}),
}, {
//Locations
LocationAccess(DODONGOS_CAVERN_BOSS_ROOM_CHEST, {[]{return true;}}),
LocationAccess(DODONGOS_CAVERN_KING_DODONGO_HEART, {[]{return DodongosCavernClear;}}),
LocationAccess(KING_DODONGO, {[]{return DodongosCavernClear;}}),
}, {
//Exits
Entrance(DODONGOS_CAVERN_BOSS_AREA, {[]{return true;}}),
Entrance(DODONGOS_CAVERN_ENTRYWAY, {[]{return DodongosCavernClear;}}),
});
} }
/*--------------------------- /*---------------------------
@ -314,6 +299,53 @@ void AreaTable_Init_DodongosCavern() {
LocationAccess(DODONGOS_CAVERN_KING_DODONGO_HEART, {[]{return CanBlastOrSmash && (Bombs || GoronBracelet) && (IsAdult || Sticks || KokiriSword);}}), LocationAccess(DODONGOS_CAVERN_KING_DODONGO_HEART, {[]{return CanBlastOrSmash && (Bombs || GoronBracelet) && (IsAdult || Sticks || KokiriSword);}}),
LocationAccess(KING_DODONGO, {[]{return CanBlastOrSmash && (Bombs || GoronBracelet) && (IsAdult || Sticks || KokiriSword);}}), LocationAccess(KING_DODONGO, {[]{return CanBlastOrSmash && (Bombs || GoronBracelet) && (IsAdult || Sticks || KokiriSword);}}),
LocationAccess(DODONGOS_CAVERN_MQ_GS_BACK_AREA, {[]{return true;}}), LocationAccess(DODONGOS_CAVERN_MQ_GS_BACK_AREA, {[]{return true;}}),
}, {}); }, {
//Exits
Entrance(DODONGOS_CAVERN_BOSS_ENTRYWAY, {[]{return true;}}),
});
} }
/*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[DODONGOS_CAVERN_BOSS_ENTRYWAY] =
Area("Dodongos Cavern Boss Entryway", "Dodongos Cavern", DODONGOS_CAVERN, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(DODONGOS_CAVERN_BOSS_AREA, { [] { return Dungeon::DodongosCavern.IsVanilla(); } }),
Entrance(DODONGOS_CAVERN_MQ_BOSS_AREA, { [] { return Dungeon::DodongosCavern.IsMQ(); } }),
Entrance(DODONGOS_CAVERN_BOSS_ROOM, { [] { return true; } }),
});
areaTable[DODONGOS_CAVERN_BOSS_ROOM] =
Area("Dodongos Cavern Boss Room", "Dodongos Cavern", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events
EventAccess(&DodongosCavernClear,
{ [] {
return DodongosCavernClear ||
(Here(DODONGOS_CAVERN_BOSS_ROOM,
[] { return HasExplosives || (CanUse(MEGATON_HAMMER) && CanShield); }) &&
(Bombs || GoronBracelet) && CanJumpslash);
},
/*Glitched*/
[] {
return Here(DODONGOS_CAVERN_BOSS_ROOM,
[] {
return HasExplosives || (CanUse(MEGATON_HAMMER) && CanShield) ||
(GlitchBlueFireWall && BlueFire);
}) &&
(HasExplosives || GoronBracelet) && CanJumpslash;
} }),
},
{
// Locations
LocationAccess(DODONGOS_CAVERN_BOSS_ROOM_CHEST, { [] { return true; } }),
LocationAccess(DODONGOS_CAVERN_KING_DODONGO_HEART, { [] { return DodongosCavernClear; } }),
LocationAccess(KING_DODONGO, { [] { return DodongosCavernClear; } }),
},
{
// Exits
Entrance(DODONGOS_CAVERN_BOSS_ENTRYWAY, { [] { return true; } }),
});
} }

View File

@ -42,25 +42,11 @@ void AreaTable_Init_FireTemple() {
}, { }, {
//Exits //Exits
Entrance(FIRE_TEMPLE_FIRST_ROOM, {[]{return true;}}), Entrance(FIRE_TEMPLE_FIRST_ROOM, {[]{return true;}}),
Entrance(FIRE_TEMPLE_BOSS_ROOM, {[]{return BossKeyFireTemple && ((IsAdult && LogicFireBossDoorJump) || CanUse(HOVER_BOOTS) || Here(FIRE_TEMPLE_FIRE_MAZE_UPPER, []{return CanUse(MEGATON_HAMMER);}));}, Entrance(FIRE_TEMPLE_BOSS_ENTRYWAY, {[]{return BossKeyFireTemple && ((IsAdult && LogicFireBossDoorJump) || CanUse(HOVER_BOOTS) || Here(FIRE_TEMPLE_FIRE_MAZE_UPPER, []{return CanUse(MEGATON_HAMMER);}));},
/*Glitched*/[]{return BossKeyFireTemple && (CanDoGlitch(GlitchType::Megaflip, GlitchDifficulty::NOVICE) || /*Glitched*/[]{return BossKeyFireTemple && (CanDoGlitch(GlitchType::Megaflip, GlitchDifficulty::NOVICE) ||
(Bombs && HasBombchus && CanDoGlitch(GlitchType::BombHover, GlitchDifficulty::INTERMEDIATE) && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::INTERMEDIATE)));}}), (Bombs && HasBombchus && CanDoGlitch(GlitchType::BombHover, GlitchDifficulty::INTERMEDIATE) && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::INTERMEDIATE)));}}),
}); });
areaTable[FIRE_TEMPLE_BOSS_ROOM] = Area("Fire Temple Boss Room", "Fire Temple", FIRE_TEMPLE, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&FireTempleClear, {[]{return FireTempleClear || (FireTimer >= 64 && CanUse(MEGATON_HAMMER));},
/*Glitched*/[]{return FireTimer >= 48 && ((CanUse(STICKS) && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::NOVICE)) ||
CanUse(MEGATON_HAMMER)) && Bombs && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::INTERMEDIATE);}}),
}, {
//Locations
LocationAccess(FIRE_TEMPLE_VOLVAGIA_HEART, {[]{return FireTempleClear;}}),
LocationAccess(VOLVAGIA, {[]{return FireTempleClear;}}),
}, {
//Exits
Entrance(FIRE_TEMPLE_ENTRYWAY, {[]{return FireTempleClear;}}),
});
areaTable[FIRE_TEMPLE_LOOP_ENEMIES] = Area("Fire Temple Loop Enemies", "Fire Temple", FIRE_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {}, { areaTable[FIRE_TEMPLE_LOOP_ENEMIES] = Area("Fire Temple Loop Enemies", "Fire Temple", FIRE_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits //Exits
Entrance(FIRE_TEMPLE_FIRST_ROOM, {[]{return SmallKeys(FIRE_TEMPLE, 8) || !IsKeysanity;}}), Entrance(FIRE_TEMPLE_FIRST_ROOM, {[]{return SmallKeys(FIRE_TEMPLE, 8) || !IsKeysanity;}}),
@ -308,7 +294,7 @@ void AreaTable_Init_FireTemple() {
areaTable[FIRE_TEMPLE_WEST_CENTRAL_UPPER] = Area("Fire Temple West Central Upper", "Fire Temple", FIRE_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {}, { areaTable[FIRE_TEMPLE_WEST_CENTRAL_UPPER] = Area("Fire Temple West Central Upper", "Fire Temple", FIRE_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits //Exits
Entrance(FIRE_TEMPLE_BOSS_ROOM, {[]{return false;}, Entrance(FIRE_TEMPLE_BOSS_ENTRYWAY, {[]{return false;},
/*Glitched*/[]{return CanDoGlitch(GlitchType::LedgeClip, GlitchDifficulty::INTERMEDIATE);}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::LedgeClip, GlitchDifficulty::INTERMEDIATE);}}),
Entrance(FIRE_TEMPLE_FIRE_MAZE_UPPER, {[]{return true;}}), Entrance(FIRE_TEMPLE_FIRE_MAZE_UPPER, {[]{return true;}}),
Entrance(FIRE_TEMPLE_WEST_CENTRAL_LOWER, {[]{return true;}}), Entrance(FIRE_TEMPLE_WEST_CENTRAL_LOWER, {[]{return true;}}),
@ -375,7 +361,7 @@ void AreaTable_Init_FireTemple() {
}, { }, {
//Exits //Exits
Entrance(FIRE_TEMPLE_ENTRYWAY, {[]{return true;}}), Entrance(FIRE_TEMPLE_ENTRYWAY, {[]{return true;}}),
Entrance(FIRE_TEMPLE_MQ_BOSS_ROOM, {[]{return IsAdult && CanUse(GORON_TUNIC) && CanUse(MEGATON_HAMMER) && BossKeyFireTemple && ((HasFireSource && (LogicFireBossDoorJump || HoverBoots)) || HasAccessTo(FIRE_TEMPLE_MQ_UPPER));}}), Entrance(FIRE_TEMPLE_BOSS_ENTRYWAY, {[]{return IsAdult && CanUse(GORON_TUNIC) && CanUse(MEGATON_HAMMER) && BossKeyFireTemple && ((HasFireSource && (LogicFireBossDoorJump || HoverBoots)) || HasAccessTo(FIRE_TEMPLE_MQ_UPPER));}}),
Entrance(FIRE_TEMPLE_MQ_LOWER_LOCKED_DOOR, {[]{return SmallKeys(FIRE_TEMPLE, 5) && (IsAdult || KokiriSword);}}), Entrance(FIRE_TEMPLE_MQ_LOWER_LOCKED_DOOR, {[]{return SmallKeys(FIRE_TEMPLE, 5) && (IsAdult || KokiriSword);}}),
Entrance(FIRE_TEMPLE_MQ_BIG_LAVA_ROOM, {[]{return IsAdult && FireTimer >= 24 && CanUse(MEGATON_HAMMER);}}), Entrance(FIRE_TEMPLE_MQ_BIG_LAVA_ROOM, {[]{return IsAdult && FireTimer >= 24 && CanUse(MEGATON_HAMMER);}}),
}); });
@ -443,14 +429,41 @@ void AreaTable_Init_FireTemple() {
LocationAccess(FIRE_TEMPLE_MQ_GS_ABOVE_FIRE_WALL_MAZE, {[]{return IsAdult && CanUse(HOOKSHOT) && SmallKeys(FIRE_TEMPLE, 5);}}), LocationAccess(FIRE_TEMPLE_MQ_GS_ABOVE_FIRE_WALL_MAZE, {[]{return IsAdult && CanUse(HOOKSHOT) && SmallKeys(FIRE_TEMPLE, 5);}}),
//Trick: (IsAdult && CanUse(HOOKSHOT) && SmallKeys(FIRE_TEMPLE, 5)) || (LogicFireMQAboveMazeGS && IsAdult && CanUse(LONGSHOT)) //Trick: (IsAdult && CanUse(HOOKSHOT) && SmallKeys(FIRE_TEMPLE, 5)) || (LogicFireMQAboveMazeGS && IsAdult && CanUse(LONGSHOT))
}, {}); }, {});
}
areaTable[FIRE_TEMPLE_MQ_BOSS_ROOM] = Area("Fire Temple MQ Boss Room", "Fire Temple", FIRE_TEMPLE, NO_DAY_NIGHT_CYCLE, { /*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[FIRE_TEMPLE_BOSS_ENTRYWAY] =
Area("Fire Temple Boss Entryway", "Fire Temple", FIRE_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(FIRE_TEMPLE_NEAR_BOSS_ROOM, { [] { return Dungeon::FireTemple.IsVanilla() && false; } }),
Entrance(FIRE_TEMPLE_MQ_LOWER, { [] { return Dungeon::FireTemple.IsMQ() && false; } }),
Entrance(FIRE_TEMPLE_BOSS_ROOM, { [] { return true; } }),
});
areaTable[FIRE_TEMPLE_BOSS_ROOM] =
Area("Fire Temple Boss Room", "Fire Temple", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events // Events
EventAccess(&FireTempleClear, {[]{return true;}}), EventAccess(&FireTempleClear,
}, { { [] { return FireTempleClear || (FireTimer >= 64 && CanUse(MEGATON_HAMMER)); },
/*Glitched*/
[] {
return FireTimer >= 48 &&
((CanUse(STICKS) && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::NOVICE)) ||
CanUse(MEGATON_HAMMER)) &&
Bombs && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::INTERMEDIATE);
} }),
},
{
// Locations // Locations
LocationAccess(FIRE_TEMPLE_VOLVAGIA_HEART, {[]{return true;}}), LocationAccess(FIRE_TEMPLE_VOLVAGIA_HEART, { [] { return FireTempleClear; } }),
LocationAccess(VOLVAGIA, {[]{return true;}}), LocationAccess(VOLVAGIA, { [] { return FireTempleClear; } }),
}, {}); },
} {
// Exits
Entrance(FIRE_TEMPLE_BOSS_ENTRYWAY, { [] { return false; } }),
});
} }

View File

@ -58,7 +58,7 @@ void AreaTable_Init_ForestTemple() {
Entrance(FOREST_TEMPLE_EAST_CORRIDOR, {[]{return false;}, Entrance(FOREST_TEMPLE_EAST_CORRIDOR, {[]{return false;},
/*Glitched*/[]{return CanDoGlitch(GlitchType::BombHover, GlitchDifficulty::NOVICE);}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::BombHover, GlitchDifficulty::NOVICE);}}),
Entrance(FOREST_TEMPLE_BOSS_REGION, {[]{return ForestTempleMeg;}}), Entrance(FOREST_TEMPLE_BOSS_REGION, {[]{return ForestTempleMeg;}}),
Entrance(FOREST_TEMPLE_BOSS_ROOM, {[]{return false;}, Entrance(FOREST_TEMPLE_BOSS_ENTRYWAY, {[]{return false;},
/*Glitched*/[]{return IsAdult && (CanUse(HOOKSHOT) || CanUse(BOW) || CanUse(SLINGSHOT)) && GlitchForestBKSkip;}}), /*Glitched*/[]{return IsAdult && (CanUse(HOOKSHOT) || CanUse(BOW) || CanUse(SLINGSHOT)) && GlitchForestBKSkip;}}),
}); });
@ -97,7 +97,7 @@ void AreaTable_Init_ForestTemple() {
/*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::INTERMEDIATE) || (IsAdult && CanDoGlitch(GlitchType::HoverBoost, GlitchDifficulty::NOVICE)) || (Bombs && HasBombchus && CanDoGlitch(GlitchType::BombHover, GlitchDifficulty::NOVICE) && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::INTERMEDIATE));}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::INTERMEDIATE) || (IsAdult && CanDoGlitch(GlitchType::HoverBoost, GlitchDifficulty::NOVICE)) || (Bombs && HasBombchus && CanDoGlitch(GlitchType::BombHover, GlitchDifficulty::NOVICE) && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::INTERMEDIATE));}}),
Entrance(FOREST_TEMPLE_MAP_ROOM, {[]{return true;}}), Entrance(FOREST_TEMPLE_MAP_ROOM, {[]{return true;}}),
Entrance(FOREST_TEMPLE_SEWER, {[]{return GoldScale || CanUse(IRON_BOOTS) || HasAccessTo(FOREST_TEMPLE_NE_OUTDOORS_UPPER);}}), Entrance(FOREST_TEMPLE_SEWER, {[]{return GoldScale || CanUse(IRON_BOOTS) || HasAccessTo(FOREST_TEMPLE_NE_OUTDOORS_UPPER);}}),
Entrance(FOREST_TEMPLE_BOSS_ROOM, {[]{return false;}, Entrance(FOREST_TEMPLE_BOSS_ENTRYWAY, {[]{return false;},
/*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::INTERMEDIATE);}}), /*Glitched*/[]{return CanDoGlitch(GlitchType::HookshotJump_Boots, GlitchDifficulty::INTERMEDIATE);}}),
}); });
@ -304,19 +304,7 @@ void AreaTable_Init_ForestTemple() {
}, { }, {
//Exits //Exits
Entrance(FOREST_TEMPLE_LOBBY, {[]{return true;}}), Entrance(FOREST_TEMPLE_LOBBY, {[]{return true;}}),
Entrance(FOREST_TEMPLE_BOSS_ROOM, {[]{return BossKeyForestTemple;}}), Entrance(FOREST_TEMPLE_BOSS_ENTRYWAY, {[]{return BossKeyForestTemple;}}),
});
areaTable[FOREST_TEMPLE_BOSS_ROOM] = Area("Forest Temple Boss Room", "Forest Temple", FOREST_TEMPLE, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&ForestTempleClear, {[]{return ForestTempleClear || ((IsAdult || KokiriSword) && (CanUse(HOOKSHOT) || CanUse(BOW) || CanUse(SLINGSHOT)));}}),
}, {
//Locations
LocationAccess(FOREST_TEMPLE_PHANTOM_GANON_HEART, {[]{return ForestTempleClear;}}),
LocationAccess(PHANTOM_GANON, {[]{return ForestTempleClear;}}),
}, {
//Exits
Entrance(FOREST_TEMPLE_ENTRYWAY, {[]{return ForestTempleClear;}}),
}); });
} }
@ -439,14 +427,43 @@ void AreaTable_Init_ForestTemple() {
Entrance(FOREST_TEMPLE_MQ_NE_OUTDOORS_LEDGE, {[]{return true;}}), Entrance(FOREST_TEMPLE_MQ_NE_OUTDOORS_LEDGE, {[]{return true;}}),
}); });
areaTable[FOREST_TEMPLE_MQ_BOSS_REGION] = Area("Forest Temple MQ Boss Region", "Forest Temple", FOREST_TEMPLE, NO_DAY_NIGHT_CYCLE, { areaTable[FOREST_TEMPLE_MQ_BOSS_REGION] = Area("Forest Temple MQ Boss Region", "Forest Temple", FOREST_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
//Events
EventAccess(&ForestTempleClear, {[]{return ForestTempleClear || BossKeyForestTemple;}}),
}, {
//Locations //Locations
LocationAccess(FOREST_TEMPLE_MQ_BASEMENT_CHEST, {[]{return true;}}), LocationAccess(FOREST_TEMPLE_MQ_BASEMENT_CHEST, {[]{return true;}}),
LocationAccess(FOREST_TEMPLE_PHANTOM_GANON_HEART, {[]{return BossKeyForestTemple;}}), }, {
LocationAccess(PHANTOM_GANON, {[]{return BossKeyForestTemple;}}), //Exits
}, {}); Entrance(FOREST_TEMPLE_BOSS_ENTRYWAY, {[]{return BossKeyForestTemple;}}),
});
} }
/*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[FOREST_TEMPLE_BOSS_ENTRYWAY] =
Area("Forest Temple Boss Entryway", "Forest Temple", FOREST_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(FOREST_TEMPLE_BOSS_REGION, { [] { return Dungeon::ForestTemple.IsVanilla() && false; } }),
Entrance(FOREST_TEMPLE_MQ_BOSS_REGION, { [] { return Dungeon::ForestTemple.IsMQ() && false; } }),
Entrance(FOREST_TEMPLE_BOSS_ROOM, { [] { return true; } }),
});
areaTable[FOREST_TEMPLE_BOSS_ROOM] = Area(
"Forest Temple Boss Room", "Forest Temple", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events
EventAccess(&ForestTempleClear, { [] {
return ForestTempleClear || ((CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)) &&
(CanUse(HOOKSHOT) || CanUse(BOW) || CanUse(SLINGSHOT)));
} }),
},
{
// Locations
LocationAccess(FOREST_TEMPLE_PHANTOM_GANON_HEART, { [] { return ForestTempleClear; } }),
LocationAccess(PHANTOM_GANON, { [] { return ForestTempleClear; } }),
},
{
// Exits
Entrance(FOREST_TEMPLE_BOSS_ENTRYWAY, { [] { return false; } }),
});
} }

View File

@ -162,23 +162,10 @@ void AreaTable_Init_JabuJabusBelly() {
}, { }, {
//Exits //Exits
Entrance(JABU_JABUS_BELLY_LIFT_MIDDLE, {[]{return true;}}), Entrance(JABU_JABUS_BELLY_LIFT_MIDDLE, {[]{return true;}}),
Entrance(JABU_JABUS_BELLY_BOSS_ROOM, {[]{return CanUse(BOOMERANG);}, Entrance(JABU_JABUS_BELLY_BOSS_ENTRYWAY, {[]{return CanUse(BOOMERANG);},
/*Glitched*/[]{return (CanUse(HOVER_BOOTS) && (CanUse(BOW) || CanUse(SLINGSHOT))) || CanDoGlitch(GlitchType::HookshotClip, GlitchDifficulty::NOVICE) || /*Glitched*/[]{return (CanUse(HOVER_BOOTS) && (CanUse(BOW) || CanUse(SLINGSHOT))) || CanDoGlitch(GlitchType::HookshotClip, GlitchDifficulty::NOVICE) ||
(CanUse(STICKS) && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::NOVICE)) || (Bombs && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::NOVICE)) || CanDoGlitch(GlitchType::SuperStab, GlitchDifficulty::NOVICE);}}), (CanUse(STICKS) && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::NOVICE)) || (Bombs && CanDoGlitch(GlitchType::ISG, GlitchDifficulty::NOVICE)) || CanDoGlitch(GlitchType::SuperStab, GlitchDifficulty::NOVICE);}}),
}); });
areaTable[JABU_JABUS_BELLY_BOSS_ROOM] = Area("Jabu Jabus Belly Boss Room", "Jabu Jabus Belly", JABU_JABUS_BELLY, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&JabuJabusBellyClear, {[]{return JabuJabusBellyClear || CanUse(BOOMERANG);}}),
}, {
//Locations
LocationAccess(JABU_JABUS_BELLY_BARINADE_HEART, {[]{return JabuJabusBellyClear;}}),
LocationAccess(BARINADE, {[]{return JabuJabusBellyClear;}}),
}, {
//Exits
Entrance(JABU_JABUS_BELLY_NEAR_BOSS_ROOM, {[]{return JabuJabusBellyClear;}}),
Entrance(JABU_JABUS_BELLY_ENTRYWAY, {[]{return JabuJabusBellyClear;}}),
});
} }
/*--------------------------- /*---------------------------
@ -234,12 +221,39 @@ void AreaTable_Init_JabuJabusBelly() {
//Locations //Locations
LocationAccess(JABU_JABUS_BELLY_MQ_COW, {[]{return CanPlay(EponasSong);}}), LocationAccess(JABU_JABUS_BELLY_MQ_COW, {[]{return CanPlay(EponasSong);}}),
LocationAccess(JABU_JABUS_BELLY_MQ_NEAR_BOSS_CHEST, {[]{return true;}}), LocationAccess(JABU_JABUS_BELLY_MQ_NEAR_BOSS_CHEST, {[]{return true;}}),
LocationAccess(JABU_JABUS_BELLY_BARINADE_HEART, {[]{return true;}}),
LocationAccess(BARINADE, {[]{return true;}}),
LocationAccess(JABU_JABUS_BELLY_MQ_GS_NEAR_BOSS, {[]{return true;}}), LocationAccess(JABU_JABUS_BELLY_MQ_GS_NEAR_BOSS, {[]{return true;}}),
}, { }, {
//Exits //Exits
Entrance(JABU_JABUS_BELLY_MQ_MAIN, {[]{return true;}}), Entrance(JABU_JABUS_BELLY_MQ_MAIN, {[]{return true;}}),
Entrance(JABU_JABUS_BELLY_BOSS_ENTRYWAY, {[]{return CanUse(SLINGSHOT);}}),
}); });
} }
/*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[JABU_JABUS_BELLY_BOSS_ENTRYWAY] =
Area("Jabu Jabus Belly Boss Entryway", "Jabu Jabus Belly", JABU_JABUS_BELLY, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(JABU_JABUS_BELLY_NEAR_BOSS_ROOM, { [] { return Dungeon::JabuJabusBelly.IsVanilla(); } }),
Entrance(JABU_JABUS_BELLY_MQ_BOSS_AREA, { [] { return Dungeon::JabuJabusBelly.IsMQ(); } }),
Entrance(JABU_JABUS_BELLY_BOSS_ROOM, { [] { return true; } }),
});
areaTable[JABU_JABUS_BELLY_BOSS_ROOM] =
Area("Jabu Jabus Belly Boss Room", "Jabu Jabus Belly", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events
EventAccess(&JabuJabusBellyClear, { [] { return JabuJabusBellyClear || CanUse(BOOMERANG); } }),
},
{
// Locations
LocationAccess(JABU_JABUS_BELLY_BARINADE_HEART, { [] { return JabuJabusBellyClear; } }),
LocationAccess(BARINADE, { [] { return JabuJabusBellyClear; } }),
},
{
// Exits
Entrance(JABU_JABUS_BELLY_BOSS_ENTRYWAY, { [] { return false; } }),
});
} }

View File

@ -81,18 +81,16 @@ void AreaTable_Init_ShadowTemple() {
Entrance(SHADOW_TEMPLE_BEYOND_BOAT, {[]{return CanPlay(ZeldasLullaby) && SmallKeys(SHADOW_TEMPLE, 4, 5);}}), Entrance(SHADOW_TEMPLE_BEYOND_BOAT, {[]{return CanPlay(ZeldasLullaby) && SmallKeys(SHADOW_TEMPLE, 4, 5);}}),
}); });
areaTable[SHADOW_TEMPLE_BEYOND_BOAT] = Area("Shadow Temple Beyond Boat", "Shadow Temple", SHADOW_TEMPLE, NO_DAY_NIGHT_CYCLE, { areaTable[SHADOW_TEMPLE_BEYOND_BOAT] = Area("Shadow Temple Beyond Boat", "Shadow Temple", SHADOW_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
//Events
EventAccess(&ShadowTempleClear, {[]{return ShadowTempleClear || (SmallKeys(SHADOW_TEMPLE, 5) && BossKeyShadowTemple && (Bow || CanUse(DISTANT_SCARECROW) || (LogicShadowStatue && HasBombchus)));}}),
}, {
//Locations //Locations
LocationAccess(SHADOW_TEMPLE_SPIKE_WALLS_LEFT_CHEST, {[]{return CanUse(DINS_FIRE);}}), LocationAccess(SHADOW_TEMPLE_SPIKE_WALLS_LEFT_CHEST, {[]{return CanUse(DINS_FIRE);}}),
LocationAccess(SHADOW_TEMPLE_BOSS_KEY_CHEST, {[]{return CanUse(DINS_FIRE);}}), LocationAccess(SHADOW_TEMPLE_BOSS_KEY_CHEST, {[]{return CanUse(DINS_FIRE);}}),
LocationAccess(SHADOW_TEMPLE_INVISIBLE_FLOORMASTER_CHEST, {[]{return true;}}), LocationAccess(SHADOW_TEMPLE_INVISIBLE_FLOORMASTER_CHEST, {[]{return true;}}),
LocationAccess(SHADOW_TEMPLE_BONGO_BONGO_HEART, {[]{return SmallKeys(SHADOW_TEMPLE, 5) && BossKeyShadowTemple && (Bow || CanUse(DISTANT_SCARECROW) || (LogicShadowStatue && HasBombchus));}}),
LocationAccess(BONGO_BONGO, {[]{return SmallKeys(SHADOW_TEMPLE, 5) && BossKeyShadowTemple && (Bow || CanUse(DISTANT_SCARECROW) || (LogicShadowStatue && HasBombchus));}}),
LocationAccess(SHADOW_TEMPLE_GS_TRIPLE_GIANT_POT, {[]{return true;}}), LocationAccess(SHADOW_TEMPLE_GS_TRIPLE_GIANT_POT, {[]{return true;}}),
}, {}); }, {
//Exits
Entrance(SHADOW_TEMPLE_BOSS_ENTRYWAY, {[]{return (CanUse(BOW) || CanUse(DISTANT_SCARECROW) || (LogicShadowStatue && HasBombchus)) && SmallKeys(SHADOW_TEMPLE, 5) && CanUse(HOVER_BOOTS) && BossKeyShadowTemple;}})
});
} }
/*--------------------------- /*---------------------------
@ -164,18 +162,14 @@ void AreaTable_Init_ShadowTemple() {
Entrance(SHADOW_TEMPLE_MQ_BEYOND_BOAT, {[]{return CanPlay(ZeldasLullaby) && SmallKeys(SHADOW_TEMPLE, 5);}}), Entrance(SHADOW_TEMPLE_MQ_BEYOND_BOAT, {[]{return CanPlay(ZeldasLullaby) && SmallKeys(SHADOW_TEMPLE, 5);}}),
}); });
areaTable[SHADOW_TEMPLE_MQ_BEYOND_BOAT] = Area("Shadow Temple MQ Beyond Boat", "Shadow Temple", SHADOW_TEMPLE, NO_DAY_NIGHT_CYCLE, { areaTable[SHADOW_TEMPLE_MQ_BEYOND_BOAT] = Area("Shadow Temple MQ Beyond Boat", "Shadow Temple", SHADOW_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
//Events
EventAccess(&ShadowTempleClear, {[]{return ShadowTempleClear || ((Bow || (LogicShadowStatue && HasBombchus)) && BossKeyShadowTemple);}}),
}, {
//Locations //Locations
LocationAccess(SHADOW_TEMPLE_BONGO_BONGO_HEART, {[]{return (Bow || (LogicShadowStatue && HasBombchus)) && BossKeyShadowTemple;}}),
LocationAccess(BONGO_BONGO, {[]{return (Bow || (LogicShadowStatue && HasBombchus)) && BossKeyShadowTemple;}}),
LocationAccess(SHADOW_TEMPLE_MQ_GS_AFTER_SHIP, {[]{return true;}}), LocationAccess(SHADOW_TEMPLE_MQ_GS_AFTER_SHIP, {[]{return true;}}),
LocationAccess(SHADOW_TEMPLE_MQ_GS_NEAR_BOSS, {[]{return Bow || (LogicShadowStatue && HasBombchus);}}), LocationAccess(SHADOW_TEMPLE_MQ_GS_NEAR_BOSS, {[]{return Bow || (LogicShadowStatue && HasBombchus);}}),
}, { }, {
//Exits //Exits
Entrance(SHADOW_TEMPLE_MQ_INVISIBLE_MAZE, {[]{return Bow && CanPlay(SongOfTime) && IsAdult && CanUse(LONGSHOT);}}), Entrance(SHADOW_TEMPLE_MQ_INVISIBLE_MAZE, {[]{return Bow && CanPlay(SongOfTime) && IsAdult && CanUse(LONGSHOT);}}),
Entrance(SHADOW_TEMPLE_BOSS_ENTRYWAY, {[]{return (CanUse(BOW) || (LogicShadowStatue && HasBombchus)) && CanUse(HOVER_BOOTS) && BossKeyShadowTemple;}}),
}); });
areaTable[SHADOW_TEMPLE_MQ_INVISIBLE_MAZE] = Area("Shadow Temple MQ Invisible Maze", "Shadow Temple", SHADOW_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, { areaTable[SHADOW_TEMPLE_MQ_INVISIBLE_MAZE] = Area("Shadow Temple MQ Invisible Maze", "Shadow Temple", SHADOW_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
@ -186,4 +180,37 @@ void AreaTable_Init_ShadowTemple() {
LocationAccess(SHADOW_TEMPLE_MQ_FREESTANDING_KEY, {[]{return true;}}), LocationAccess(SHADOW_TEMPLE_MQ_FREESTANDING_KEY, {[]{return true;}}),
}, {}); }, {});
} }
/*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[SHADOW_TEMPLE_BOSS_ENTRYWAY] =
Area("Shadow Temple Boss Entryway", "Shadow Temple", SHADOW_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(SHADOW_TEMPLE_BEYOND_BOAT, { [] { return Dungeon::ShadowTemple.IsVanilla() && false; } }),
Entrance(SHADOW_TEMPLE_MQ_BEYOND_BOAT, { [] { return Dungeon::ShadowTemple.IsMQ() && false; } }),
Entrance(SHADOW_TEMPLE_BOSS_ROOM, { [] { return true; } }),
});
areaTable[SHADOW_TEMPLE_BOSS_ROOM] =
Area("Shadow Temple Boss Room", "Shadow Temple", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events
EventAccess(&ShadowTempleClear, { [] {
return ShadowTempleClear ||
((CanUse(LENS_OF_TRUTH) || ((Dungeon::ShadowTemple.IsVanilla() && LogicLensShadowBack) ||
(Dungeon::ShadowTemple.IsMQ() && LogicLensShadowMQBack))) &&
(CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)));
} }),
},
{
// Locations
LocationAccess(SHADOW_TEMPLE_BONGO_BONGO_HEART, { [] { return ShadowTempleClear; } }),
LocationAccess(BONGO_BONGO, { [] { return ShadowTempleClear; } }),
},
{
// Exits
Entrance(SHADOW_TEMPLE_BOSS_ENTRYWAY, { [] { return false; } }),
});
} }

View File

@ -122,16 +122,22 @@ void AreaTable_Init_SpiritTemple() {
Entrance(SPIRIT_TEMPLE_BEYOND_FINAL_LOCKED_DOOR, {[]{return SmallKeys(SPIRIT_TEMPLE, 5) && (LogicSpiritWall || CanUse(LONGSHOT) || HasBombchus || ((Bombs || Nuts || CanUse(DINS_FIRE)) && (Bow || CanUse(HOOKSHOT) || Hammer)));}}), Entrance(SPIRIT_TEMPLE_BEYOND_FINAL_LOCKED_DOOR, {[]{return SmallKeys(SPIRIT_TEMPLE, 5) && (LogicSpiritWall || CanUse(LONGSHOT) || HasBombchus || ((Bombs || Nuts || CanUse(DINS_FIRE)) && (Bow || CanUse(HOOKSHOT) || Hammer)));}}),
}); });
areaTable[SPIRIT_TEMPLE_BEYOND_FINAL_LOCKED_DOOR] = Area("Spirit Temple Beyond Final Locked Door", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, { areaTable[SPIRIT_TEMPLE_BEYOND_FINAL_LOCKED_DOOR] = Area("Spirit Temple Beyond Final Locked Door", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
//Events
EventAccess(&SpiritTempleClear, {[]{return SpiritTempleClear || (MirrorShield && HasExplosives && Hookshot && BossKeySpiritTemple);}}),
}, {
//Locations //Locations
LocationAccess(SPIRIT_TEMPLE_BOSS_KEY_CHEST, {[]{return CanPlay(ZeldasLullaby) && ((CanTakeDamage && LogicFlamingChests) || (Bow && Hookshot));}}), LocationAccess(SPIRIT_TEMPLE_BOSS_KEY_CHEST, {[]{return CanPlay(ZeldasLullaby) && ((CanTakeDamage && LogicFlamingChests) || (Bow && Hookshot));}}),
LocationAccess(SPIRIT_TEMPLE_TOPMOST_CHEST, {[]{return MirrorShield || (SunlightArrows && CanUse(LIGHT_ARROWS));}}), LocationAccess(SPIRIT_TEMPLE_TOPMOST_CHEST, {[]{return MirrorShield || (SunlightArrows && CanUse(LIGHT_ARROWS));}}),
LocationAccess(SPIRIT_TEMPLE_TWINROVA_HEART, {[]{return MirrorShield && HasExplosives && Hookshot && BossKeySpiritTemple;}}), }, {
LocationAccess(TWINROVA, {[]{return MirrorShield && HasExplosives && Hookshot && BossKeySpiritTemple;}}), //Exits
}, {}); Entrance(SPIRIT_TEMPLE_INSIDE_STATUE_HEAD, {[]{return MirrorShield && HasExplosives && Hookshot;}}),
});
areaTable[SPIRIT_TEMPLE_INSIDE_STATUE_HEAD] =
Area("Spirit Temple Inside Statue Head", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(SPIRIT_TEMPLE_CENTRAL_CHAMBER, { [] { return true; } }),
Entrance(SPIRIT_TEMPLE_BOSS_ENTRYWAY, { [] { return BossKeySpiritTemple; } }),
});
} }
/*--------------------------- /*---------------------------
@ -209,15 +215,21 @@ void AreaTable_Init_SpiritTemple() {
LocationAccess(SPIRIT_TEMPLE_MQ_GS_SYMPHONY_ROOM, {[]{return SmallKeys(SPIRIT_TEMPLE, 7) && Hammer && Ocarina && SongOfTime && EponasSong && SunsSong && SongOfStorms && ZeldasLullaby;}}), LocationAccess(SPIRIT_TEMPLE_MQ_GS_SYMPHONY_ROOM, {[]{return SmallKeys(SPIRIT_TEMPLE, 7) && Hammer && Ocarina && SongOfTime && EponasSong && SunsSong && SongOfStorms && ZeldasLullaby;}}),
}, {}); }, {});
areaTable[SPIRIT_TEMPLE_MQ_BOSS_AREA] = Area("Spirit Temple MQ Boss Area", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, { areaTable[SPIRIT_TEMPLE_MQ_BOSS_AREA] = Area("Spirit Temple MQ Boss Area", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
//Events
EventAccess(&SpiritTempleClear, {[]{return SpiritTempleClear || (MirrorShield && BossKeySpiritTemple);}}),
}, {
//Locations //Locations
LocationAccess(SPIRIT_TEMPLE_MQ_MIRROR_PUZZLE_INVISIBLE_CHEST, {[]{return LogicLensSpiritMQ || CanUse(LENS_OF_TRUTH);}}), LocationAccess(SPIRIT_TEMPLE_MQ_MIRROR_PUZZLE_INVISIBLE_CHEST, {[]{return LogicLensSpiritMQ || CanUse(LENS_OF_TRUTH);}}),
LocationAccess(SPIRIT_TEMPLE_TWINROVA_HEART, {[]{return MirrorShield && BossKeySpiritTemple;}}), }, {
LocationAccess(TWINROVA, {[]{return MirrorShield && BossKeySpiritTemple;}}), //Exits
}, {}); Entrance(SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD, {[]{return MirrorShield && Hookshot;}}),
});
areaTable[SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD] =
Area("Spirit Temple MQ Inside Statue Head", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(SPIRIT_TEMPLE_MQ_SHARED, { [] { return true; } }),
Entrance(SPIRIT_TEMPLE_BOSS_ENTRYWAY, { [] { return BossKeySpiritTemple; } }),
});
areaTable[SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND] = Area("Spirit Temple MQ Mirror Shield Hand", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, { areaTable[SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND] = Area("Spirit Temple MQ Mirror Shield Hand", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
//Locations //Locations
@ -229,4 +241,35 @@ void AreaTable_Init_SpiritTemple() {
LocationAccess(SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST, {[]{return true;}}), LocationAccess(SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST, {[]{return true;}}),
}, {}); }, {});
} }
/*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[SPIRIT_TEMPLE_BOSS_ENTRYWAY] = Area(
"Spirit Temple Boss Entryway", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(SPIRIT_TEMPLE_INSIDE_STATUE_HEAD, { [] { return Dungeon::SpiritTemple.IsVanilla() && false; } }),
Entrance(SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD, { [] { return Dungeon::SpiritTemple.IsMQ() && false; } }),
Entrance(SPIRIT_TEMPLE_BOSS_ROOM, { [] { return true; } }),
});
areaTable[SPIRIT_TEMPLE_BOSS_ROOM] = Area(
"Spirit Temple Boss Room", "Spirit Temple", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events
EventAccess(&SpiritTempleClear, { [] {
return SpiritTempleClear || (CanUse(MIRROR_SHIELD) &&
(CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)));
} }),
},
{
// Locations
LocationAccess(SPIRIT_TEMPLE_TWINROVA_HEART, { [] { return SpiritTempleClear; } }),
LocationAccess(TWINROVA, { [] { return SpiritTempleClear; } }),
},
{
// Exits
Entrance(SPIRIT_TEMPLE_BOSS_ENTRYWAY, { [] { return false; } }),
});
} }

View File

@ -275,19 +275,7 @@ void AreaTable_Init_WaterTemple() {
}, {}, { }, {}, {
//Exits //Exits
Entrance(WATER_TEMPLE_LOBBY, {[]{return true;}}), Entrance(WATER_TEMPLE_LOBBY, {[]{return true;}}),
Entrance(WATER_TEMPLE_BOSS_ROOM, {[]{return BossKeyWaterTemple;}}), Entrance(WATER_TEMPLE_BOSS_ENTRYWAY, {[]{return BossKeyWaterTemple;}}),
});
areaTable[WATER_TEMPLE_BOSS_ROOM] = Area("Water Temple Boss Room", "Water Temple", WATER_TEMPLE, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&WaterTempleClear, {[]{return WaterTempleClear || (CanUse(HOOKSHOT) && (CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)));}}),
}, {
//Locations
LocationAccess(WATER_TEMPLE_MORPHA_HEART, {[]{return WaterTempleClear;}}),
LocationAccess(MORPHA, {[]{return WaterTempleClear;}}),
}, {
//Exits
Entrance(WATER_TEMPLE_ENTRYWAY, {[]{return WaterTempleClear;}}),
}); });
} }
@ -295,18 +283,12 @@ void AreaTable_Init_WaterTemple() {
| MASTER QUEST DUNGEON | | MASTER QUEST DUNGEON |
---------------------------*/ ---------------------------*/
if (Dungeon::WaterTemple.IsMQ()) { if (Dungeon::WaterTemple.IsMQ()) {
areaTable[WATER_TEMPLE_MQ_LOBBY] = Area("Water Temple MQ Lobby", "Water Temple", WATER_TEMPLE, NO_DAY_NIGHT_CYCLE, { areaTable[WATER_TEMPLE_MQ_LOBBY] = Area("Water Temple MQ Lobby", "Water Temple", WATER_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Events
EventAccess(&WaterTempleClear, {[]{return BossKeyWaterTemple && IsAdult && CanUse(LONGSHOT);}}),
}, {
//Locations
LocationAccess(WATER_TEMPLE_MORPHA_HEART, {[]{return BossKeyWaterTemple && IsAdult && CanUse(LONGSHOT);}}),
LocationAccess(MORPHA, {[]{return BossKeyWaterTemple && IsAdult && CanUse(LONGSHOT);}}),
}, {
//Exits //Exits
Entrance(WATER_TEMPLE_ENTRYWAY, {[]{return true;}}), Entrance(WATER_TEMPLE_ENTRYWAY, {[]{return true;}}),
Entrance(WATER_TEMPLE_MQ_DIVE, {[]{return IsAdult && WaterTimer >= 24 && CanUse(IRON_BOOTS);}}), Entrance(WATER_TEMPLE_MQ_DIVE, {[]{return IsAdult && WaterTimer >= 24 && CanUse(IRON_BOOTS);}}),
Entrance(WATER_TEMPLE_MQ_DARK_LINK_REGION, {[]{return SmallKeys(WATER_TEMPLE, 1) && IsAdult && CanUse(LONGSHOT);}}), Entrance(WATER_TEMPLE_MQ_DARK_LINK_REGION, {[]{return SmallKeys(WATER_TEMPLE, 1) && IsAdult && CanUse(LONGSHOT);}}),
Entrance(WATER_TEMPLE_BOSS_ENTRYWAY, {[]{return BossKeyWaterTemple && IsAdult && CanUse(LONGSHOT);}}),
}); });
areaTable[WATER_TEMPLE_MQ_DIVE] = Area("Water Temple MQ Dive", "Water Temple", WATER_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, { areaTable[WATER_TEMPLE_MQ_DIVE] = Area("Water Temple MQ Dive", "Water Temple", WATER_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
@ -348,4 +330,35 @@ void AreaTable_Init_WaterTemple() {
//Trick: LogicWaterMQLockedGS || (SmallKeys(WATER_TEMPLE, 2) && (HoverBoots || CanUse(SCARECROW) || LogicWaterNorthBasementLedgeJump)) //Trick: LogicWaterMQLockedGS || (SmallKeys(WATER_TEMPLE, 2) && (HoverBoots || CanUse(SCARECROW) || LogicWaterNorthBasementLedgeJump))
}, {}); }, {});
} }
/*---------------------------
| BOSS ROOM |
---------------------------*/
areaTable[WATER_TEMPLE_BOSS_ENTRYWAY] =
Area("Water Temple Boss Entryway", "Water Temple", WATER_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(WATER_TEMPLE_PRE_BOSS_ROOM, { [] { return Dungeon::WaterTemple.IsVanilla() && false; } }),
Entrance(WATER_TEMPLE_MQ_LOBBY, { [] { return Dungeon::WaterTemple.IsMQ() && false; } }),
Entrance(WATER_TEMPLE_BOSS_ROOM, { [] { return true; } }),
});
areaTable[WATER_TEMPLE_BOSS_ROOM] = Area(
"Water Temple Boss Room", "Water Temple", NONE, NO_DAY_NIGHT_CYCLE,
{
// Events
EventAccess(&WaterTempleClear, { [] {
return WaterTempleClear ||
(CanUse(HOOKSHOT) && (CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)));
} }),
},
{
// Locations
LocationAccess(WATER_TEMPLE_MORPHA_HEART, { [] { return WaterTempleClear; } }),
LocationAccess(MORPHA, { [] { return WaterTempleClear; } }),
},
{
// Exits
Entrance(WATER_TEMPLE_BOSS_ENTRYWAY, { [] { return false; } }),
});
} }

View File

@ -5,9 +5,9 @@
#include "location_access.hpp" #include "location_access.hpp"
#include "rando_main.hpp" #include "rando_main.hpp"
// #include <soh/Enhancements/randomizer.h> // #include <soh/Enhancements/randomizer.h>
#include <Cvar.h> #include <libultraship/bridge.h>
#include <Window.h> #include <Window.h>
#include <ultra64/types.h> #include <libultraship/libultra/types.h>
#define TICKS_PER_SEC 268123480.0 #define TICKS_PER_SEC 268123480.0
@ -17,14 +17,14 @@ void RandoMain::GenerateRando(std::unordered_map<RandomizerSettingKey, u8> cvarS
LocationTable_Init(); LocationTable_Init();
// std::string settingsFileName = "./randomizer/latest_settings.json"; // std::string settingsFileName = "./randomizer/latest_settings.json";
// CVar_SetString("gLoadedPreset", settingsFileName.c_str()); // CVarSetString("gLoadedPreset", settingsFileName.c_str());
std::string fileName = Ship::Window::GetPathRelativeToAppDirectory(GenerateRandomizer(cvarSettings, excludedLocations).c_str()); std::string fileName = Ship::Window::GetPathRelativeToAppDirectory(GenerateRandomizer(cvarSettings, excludedLocations).c_str());
CVar_SetString("gSpoilerLog", fileName.c_str()); CVarSetString("gSpoilerLog", fileName.c_str());
CVar_Save(); CVarSave();
CVar_Load(); CVarLoad();
CVar_SetS32("gNewSeedGenerated", 1); CVarSetInteger("gNewSeedGenerated", 1);
} }
std::array<Item, KEY_ENUM_MAX>* RandoMain::GetFullItemTable() { std::array<Item, KEY_ENUM_MAX>* RandoMain::GetFullItemTable() {

View File

@ -164,6 +164,17 @@ string_view dungeonEntrancesDesc = "Shuffle the pool of dungeon entrances,
"Temple, Bottom of the Well and Gerudo Training\n" // "Temple, Bottom of the Well and Gerudo Training\n" //
"Ground are opened for both adult and child."; // "Ground are opened for both adult and child."; //
/*------------------------------ // /*------------------------------ //
| BOSS ENTRANCES | //
------------------------------*/ //
string_view bossEntrancesDesc = "Shuffle the pool of dungeon boss entrances.\n" //
"This affects the boss rooms of all stone and\n" //
"medallion dungeons.\n" //
"\n" //
"Child and adult boss rooms can be shuffled\n" //
"separately.\n" //
"Child may be expected to defeat Phantom Ganon\n" //
"and/or Bongo Bongo."; //
/*------------------------------ //
| OVERWORLD ENTRANCES | // | OVERWORLD ENTRANCES | //
------------------------------*/ // ------------------------------*/ //
string_view overworldEntrancesDesc = "Shuffle the pool of Overworld entrances, which\n" // string_view overworldEntrancesDesc = "Shuffle the pool of Overworld entrances, which\n" //
@ -238,7 +249,9 @@ string_view decoupledEntrancesDesc = "Decouple entrances when shuffling them.
"you came from when you go back through an\n" // "you came from when you go back through an\n" //
"entrance. This also adds the one-way entrance from" "entrance. This also adds the one-way entrance from"
"Gerudo Valley to Lake Hylia in the pool of\n" // "Gerudo Valley to Lake Hylia in the pool of\n" //
"overworld entrances when they are shuffled."; // "overworld entrances when they are shuffled.\n" //
"Boss entrances are currently excluded from this\n"//
"and remain coupled regardless."; //
/*------------------------------ // /*------------------------------ //
| BOMBCHUS IN LOGIC | // | BOMBCHUS IN LOGIC | //
------------------------------*/ // ------------------------------*/ //

View File

@ -57,6 +57,8 @@ extern string_view shuffleEntrancesDesc;
extern string_view dungeonEntrancesDesc; extern string_view dungeonEntrancesDesc;
extern string_view bossEntrancesDesc;
extern string_view overworldEntrancesDesc; extern string_view overworldEntrancesDesc;
extern string_view grottoEntrancesDesc; extern string_view grottoEntrancesDesc;

View File

@ -89,6 +89,7 @@ namespace Settings {
uint8_t ResolvedStartingAge; uint8_t ResolvedStartingAge;
Option ShuffleEntrances = Option::Bool("Shuffle Entrances", {"Off", "On"}, {shuffleEntrancesDesc}); Option ShuffleEntrances = Option::Bool("Shuffle Entrances", {"Off", "On"}, {shuffleEntrancesDesc});
Option ShuffleDungeonEntrances = Option::U8 ("Dungeon Entrances", {"Off", "On", "On + Ganon"}, {dungeonEntrancesDesc}); Option ShuffleDungeonEntrances = Option::U8 ("Dungeon Entrances", {"Off", "On", "On + Ganon"}, {dungeonEntrancesDesc});
Option ShuffleBossEntrances = Option::U8 ("Boss Entrances", {"Off", "Age Restricted", "Full"}, {bossEntrancesDesc});
Option ShuffleOverworldEntrances = Option::Bool("Overworld Entrances", {"Off", "On"}, {overworldEntrancesDesc}); Option ShuffleOverworldEntrances = Option::Bool("Overworld Entrances", {"Off", "On"}, {overworldEntrancesDesc});
Option ShuffleInteriorEntrances = Option::U8 ("Interior Entrances", {"Off", "Simple", "All"}, {interiorEntrancesOff, interiorEntrancesSimple, interiorEntrancesAll}); Option ShuffleInteriorEntrances = Option::U8 ("Interior Entrances", {"Off", "Simple", "All"}, {interiorEntrancesOff, interiorEntrancesSimple, interiorEntrancesAll});
Option ShuffleGrottoEntrances = Option::Bool("Grottos Entrances", {"Off", "On"}, {grottoEntrancesDesc}); Option ShuffleGrottoEntrances = Option::Bool("Grottos Entrances", {"Off", "On"}, {grottoEntrancesDesc});
@ -125,6 +126,7 @@ namespace Settings {
&StartingAge, &StartingAge,
&ShuffleEntrances, &ShuffleEntrances,
&ShuffleDungeonEntrances, &ShuffleDungeonEntrances,
&ShuffleBossEntrances,
&ShuffleOverworldEntrances, &ShuffleOverworldEntrances,
&ShuffleInteriorEntrances, &ShuffleInteriorEntrances,
&ShuffleGrottoEntrances, &ShuffleGrottoEntrances,
@ -314,6 +316,16 @@ namespace Settings {
Option GossipStoneHints = Option::U8 ("Gossip Stone Hints", {"No Hints", "Need Nothing", "Mask of Truth", "Stone of Agony"}, {gossipStonesHintsDesc}, OptionCategory::Setting, HINTS_NEED_NOTHING); Option GossipStoneHints = Option::U8 ("Gossip Stone Hints", {"No Hints", "Need Nothing", "Mask of Truth", "Stone of Agony"}, {gossipStonesHintsDesc}, OptionCategory::Setting, HINTS_NEED_NOTHING);
Option ClearerHints = Option::U8 ("Hint Clarity", {"Obscure", "Ambiguous", "Clear"}, {obscureHintsDesc, ambiguousHintsDesc, clearHintsDesc}); Option ClearerHints = Option::U8 ("Hint Clarity", {"Obscure", "Ambiguous", "Clear"}, {obscureHintsDesc, ambiguousHintsDesc, clearHintsDesc});
Option HintDistribution = Option::U8 ("Hint Distribution", {"Useless", "Balanced", "Strong", "Very Strong"}, {uselessHintsDesc, balancedHintsDesc, strongHintsDesc, veryStrongHintsDesc}, OptionCategory::Setting, 1); // Balanced Option HintDistribution = Option::U8 ("Hint Distribution", {"Useless", "Balanced", "Strong", "Very Strong"}, {uselessHintsDesc, balancedHintsDesc, strongHintsDesc, veryStrongHintsDesc}, OptionCategory::Setting, 1); // Balanced
Option AltarHintText = Option::Bool("ToT Altar Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 1);
Option GanondorfHintText = Option::Bool("Ganondorf LA Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 1);
Option DampeHintText = Option::Bool("Dampe's Diary Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option WarpSongHints = Option::Bool("Warp Songs Hints", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option Kak10GSHintText = Option::Bool("10 GS Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option Kak20GSHintText = Option::Bool("20 GS Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option Kak30GSHintText = Option::Bool("30 GS Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option Kak40GSHintText = Option::Bool("40 GS Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option Kak50GSHintText = Option::Bool("50 GS Hint", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option ScrubHintText = Option::Bool("Scrub Hint Text", {"Off", "On"}, {"", ""}, OptionCategory::Setting, 0);
Option CompassesShowReward = Option::U8 ("Compasses Show Rewards", {"No", "Yes"}, {compassesShowRewardsDesc}, OptionCategory::Setting, 1); Option CompassesShowReward = Option::U8 ("Compasses Show Rewards", {"No", "Yes"}, {compassesShowRewardsDesc}, OptionCategory::Setting, 1);
Option CompassesShowWotH = Option::U8 ("Compasses Show WotH", {"No", "Yes"}, {compassesShowWotHDesc}, OptionCategory::Setting, 1); Option CompassesShowWotH = Option::U8 ("Compasses Show WotH", {"No", "Yes"}, {compassesShowWotHDesc}, OptionCategory::Setting, 1);
Option MapsShowDungeonMode = Option::U8 ("Maps Show Dungeon Modes",{"No", "Yes"}, {mapsShowDungeonModesDesc}, OptionCategory::Setting, 1); Option MapsShowDungeonMode = Option::U8 ("Maps Show Dungeon Modes",{"No", "Yes"}, {mapsShowDungeonModesDesc}, OptionCategory::Setting, 1);
@ -332,6 +344,16 @@ namespace Settings {
&GossipStoneHints, &GossipStoneHints,
&ClearerHints, &ClearerHints,
&HintDistribution, &HintDistribution,
&AltarHintText,
&GanondorfHintText,
&DampeHintText,
&WarpSongHints,
&Kak10GSHintText,
&Kak20GSHintText,
&Kak30GSHintText,
&Kak40GSHintText,
&Kak50GSHintText,
&ScrubHintText,
&CompassesShowReward, &CompassesShowReward,
&CompassesShowWotH, &CompassesShowWotH,
&MapsShowDungeonMode, &MapsShowDungeonMode,
@ -509,18 +531,18 @@ namespace Settings {
&StartingRutoBottle, &StartingRutoBottle,
}; };
Option StartingZeldasLullaby = Option::U8 ("Zelda's Lullaby", {"Off", "On"}, {""}); Option StartingZeldasLullaby = Option::U8 ("Start with Zelda's Lullaby", {"Off", "On"}, {""});
Option StartingEponasSong = Option::U8 ("Epona's Song", {"Off", "On"}, {""}); Option StartingEponasSong = Option::U8 ("Start with Epona's Song", {"Off", "On"}, {""});
Option StartingSariasSong = Option::U8 ("Saria's Song", {"Off", "On"}, {""}); Option StartingSariasSong = Option::U8 ("Start with Saria's Song", {"Off", "On"}, {""});
Option StartingSunsSong = Option::U8 ("Sun's Song", {"Off", "On"}, {""}); Option StartingSunsSong = Option::U8 ("Start with Sun's Song", {"Off", "On"}, {""});
Option StartingSongOfTime = Option::U8 ("Song of Time", {"Off", "On"}, {""}); Option StartingSongOfTime = Option::U8 ("Start with Song of Time", {"Off", "On"}, {""});
Option StartingSongOfStorms = Option::U8 ("Song of Storms", {"Off", "On"}, {""}); Option StartingSongOfStorms = Option::U8 ("Start with Song of Storms", {"Off", "On"}, {""});
Option StartingMinuetOfForest = Option::U8 ("Minuet of Forest", {"Off", "On"}, {""}); Option StartingMinuetOfForest = Option::U8 ("Start with Minuet of Forest", {"Off", "On"}, {""});
Option StartingBoleroOfFire = Option::U8 ("Bolero of Fire", {"Off", "On"}, {""}); Option StartingBoleroOfFire = Option::U8 ("Start with Bolero of Fire", {"Off", "On"}, {""});
Option StartingSerenadeOfWater = Option::U8 ("Serenade of Water", {"Off", "On"}, {""}); Option StartingSerenadeOfWater = Option::U8 ("Start with Serenade of Water", {"Off", "On"}, {""});
Option StartingRequiemOfSpirit = Option::U8 ("Requiem of Spirit", {"Off", "On"}, {""}); Option StartingRequiemOfSpirit = Option::U8 ("Start with Requiem of Spirit", {"Off", "On"}, {""});
Option StartingNocturneOfShadow = Option::U8 ("Nocturne of Shadow", {"Off", "On"}, {""}); Option StartingNocturneOfShadow = Option::U8 ("Start with Nocturne of Shadow", {"Off", "On"}, {""});
Option StartingPreludeOfLight = Option::U8 ("Prelude of Light", {"Off", "On"}, {""}); Option StartingPreludeOfLight = Option::U8 ("Start with Prelude of Light", {"Off", "On"}, {""});
std::vector<Option *> startingSongsOptions = { std::vector<Option *> startingSongsOptions = {
&StartingZeldasLullaby, &StartingZeldasLullaby,
&StartingEponasSong, &StartingEponasSong,
@ -1271,6 +1293,7 @@ namespace Settings {
ctx.startingAge = StartingAge.Value<uint8_t>(); ctx.startingAge = StartingAge.Value<uint8_t>();
ctx.resolvedStartingAge = ResolvedStartingAge; ctx.resolvedStartingAge = ResolvedStartingAge;
ctx.shuffleDungeonEntrances = ShuffleDungeonEntrances.Value<uint8_t>(); ctx.shuffleDungeonEntrances = ShuffleDungeonEntrances.Value<uint8_t>();
ctx.shuffleBossEntrances = ShuffleBossEntrances.Value<uint8_t>();
ctx.shuffleOverworldEntrances = (ShuffleOverworldEntrances) ? 1 : 0; ctx.shuffleOverworldEntrances = (ShuffleOverworldEntrances) ? 1 : 0;
ctx.shuffleInteriorEntrances = ShuffleInteriorEntrances.Value<uint8_t>(); ctx.shuffleInteriorEntrances = ShuffleInteriorEntrances.Value<uint8_t>();
ctx.shuffleGrottoEntrances = (ShuffleGrottoEntrances) ? 1 : 0; ctx.shuffleGrottoEntrances = (ShuffleGrottoEntrances) ? 1 : 0;
@ -1953,6 +1976,7 @@ namespace Settings {
//Show Shuffle options when Shuffle Entrances is On //Show Shuffle options when Shuffle Entrances is On
if (ShuffleEntrances) { if (ShuffleEntrances) {
ShuffleDungeonEntrances.Unhide(); ShuffleDungeonEntrances.Unhide();
ShuffleBossEntrances.Unhide();
ShuffleOverworldEntrances.Unhide(); ShuffleOverworldEntrances.Unhide();
ShuffleInteriorEntrances.Unhide(); ShuffleInteriorEntrances.Unhide();
ShuffleGrottoEntrances.Unhide(); ShuffleGrottoEntrances.Unhide();
@ -1964,6 +1988,8 @@ namespace Settings {
} else { } else {
ShuffleDungeonEntrances.SetSelectedIndex(SHUFFLEDUNGEONS_OFF); ShuffleDungeonEntrances.SetSelectedIndex(SHUFFLEDUNGEONS_OFF);
ShuffleDungeonEntrances.Hide(); ShuffleDungeonEntrances.Hide();
ShuffleBossEntrances.SetSelectedIndex(SHUFFLEBOSSES_OFF);
ShuffleBossEntrances.Hide();
ShuffleOverworldEntrances.SetSelectedIndex(OFF); ShuffleOverworldEntrances.SetSelectedIndex(OFF);
ShuffleOverworldEntrances.Hide(); ShuffleOverworldEntrances.Hide();
ShuffleInteriorEntrances.SetSelectedIndex(SHUFFLEINTERIORS_OFF); ShuffleInteriorEntrances.SetSelectedIndex(SHUFFLEINTERIORS_OFF);
@ -2444,6 +2470,7 @@ namespace Settings {
// Sanity Check Entrance Shuffling // Sanity Check Entrance Shuffling
if (!ShuffleEntrances) { if (!ShuffleEntrances) {
ShuffleDungeonEntrances.SetSelectedIndex(OFF); ShuffleDungeonEntrances.SetSelectedIndex(OFF);
ShuffleBossEntrances.SetSelectedIndex(OFF);
ShuffleOverworldEntrances.SetSelectedIndex(OFF); ShuffleOverworldEntrances.SetSelectedIndex(OFF);
ShuffleInteriorEntrances.SetSelectedIndex(OFF); ShuffleInteriorEntrances.SetSelectedIndex(OFF);
ShuffleGrottoEntrances.SetSelectedIndex(OFF); ShuffleGrottoEntrances.SetSelectedIndex(OFF);
@ -2661,6 +2688,7 @@ namespace Settings {
// Shuffle Entrances // Shuffle Entrances
ShuffleEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_ENTRANCES]); ShuffleEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_ENTRANCES]);
ShuffleDungeonEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_DUNGEON_ENTRANCES]); ShuffleDungeonEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_DUNGEON_ENTRANCES]);
ShuffleBossEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_BOSS_ENTRANCES]);
ShuffleOverworldEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_OVERWORLD_ENTRANCES]); ShuffleOverworldEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_OVERWORLD_ENTRANCES]);
ShuffleInteriorEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_INTERIOR_ENTRANCES]); ShuffleInteriorEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_INTERIOR_ENTRANCES]);
ShuffleGrottoEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_GROTTO_ENTRANCES]); ShuffleGrottoEntrances.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_GROTTO_ENTRANCES]);
@ -2703,6 +2731,19 @@ namespace Settings {
MapsAndCompasses.SetSelectedIndex(cvarSettings[RSK_STARTING_MAPS_COMPASSES]); MapsAndCompasses.SetSelectedIndex(cvarSettings[RSK_STARTING_MAPS_COMPASSES]);
StartingZeldasLullaby.SetSelectedIndex(cvarSettings[RSK_STARTING_ZELDAS_LULLABY]);
StartingEponasSong.SetSelectedIndex(cvarSettings[RSK_STARTING_EPONAS_SONG]);
StartingSariasSong.SetSelectedIndex(cvarSettings[RSK_STARTING_SARIAS_SONG]);
StartingSunsSong.SetSelectedIndex(cvarSettings[RSK_STARTING_SUNS_SONG]);
StartingSongOfTime.SetSelectedIndex(cvarSettings[RSK_STARTING_SONG_OF_TIME]);
StartingSongOfStorms.SetSelectedIndex(cvarSettings[RSK_STARTING_SONG_OF_STORMS]);
StartingMinuetOfForest.SetSelectedIndex(cvarSettings[RSK_STARTING_MINUET_OF_FOREST]);
StartingBoleroOfFire.SetSelectedIndex(cvarSettings[RSK_STARTING_BOLERO_OF_FIRE]);
StartingSerenadeOfWater.SetSelectedIndex(cvarSettings[RSK_STARTING_SERENADE_OF_WATER]);
StartingRequiemOfSpirit.SetSelectedIndex(cvarSettings[RSK_STARTING_REQUIEM_OF_SPIRIT]);
StartingNocturneOfShadow.SetSelectedIndex(cvarSettings[RSK_STARTING_NOCTURNE_OF_SHADOW]);
StartingPreludeOfLight.SetSelectedIndex(cvarSettings[RSK_STARTING_PRELUDE_OF_LIGHT]);
// RANDOTODO: Implement disabling ammo drops. Currently only "On" (index 0) or "On + Bombchus" (index 1) is implemented. // RANDOTODO: Implement disabling ammo drops. Currently only "On" (index 0) or "On + Bombchus" (index 1) is implemented.
AmmoDrops.SetSelectedIndex(cvarSettings[RSK_ENABLE_BOMBCHU_DROPS]); AmmoDrops.SetSelectedIndex(cvarSettings[RSK_ENABLE_BOMBCHU_DROPS]);
@ -2713,6 +2754,16 @@ namespace Settings {
GossipStoneHints.SetSelectedIndex(cvarSettings[RSK_GOSSIP_STONE_HINTS]); GossipStoneHints.SetSelectedIndex(cvarSettings[RSK_GOSSIP_STONE_HINTS]);
ClearerHints.SetSelectedIndex(cvarSettings[RSK_HINT_CLARITY]); ClearerHints.SetSelectedIndex(cvarSettings[RSK_HINT_CLARITY]);
AltarHintText.SetSelectedIndex(cvarSettings[RSK_TOT_ALTAR_HINT]);
GanondorfHintText.SetSelectedIndex(cvarSettings[RSK_GANONDORF_LIGHT_ARROWS_HINT]);
DampeHintText.SetSelectedIndex(cvarSettings[RSK_DAMPES_DIARY_HINT]);
WarpSongHints.SetSelectedIndex(cvarSettings[RSK_WARP_SONG_HINTS]);
Kak10GSHintText.SetSelectedIndex(cvarSettings[RSK_KAK_10_SKULLS_HINT]);
Kak20GSHintText.SetSelectedIndex(cvarSettings[RSK_KAK_20_SKULLS_HINT]);
Kak30GSHintText.SetSelectedIndex(cvarSettings[RSK_KAK_30_SKULLS_HINT]);
Kak40GSHintText.SetSelectedIndex(cvarSettings[RSK_KAK_40_SKULLS_HINT]);
Kak50GSHintText.SetSelectedIndex(cvarSettings[RSK_KAK_50_SKULLS_HINT]);
ScrubHintText.SetSelectedIndex(cvarSettings[RSK_SCRUB_TEXT_HINT]);
HintDistribution.SetSelectedIndex(cvarSettings[RSK_HINT_DISTRIBUTION]); HintDistribution.SetSelectedIndex(cvarSettings[RSK_HINT_DISTRIBUTION]);
BlueFireArrows.SetSelectedIndex(cvarSettings[RSK_BLUE_FIRE_ARROWS]); BlueFireArrows.SetSelectedIndex(cvarSettings[RSK_BLUE_FIRE_ARROWS]);
SunlightArrows.SetSelectedIndex(cvarSettings[RSK_SUNLIGHT_ARROWS]); SunlightArrows.SetSelectedIndex(cvarSettings[RSK_SUNLIGHT_ARROWS]);

View File

@ -92,6 +92,12 @@ typedef enum {
SHUFFLEDUNGEONS_GANON, SHUFFLEDUNGEONS_GANON,
} ShuffleDungeonEntrancesSetting; } ShuffleDungeonEntrancesSetting;
typedef enum {
SHUFFLEBOSSES_OFF,
SHUFFLEBOSSES_AGE_RESTRICTED,
SHUFFLEBOSSES_FULL,
} ShuffleBossEntrancesSetting;
typedef enum { typedef enum {
SHUFFLEINTERIORS_OFF, SHUFFLEINTERIORS_OFF,
SHUFFLEINTERIORS_SIMPLE, SHUFFLEINTERIORS_SIMPLE,
@ -387,6 +393,7 @@ typedef struct {
uint8_t startingAge; uint8_t startingAge;
uint8_t resolvedStartingAge; uint8_t resolvedStartingAge;
uint8_t shuffleDungeonEntrances; uint8_t shuffleDungeonEntrances;
uint8_t shuffleBossEntrances;
uint8_t shuffleOverworldEntrances; uint8_t shuffleOverworldEntrances;
uint8_t shuffleInteriorEntrances; uint8_t shuffleInteriorEntrances;
uint8_t shuffleGrottoEntrances; uint8_t shuffleGrottoEntrances;
@ -903,6 +910,7 @@ void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettin
extern uint8_t ResolvedStartingAge; extern uint8_t ResolvedStartingAge;
extern Option ShuffleEntrances; extern Option ShuffleEntrances;
extern Option ShuffleDungeonEntrances; extern Option ShuffleDungeonEntrances;
extern Option ShuffleBossEntrances;
extern Option ShuffleOverworldEntrances; extern Option ShuffleOverworldEntrances;
extern Option ShuffleInteriorEntrances; extern Option ShuffleInteriorEntrances;
extern Option ShuffleGrottoEntrances; extern Option ShuffleGrottoEntrances;
@ -981,6 +989,16 @@ void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettin
extern Option GossipStoneHints; extern Option GossipStoneHints;
extern Option ClearerHints; extern Option ClearerHints;
extern Option HintDistribution; extern Option HintDistribution;
extern Option AltarHintText;
extern Option GanondorfHintText;
extern Option DampeHintText;
extern Option Kak10GSHintText;
extern Option Kak20GSHintText;
extern Option Kak30GSHintText;
extern Option Kak40GSHintText;
extern Option Kak50GSHintText;
extern Option ScrubHintText;
extern Option WarpSongHints;
extern Option DamageMultiplier; extern Option DamageMultiplier;
extern Option StartingTime; extern Option StartingTime;
extern Option ChestAnimations; extern Option ChestAnimations;

View File

@ -306,7 +306,7 @@ static void WriteShuffledEntrance(std::string sphereString, Entrance* entrance)
std::string name = entrance->GetName(); std::string name = entrance->GetName();
std::string text = entrance->GetConnectedRegion()->regionName + " from " + entrance->GetReplacement()->GetParentRegion()->regionName; std::string text = entrance->GetConnectedRegion()->regionName + " from " + entrance->GetReplacement()->GetParentRegion()->regionName;
if (entrance->GetReverse() != nullptr && !Settings::DecoupleEntrances) { if (entrance->GetReverse() != nullptr && !entrance->IsDecoupled()) {
destinationIndex = entrance->GetReverse()->GetIndex(); destinationIndex = entrance->GetReverse()->GetIndex();
replacementDestinationIndex = entrance->GetReplacement()->GetReverse()->GetIndex(); replacementDestinationIndex = entrance->GetReplacement()->GetReverse()->GetIndex();
replacementBlueWarp = entrance->GetReplacement()->GetReverse()->GetBlueWarp(); replacementBlueWarp = entrance->GetReplacement()->GetReverse()->GetBlueWarp();
@ -323,7 +323,7 @@ static void WriteShuffledEntrance(std::string sphereString, Entrance* entrance)
jsonData["entrances"].push_back(entranceJson); jsonData["entrances"].push_back(entranceJson);
// When decoupled entrances is off, handle saving reverse entrances with blue warps // When decoupled entrances is off, handle saving reverse entrances with blue warps
if (entrance->GetReverse() != nullptr && !Settings::DecoupleEntrances) { if (entrance->GetReverse() != nullptr && !entrance->IsDecoupled()) {
json reverseEntranceJson = json::object({ json reverseEntranceJson = json::object({
{"index", replacementDestinationIndex}, {"index", replacementDestinationIndex},
{"destination", replacementIndex}, {"destination", replacementIndex},
@ -435,6 +435,26 @@ static void WriteStartingInventory() {
&Settings::startingOthersOptions &Settings::startingOthersOptions
}; };
for (std::vector<Option*>* menu : startingInventoryOptions) {
for (size_t i = 0; i < menu->size(); ++i) {
const auto setting = menu->at(i);
// Starting Songs
if (setting->GetName() == "Start with Zelda's Lullaby" ||
setting->GetName() == "Start with Epona's Song" ||
setting->GetName() == "Start with Saria's Song" ||
setting->GetName() == "Start with Sun's Song" ||
setting->GetName() == "Start with Song of Time" ||
setting->GetName() == "Start with Song of Storms" ||
setting->GetName() == "Start with Minuet of Forest" ||
setting->GetName() == "Start with Bolero of Fire" ||
setting->GetName() == "Start with Serenade of Water" ||
setting->GetName() == "Start with Requiem of Spirit" ||
setting->GetName() == "Start with Nocturne of Shadow" ||
setting->GetName() == "Start with Prelude of Light") {
jsonData["settings"][setting->GetName()] = setting->GetSelectedOptionText();
}
}
}
for (std::vector<Option *>* menu : startingInventoryOptions) { for (std::vector<Option *>* menu : startingInventoryOptions) {
for (size_t i = 0; i < menu->size(); ++i) { for (size_t i = 0; i < menu->size(); ++i) {
const auto setting = menu->at(i); const auto setting = menu->at(i);
@ -628,12 +648,14 @@ std::string AutoFormatHintTextString(std::string unformattedHintTextString) {
static void WriteHints(int language) { static void WriteHints(int language) {
std::string unformattedGanonText; std::string unformattedGanonText;
std::string unformattedGanonHintText; std::string unformattedGanonHintText;
std::string unformattedDampesText;
switch (language) { switch (language) {
case 0: case 0:
default: default:
unformattedGanonText = GetGanonText().GetEnglish(); unformattedGanonText = GetGanonText().GetEnglish();
unformattedGanonHintText = GetGanonHintText().GetEnglish(); unformattedGanonHintText = GetGanonHintText().GetEnglish();
unformattedDampesText = GetDampeHintText().GetEnglish();
jsonData["warpMinuetText"] = GetWarpMinuetText().GetEnglish(); jsonData["warpMinuetText"] = GetWarpMinuetText().GetEnglish();
jsonData["warpBoleroText"] = GetWarpBoleroText().GetEnglish(); jsonData["warpBoleroText"] = GetWarpBoleroText().GetEnglish();
jsonData["warpSerenadeText"] = GetWarpSerenadeText().GetEnglish(); jsonData["warpSerenadeText"] = GetWarpSerenadeText().GetEnglish();
@ -646,6 +668,7 @@ static void WriteHints(int language) {
case 2: case 2:
unformattedGanonText = GetGanonText().GetFrench(); unformattedGanonText = GetGanonText().GetFrench();
unformattedGanonHintText = GetGanonHintText().GetFrench(); unformattedGanonHintText = GetGanonHintText().GetFrench();
unformattedDampesText = GetDampeHintText().GetFrench();
jsonData["warpMinuetText"] = GetWarpMinuetText().GetFrench(); jsonData["warpMinuetText"] = GetWarpMinuetText().GetFrench();
jsonData["warpBoleroText"] = GetWarpBoleroText().GetFrench(); jsonData["warpBoleroText"] = GetWarpBoleroText().GetFrench();
jsonData["warpSerenadeText"] = GetWarpSerenadeText().GetFrench(); jsonData["warpSerenadeText"] = GetWarpSerenadeText().GetFrench();
@ -659,9 +682,11 @@ static void WriteHints(int language) {
std::string ganonText = AutoFormatHintTextString(unformattedGanonText); std::string ganonText = AutoFormatHintTextString(unformattedGanonText);
std::string ganonHintText = AutoFormatHintTextString(unformattedGanonHintText); std::string ganonHintText = AutoFormatHintTextString(unformattedGanonHintText);
std::string dampesText = AutoFormatHintTextString(unformattedDampesText);
jsonData["ganonText"] = ganonText; jsonData["ganonText"] = ganonText;
jsonData["ganonHintText"] = ganonHintText; jsonData["ganonHintText"] = ganonHintText;
jsonData["dampeText"] = dampesText;
if (Settings::GossipStoneHints.Is(HINTS_NO_HINTS)) { if (Settings::GossipStoneHints.Is(HINTS_NO_HINTS)) {
return; return;

View File

@ -1,4 +1,4 @@
#include <Cvar.h> #include <libultraship/bridge.h>
#include "draw.h" #include "draw.h"
#include "z64.h" #include "z64.h"
#include "macros.h" #include "macros.h"
@ -12,7 +12,7 @@
extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry) { extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry) {
s32 pad; s32 pad;
s8 isColoredKeysEnabled = CVar_GetS32("gRandoMatchKeyColors", 0); s8 isColoredKeysEnabled = CVarGetInteger("gRandoMatchKeyColors", 0);
s16 color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_SMALL_KEY; s16 color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_SMALL_KEY;
s16 colors[9][3] = { s16 colors[9][3] = {
{ 4, 195, 46 }, // Forest Temple { 4, 195, 46 }, // Forest Temple
@ -49,7 +49,7 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn
extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry) { extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry) {
s32 pad; s32 pad;
s8 isColoredKeysEnabled = CVar_GetS32("gRandoMatchKeyColors", 0); s8 isColoredKeysEnabled = CVarGetInteger("gRandoMatchKeyColors", 0);
s16 color_slot; s16 color_slot;
color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_BOSS_KEY; color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_BOSS_KEY;
s16 colors[6][3] = { s16 colors[6][3] = {

View File

@ -6,7 +6,7 @@
#include <macros.h> #include <macros.h>
#include <objects/gameplay_keep/gameplay_keep.h> #include <objects/gameplay_keep/gameplay_keep.h>
#include <functions.h> #include <functions.h>
#include <Cvar.h> #include <libultraship/bridge.h>
#include <textures/icon_item_static/icon_item_static.h> #include <textures/icon_item_static/icon_item_static.h>
#include <textures/icon_item_24_static/icon_item_24_static.h> #include <textures/icon_item_24_static/icon_item_24_static.h>
#include <ImGuiImpl.h> #include <ImGuiImpl.h>
@ -46,6 +46,7 @@ const std::string Randomizer::merchantMessageTableID = "RandomizerMerchants";
const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees"; const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees";
const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi"; const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi";
const std::string Randomizer::IceTrapRandoMessageTableID = "RandomizerIceTrap"; const std::string Randomizer::IceTrapRandoMessageTableID = "RandomizerIceTrap";
const std::string Randomizer::randoMiscHintsTableID = "RandomizerMiscHints";
static const char* englishRupeeNames[81] = { static const char* englishRupeeNames[81] = {
"Rupees", "Bitcoin", "Bananas", "Cornflakes", "Gummybears", "Floopies", "Dollars", "Rupees", "Bitcoin", "Bananas", "Cornflakes", "Gummybears", "Floopies", "Dollars",
@ -208,6 +209,18 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
{ "Start with Deku Shield", RSK_STARTING_DEKU_SHIELD }, { "Start with Deku Shield", RSK_STARTING_DEKU_SHIELD },
{ "Start with Kokiri Sword", RSK_STARTING_KOKIRI_SWORD }, { "Start with Kokiri Sword", RSK_STARTING_KOKIRI_SWORD },
{ "Start with Fairy Ocarina", RSK_STARTING_OCARINA }, { "Start with Fairy Ocarina", RSK_STARTING_OCARINA },
{ "Start with Zelda's Lullaby", RSK_STARTING_ZELDAS_LULLABY },
{ "Start with Epona's Song", RSK_STARTING_EPONAS_SONG },
{ "Start with Saria's Song", RSK_STARTING_SARIAS_SONG },
{ "Start with Sun's Song", RSK_STARTING_SUNS_SONG },
{ "Start with Song of Time", RSK_STARTING_SONG_OF_TIME },
{ "Start with Song of Storms", RSK_STARTING_SONG_OF_STORMS },
{ "Start with Minuet of Forest", RSK_STARTING_MINUET_OF_FOREST },
{ "Start with Bolero of Fire", RSK_STARTING_BOLERO_OF_FIRE },
{ "Start with Serenade of Water", RSK_STARTING_SERENADE_OF_WATER },
{ "Start with Requiem of Spirit", RSK_STARTING_REQUIEM_OF_SPIRIT },
{ "Start with Nocturne of Shadow", RSK_STARTING_NOCTURNE_OF_SHADOW },
{ "Start with Prelude of Light", RSK_STARTING_PRELUDE_OF_LIGHT },
{ "Shuffle Dungeon Items:Maps/Compasses", RSK_STARTING_MAPS_COMPASSES }, { "Shuffle Dungeon Items:Maps/Compasses", RSK_STARTING_MAPS_COMPASSES },
{ "Shuffle Dungeon Items:Small Keys", RSK_KEYSANITY }, { "Shuffle Dungeon Items:Small Keys", RSK_KEYSANITY },
{ "Shuffle Dungeon Items:Gerudo Fortress Keys", RSK_GERUDO_KEYS }, { "Shuffle Dungeon Items:Gerudo Fortress Keys", RSK_GERUDO_KEYS },
@ -223,6 +236,7 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
{ "World Settings:Bombchus in Logic", RSK_BOMBCHUS_IN_LOGIC }, { "World Settings:Bombchus in Logic", RSK_BOMBCHUS_IN_LOGIC },
{ "World Settings:Shuffle Entrances", RSK_SHUFFLE_ENTRANCES }, { "World Settings:Shuffle Entrances", RSK_SHUFFLE_ENTRANCES },
{ "World Settings:Dungeon Entrances", RSK_SHUFFLE_DUNGEON_ENTRANCES }, { "World Settings:Dungeon Entrances", RSK_SHUFFLE_DUNGEON_ENTRANCES },
{ "World Settings:Boss Entrances", RSK_SHUFFLE_BOSS_ENTRANCES },
{ "World Settings:Overworld Entrances", RSK_SHUFFLE_OVERWORLD_ENTRANCES }, { "World Settings:Overworld Entrances", RSK_SHUFFLE_OVERWORLD_ENTRANCES },
{ "World Settings:Interior Entrances", RSK_SHUFFLE_INTERIOR_ENTRANCES }, { "World Settings:Interior Entrances", RSK_SHUFFLE_INTERIOR_ENTRANCES },
{ "World Settings:Grottos Entrances", RSK_SHUFFLE_GROTTO_ENTRANCES }, { "World Settings:Grottos Entrances", RSK_SHUFFLE_GROTTO_ENTRANCES },
@ -237,6 +251,16 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
{ "World Settings:Decouple Entrances", RSK_DECOUPLED_ENTRANCES }, { "World Settings:Decouple Entrances", RSK_DECOUPLED_ENTRANCES },
{ "Misc Settings:Gossip Stone Hints", RSK_GOSSIP_STONE_HINTS }, { "Misc Settings:Gossip Stone Hints", RSK_GOSSIP_STONE_HINTS },
{ "Misc Settings:Hint Clarity", RSK_HINT_CLARITY }, { "Misc Settings:Hint Clarity", RSK_HINT_CLARITY },
{ "Misc Settings:ToT Altar Hint", RSK_TOT_ALTAR_HINT },
{ "Misc Settings:Ganondorf LA Hint", RSK_GANONDORF_LIGHT_ARROWS_HINT },
{ "Misc Settings:Dampe's Diary Hint", RSK_DAMPES_DIARY_HINT },
{ "Misc Settings:10 GS Hint", RSK_KAK_10_SKULLS_HINT },
{ "Misc Settings:20 GS Hint", RSK_KAK_20_SKULLS_HINT },
{ "Misc Settings:30 GS Hint", RSK_KAK_30_SKULLS_HINT },
{ "Misc Settings:40 GS Hint", RSK_KAK_40_SKULLS_HINT },
{ "Misc Settings:50 GS Hint", RSK_KAK_50_SKULLS_HINT },
{ "Misc Settings:Warp Song Hints", RSK_WARP_SONG_HINTS },
{ "Misc Settings:Scrub Hint Text", RSK_SCRUB_TEXT_HINT },
{ "Misc Settings:Hint Distribution", RSK_HINT_DISTRIBUTION }, { "Misc Settings:Hint Distribution", RSK_HINT_DISTRIBUTION },
{ "Misc Settings:Blue Fire Arrows", RSK_BLUE_FIRE_ARROWS }, { "Misc Settings:Blue Fire Arrows", RSK_BLUE_FIRE_ARROWS },
{ "Misc Settings:Sunlight Arrows", RSK_SUNLIGHT_ARROWS }, { "Misc Settings:Sunlight Arrows", RSK_SUNLIGHT_ARROWS },
@ -339,6 +363,29 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) {
Randomizer::hintMessageTableID, hintLocation.check, { TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM, hintLocation.hintText, hintLocation.hintText, hintLocation.hintText }); Randomizer::hintMessageTableID, hintLocation.check, { TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM, hintLocation.hintText, hintLocation.hintText, hintLocation.hintText });
} }
//Extra Hints
CustomMessageManager::Instance->ClearMessageTable(Randomizer::randoMiscHintsTableID);
CustomMessageManager::Instance->AddCustomMessageTable(Randomizer::randoMiscHintsTableID);
CustomMessageManager::Instance->CreateMessage(
Randomizer::randoMiscHintsTableID, TEXT_CURSED_SKULLTULA_PEOPLE,
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
"Yeaaarrgh! I'm cursed!!^Please save me by destroying&%r{{params}} Spiders of the Curse%w&and I will give you my&%b{{check}}%w!",
"Yeaaarrgh! Ich bin verflucht!^Bitte rette mich, indem du %r{{params}} Skulltulas&%wzerstörst und ich werde dir dafür&%b{{check}} %wgeben!",
"Yeaaarrgh! Je suis maudit!^Détruit encore %r{{params}} Araignées de&la Malédiction%w et j'aurai quelque&chose à te donner!&%b({{check}})",
}
);
CustomMessageManager::Instance->CreateMessage(
Randomizer::randoMiscHintsTableID, TEXT_DAMPES_DIARY,
{
TEXTBOX_TYPE_BLUE,
TEXTBOX_POS_TOP,
gSaveContext.dampeText,
gSaveContext.dampeText,
gSaveContext.dampeText
}
);
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_WARP_RANDOM_REPLACED_TEXT, CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_WARP_RANDOM_REPLACED_TEXT,
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
"Warp to&{{location}}?\x1B&%gOK&No%w\x02", "Warp to&{{location}}?\x1B&%gOK&No%w\x02",
@ -674,12 +721,34 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
case RSK_RANDOM_MQ_DUNGEONS: case RSK_RANDOM_MQ_DUNGEONS:
case RSK_STARTING_DEKU_SHIELD: case RSK_STARTING_DEKU_SHIELD:
case RSK_STARTING_KOKIRI_SWORD: case RSK_STARTING_KOKIRI_SWORD:
case RSK_STARTING_ZELDAS_LULLABY:
case RSK_STARTING_EPONAS_SONG:
case RSK_STARTING_SARIAS_SONG:
case RSK_STARTING_SUNS_SONG:
case RSK_STARTING_SONG_OF_TIME:
case RSK_STARTING_SONG_OF_STORMS:
case RSK_STARTING_MINUET_OF_FOREST:
case RSK_STARTING_BOLERO_OF_FIRE:
case RSK_STARTING_SERENADE_OF_WATER:
case RSK_STARTING_REQUIEM_OF_SPIRIT:
case RSK_STARTING_NOCTURNE_OF_SHADOW:
case RSK_STARTING_PRELUDE_OF_LIGHT:
case RSK_COMPLETE_MASK_QUEST: case RSK_COMPLETE_MASK_QUEST:
case RSK_SKIP_SCARECROWS_SONG: case RSK_SKIP_SCARECROWS_SONG:
case RSK_ENABLE_GLITCH_CUTSCENES: case RSK_ENABLE_GLITCH_CUTSCENES:
case RSK_BLUE_FIRE_ARROWS: case RSK_BLUE_FIRE_ARROWS:
case RSK_SUNLIGHT_ARROWS: case RSK_SUNLIGHT_ARROWS:
case RSK_BOMBCHUS_IN_LOGIC: case RSK_BOMBCHUS_IN_LOGIC:
case RSK_TOT_ALTAR_HINT:
case RSK_GANONDORF_LIGHT_ARROWS_HINT:
case RSK_DAMPES_DIARY_HINT:
case RSK_KAK_10_SKULLS_HINT:
case RSK_KAK_20_SKULLS_HINT:
case RSK_KAK_30_SKULLS_HINT:
case RSK_KAK_40_SKULLS_HINT:
case RSK_KAK_50_SKULLS_HINT:
case RSK_WARP_SONG_HINTS:
case RSK_SCRUB_TEXT_HINT:
case RSK_SHUFFLE_ENTRANCES: case RSK_SHUFFLE_ENTRANCES:
case RSK_SHUFFLE_OVERWORLD_ENTRANCES: case RSK_SHUFFLE_OVERWORLD_ENTRANCES:
case RSK_SHUFFLE_GROTTO_ENTRANCES: case RSK_SHUFFLE_GROTTO_ENTRANCES:
@ -919,6 +988,15 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
gSaveContext.randoSettings[index].value = RO_DUNGEON_ENTRANCE_SHUFFLE_ON_PLUS_GANON; gSaveContext.randoSettings[index].value = RO_DUNGEON_ENTRANCE_SHUFFLE_ON_PLUS_GANON;
} }
break; break;
case RSK_SHUFFLE_BOSS_ENTRANCES:
if (it.value() == "Off") {
gSaveContext.randoSettings[index].value = RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF;
} else if (it.value() == "Age Restricted") {
gSaveContext.randoSettings[index].value = RO_BOSS_ROOM_ENTRANCE_SHUFFLE_AGE_RESTRICTED;
} else if (it.value() == "Full") {
gSaveContext.randoSettings[index].value = RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL;
}
break;
case RSK_SHUFFLE_INTERIOR_ENTRANCES: case RSK_SHUFFLE_INTERIOR_ENTRANCES:
if (it.value() == "Off") { if (it.value() == "Off") {
gSaveContext.randoSettings[index].value = RO_INTERIOR_ENTRANCE_SHUFFLE_OFF; gSaveContext.randoSettings[index].value = RO_INTERIOR_ENTRANCE_SHUFFLE_OFF;
@ -1077,6 +1155,11 @@ void Randomizer::ParseHintLocationsFile(const char* spoilerFileName) {
strncpy(gSaveContext.ganonText, formattedGanonJsonText.c_str(), sizeof(gSaveContext.ganonText) - 1); strncpy(gSaveContext.ganonText, formattedGanonJsonText.c_str(), sizeof(gSaveContext.ganonText) - 1);
gSaveContext.ganonText[sizeof(gSaveContext.ganonText) - 1] = 0; gSaveContext.ganonText[sizeof(gSaveContext.ganonText) - 1] = 0;
std::string dampeJsonText = spoilerFileJson["dampeText"].get<std::string>();
std::string formattedDampeJsonText = FormatJsonHintText(dampeJsonText);
strncpy(gSaveContext.dampeText, formattedDampeJsonText.c_str(), sizeof(gSaveContext.dampeText) - 1);
gSaveContext.dampeText[sizeof(gSaveContext.dampeText) - 1] = 0;
std::string warpMinuetJsonText = spoilerFileJson["warpMinuetText"].get<std::string>(); std::string warpMinuetJsonText = spoilerFileJson["warpMinuetText"].get<std::string>();
strncpy(gSaveContext.warpMinuetText, warpMinuetJsonText.c_str(), sizeof(gSaveContext.warpMinuetText) - 1); strncpy(gSaveContext.warpMinuetText, warpMinuetJsonText.c_str(), sizeof(gSaveContext.warpMinuetText) - 1);
gSaveContext.warpMinuetText[sizeof(gSaveContext.warpMinuetText) - 1] = 0; gSaveContext.warpMinuetText[sizeof(gSaveContext.warpMinuetText) - 1] = 0;
@ -2260,6 +2343,10 @@ std::string Randomizer::GetGanonHintText() const {
return ganonHintText; return ganonHintText;
} }
std::string Randomizer::GetDampeText() const {
return dampeText;
}
// There has been some talk about potentially just using the RC identifier to store flags rather than randomizer inf, so // There has been some talk about potentially just using the RC identifier to store flags rather than randomizer inf, so
// for now we're not going to store randomzierInf in the randomizer check objects, we're just going to map them 1:1 here // for now we're not going to store randomzierInf in the randomizer check objects, we're just going to map them 1:1 here
std::map<RandomizerCheck, RandomizerInf> rcToRandomizerInf = { std::map<RandomizerCheck, RandomizerInf> rcToRandomizerInf = {
@ -2430,6 +2517,17 @@ RandomizerCheckObject Randomizer::GetCheckObjectFromActor(s16 actorId, s16 scene
break; break;
} }
break; break;
case SCENE_KINSUTA:
if (actorId == ACTOR_EN_SSH) {
switch (actorParams) { // actor params are used to differentiate between textboxes
case 1: specialRc = RC_KAK_10_GOLD_SKULLTULA_REWARD; break;
case 2: specialRc = RC_KAK_20_GOLD_SKULLTULA_REWARD; break;
case 3: specialRc = RC_KAK_30_GOLD_SKULLTULA_REWARD; break;
case 4: specialRc = RC_KAK_40_GOLD_SKULLTULA_REWARD; break;
case 5: specialRc = RC_KAK_50_GOLD_SKULLTULA_REWARD; break;
}
}
break;
case SCENE_SPOT01: case SCENE_SPOT01:
switch (actorId) { switch (actorId) {
case ACTOR_EN_NIW_LADY: case ACTOR_EN_NIW_LADY:
@ -2643,112 +2741,133 @@ RandomizerCheck Randomizer::GetCheckFromRandomizerInf(RandomizerInf randomizerIn
std::thread randoThread; std::thread randoThread;
void GenerateRandomizerImgui() { void GenerateRandomizerImgui() {
CVar_SetS32("gRandoGenerating", 1); CVarSetInteger("gRandoGenerating", 1);
CVar_Save(); CVarSave();
std::unordered_map<RandomizerSettingKey, u8> cvarSettings; std::unordered_map<RandomizerSettingKey, u8> cvarSettings;
cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS); cvarSettings[RSK_LOGIC_RULES] = CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS);
cvarSettings[RSK_ALL_LOCATIONS_REACHABLE] = CVar_GetS32("gRandomizeAllLocationsReachable", RO_GENERIC_ON); cvarSettings[RSK_ALL_LOCATIONS_REACHABLE] = CVarGetInteger("gRandomizeAllLocationsReachable", RO_GENERIC_ON);
cvarSettings[RSK_FOREST] = CVar_GetS32("gRandomizeForest", RO_FOREST_CLOSED); cvarSettings[RSK_FOREST] = CVarGetInteger("gRandomizeForest", RO_FOREST_CLOSED);
cvarSettings[RSK_KAK_GATE] = CVar_GetS32("gRandomizeKakarikoGate", RO_KAK_GATE_CLOSED); cvarSettings[RSK_KAK_GATE] = CVarGetInteger("gRandomizeKakarikoGate", RO_KAK_GATE_CLOSED);
cvarSettings[RSK_DOOR_OF_TIME] = CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED); cvarSettings[RSK_DOOR_OF_TIME] = CVarGetInteger("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED);
cvarSettings[RSK_ZORAS_FOUNTAIN] = CVar_GetS32("gRandomizeZorasFountain", 0); cvarSettings[RSK_ZORAS_FOUNTAIN] = CVarGetInteger("gRandomizeZorasFountain", 0);
cvarSettings[RSK_STARTING_AGE] = CVar_GetS32("gRandomizeStartingAge", RO_AGE_CHILD); cvarSettings[RSK_STARTING_AGE] = CVarGetInteger("gRandomizeStartingAge", RO_AGE_CHILD);
cvarSettings[RSK_GERUDO_FORTRESS] = CVar_GetS32("gRandomizeGerudoFortress", RO_GF_NORMAL); cvarSettings[RSK_GERUDO_FORTRESS] = CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL);
cvarSettings[RSK_RAINBOW_BRIDGE] = CVar_GetS32("gRandomizeRainbowBridge", RO_BRIDGE_VANILLA); cvarSettings[RSK_RAINBOW_BRIDGE] = CVarGetInteger("gRandomizeRainbowBridge", RO_BRIDGE_VANILLA);
cvarSettings[RSK_RAINBOW_BRIDGE_STONE_COUNT] = CVar_GetS32("gRandomizeStoneCount", 3); cvarSettings[RSK_RAINBOW_BRIDGE_STONE_COUNT] = CVarGetInteger("gRandomizeStoneCount", 3);
cvarSettings[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = CVar_GetS32("gRandomizeMedallionCount", 6); cvarSettings[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = CVarGetInteger("gRandomizeMedallionCount", 6);
cvarSettings[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = CVar_GetS32("gRandomizeRewardCount", 9); cvarSettings[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = CVarGetInteger("gRandomizeRewardCount", 9);
cvarSettings[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = CVar_GetS32("gRandomizeDungeonCount", 8); cvarSettings[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = CVarGetInteger("gRandomizeDungeonCount", 8);
cvarSettings[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = CVar_GetS32("gRandomizeTokenCount", 100); cvarSettings[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = CVarGetInteger("gRandomizeTokenCount", 100);
cvarSettings[RSK_GANONS_TRIALS] = CVar_GetS32("gRandomizeGanonTrial", RO_GANONS_TRIALS_SET_NUMBER); cvarSettings[RSK_GANONS_TRIALS] = CVarGetInteger("gRandomizeGanonTrial", RO_GANONS_TRIALS_SET_NUMBER);
cvarSettings[RSK_TRIAL_COUNT] = CVar_GetS32("gRandomizeGanonTrialCount", 6); cvarSettings[RSK_TRIAL_COUNT] = CVarGetInteger("gRandomizeGanonTrialCount", 6);
cvarSettings[RSK_STARTING_OCARINA] = CVar_GetS32("gRandomizeStartingOcarina", 0); cvarSettings[RSK_STARTING_OCARINA] = CVarGetInteger("gRandomizeStartingOcarina", 0);
cvarSettings[RSK_SHUFFLE_OCARINA] = CVar_GetS32("gRandomizeShuffleOcarinas", 0) || cvarSettings[RSK_SHUFFLE_OCARINA] = CVarGetInteger("gRandomizeShuffleOcarinas", 0) ||
CVar_GetS32("gRandomizeStartingOcarina", 0); CVarGetInteger("gRandomizeStartingOcarina", 0);
cvarSettings[RSK_STARTING_KOKIRI_SWORD] = CVar_GetS32("gRandomizeStartingKokiriSword", 0); cvarSettings[RSK_STARTING_KOKIRI_SWORD] = CVarGetInteger("gRandomizeStartingKokiriSword", 0);
cvarSettings[RSK_SHUFFLE_KOKIRI_SWORD] = CVar_GetS32("gRandomizeShuffleKokiriSword", 0) || cvarSettings[RSK_SHUFFLE_KOKIRI_SWORD] = CVarGetInteger("gRandomizeShuffleKokiriSword", 0) ||
CVar_GetS32("gRandomizeStartingKokiriSword", 0); CVarGetInteger("gRandomizeStartingKokiriSword", 0);
cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVar_GetS32("gRandomizeStartingDekuShield", 0); cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVarGetInteger("gRandomizeStartingDekuShield", 0);
cvarSettings[RSK_STARTING_SKULLTULA_TOKEN] = CVar_GetS32("gRandomizeStartingSkulltulaToken", 0); cvarSettings[RSK_STARTING_ZELDAS_LULLABY] = CVarGetInteger("gRandomizeStartingZeldasLullaby", 0);
cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVar_GetS32("gRandomizeStartingMapsCompasses", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); cvarSettings[RSK_STARTING_EPONAS_SONG] = CVarGetInteger("gRandomizeStartingEponasSong", 0);
cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVar_GetS32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON); cvarSettings[RSK_STARTING_SARIAS_SONG] = CVarGetInteger("gRandomizeStartingSariasSong", 0);
cvarSettings[RSK_SHUFFLE_SONGS] = CVar_GetS32("gRandomizeShuffleSongs", RO_SONG_SHUFFLE_SONG_LOCATIONS); cvarSettings[RSK_STARTING_SUNS_SONG] = CVarGetInteger("gRandomizeStartingSunsSong", 0);
cvarSettings[RSK_SHUFFLE_TOKENS] = CVar_GetS32("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF); cvarSettings[RSK_STARTING_SONG_OF_TIME] = CVarGetInteger("gRandomizeStartingSongOfTime", 0);
cvarSettings[RSK_SHOPSANITY] = CVar_GetS32("gRandomizeShopsanity", RO_SHOPSANITY_OFF); cvarSettings[RSK_STARTING_SONG_OF_STORMS] = CVarGetInteger("gRandomizeStartingSongOfStorms", 0);
cvarSettings[RSK_SHUFFLE_SCRUBS] = CVar_GetS32("gRandomizeShuffleScrubs", RO_SCRUBS_OFF); cvarSettings[RSK_STARTING_MINUET_OF_FOREST] = CVarGetInteger("gRandomizeStartingMinuetOfForest", 0);
cvarSettings[RSK_SHUFFLE_COWS] = CVar_GetS32("gRandomizeShuffleCows", 0); cvarSettings[RSK_STARTING_BOLERO_OF_FIRE] = CVarGetInteger("gRandomizeStartingBoleroOfFire", 0);
cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVar_GetS32("gRandomizeShuffleAdultTrade", 0); cvarSettings[RSK_STARTING_SERENADE_OF_WATER] = CVarGetInteger("gRandomizeStartingSerenadeOfWater", 0);
cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVar_GetS32("gRandomizeShuffleBeans", 0); cvarSettings[RSK_STARTING_REQUIEM_OF_SPIRIT] = CVarGetInteger("gRandomizeStartingRequiemOfSpirit", 0);
cvarSettings[RSK_SHUFFLE_MERCHANTS] = CVar_GetS32("gRandomizeShuffleMerchants", RO_SHUFFLE_MERCHANTS_OFF); cvarSettings[RSK_STARTING_NOCTURNE_OF_SHADOW] = CVarGetInteger("gRandomizeStartingNocturneOfShadow", 0);
cvarSettings[RSK_ENABLE_BOMBCHU_DROPS] = CVar_GetS32("gRandomizeEnableBombchuDrops", 0); cvarSettings[RSK_STARTING_PRELUDE_OF_LIGHT] = CVarGetInteger("gRandomizeStartingPreludeOfLight", 0);
cvarSettings[RSK_BOMBCHUS_IN_LOGIC] = CVar_GetS32("gRandomizeBombchusInLogic", 0); cvarSettings[RSK_STARTING_SKULLTULA_TOKEN] = CVarGetInteger("gRandomizeStartingSkulltulaToken", 0);
cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVar_GetS32("gRandomizeSkipChildZelda", 0); cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVarGetInteger("gRandomizeStartingMapsCompasses", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON);
cvarSettings[RSK_SHUFFLE_SONGS] = CVarGetInteger("gRandomizeShuffleSongs", RO_SONG_SHUFFLE_SONG_LOCATIONS);
cvarSettings[RSK_SHUFFLE_TOKENS] = CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF);
cvarSettings[RSK_SHOPSANITY] = CVarGetInteger("gRandomizeShopsanity", RO_SHOPSANITY_OFF);
cvarSettings[RSK_SHUFFLE_SCRUBS] = CVarGetInteger("gRandomizeShuffleScrubs", RO_SCRUBS_OFF);
cvarSettings[RSK_SHUFFLE_COWS] = CVarGetInteger("gRandomizeShuffleCows", 0);
cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVarGetInteger("gRandomizeShuffleAdultTrade", 0);
cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVarGetInteger("gRandomizeShuffleBeans", 0);
cvarSettings[RSK_SHUFFLE_MERCHANTS] = CVarGetInteger("gRandomizeShuffleMerchants", RO_SHUFFLE_MERCHANTS_OFF);
cvarSettings[RSK_ENABLE_BOMBCHU_DROPS] = CVarGetInteger("gRandomizeEnableBombchuDrops", 0);
cvarSettings[RSK_BOMBCHUS_IN_LOGIC] = CVarGetInteger("gRandomizeBombchusInLogic", 0);
cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVarGetInteger("gRandomizeSkipChildZelda", 0);
// if we skip child zelda, we start with zelda's letter, and malon starts // if we skip child zelda, we start with zelda's letter, and malon starts
// at the ranch, so we should *not* shuffle the weird egg // at the ranch, so we should *not* shuffle the weird egg
cvarSettings[RSK_SHUFFLE_WEIRD_EGG] = ((CVar_GetS32("gRandomizeSkipChildZelda", 0) == 0) && cvarSettings[RSK_SHUFFLE_WEIRD_EGG] = ((CVarGetInteger("gRandomizeSkipChildZelda", 0) == 0) &&
CVar_GetS32("gRandomizeShuffleWeirdEgg", 0)); CVarGetInteger("gRandomizeShuffleWeirdEgg", 0));
cvarSettings[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = CVarGetInteger("gRandomizeShuffleGerudoToken", 0);
cvarSettings[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = CVar_GetS32("gRandomizeShuffleGerudoToken", 0); cvarSettings[RSK_SHUFFLE_FROG_SONG_RUPEES] = CVarGetInteger("gRandomizeShuffleFrogSongRupees", 0);
cvarSettings[RSK_SHUFFLE_FROG_SONG_RUPEES] = CVar_GetS32("gRandomizeShuffleFrogSongRupees", 0); cvarSettings[RSK_ITEM_POOL] = CVarGetInteger("gRandomizeItemPool", RO_ITEM_POOL_BALANCED);
cvarSettings[RSK_ITEM_POOL] = CVar_GetS32("gRandomizeItemPool", RO_ITEM_POOL_BALANCED); cvarSettings[RSK_ICE_TRAPS] = CVarGetInteger("gRandomizeIceTraps", RO_ICE_TRAPS_NORMAL);
cvarSettings[RSK_ICE_TRAPS] = CVar_GetS32("gRandomizeIceTraps", RO_ICE_TRAPS_NORMAL); cvarSettings[RSK_TOT_ALTAR_HINT] = CVarGetInteger("gRandomizeAltarHint", RO_GENERIC_ON);
cvarSettings[RSK_GOSSIP_STONE_HINTS] = CVar_GetS32("gRandomizeGossipStoneHints", RO_GOSSIP_STONES_NEED_NOTHING); cvarSettings[RSK_GANONDORF_LIGHT_ARROWS_HINT] = CVarGetInteger("gRandomizeLAHint", RO_GENERIC_ON);
cvarSettings[RSK_HINT_CLARITY] = CVar_GetS32("gRandomizeHintClarity", RO_HINT_CLARITY_CLEAR); cvarSettings[RSK_DAMPES_DIARY_HINT] = CVarGetInteger("gRandomizeDampeHint", RO_GENERIC_OFF);
cvarSettings[RSK_HINT_DISTRIBUTION] = CVar_GetS32("gRandomizeHintDistribution", RO_HINT_DIST_BALANCED); cvarSettings[RSK_WARP_SONG_HINTS] = CVarGetInteger("gRandomizeWarpSongText", RO_GENERIC_OFF);
cvarSettings[RSK_BLUE_FIRE_ARROWS] = CVar_GetS32("gRandomizeBlueFireArrows", 0); cvarSettings[RSK_SCRUB_TEXT_HINT] = CVarGetInteger("gRandomizeScrubText", RO_GENERIC_OFF);
cvarSettings[RSK_SUNLIGHT_ARROWS] = CVar_GetS32("gRandomizeSunlightArrows", 0); cvarSettings[RSK_KAK_10_SKULLS_HINT] = CVarGetInteger("gRandomize10GSHint", RO_GENERIC_OFF);
cvarSettings[RSK_KEYSANITY] = CVar_GetS32("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); cvarSettings[RSK_KAK_20_SKULLS_HINT] = CVarGetInteger("gRandomize20GSHint", RO_GENERIC_OFF);
cvarSettings[RSK_GERUDO_KEYS] = CVar_GetS32("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA); cvarSettings[RSK_KAK_30_SKULLS_HINT] = CVarGetInteger("gRandomize30GSHint", RO_GENERIC_OFF);
cvarSettings[RSK_KEYRINGS] = CVar_GetS32("gRandomizeShuffleKeyRings", RO_KEYRINGS_OFF); cvarSettings[RSK_KAK_40_SKULLS_HINT] = CVarGetInteger("gRandomize40GSHint", RO_GENERIC_OFF);
cvarSettings[RSK_KEYRINGS_RANDOM_COUNT] = CVar_GetS32("gRandomizeShuffleKeyRingsRandomCount", 8); cvarSettings[RSK_KAK_50_SKULLS_HINT] = CVarGetInteger("gRandomize50GSHint", RO_GENERIC_OFF);
cvarSettings[RSK_KEYRINGS_FOREST_TEMPLE] = CVar_GetS32("gRandomizeShuffleKeyRingsForestTemple", 0); cvarSettings[RSK_GOSSIP_STONE_HINTS] = CVarGetInteger("gRandomizeGossipStoneHints", RO_GOSSIP_STONES_NEED_NOTHING);
cvarSettings[RSK_KEYRINGS_FIRE_TEMPLE] = CVar_GetS32("gRandomizeShuffleKeyRingsFireTemple", 0); cvarSettings[RSK_HINT_CLARITY] = CVarGetInteger("gRandomizeHintClarity", RO_HINT_CLARITY_CLEAR);
cvarSettings[RSK_KEYRINGS_WATER_TEMPLE] = CVar_GetS32("gRandomizeShuffleKeyRingsWaterTemple", 0); cvarSettings[RSK_HINT_DISTRIBUTION] = CVarGetInteger("gRandomizeHintDistribution", RO_HINT_DIST_BALANCED);
cvarSettings[RSK_KEYRINGS_SPIRIT_TEMPLE] = CVar_GetS32("gRandomizeShuffleKeyRingsSpiritTemple", 0); cvarSettings[RSK_BLUE_FIRE_ARROWS] = CVarGetInteger("gRandomizeBlueFireArrows", 0);
cvarSettings[RSK_KEYRINGS_SHADOW_TEMPLE] = CVar_GetS32("gRandomizeShuffleKeyRingsShadowTemple", 0); cvarSettings[RSK_SUNLIGHT_ARROWS] = CVarGetInteger("gRandomizeSunlightArrows", 0);
cvarSettings[RSK_KEYRINGS_BOTTOM_OF_THE_WELL] = CVar_GetS32("gRandomizeShuffleKeyRingsBottomOfTheWell", 0); cvarSettings[RSK_KEYSANITY] = CVarGetInteger("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
cvarSettings[RSK_KEYRINGS_GTG] = CVar_GetS32("gRandomizeShuffleKeyRingsGTG", 0); cvarSettings[RSK_GERUDO_KEYS] = CVarGetInteger("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA);
cvarSettings[RSK_KEYRINGS_GANONS_CASTLE] = CVar_GetS32("gRandomizeShuffleKeyRingsGanonsCastle", 0); cvarSettings[RSK_KEYRINGS] = CVarGetInteger("gRandomizeShuffleKeyRings", RO_KEYRINGS_OFF);
cvarSettings[RSK_BOSS_KEYSANITY] = CVar_GetS32("gRandomizeBossKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); cvarSettings[RSK_KEYRINGS_RANDOM_COUNT] = CVarGetInteger("gRandomizeShuffleKeyRingsRandomCount", 8);
cvarSettings[RSK_GANONS_BOSS_KEY] = CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA); cvarSettings[RSK_KEYRINGS_FOREST_TEMPLE] = CVarGetInteger("gRandomizeShuffleKeyRingsForestTemple", 0);
cvarSettings[RSK_LACS_STONE_COUNT] = CVar_GetS32("gRandomizeLacsStoneCount", 3); cvarSettings[RSK_KEYRINGS_FIRE_TEMPLE] = CVarGetInteger("gRandomizeShuffleKeyRingsFireTemple", 0);
cvarSettings[RSK_LACS_MEDALLION_COUNT] = CVar_GetS32("gRandomizeLacsMedallionCount", 6); cvarSettings[RSK_KEYRINGS_WATER_TEMPLE] = CVarGetInteger("gRandomizeShuffleKeyRingsWaterTemple", 0);
cvarSettings[RSK_LACS_REWARD_COUNT] = CVar_GetS32("gRandomizeLacsRewardCount", 9); cvarSettings[RSK_KEYRINGS_SPIRIT_TEMPLE] = CVarGetInteger("gRandomizeShuffleKeyRingsSpiritTemple", 0);
cvarSettings[RSK_LACS_DUNGEON_COUNT] = CVar_GetS32("gRandomizeLacsDungeonCount", 8); cvarSettings[RSK_KEYRINGS_SHADOW_TEMPLE] = CVarGetInteger("gRandomizeShuffleKeyRingsShadowTemple", 0);
cvarSettings[RSK_LACS_TOKEN_COUNT] = CVar_GetS32("gRandomizeLacsTokenCount", 100); cvarSettings[RSK_KEYRINGS_BOTTOM_OF_THE_WELL] = CVarGetInteger("gRandomizeShuffleKeyRingsBottomOfTheWell", 0);
cvarSettings[RSK_STARTING_CONSUMABLES] = CVar_GetS32("gRandomizeStartingConsumables", 0); cvarSettings[RSK_KEYRINGS_GTG] = CVarGetInteger("gRandomizeShuffleKeyRingsGTG", 0);
cvarSettings[RSK_FULL_WALLETS] = CVar_GetS32("gRandomizeFullWallets", 0); cvarSettings[RSK_KEYRINGS_GANONS_CASTLE] = CVarGetInteger("gRandomizeShuffleKeyRingsGanonsCastle", 0);
cvarSettings[RSK_BOSS_KEYSANITY] = CVarGetInteger("gRandomizeBossKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
cvarSettings[RSK_GANONS_BOSS_KEY] = CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA);
cvarSettings[RSK_LACS_STONE_COUNT] = CVarGetInteger("gRandomizeLacsStoneCount", 3);
cvarSettings[RSK_LACS_MEDALLION_COUNT] = CVarGetInteger("gRandomizeLacsMedallionCount", 6);
cvarSettings[RSK_LACS_REWARD_COUNT] = CVarGetInteger("gRandomizeLacsRewardCount", 9);
cvarSettings[RSK_LACS_DUNGEON_COUNT] = CVarGetInteger("gRandomizeLacsDungeonCount", 8);
cvarSettings[RSK_LACS_TOKEN_COUNT] = CVarGetInteger("gRandomizeLacsTokenCount", 100);
cvarSettings[RSK_STARTING_CONSUMABLES] = CVarGetInteger("gRandomizeStartingConsumables", 0);
cvarSettings[RSK_FULL_WALLETS] = CVarGetInteger("gRandomizeFullWallets", 0);
// RANDOTODO implement chest minigame shuffle with keysanity // RANDOTODO implement chest minigame shuffle with keysanity
cvarSettings[RSK_SHUFFLE_CHEST_MINIGAME] = false; cvarSettings[RSK_SHUFFLE_CHEST_MINIGAME] = false;
cvarSettings[RSK_LANGUAGE] = CVar_GetS32("gLanguages", 0); cvarSettings[RSK_LANGUAGE] = CVarGetInteger("gLanguages", 0);
cvarSettings[RSK_CUCCO_COUNT] = CVar_GetS32("gRandomizeCuccosToReturn", 7); cvarSettings[RSK_CUCCO_COUNT] = CVarGetInteger("gRandomizeCuccosToReturn", 7);
cvarSettings[RSK_BIG_POE_COUNT] = CVar_GetS32("gRandomizeBigPoeTargetCount", 10); cvarSettings[RSK_BIG_POE_COUNT] = CVarGetInteger("gRandomizeBigPoeTargetCount", 10);
// If we skip child zelda, skip child stealth is pointless, so this needs to be reflected in the spoiler log // If we skip child zelda, skip child stealth is pointless, so this needs to be reflected in the spoiler log
cvarSettings[RSK_SKIP_CHILD_STEALTH] = cvarSettings[RSK_SKIP_CHILD_STEALTH] =
!CVar_GetS32("gRandomizeSkipChildZelda", 0) && CVar_GetS32("gRandomizeSkipChildStealth", 0); !CVarGetInteger("gRandomizeSkipChildZelda", 0) && CVarGetInteger("gRandomizeSkipChildStealth", 0);
cvarSettings[RSK_SKIP_EPONA_RACE] = CVar_GetS32("gRandomizeSkipEponaRace", 0); cvarSettings[RSK_SKIP_EPONA_RACE] = CVarGetInteger("gRandomizeSkipEponaRace", 0);
cvarSettings[RSK_SKIP_TOWER_ESCAPE] = CVar_GetS32("gRandomizeSkipTowerEscape", 0); cvarSettings[RSK_SKIP_TOWER_ESCAPE] = CVarGetInteger("gRandomizeSkipTowerEscape", 0);
cvarSettings[RSK_COMPLETE_MASK_QUEST] = CVar_GetS32("gRandomizeCompleteMaskQuest", 0); cvarSettings[RSK_COMPLETE_MASK_QUEST] = CVarGetInteger("gRandomizeCompleteMaskQuest", 0);
cvarSettings[RSK_SKIP_SCARECROWS_SONG] = CVar_GetS32("gRandomizeSkipScarecrowsSong", 0); cvarSettings[RSK_SKIP_SCARECROWS_SONG] = CVarGetInteger("gRandomizeSkipScarecrowsSong", 0);
cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES] = CVar_GetS32("gRandomizeEnableGlitchCutscenes", 0); cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES] = CVarGetInteger("gRandomizeEnableGlitchCutscenes", 0);
cvarSettings[RSK_SKULLS_SUNS_SONG] = CVar_GetS32("gRandomizeGsExpectSunsSong", 0); cvarSettings[RSK_SKULLS_SUNS_SONG] = CVarGetInteger("gRandomizeGsExpectSunsSong", 0);
// Link's Pocket has to have a dungeon reward if the other rewards are shuffled to end of dungeon. // Link's Pocket has to have a dungeon reward if the other rewards are shuffled to end of dungeon.
cvarSettings[RSK_LINKS_POCKET] = CVar_GetS32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON ? cvarSettings[RSK_LINKS_POCKET] = CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON ?
CVar_GetS32("gRandomizeLinksPocket", RO_LINKS_POCKET_DUNGEON_REWARD) : CVarGetInteger("gRandomizeLinksPocket", RO_LINKS_POCKET_DUNGEON_REWARD) :
RO_LINKS_POCKET_DUNGEON_REWARD; RO_LINKS_POCKET_DUNGEON_REWARD;
if (OTRGlobals::Instance->HasMasterQuest() && OTRGlobals::Instance->HasOriginal()) { if (OTRGlobals::Instance->HasMasterQuest() && OTRGlobals::Instance->HasOriginal()) {
// If both OTRs are loaded. // If both OTRs are loaded.
cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = CVar_GetS32("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE); cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE);
cvarSettings[RSK_MQ_DUNGEON_COUNT] = CVar_GetS32("gRandomizeMqDungeonCount", 12); cvarSettings[RSK_MQ_DUNGEON_COUNT] = CVarGetInteger("gRandomizeMqDungeonCount", 12);
} else if (OTRGlobals::Instance->HasMasterQuest()) { } else if (OTRGlobals::Instance->HasMasterQuest()) {
// If only Master Quest is loaded. // If only Master Quest is loaded.
cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = RO_MQ_DUNGEONS_SET_NUMBER; cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = RO_MQ_DUNGEONS_SET_NUMBER;
@ -2760,31 +2879,33 @@ void GenerateRandomizerImgui() {
} }
// Enable if any of the entrance rando options are enabled. // Enable if any of the entrance rando options are enabled.
cvarSettings[RSK_SHUFFLE_ENTRANCES] = CVar_GetS32("gRandomizeShuffleDungeonsEntrances", RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) || cvarSettings[RSK_SHUFFLE_ENTRANCES] = CVarGetInteger("gRandomizeShuffleDungeonsEntrances", RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) ||
CVar_GetS32("gRandomizeShuffleOverworldEntrances", RO_GENERIC_OFF) || CVarGetInteger("gRandomizeShuffleBossEntrances", RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF) ||
CVar_GetS32("gRandomizeShuffleInteriorsEntrances", RO_INTERIOR_ENTRANCE_SHUFFLE_OFF) || CVarGetInteger("gRandomizeShuffleOverworldEntrances", RO_GENERIC_OFF) ||
CVar_GetS32("gRandomizeShuffleGrottosEntrances", RO_GENERIC_OFF) || CVarGetInteger("gRandomizeShuffleInteriorsEntrances", RO_INTERIOR_ENTRANCE_SHUFFLE_OFF) ||
CVar_GetS32("gRandomizeShuffleOwlDrops", RO_GENERIC_OFF) || CVarGetInteger("gRandomizeShuffleGrottosEntrances", RO_GENERIC_OFF) ||
CVar_GetS32("gRandomizeShuffleWarpSongs", RO_GENERIC_OFF) || CVarGetInteger("gRandomizeShuffleOwlDrops", RO_GENERIC_OFF) ||
CVar_GetS32("gRandomizeShuffleOverworldSpawns", RO_GENERIC_OFF); CVarGetInteger("gRandomizeShuffleWarpSongs", RO_GENERIC_OFF) ||
CVarGetInteger("gRandomizeShuffleOverworldSpawns", RO_GENERIC_OFF);
cvarSettings[RSK_SHUFFLE_DUNGEON_ENTRANCES] = CVar_GetS32("gRandomizeShuffleDungeonsEntrances", RO_DUNGEON_ENTRANCE_SHUFFLE_OFF); cvarSettings[RSK_SHUFFLE_DUNGEON_ENTRANCES] = CVarGetInteger("gRandomizeShuffleDungeonsEntrances", RO_DUNGEON_ENTRANCE_SHUFFLE_OFF);
cvarSettings[RSK_SHUFFLE_OVERWORLD_ENTRANCES] = CVar_GetS32("gRandomizeShuffleOverworldEntrances", RO_GENERIC_OFF); cvarSettings[RSK_SHUFFLE_BOSS_ENTRANCES] = CVarGetInteger("gRandomizeShuffleBossEntrances", RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF);
cvarSettings[RSK_SHUFFLE_INTERIOR_ENTRANCES] = CVar_GetS32("gRandomizeShuffleInteriorsEntrances", RO_INTERIOR_ENTRANCE_SHUFFLE_OFF); cvarSettings[RSK_SHUFFLE_OVERWORLD_ENTRANCES] = CVarGetInteger("gRandomizeShuffleOverworldEntrances", RO_GENERIC_OFF);
cvarSettings[RSK_SHUFFLE_GROTTO_ENTRANCES] = CVar_GetS32("gRandomizeShuffleGrottosEntrances", RO_GENERIC_OFF); cvarSettings[RSK_SHUFFLE_INTERIOR_ENTRANCES] = CVarGetInteger("gRandomizeShuffleInteriorsEntrances", RO_INTERIOR_ENTRANCE_SHUFFLE_OFF);
cvarSettings[RSK_SHUFFLE_OWL_DROPS] = CVar_GetS32("gRandomizeShuffleOwlDrops", RO_GENERIC_OFF); cvarSettings[RSK_SHUFFLE_GROTTO_ENTRANCES] = CVarGetInteger("gRandomizeShuffleGrottosEntrances", RO_GENERIC_OFF);
cvarSettings[RSK_SHUFFLE_WARP_SONGS] = CVar_GetS32("gRandomizeShuffleWarpSongs", RO_GENERIC_OFF); cvarSettings[RSK_SHUFFLE_OWL_DROPS] = CVarGetInteger("gRandomizeShuffleOwlDrops", RO_GENERIC_OFF);
cvarSettings[RSK_SHUFFLE_OVERWORLD_SPAWNS] = CVar_GetS32("gRandomizeShuffleOverworldSpawns", RO_GENERIC_OFF); cvarSettings[RSK_SHUFFLE_WARP_SONGS] = CVarGetInteger("gRandomizeShuffleWarpSongs", RO_GENERIC_OFF);
cvarSettings[RSK_MIXED_ENTRANCE_POOLS] = CVar_GetS32("gRandomizeMixedEntrances", RO_GENERIC_OFF); cvarSettings[RSK_SHUFFLE_OVERWORLD_SPAWNS] = CVarGetInteger("gRandomizeShuffleOverworldSpawns", RO_GENERIC_OFF);
cvarSettings[RSK_MIX_DUNGEON_ENTRANCES] = CVar_GetS32("gRandomizeMixDungeons", RO_GENERIC_OFF); cvarSettings[RSK_MIXED_ENTRANCE_POOLS] = CVarGetInteger("gRandomizeMixedEntrances", RO_GENERIC_OFF);
cvarSettings[RSK_MIX_OVERWORLD_ENTRANCES] = CVar_GetS32("gRandomizeMixOverworld", RO_GENERIC_OFF); cvarSettings[RSK_MIX_DUNGEON_ENTRANCES] = CVarGetInteger("gRandomizeMixDungeons", RO_GENERIC_OFF);
cvarSettings[RSK_MIX_INTERIOR_ENTRANCES] = CVar_GetS32("gRandomizeMixInteriors", RO_GENERIC_OFF); cvarSettings[RSK_MIX_OVERWORLD_ENTRANCES] = CVarGetInteger("gRandomizeMixOverworld", RO_GENERIC_OFF);
cvarSettings[RSK_MIX_GROTTO_ENTRANCES] = CVar_GetS32("gRandomizeMixGrottos", RO_GENERIC_OFF); cvarSettings[RSK_MIX_INTERIOR_ENTRANCES] = CVarGetInteger("gRandomizeMixInteriors", RO_GENERIC_OFF);
cvarSettings[RSK_DECOUPLED_ENTRANCES] = CVar_GetS32("gRandomizeDecoupleEntrances", RO_GENERIC_OFF); cvarSettings[RSK_MIX_GROTTO_ENTRANCES] = CVarGetInteger("gRandomizeMixGrottos", RO_GENERIC_OFF);
cvarSettings[RSK_DECOUPLED_ENTRANCES] = CVarGetInteger("gRandomizeDecoupleEntrances", RO_GENERIC_OFF);
// todo: this efficently when we build out cvar array support // todo: this efficently when we build out cvar array support
std::set<RandomizerCheck> excludedLocations; std::set<RandomizerCheck> excludedLocations;
std::stringstream excludedLocationStringStream(CVar_GetString("gRandomizeExcludedLocations", "")); std::stringstream excludedLocationStringStream(CVarGetString("gRandomizeExcludedLocations", ""));
std::string excludedLocationString; std::string excludedLocationString;
while (getline(excludedLocationStringStream, excludedLocationString, ',')) { while (getline(excludedLocationStringStream, excludedLocationString, ',')) {
excludedLocations.insert((RandomizerCheck)std::stoi(excludedLocationString)); excludedLocations.insert((RandomizerCheck)std::stoi(excludedLocationString));
@ -2792,9 +2913,9 @@ void GenerateRandomizerImgui() {
RandoMain::GenerateRando(cvarSettings, excludedLocations); RandoMain::GenerateRando(cvarSettings, excludedLocations);
CVar_SetS32("gRandoGenerating", 0); CVarSetInteger("gRandoGenerating", 0);
CVar_Save(); CVarSave();
CVar_Load(); CVarLoad();
generated = 1; generated = 1;
} }
@ -2806,7 +2927,7 @@ void DrawRandoEditor(bool& open) {
} }
if (!open) { if (!open) {
CVar_SetS32("gRandomizerSettingsEnabled", 0); CVarSetInteger("gRandomizerSettingsEnabled", 0);
return; return;
} }
@ -2828,6 +2949,7 @@ void DrawRandoEditor(bool& open) {
// World Settings // World Settings
static const char* randoStartingAge[3] = { "Child", "Adult", "Random" }; static const char* randoStartingAge[3] = { "Child", "Adult", "Random" };
static const char* randoShuffleDungeonsEntrances[3] = { "Off", "On", "On + Ganon" }; static const char* randoShuffleDungeonsEntrances[3] = { "Off", "On", "On + Ganon" };
static const char* randoShuffleBossEntrances[3] = { "Off", "Age Restricted", "Full" };
static const char* randoShuffleInteriorsEntrances[3] = { "Off", "Simple", "All" }; static const char* randoShuffleInteriorsEntrances[3] = { "Off", "Simple", "All" };
static const char* randoBombchusInLogic[2] = { "Off", "On" }; static const char* randoBombchusInLogic[2] = { "Off", "On" };
static const char* randoAmmoDrops[3] = { "On + Bombchu", "Off", "On" }; static const char* randoAmmoDrops[3] = { "On + Bombchu", "Off", "On" };
@ -2875,22 +2997,22 @@ void DrawRandoEditor(bool& open) {
DrawPresetSelector(PRESET_TYPE_RANDOMIZER); DrawPresetSelector(PRESET_TYPE_RANDOMIZER);
bool disableEditingRandoSettings = CVar_GetS32("gRandoGenerating", 0) || CVar_GetS32("gOnFileSelectNameEntry", 0); bool disableEditingRandoSettings = CVarGetInteger("gRandoGenerating", 0) || CVarGetInteger("gOnFileSelectNameEntry", 0);
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, disableEditingRandoSettings); ImGui::PushItemFlag(ImGuiItemFlags_Disabled, disableEditingRandoSettings);
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * (disableEditingRandoSettings ? 0.5f : 1.0f)); ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * (disableEditingRandoSettings ? 0.5f : 1.0f));
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
if (ImGui::Button("Generate Seed")) { if (ImGui::Button("Generate Seed")) {
if (CVar_GetS32("gRandoGenerating", 0) == 0) { if (CVarGetInteger("gRandoGenerating", 0) == 0) {
randoThread = std::thread(&GenerateRandomizerImgui); randoThread = std::thread(&GenerateRandomizerImgui);
} }
} }
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
std::string spoilerfilepath = CVar_GetString("gSpoilerLog", ""); std::string spoilerfilepath = CVarGetString("gSpoilerLog", "");
ImGui::Text("Spoiler File: %s", spoilerfilepath.c_str()); ImGui::Text("Spoiler File: %s", spoilerfilepath.c_str());
// RANDOTODO settings presets // RANDOTODO settings presets
// std::string presetfilepath = CVar_GetString("gLoadedPreset", ""); // std::string presetfilepath = CVarGetString("gLoadedPreset", "");
// ImGui::Text("Settings File: %s", presetfilepath.c_str()); // ImGui::Text("Settings File: %s", presetfilepath.c_str());
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();
@ -2990,10 +3112,10 @@ void DrawRandoEditor(bool& open) {
//Starting Age //Starting Age
//Disabled when Forest is set to Closed or under very specific conditions //Disabled when Forest is set to Closed or under very specific conditions
//RANDOTODO: Replace magic number checks with enums //RANDOTODO: Replace magic number checks with enums
bool disableRandoStartingAge = (CVar_GetS32("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) && bool disableRandoStartingAge = (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) &&
((CVar_GetS32("gRandomizeForest", RO_FOREST_CLOSED) == RO_FOREST_CLOSED) || ((CVarGetInteger("gRandomizeForest", RO_FOREST_CLOSED) == RO_FOREST_CLOSED) ||
((CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED) && ((CVarGetInteger("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED) &&
(CVar_GetS32("gRandomizeShuffleOcarinas", 0) == 0))); // ocarinas not shuffled (CVarGetInteger("gRandomizeShuffleOcarinas", 0) == 0))); // ocarinas not shuffled
static const char* disableRandoStartingAgeText = "This option is disabled due to other options making the game unbeatable."; static const char* disableRandoStartingAgeText = "This option is disabled due to other options making the game unbeatable.";
ImGui::Text(Settings::StartingAge.GetName().c_str()); ImGui::Text(Settings::StartingAge.GetName().c_str());
@ -3011,7 +3133,7 @@ void DrawRandoEditor(bool& open) {
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) { if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) {
ImGui::SetTooltip("%s", disableRandoStartingAgeText); ImGui::SetTooltip("%s", disableRandoStartingAgeText);
} }
CVar_SetS32("gRandomizeStartingAge", RO_AGE_CHILD); CVarSetInteger("gRandomizeStartingAge", RO_AGE_CHILD);
ImGui::PopStyleVar(1); ImGui::PopStyleVar(1);
ImGui::PopItemFlag(); ImGui::PopItemFlag();
} }
@ -3059,7 +3181,7 @@ void DrawRandoEditor(bool& open) {
UIWidgets::EnhancementCombobox("gRandomizeRainbowBridge", randoRainbowBridge, RO_BRIDGE_MAX, RO_BRIDGE_VANILLA); UIWidgets::EnhancementCombobox("gRandomizeRainbowBridge", randoRainbowBridge, RO_BRIDGE_MAX, RO_BRIDGE_VANILLA);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
switch (CVar_GetS32("gRandomizeRainbowBridge", RO_BRIDGE_VANILLA)) { switch (CVarGetInteger("gRandomizeRainbowBridge", RO_BRIDGE_VANILLA)) {
case RO_BRIDGE_ALWAYS_OPEN: case RO_BRIDGE_ALWAYS_OPEN:
break; break;
case RO_BRIDGE_VANILLA: case RO_BRIDGE_VANILLA:
@ -3108,7 +3230,7 @@ void DrawRandoEditor(bool& open) {
); );
UIWidgets::EnhancementCombobox("gRandomizeGanonTrial", randoGanonsTrial, RO_GANONS_TRIALS_MAX, RO_GANONS_TRIALS_SET_NUMBER); UIWidgets::EnhancementCombobox("gRandomizeGanonTrial", randoGanonsTrial, RO_GANONS_TRIALS_MAX, RO_GANONS_TRIALS_SET_NUMBER);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
if (CVar_GetS32("gRandomizeGanonTrial", RO_GANONS_TRIALS_SET_NUMBER) == RO_GANONS_TRIALS_SET_NUMBER) { if (CVarGetInteger("gRandomizeGanonTrial", RO_GANONS_TRIALS_SET_NUMBER) == RO_GANONS_TRIALS_SET_NUMBER) {
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
UIWidgets::EnhancementSliderInt("Ganon's Trial Count: %d", "##RandoTrialCount", UIWidgets::EnhancementSliderInt("Ganon's Trial Count: %d", "##RandoTrialCount",
"gRandomizeGanonTrialCount", 1, 6, "", 6, true); "gRandomizeGanonTrialCount", 1, 6, "", 6, true);
@ -3132,10 +3254,10 @@ void DrawRandoEditor(bool& open) {
); );
UIWidgets::EnhancementCombobox("gRandomizeMqDungeons", randoMqDungeons, RO_MQ_DUNGEONS_MAX, RO_MQ_DUNGEONS_NONE); UIWidgets::EnhancementCombobox("gRandomizeMqDungeons", randoMqDungeons, RO_MQ_DUNGEONS_MAX, RO_MQ_DUNGEONS_NONE);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
if (CVar_GetS32("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER) { if (CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER) {
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
UIWidgets::EnhancementSliderInt("Master Quest Dungeon Count: %d", "##RandoMqDungeonCount", UIWidgets::EnhancementSliderInt("Master Quest Dungeon Count: %d", "##RandoMqDungeonCount",
"gRandomizeMqDungeonCount", 1, 12, "", CVar_GetS32("gRandomizeMqDungeonCount", 12), true); "gRandomizeMqDungeonCount", 1, 12, "", CVarGetInteger("gRandomizeMqDungeonCount", 12), true);
} }
} }
@ -3164,6 +3286,19 @@ void DrawRandoEditor(bool& open) {
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();
// Shuffle Boss Entrances
ImGui::Text("Shuffle Boss Entrances");
UIWidgets::InsertHelpHoverText(
"Shuffle the pool of dungeon boss entrances. This affects the boss rooms of all stone and medallion dungeons.\n"
"\n"
"Age Restricted - Shuffle the entrances of child and adult boss rooms separately.\n"
"\n"
"Full - Shuffle the entrances of all boss rooms together. Child may be expected to defeat Phantom Ganon and/or Bongo Bongo."
);
UIWidgets::EnhancementCombobox("gRandomizeShuffleBossEntrances", randoShuffleBossEntrances, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_MAX, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF);
UIWidgets::PaddedSeparator();
// Shuffle Overworld Entrances // Shuffle Overworld Entrances
UIWidgets::EnhancementCheckbox("Shuffle Overworld Entrances", "gRandomizeShuffleOverworldEntrances"); UIWidgets::EnhancementCheckbox("Shuffle Overworld Entrances", "gRandomizeShuffleOverworldEntrances");
UIWidgets::InsertHelpHoverText( UIWidgets::InsertHelpHoverText(
@ -3253,26 +3388,26 @@ void DrawRandoEditor(bool& open) {
"vice versa, while overworld entrances are shuffled in their own separate pool and indoors stay vanilla." "vice versa, while overworld entrances are shuffled in their own separate pool and indoors stay vanilla."
); );
if (CVar_GetS32("gRandomizeMixedEntrances", RO_GENERIC_OFF)) { if (CVarGetInteger("gRandomizeMixedEntrances", RO_GENERIC_OFF)) {
if (CVar_GetS32("gRandomizeShuffleDungeonsEntrances", RO_GENERIC_OFF)) { if (CVarGetInteger("gRandomizeShuffleDungeonsEntrances", RO_GENERIC_OFF)) {
UIWidgets::Spacer(0); UIWidgets::Spacer(0);
ImGui::SetCursorPosX(20); ImGui::SetCursorPosX(20);
UIWidgets::EnhancementCheckbox("Mix Dungeons", "gRandomizeMixDungeons"); UIWidgets::EnhancementCheckbox("Mix Dungeons", "gRandomizeMixDungeons");
UIWidgets::InsertHelpHoverText("Dungeon entrances will be part of the mixed pool"); UIWidgets::InsertHelpHoverText("Dungeon entrances will be part of the mixed pool");
} }
if (CVar_GetS32("gRandomizeShuffleOverworldEntrances", RO_GENERIC_OFF)) { if (CVarGetInteger("gRandomizeShuffleOverworldEntrances", RO_GENERIC_OFF)) {
UIWidgets::Spacer(0); UIWidgets::Spacer(0);
ImGui::SetCursorPosX(20); ImGui::SetCursorPosX(20);
UIWidgets::EnhancementCheckbox("Mix Overworld", "gRandomizeMixOverworld"); UIWidgets::EnhancementCheckbox("Mix Overworld", "gRandomizeMixOverworld");
UIWidgets::InsertHelpHoverText("Overworld entrances will be part of the mixed pool"); UIWidgets::InsertHelpHoverText("Overworld entrances will be part of the mixed pool");
} }
if (CVar_GetS32("gRandomizeShuffleInteriorsEntrances", RO_GENERIC_OFF)) { if (CVarGetInteger("gRandomizeShuffleInteriorsEntrances", RO_GENERIC_OFF)) {
UIWidgets::Spacer(0); UIWidgets::Spacer(0);
ImGui::SetCursorPosX(20); ImGui::SetCursorPosX(20);
UIWidgets::EnhancementCheckbox("Mix Interiors", "gRandomizeMixInteriors"); UIWidgets::EnhancementCheckbox("Mix Interiors", "gRandomizeMixInteriors");
UIWidgets::InsertHelpHoverText("Interior entrances will be part of the mixed pool"); UIWidgets::InsertHelpHoverText("Interior entrances will be part of the mixed pool");
} }
if (CVar_GetS32("gRandomizeShuffleGrottosEntrances", RO_GENERIC_OFF)) { if (CVarGetInteger("gRandomizeShuffleGrottosEntrances", RO_GENERIC_OFF)) {
UIWidgets::Spacer(0); UIWidgets::Spacer(0);
ImGui::SetCursorPosX(20); ImGui::SetCursorPosX(20);
UIWidgets::EnhancementCheckbox("Mix Grottos", "gRandomizeMixGrottos"); UIWidgets::EnhancementCheckbox("Mix Grottos", "gRandomizeMixGrottos");
@ -3352,7 +3487,7 @@ void DrawRandoEditor(bool& open) {
// Shuffle Kokiri Sword // Shuffle Kokiri Sword
// Disabled when Start with Kokiri Sword is active // Disabled when Start with Kokiri Sword is active
bool disableShuffleKokiriSword = CVar_GetS32("gRandomizeStartingKokiriSword", 0); bool disableShuffleKokiriSword = CVarGetInteger("gRandomizeStartingKokiriSword", 0);
static const char* disableShuffleKokiriSwordText = "This option is disabled because \"Start with Kokiri Sword\" is enabled."; static const char* disableShuffleKokiriSwordText = "This option is disabled because \"Start with Kokiri Sword\" is enabled.";
UIWidgets::EnhancementCheckbox(Settings::ShuffleKokiriSword.GetName().c_str(), "gRandomizeShuffleKokiriSword", UIWidgets::EnhancementCheckbox(Settings::ShuffleKokiriSword.GetName().c_str(), "gRandomizeShuffleKokiriSword",
disableShuffleKokiriSword, disableShuffleKokiriSwordText); disableShuffleKokiriSword, disableShuffleKokiriSwordText);
@ -3366,7 +3501,7 @@ void DrawRandoEditor(bool& open) {
// Shuffle Ocarinas // Shuffle Ocarinas
// Disabled when Start with Ocarina is active // Disabled when Start with Ocarina is active
bool disableShuffleOcarinas = CVar_GetS32("gRandomizeStartingOcarina", 0); bool disableShuffleOcarinas = CVarGetInteger("gRandomizeStartingOcarina", 0);
static const char* disableShuffleOcarinasText = "This option is disabled because \"Start with Fairy Ocarina\" is enabled."; static const char* disableShuffleOcarinasText = "This option is disabled because \"Start with Fairy Ocarina\" is enabled.";
UIWidgets::EnhancementCheckbox(Settings::ShuffleOcarinas.GetName().c_str(), "gRandomizeShuffleOcarinas", UIWidgets::EnhancementCheckbox(Settings::ShuffleOcarinas.GetName().c_str(), "gRandomizeShuffleOcarinas",
disableShuffleOcarinas, disableShuffleOcarinasText); disableShuffleOcarinas, disableShuffleOcarinasText);
@ -3380,7 +3515,7 @@ void DrawRandoEditor(bool& open) {
// Shuffle Weird Egg // Shuffle Weird Egg
// Disabled when Skip Child Zelda is active // Disabled when Skip Child Zelda is active
bool disableShuffleWeirdEgg = CVar_GetS32("gRandomizeSkipChildZelda", 0); bool disableShuffleWeirdEgg = CVarGetInteger("gRandomizeSkipChildZelda", 0);
static const char* disableShuffleWeirdEggText = "This option is disabled because \"Skip Child Zelda\" is enabled."; static const char* disableShuffleWeirdEggText = "This option is disabled because \"Skip Child Zelda\" is enabled.";
UIWidgets::EnhancementCheckbox(Settings::ShuffleWeirdEgg.GetName().c_str(), "gRandomizeShuffleWeirdEgg", UIWidgets::EnhancementCheckbox(Settings::ShuffleWeirdEgg.GetName().c_str(), "gRandomizeShuffleWeirdEgg",
disableShuffleWeirdEgg, disableShuffleWeirdEggText); disableShuffleWeirdEgg, disableShuffleWeirdEggText);
@ -3555,9 +3690,11 @@ void DrawRandoEditor(bool& open) {
UIWidgets::InsertHelpHoverText( UIWidgets::InsertHelpHoverText(
"Start with - You will start with all Small Keys from all dungeons.\n" "Start with - You will start with all Small Keys from all dungeons.\n"
"\n" "\n"
"Vanilla - Small Keys will appear in their vanilla locations.\n" "Vanilla - Small Keys will appear in their vanilla locations. "
"You start with 3 keys in Spirit Temple MQ because the vanilla key layout is not beatable in logic.\n"
"\n" "\n"
"Own dungeon - Small Keys can only appear in their respective dungeon.\n" "Own dungeon - Small Keys can only appear in their respective dungeon. "
"If Fire Temple is not a Master Quest dungeon, the door to the Boss Key chest will be unlocked.\n"
"\n" "\n"
"Any dungeon - Small Keys can only appear inside of any dungon.\n" "Any dungeon - Small Keys can only appear inside of any dungon.\n"
"\n" "\n"
@ -3584,7 +3721,7 @@ void DrawRandoEditor(bool& open) {
); );
UIWidgets::EnhancementCombobox("gRandomizeShuffleKeyRings", randoShuffleKeyRings, RO_KEYRINGS_MAX, RO_KEYRINGS_OFF); UIWidgets::EnhancementCombobox("gRandomizeShuffleKeyRings", randoShuffleKeyRings, RO_KEYRINGS_MAX, RO_KEYRINGS_OFF);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
switch (CVar_GetS32("gRandomizeShuffleKeyRings", RO_KEYRINGS_OFF)) { switch (CVarGetInteger("gRandomizeShuffleKeyRings", RO_KEYRINGS_OFF)) {
case RO_KEYRINGS_COUNT: case RO_KEYRINGS_COUNT:
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
UIWidgets::EnhancementSliderInt("Key Ring Count: %d", "##RandomizeShuffleKeyRingsRandomCount", UIWidgets::EnhancementSliderInt("Key Ring Count: %d", "##RandomizeShuffleKeyRingsRandomCount",
@ -3666,7 +3803,7 @@ void DrawRandoEditor(bool& open) {
); );
UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, RO_GANON_BOSS_KEY_MAX, RO_GANON_BOSS_KEY_VANILLA); UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, RO_GANON_BOSS_KEY_MAX, RO_GANON_BOSS_KEY_VANILLA);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
switch (CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) { switch (CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) {
case RO_GANON_BOSS_KEY_LACS_MEDALLIONS: case RO_GANON_BOSS_KEY_LACS_MEDALLIONS:
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
UIWidgets::EnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount", UIWidgets::EnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount",
@ -3739,7 +3876,7 @@ void DrawRandoEditor(bool& open) {
// Skip child stealth // Skip child stealth
// Disabled when Skip Child Zelda is active // Disabled when Skip Child Zelda is active
bool disableChildStealth = CVar_GetS32("gRandomizeSkipChildZelda", 0); bool disableChildStealth = CVarGetInteger("gRandomizeSkipChildZelda", 0);
static const char* disableChildStealthText = "This option is disabled because \"Skip Child Zelda\" is enabled"; static const char* disableChildStealthText = "This option is disabled because \"Skip Child Zelda\" is enabled";
UIWidgets::EnhancementCheckbox(Settings::SkipChildStealth.GetName().c_str(), "gRandomizeSkipChildStealth", disableChildStealth, disableChildStealthText); UIWidgets::EnhancementCheckbox(Settings::SkipChildStealth.GetName().c_str(), "gRandomizeSkipChildStealth", disableChildStealth, disableChildStealthText);
UIWidgets::InsertHelpHoverText("The crawlspace into Hyrule Castle goes straight to Zelda, skipping the guards."); UIWidgets::InsertHelpHoverText("The crawlspace into Hyrule Castle goes straight to Zelda, skipping the guards.");
@ -3840,7 +3977,7 @@ void DrawRandoEditor(bool& open) {
"\n" "\n"
"Need Mask of Truth - Hints are only available whilst wearing the Mask of Truth.\n"); "Need Mask of Truth - Hints are only available whilst wearing the Mask of Truth.\n");
UIWidgets::EnhancementCombobox("gRandomizeGossipStoneHints", randoGossipStoneHints, RO_GOSSIP_STONES_MAX, RO_GOSSIP_STONES_NEED_NOTHING); UIWidgets::EnhancementCombobox("gRandomizeGossipStoneHints", randoGossipStoneHints, RO_GOSSIP_STONES_MAX, RO_GOSSIP_STONES_NEED_NOTHING);
if (CVar_GetS32("gRandomizeGossipStoneHints", RO_GOSSIP_STONES_NEED_NOTHING) != RO_GOSSIP_STONES_NONE) { if (CVarGetInteger("gRandomizeGossipStoneHints", RO_GOSSIP_STONES_NEED_NOTHING) != RO_GOSSIP_STONES_NONE) {
// Hint Clarity // Hint Clarity
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
ImGui::Indent(); ImGui::Indent();
@ -3877,6 +4014,37 @@ void DrawRandoEditor(bool& open) {
ImGui::Unindent(); ImGui::Unindent();
} }
UIWidgets::PaddedSeparator();
//Extra Hints
ImGui::Text("Extra Hints");
UIWidgets::InsertHelpHoverText(
"This setting adds some hints at locations other than Gossip Stones.\n\n"
"House of Skulltula: # - Talking to a cursed House of Skulltula resident will tell you the reward they will give you for obtaining that many tokens."
);
ImGui::Indent();
//Altar, Light Arrows, and Warp Songs are enabled by default
UIWidgets::PaddedEnhancementCheckbox("Altar Text", "gRandomizeAltarHint", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
UIWidgets::InsertHelpHoverText("Reading the Temple of Time altar as child will tell you the locations of the Spiritual Stones.\n"
"Reading the Temple of Time altar as adult will tell you the locations of the Medallions, as well as the conditions for building the Rainbow Bridge and getting the Boss Key for Ganon's Castle.");
UIWidgets::PaddedEnhancementCheckbox("Ganondorf (Light Arrows)", "gRandomizeLAHint", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
UIWidgets::InsertHelpHoverText("Talking to Ganondorf in his boss room will tell you the location of the Light Arrows. If this option is enabled and Ganondorf is reachable without Light Arrows, Gossip Stones will never hint the Light Arrows.");
UIWidgets::PaddedEnhancementCheckbox("Dampe's Diary (Hookshot)", "gRandomizeDampeHint", true, false);
UIWidgets::InsertHelpHoverText("Reading the diary of Dampé the gravekeeper as adult will tell you the location of one of the Hookshots.");
UIWidgets::PaddedEnhancementCheckbox("Warp Song text", "gRandomizeWarpSongText", true, false, !CVarGetInteger("gRandomizeShuffleWarpSongs", RO_GENERIC_OFF),
"This option is disabled since warp songs are not shuffled.", UIWidgets::CheckboxGraphics::Cross, true);
UIWidgets::InsertHelpHoverText("Playing a warp song will tell you where it leads. (If warp song destinations are vanilla, this is always enabled.)");
UIWidgets::PaddedEnhancementCheckbox("Scrub Item text", "gRandomizeScrubText", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, false);
UIWidgets::InsertHelpHoverText("Business scrubs will reveal the identity of what they're selling.");
UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 10", "gRandomize10GSHint", true, false);
UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 20", "gRandomize20GSHint", true, false);
UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 30", "gRandomize30GSHint", true, false);
UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 40", "gRandomize40GSHint", true, false);
UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 50", "gRandomize50GSHint", true, false);
ImGui::Unindent();
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();
ImGui::PopItemWidth(); ImGui::PopItemWidth();
@ -3946,7 +4114,7 @@ void DrawRandoEditor(bool& open) {
locationsTabOpen = true; locationsTabOpen = true;
RandomizerCheckObjects::UpdateImGuiVisibility(); RandomizerCheckObjects::UpdateImGuiVisibility();
// todo: this efficently when we build out cvar array support // todo: this efficently when we build out cvar array support
std::stringstream excludedLocationStringStream(CVar_GetString("gRandomizeExcludedLocations", "")); std::stringstream excludedLocationStringStream(CVarGetString("gRandomizeExcludedLocations", ""));
std::string excludedLocationString; std::string excludedLocationString;
excludedLocations.clear(); excludedLocations.clear();
while (getline(excludedLocationStringStream, excludedLocationString, ',')) { while (getline(excludedLocationStringStream, excludedLocationString, ',')) {
@ -3996,7 +4164,7 @@ void DrawRandoEditor(bool& open) {
excludedLocationString += std::to_string(excludedLocationIt); excludedLocationString += std::to_string(excludedLocationIt);
excludedLocationString += ","; excludedLocationString += ",";
} }
CVar_SetString("gRandomizeExcludedLocations", excludedLocationString.c_str()); CVarSetString("gRandomizeExcludedLocations", excludedLocationString.c_str());
SohImGui::RequestCvarSaveOnNextTick(); SohImGui::RequestCvarSaveOnNextTick();
} }
ImGui::SameLine(); ImGui::SameLine();
@ -4037,7 +4205,7 @@ void DrawRandoEditor(bool& open) {
excludedLocationString += std::to_string(excludedLocationIt); excludedLocationString += std::to_string(excludedLocationIt);
excludedLocationString += ","; excludedLocationString += ",";
} }
CVar_SetString("gRandomizeExcludedLocations", excludedLocationString.c_str()); CVarSetString("gRandomizeExcludedLocations", excludedLocationString.c_str());
SohImGui::RequestCvarSaveOnNextTick(); SohImGui::RequestCvarSaveOnNextTick();
} }
ImGui::SameLine(); ImGui::SameLine();
@ -4072,7 +4240,7 @@ void DrawRandoEditor(bool& open) {
"No logic - Item placement is completely random. MAY BE IMPOSSIBLE TO BEAT." "No logic - Item placement is completely random. MAY BE IMPOSSIBLE TO BEAT."
); );
UIWidgets::EnhancementCombobox("gRandomizeLogicRules", randoLogicRules, RO_LOGIC_MAX, RO_LOGIC_GLITCHLESS); UIWidgets::EnhancementCombobox("gRandomizeLogicRules", randoLogicRules, RO_LOGIC_MAX, RO_LOGIC_GLITCHLESS);
if (CVar_GetS32("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) { if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) {
ImGui::SameLine(); ImGui::SameLine();
UIWidgets::EnhancementCheckbox(Settings::LocationsReachable.GetName().c_str(), "gRandomizeAllLocationsReachable", false, "", UIWidgets::CheckboxGraphics::Cross, RO_GENERIC_ON); UIWidgets::EnhancementCheckbox(Settings::LocationsReachable.GetName().c_str(), "gRandomizeAllLocationsReachable", false, "", UIWidgets::CheckboxGraphics::Cross, RO_GENERIC_ON);
UIWidgets::InsertHelpHoverText( UIWidgets::InsertHelpHoverText(
@ -4145,7 +4313,7 @@ void DrawRandoEditor(bool& open) {
ImGui::BeginChild("ChildStartingEquipment", ImVec2(0, -8)); ImGui::BeginChild("ChildStartingEquipment", ImVec2(0, -8));
// Don't display this option if Dungeon Rewards are Shuffled to End of Dungeon. // Don't display this option if Dungeon Rewards are Shuffled to End of Dungeon.
// TODO: Show this but disabled when we have options for disabled Comboboxes. // TODO: Show this but disabled when we have options for disabled Comboboxes.
if (CVar_GetS32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON) { if (CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON) {
ImGui::Text(Settings::LinksPocketItem.GetName().c_str()); ImGui::Text(Settings::LinksPocketItem.GetName().c_str());
UIWidgets::EnhancementCombobox("gRandomizeLinksPocket", randoLinksPocket, RO_LINKS_POCKET_MAX, RO_LINKS_POCKET_DUNGEON_REWARD); UIWidgets::EnhancementCombobox("gRandomizeLinksPocket", randoLinksPocket, RO_LINKS_POCKET_MAX, RO_LINKS_POCKET_DUNGEON_REWARD);
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();
@ -4181,7 +4349,44 @@ void DrawRandoEditor(bool& open) {
window->DC.CurrLineTextBaseOffset = 0.0f; window->DC.CurrLineTextBaseOffset = 0.0f;
ImGui::BeginChild("ChildStartingSongs", ImVec2(0, -8)); ImGui::BeginChild("ChildStartingSongs", ImVec2(0, -8));
ImGui::Text("Coming soon"); UIWidgets::EnhancementCheckbox(Settings::StartingZeldasLullaby.GetName().c_str(),
"gRandomizeStartingZeldasLullaby");
UIWidgets::EnhancementCheckbox(Settings::StartingEponasSong.GetName().c_str(),
"gRandomizeStartingEponasSong");
UIWidgets::EnhancementCheckbox(Settings::StartingSariasSong.GetName().c_str(),
"gRandomizeStartingSariasSong");
UIWidgets::EnhancementCheckbox(Settings::StartingSunsSong.GetName().c_str(),
"gRandomizeStartingSunsSong");
UIWidgets::EnhancementCheckbox(Settings::StartingSongOfTime.GetName().c_str(),
"gRandomizeStartingSongOfTime");
UIWidgets::EnhancementCheckbox(Settings::StartingSongOfStorms.GetName().c_str(),
"gRandomizeStartingSongOfStorms");
UIWidgets::PaddedSeparator();
ImGui::Text("Warp Songs");
UIWidgets::PaddedSeparator();
UIWidgets::EnhancementCheckbox(Settings::StartingMinuetOfForest.GetName().c_str(),
"gRandomizeStartingMinuetOfForest");
UIWidgets::EnhancementCheckbox(Settings::StartingBoleroOfFire.GetName().c_str(),
"gRandomizeStartingBoleroOfFire");
UIWidgets::EnhancementCheckbox(Settings::StartingSerenadeOfWater.GetName().c_str(),
"gRandomizeStartingSerenadeOfWater");
UIWidgets::EnhancementCheckbox(Settings::StartingRequiemOfSpirit.GetName().c_str(),
"gRandomizeStartingRequiemOfSpirit");
UIWidgets::EnhancementCheckbox(Settings::StartingNocturneOfShadow.GetName().c_str(),
"gRandomizeStartingNocturneOfShadow");
UIWidgets::EnhancementCheckbox(Settings::StartingPreludeOfLight.GetName().c_str(),
"gRandomizeStartingPreludeOfLight");
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();
@ -4273,6 +4478,27 @@ CustomMessageEntry Randomizer::GetMerchantMessage(RandomizerInf randomizerInf, u
return messageEntry; return messageEntry;
} }
CustomMessageEntry Randomizer::GetCursedSkullMessage(s16 params) {
CustomMessageEntry messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::randoMiscHintsTableID, TEXT_CURSED_SKULLTULA_PEOPLE);
RandomizerCheck rc = GetCheckFromActor(ACTOR_EN_SSH, SCENE_KINSUTA, params);
RandomizerGet itemGet = this->itemLocations[rc].rgID;
std::vector<std::string> itemName;
if (itemGet == RG_ICE_TRAP) {
itemGet = this->itemLocations[rc].fakeRgID;
itemName = {
std::string(this->itemLocations[rc].trickName),
std::string(this->itemLocations[rc].trickName),
std::string(this->itemLocations[rc].trickName)
};
} else {
itemName = EnumToSpoilerfileGetName[itemGet];
}
CustomMessageManager::ReplaceStringInMessage(messageEntry, "{{params}}", std::to_string(params*10));
CustomMessageManager::ReplaceStringInMessage(messageEntry, "{{check}}", itemName[0], itemName[1], itemName[2]);
return messageEntry;
}
const char* mapGetItemHints[3][2] = { const char* mapGetItemHints[3][2] = {
{ " It's ordinary.", " It's masterful!" }, { " It's ordinary.", " It's masterful!" },
{ "&Sieht aus wie immer.", " &Man kann darauf die Worte&%r\"Master Quest\"%w entziffern..." }, { "&Sieht aus wie immer.", " &Man kann darauf die Worte&%r\"Master Quest\"%w entziffern..." },
@ -4575,6 +4801,76 @@ void CreateIceTrapRandoMessages() {
"Pour Noël, cette année, tu&n'auras que du %BCHARBON!&%rJoyeux Noël%w!" }); "Pour Noël, cette année, tu&n'auras que du %BCHARBON!&%rJoyeux Noël%w!" });
} }
CustomMessageMinimal FireTempleGoronMessages[NUM_GORON_MESSAGES] = {
{
"Are you the one they call %g@%w?^You look really weird for %rDarunia's kid.%w&Are you adopted?",
"Du bist also der, den sie @ nennen?^Du siehst nicht aus als wärst du&%rDarunias Kind.%w Bist du adoptiert?",
"C'est toi qu'on appelle %g@%w?^Tu es vraiment bizarre pour être&le %rfils du Chef%w. Tu as été adopté?",
},
{
"Thank Hylia! I was so worried about&when my teacher would let me get&out of detention.^I gotta go home and see my parents.",
"Ich wollte nur dieses Ding hier wieder&in seine Truhe zurücklegen, weil...^...gehört mir ja eigentlich nicht,&weißt du?^Doch dann ging plötzlich dieses&Tor hinter mir zu.&Danke für die Rettung.",
"Par les déesses!&Mon Frère?!&C'est bien toi?&Comment ça on ne se connaît pas?^Tu trouves vraiment que je&ressemble à n'importe quel Goron?",
},
{
"How long has it been, do you know?^%r{{days}}%w days!?^Oh no, and it's %r\x1F%w?&I have to check on my cake!!",
"Weißt du zufällig, wie viele Tage&vergangen sind?^%r{{days}}%w Tage!?^Oh je, und es ist %r\x1F%w Uhr? Ich&muss dringend nach meinem Kuchen&sehen!!!",
"Cela fait combien de temps que&je suis enfermé ici?&Non mais je ne vais pas crier.^COMBIEN?! %r{{days}}%w JOURS!?^En plus il est %r\x1F%w...&Il faut vraiment que je rentre...",
},
{
//0x39C7 - ganon laugh
"\x12\x39\xC7You fell into my %rtrap!%w&Foolish boy, it was me, Ganondorf!!!^...whoa, where am I?&What happened?^Weird.",
"\x12\x39\xC7""Du bist mir in die %rFalle%w gegangen!&Du Narr, ich bin es, %rGanondorf%w!!!^...Huch? Wo bin ich? Was ist passiert?^Seltsam...",
"\x12\x39\xC7Tu es tombé dans mon %rpiège%w!&Tu croyais que j'étais un Goron mais,&c'était moi! %rGanondorf%w!^...Hein? Où suis-je?&Que s'est-il passé?",
},
{
"Thanks, but I don't know if I wanna go&just yet...^Hmm...^...^...^...^...^...maybe I can come back later.&Bye bye.",
"Danke für die Rettung, aber&eigentlich finde ich es hier ganz&nett...^Hmm...^...^...^...^...^...Naja, ich kann ja jederzeit&wiederkommen. Man sieht sich.",
"Merci, mais je me sens plus en&sécurité ici...^...^...^...^...^Hmm...^...Tout compte fait, je vais y aller.&A plus tard.",
},
{
"Do you know about %b\x9f%w?&It's this weird symbol that's been&in my dreams lately...^Apparently, you pressed it %b{{a_btn}}%w times.^Wow."
"Weißt du über %b\x9f%w bescheid?&Es sind Symbole, die mir&in letzter Zeit öfter in&meinen Träumen erschienen sind...^Es scheint, dass du sie schon&%b{{a_btn}}%w mal betätigt hast.^Faszinierend..."
"Tu as déjà entendu parler du&symbole %b\x9f%w?&C'est un symbole bizarre qui est&apparu dans mes rêves dernièrement...^Apparemment, tu as appuyé dessus&%b{{a_btn}}%w fois.^Wow..."
},
{
"\x13\x1A""Boy, you must be hot!&Get yourself a bottle of&%rLon Lon Milk%w right away and cool&down, for only %g30%w rupees!",
"\x13\x1A""Hey, ist dir nicht zu warm?&Besorg dir doch eine Flasche&%rLon Lon-Milch%w, um dich&abzukühlen.^Kostet dich auch nur %g30%w Rubine!",
"\x13\x1A""Woah! Tu dois avoir chaud!&Tu savais que tu pouvais acheter&du %rLait de Lon Lon%w pour&seulement %g30 rubis%w?^Il n'y a rien de mieux pour s'hydrater!",
},
{
"In that case, I'll help you out!^They say that %rthe thing you're&looking for%w can only be found%g when&you're not looking for it.%w^Hope that helps!",
"Pass auf, ich geb dir einen Tipp!^Man sagt, man findet %rdas was&man sucht%w nur, und wirklich nur&dann, %gwenn man gerade nicht danach&sucht%w.^Du kannst mich jederzeit wieder für&mehr hilfreiche Tipps aufsuchen!",
"Dans ce cas, je vais t'aider!&On dit que l'objet que tu cherches&ne peut être trouvé que lorsque&tu ne le cherches pas.",
},
{
"I dunno why I was thrown in here,&truth be told.&I'm just a %g\"PR\"%w person.",
"Wat weiß'n ich, wieso ich hier&eingepfercht wurd. Ich mach&doch nur %g\"Pull&Requests\"%w.",
"Je ne sais pas comment on m'a jeté&ici. Il faut croire que je dors comme&une pierre.",
},
};
static int goronIDs[9] = {0x3052, 0x3069, 0x306A, 0x306B, 0x306C, 0x306D, 0x306E, 0x306F, 0x3070};
void CreateFireTempleGoronMessages() {
CustomMessageManager* customMessageManager = CustomMessageManager::Instance;
customMessageManager->AddCustomMessageTable(customMessageTableID);
for (u8 i = 0; i <= NUM_GORON_MESSAGES - 1; i++) {
customMessageManager->CreateMessage(customMessageTableID, goronIDs[i], {
TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
FireTempleGoronMessages[i].english, FireTempleGoronMessages[i].german, FireTempleGoronMessages[i].french
});
}
}
CustomMessageEntry Randomizer::GetGoronMessage(u16 index) {
CustomMessageEntry messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, goronIDs[index]);
CustomMessageManager::ReplaceStringInMessage(messageEntry, "{{days}}", std::to_string(gSaveContext.totalDays));
CustomMessageManager::ReplaceStringInMessage(messageEntry, "{{a_btn}}", std::to_string(gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_A]));
return messageEntry;
}
void Randomizer::CreateCustomMessages() { void Randomizer::CreateCustomMessages() {
// RANDTODO: Translate into french and german and replace GIMESSAGE_UNTRANSLATED // RANDTODO: Translate into french and german and replace GIMESSAGE_UNTRANSLATED
// with GIMESSAGE(getItemID, itemID, english, german, french). // with GIMESSAGE(getItemID, itemID, english, german, french).
@ -4810,6 +5106,7 @@ void Randomizer::CreateCustomMessages() {
CreateRupeeMessages(); CreateRupeeMessages();
CreateNaviRandoMessages(); CreateNaviRandoMessages();
CreateIceTrapRandoMessages(); CreateIceTrapRandoMessages();
CreateFireTempleGoronMessages();
} }
class ExtendedVanillaTableInvalidItemIdException: public std::exception { class ExtendedVanillaTableInvalidItemIdException: public std::exception {

View File

@ -4,8 +4,8 @@
#include <unordered_set> #include <unordered_set>
#include <string> #include <string>
#include <vector> #include <vector>
#include "../../../include/ultra64.h" #include <libultraship/libultra.h>
#include "../../../include/z64item.h" #include "z64item.h"
#include <memory> #include <memory>
#include <soh/Enhancements/randomizer/randomizerTypes.h> #include <soh/Enhancements/randomizer/randomizerTypes.h>
#include "soh/Enhancements/randomizer/randomizer_check_objects.h" #include "soh/Enhancements/randomizer/randomizer_check_objects.h"
@ -14,6 +14,7 @@
#define NUM_NAVI_MESSAGES 19 #define NUM_NAVI_MESSAGES 19
#define NUM_ICE_TRAP_MESSAGES 23 #define NUM_ICE_TRAP_MESSAGES 23
#define NUM_GORON_MESSAGES 9
class Randomizer { class Randomizer {
private: private:
std::unordered_map<RandomizerCheck, RandomizerGetData> itemLocations; std::unordered_map<RandomizerCheck, RandomizerGetData> itemLocations;
@ -22,6 +23,7 @@ class Randomizer {
std::string adultAltarText; std::string adultAltarText;
std::string ganonHintText; std::string ganonHintText;
std::string ganonText; std::string ganonText;
std::string dampeText;
std::unordered_map<RandomizerSettingKey, u8> randoSettings; std::unordered_map<RandomizerSettingKey, u8> randoSettings;
void ParseRandomizerSettingsFile(const char* spoilerFileName); void ParseRandomizerSettingsFile(const char* spoilerFileName);
void ParseHintLocationsFile(const char* spoilerFileName); void ParseHintLocationsFile(const char* spoilerFileName);
@ -43,6 +45,7 @@ class Randomizer {
static const std::string rupeeMessageTableID; static const std::string rupeeMessageTableID;
static const std::string NaviRandoMessageTableID; static const std::string NaviRandoMessageTableID;
static const std::string IceTrapRandoMessageTableID; static const std::string IceTrapRandoMessageTableID;
static const std::string randoMiscHintsTableID;
// Public for now to be accessed by SaveManager, will be made private again soon :tm: // Public for now to be accessed by SaveManager, will be made private again soon :tm:
std::unordered_map<RandomizerInf, bool> trialsRequired; std::unordered_map<RandomizerInf, bool> trialsRequired;
@ -72,6 +75,7 @@ class Randomizer {
std::string GetAdultAltarText() const; std::string GetAdultAltarText() const;
std::string GetGanonText() const; std::string GetGanonText() const;
std::string GetGanonHintText() const; std::string GetGanonHintText() const;
std::string GetDampeText() const;
RandomizerCheckObject GetCheckObjectFromActor(s16 actorId, s16 sceneNum, s32 actorParams); RandomizerCheckObject GetCheckObjectFromActor(s16 actorId, s16 sceneNum, s32 actorParams);
ScrubIdentity IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respawnData); ScrubIdentity IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respawnData);
ShopItemIdentity IdentifyShopItem(s32 sceneNum, u8 slotIndex); ShopItemIdentity IdentifyShopItem(s32 sceneNum, u8 slotIndex);
@ -83,6 +87,8 @@ class Randomizer {
ItemObtainability GetItemObtainabilityFromRandomizerGet(RandomizerGet randomizerCheck); ItemObtainability GetItemObtainabilityFromRandomizerGet(RandomizerGet randomizerCheck);
CustomMessageEntry GetWarpSongMessage(u16 textId, bool mysterious = false); CustomMessageEntry GetWarpSongMessage(u16 textId, bool mysterious = false);
CustomMessageEntry GetMerchantMessage(RandomizerInf randomizerInf, u16 textId, bool mysterious = false); CustomMessageEntry GetMerchantMessage(RandomizerInf randomizerInf, u16 textId, bool mysterious = false);
CustomMessageEntry GetCursedSkullMessage(s16 params);
CustomMessageEntry GetGoronMessage(u16 index);
CustomMessageEntry GetMapGetItemMessageWithHint(GetItemEntry itemEntry); CustomMessageEntry GetMapGetItemMessageWithHint(GetItemEntry itemEntry);
static void CreateCustomMessages(); static void CreateCustomMessages();
static CustomMessageEntry GetRupeeMessage(u16 rupeeTextId); static CustomMessageEntry GetRupeeMessage(u16 rupeeTextId);

View File

@ -993,6 +993,18 @@ typedef enum {
RSK_SHUFFLE_OCARINA, RSK_SHUFFLE_OCARINA,
RSK_STARTING_DEKU_SHIELD, RSK_STARTING_DEKU_SHIELD,
RSK_STARTING_KOKIRI_SWORD, RSK_STARTING_KOKIRI_SWORD,
RSK_STARTING_ZELDAS_LULLABY,
RSK_STARTING_EPONAS_SONG,
RSK_STARTING_SARIAS_SONG,
RSK_STARTING_SUNS_SONG,
RSK_STARTING_SONG_OF_TIME,
RSK_STARTING_SONG_OF_STORMS,
RSK_STARTING_MINUET_OF_FOREST,
RSK_STARTING_BOLERO_OF_FIRE,
RSK_STARTING_SERENADE_OF_WATER,
RSK_STARTING_REQUIEM_OF_SPIRIT,
RSK_STARTING_NOCTURNE_OF_SHADOW,
RSK_STARTING_PRELUDE_OF_LIGHT,
RSK_SHUFFLE_KOKIRI_SWORD, RSK_SHUFFLE_KOKIRI_SWORD,
RSK_STARTING_MAPS_COMPASSES, RSK_STARTING_MAPS_COMPASSES,
RSK_SHUFFLE_DUNGEON_REWARDS, RSK_SHUFFLE_DUNGEON_REWARDS,
@ -1007,6 +1019,16 @@ typedef enum {
RSK_ITEM_POOL, RSK_ITEM_POOL,
RSK_ICE_TRAPS, RSK_ICE_TRAPS,
RSK_GOSSIP_STONE_HINTS, RSK_GOSSIP_STONE_HINTS,
RSK_TOT_ALTAR_HINT,
RSK_GANONDORF_LIGHT_ARROWS_HINT,
RSK_DAMPES_DIARY_HINT,
RSK_KAK_10_SKULLS_HINT,
RSK_KAK_20_SKULLS_HINT,
RSK_KAK_30_SKULLS_HINT,
RSK_KAK_40_SKULLS_HINT,
RSK_KAK_50_SKULLS_HINT,
RSK_WARP_SONG_HINTS,
RSK_SCRUB_TEXT_HINT,
RSK_HINT_CLARITY, RSK_HINT_CLARITY,
RSK_HINT_DISTRIBUTION, RSK_HINT_DISTRIBUTION,
RSK_KEYSANITY, RSK_KEYSANITY,
@ -1068,6 +1090,7 @@ typedef enum {
RSK_DECOUPLED_ENTRANCES, RSK_DECOUPLED_ENTRANCES,
RSK_STARTING_SKULLTULA_TOKEN, RSK_STARTING_SKULLTULA_TOKEN,
RSK_ALL_LOCATIONS_REACHABLE, RSK_ALL_LOCATIONS_REACHABLE,
RSK_SHUFFLE_BOSS_ENTRANCES,
RSK_MAX RSK_MAX
} RandomizerSettingKey; } RandomizerSettingKey;
@ -1245,6 +1268,14 @@ typedef enum {
RO_DUNGEON_ENTRANCE_SHUFFLE_MAX, RO_DUNGEON_ENTRANCE_SHUFFLE_MAX,
} RandoOptionDungeonEntranceShuffle; } RandoOptionDungeonEntranceShuffle;
//Shuffle Boss Room Entrance Settings (Off, Age Restricted, Full)
typedef enum {
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF,
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_AGE_RESTRICTED,
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL,
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_MAX,
} RandoOptionBossRoomEntranceShuffle;
//Shuffle Interior Entrance Settings (Off, simple, all) //Shuffle Interior Entrance Settings (Off, simple, all)
typedef enum { typedef enum {
RO_INTERIOR_ENTRANCE_SHUFFLE_OFF, RO_INTERIOR_ENTRANCE_SHUFFLE_OFF,

View File

@ -1,7 +1,7 @@
#include "randomizer_check_objects.h" #include "randomizer_check_objects.h"
#include <map> #include <map>
#include <string> #include <string>
#include <Cvar.h> #include <libultraship/bridge.h>
#include "z64.h" #include "z64.h"
/* /*
@ -587,8 +587,8 @@ std::map<RandomizerCheck, RandomizerCheckObject> rcObjects = {
RC_OBJECT(RC_WATER_TEMPLE_MORPHA_HEART, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_WATER_TEMPLE, ACTOR_ITEM_B_HEART, SCENE_MIZUSIN_BS, 0x00, GI_HEART_CONTAINER, "Morpha Heart Container", "Water Temple Morpha Heart Container"), RC_OBJECT(RC_WATER_TEMPLE_MORPHA_HEART, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_WATER_TEMPLE, ACTOR_ITEM_B_HEART, SCENE_MIZUSIN_BS, 0x00, GI_HEART_CONTAINER, "Morpha Heart Container", "Water Temple Morpha Heart Container"),
RC_OBJECT(RC_SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 1707, GI_GAUNTLETS_SILVER, "Silver Gauntlets Chest", "Spirit Temple Silver Gauntlets Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 1707, GI_GAUNTLETS_SILVER, "Silver Gauntlets Chest", "Spirit Temple Silver Gauntlets Chest"),
RC_OBJECT(RC_SPIRIT_TEMPLE_MIRROR_SHIELD_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 13673, GI_SHIELD_MIRROR, "Mirror Shield Chest", "Spirit Temple Mirror Shield Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_MIRROR_SHIELD_CHEST, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 13673, GI_SHIELD_MIRROR, "Mirror Shield Chest", "Spirit Temple Mirror Shield Chest"),
RC_OBJECT(RC_SPIRIT_TEMPLE_CHILD_BRIDGE_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, 21800, GI_SHIELD_DEKU, "Child Bridge Chest", "Spirit Temple Child Bridge Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_CHILD_BRIDGE_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, 21800, GI_SHIELD_DEKU, "Child Bridge Chest", "Spirit Temple Child Bridge Chest"),
RC_OBJECT(RC_SPIRIT_TEMPLE_CHILD_EARLY_TORCHES_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, -30656, GI_KEY_SMALL, "Child Early Torches Chest", "Spirit Temple Child Early Torches Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_CHILD_EARLY_TORCHES_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, -30656, GI_KEY_SMALL, "Child Early Torches Chest", "Spirit Temple Child Early Torches Chest"),
RC_OBJECT(RC_SPIRIT_TEMPLE_COMPASS_CHEST, RCVORMQ_VANILLA, RCTYPE_MAP_COMPASS, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, 14340, GI_COMPASS, "Compass Chest", "Spirit Temple Compass Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_COMPASS_CHEST, RCVORMQ_VANILLA, RCTYPE_MAP_COMPASS, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, 14340, GI_COMPASS, "Compass Chest", "Spirit Temple Compass Chest"),
@ -776,7 +776,7 @@ std::map<RandomizerCheck, RandomizerCheckObject> rcObjects = {
RC_OBJECT(RC_GERUDO_TRAINING_GROUND_MQ_HEAVY_BLOCK_CHEST, RCVORMQ_MQ, RCTYPE_STANDARD, RCAREA_GERUDO_TRAINING_GROUND, ACTOR_EN_BOX, SCENE_MEN, 31394, GI_RUPEE_PURPLE, "MQ Heavy Block Chest", "Gerudo Training Grounds MQ Heavy Block Chest"), RC_OBJECT(RC_GERUDO_TRAINING_GROUND_MQ_HEAVY_BLOCK_CHEST, RCVORMQ_MQ, RCTYPE_STANDARD, RCAREA_GERUDO_TRAINING_GROUND, ACTOR_EN_BOX, SCENE_MEN, 31394, GI_RUPEE_PURPLE, "MQ Heavy Block Chest", "Gerudo Training Grounds MQ Heavy Block Chest"),
RC_OBJECT(RC_GANONS_TOWER_BOSS_KEY_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANON, 10219, GI_KEY_BOSS, "Boss Key Chest", "Ganon's Tower Boss Key Chest"), RC_OBJECT(RC_GANONS_TOWER_BOSS_KEY_CHEST, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANON, 10219, GI_KEY_BOSS, "Boss Key Chest", "Ganon's Tower Boss Key Chest"),
RC_OBJECT(RC_GANONS_CASTLE_FOREST_TRIAL_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 30857, GI_MAGIC_LARGE, "Forest Trial Chest", "Ganon's Castle Forest Trial Chest"), RC_OBJECT(RC_GANONS_CASTLE_FOREST_TRIAL_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 30857, GI_MAGIC_LARGE, "Forest Trial Chest", "Ganon's Castle Forest Trial Chest"),
RC_OBJECT(RC_GANONS_CASTLE_WATER_TRIAL_LEFT_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 24455, GI_ICE_TRAP, "Water Trial Left Chest", "Ganon's Castle Water Trial Left Chest"), RC_OBJECT(RC_GANONS_CASTLE_WATER_TRIAL_LEFT_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 24455, GI_ICE_TRAP, "Water Trial Left Chest", "Ganon's Castle Water Trial Left Chest"),
RC_OBJECT(RC_GANONS_CASTLE_WATER_TRIAL_RIGHT_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 22790, GI_HEART, "Water Trial Right Chest", "Ganon's Castle Water Trial Right Chest"), RC_OBJECT(RC_GANONS_CASTLE_WATER_TRIAL_RIGHT_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 22790, GI_HEART, "Water Trial Right Chest", "Ganon's Castle Water Trial Right Chest"),
@ -924,40 +924,40 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
(locationIt.rc != RC_UNKNOWN_CHECK) && (locationIt.rc != RC_UNKNOWN_CHECK) &&
(!RandomizerCheckObjects::AreaIsDungeon(locationIt.rcArea) || (!RandomizerCheckObjects::AreaIsDungeon(locationIt.rcArea) ||
locationIt.vOrMQ == RCVORMQ_BOTH || locationIt.vOrMQ == RCVORMQ_BOTH ||
locationIt.vOrMQ == RCVORMQ_MQ && CVar_GetS32("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_NONE && CVar_GetS32("gRandomizeMqDungeonCount", 0) > 0 || //at least one MQ dungeon locationIt.vOrMQ == RCVORMQ_MQ && CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_NONE && CVarGetInteger("gRandomizeMqDungeonCount", 0) > 0 || //at least one MQ dungeon
locationIt.vOrMQ == RCVORMQ_VANILLA && (CVar_GetS32("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_NONE || CVar_GetS32("gRandomizeMqDungeonCount", 0) < 12) //at least one vanilla dungeon locationIt.vOrMQ == RCVORMQ_VANILLA && (CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_NONE || CVarGetInteger("gRandomizeMqDungeonCount", 0) < 12) //at least one vanilla dungeon
) && ) &&
(locationIt.rcType != RCTYPE_SHOP || CVar_GetS32("gRandomizeShopsanity", RO_SHOPSANITY_OFF) > RO_SHOPSANITY_ZERO_ITEMS) && (locationIt.rcType != RCTYPE_SHOP || CVarGetInteger("gRandomizeShopsanity", RO_SHOPSANITY_OFF) > RO_SHOPSANITY_ZERO_ITEMS) &&
(locationIt.rcType != RCTYPE_SCRUB || CVar_GetS32("gRandomizeShuffleScrubs", RO_SCRUBS_OFF) != RO_SCRUBS_OFF || (locationIt.rcType != RCTYPE_SCRUB || CVarGetInteger("gRandomizeShuffleScrubs", RO_SCRUBS_OFF) != RO_SCRUBS_OFF ||
locationIt.rc == RC_HF_DEKU_SCRUB_GROTTO || locationIt.rc == RC_LW_DEKU_SCRUB_GROTTO_FRONT || locationIt.rc == RC_LW_DEKU_SCRUB_NEAR_BRIDGE) && //The 3 scrubs that are always randomized locationIt.rc == RC_HF_DEKU_SCRUB_GROTTO || locationIt.rc == RC_LW_DEKU_SCRUB_GROTTO_FRONT || locationIt.rc == RC_LW_DEKU_SCRUB_NEAR_BRIDGE) && //The 3 scrubs that are always randomized
(locationIt.rcType != RCTYPE_MERCHANT || CVar_GetS32("gRandomizeShuffleMerchants", RO_SHUFFLE_MERCHANTS_OFF) != RO_SHUFFLE_MERCHANTS_OFF) && (locationIt.rcType != RCTYPE_MERCHANT || CVarGetInteger("gRandomizeShuffleMerchants", RO_SHUFFLE_MERCHANTS_OFF) != RO_SHUFFLE_MERCHANTS_OFF) &&
(locationIt.rcType != RCTYPE_GOSSIP_STONE) && // don't show gossip stones (maybe gossipsanity will be a thing eventually?) (locationIt.rcType != RCTYPE_GOSSIP_STONE) && // don't show gossip stones (maybe gossipsanity will be a thing eventually?)
(locationIt.rcType != RCTYPE_LINKS_POCKET) && (locationIt.rcType != RCTYPE_LINKS_POCKET) &&
(locationIt.rcType != RCTYPE_CHEST_GAME) && // don't show non final reward chest game checks until we support shuffling them (locationIt.rcType != RCTYPE_CHEST_GAME) && // don't show non final reward chest game checks until we support shuffling them
((locationIt.rcType != RCTYPE_SKULL_TOKEN) || ((locationIt.rcType != RCTYPE_SKULL_TOKEN) ||
(CVar_GetS32("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_ALL) || (CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_ALL) ||
((CVar_GetS32("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_OVERWORLD) && RandomizerCheckObjects::AreaIsOverworld(locationIt.rcArea)) || ((CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_OVERWORLD) && RandomizerCheckObjects::AreaIsOverworld(locationIt.rcArea)) ||
((CVar_GetS32("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_DUNGEONS) && RandomizerCheckObjects::AreaIsDungeon(locationIt.rcArea)) ((CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_DUNGEONS) && RandomizerCheckObjects::AreaIsDungeon(locationIt.rcArea))
) && ) &&
((locationIt.rcType != RCTYPE_COW) || CVar_GetS32("gRandomizeShuffleCows", RO_GENERIC_NO)) && ((locationIt.rcType != RCTYPE_COW) || CVarGetInteger("gRandomizeShuffleCows", RO_GENERIC_NO)) &&
((locationIt.rcType != RCTYPE_ADULT_TRADE) || CVar_GetS32("gRandomizeShuffleAdultTrade", RO_GENERIC_NO)) && ((locationIt.rcType != RCTYPE_ADULT_TRADE) || CVarGetInteger("gRandomizeShuffleAdultTrade", RO_GENERIC_NO)) &&
((locationIt.rc != RC_KF_KOKIRI_SWORD_CHEST) || CVar_GetS32("gRandomizeShuffleKokiriSword", RO_GENERIC_NO)) && ((locationIt.rc != RC_KF_KOKIRI_SWORD_CHEST) || CVarGetInteger("gRandomizeShuffleKokiriSword", RO_GENERIC_NO)) &&
((locationIt.rc != RC_ZR_MAGIC_BEAN_SALESMAN) || CVar_GetS32("gRandomizeShuffleBeans", RO_GENERIC_NO) == RO_GENERIC_YES) && ((locationIt.rc != RC_ZR_MAGIC_BEAN_SALESMAN) || CVarGetInteger("gRandomizeShuffleBeans", RO_GENERIC_NO) == RO_GENERIC_YES) &&
((locationIt.rc != RC_HC_MALON_EGG) || CVar_GetS32("gRandomizeShuffleWeirdEgg", RO_GENERIC_NO)) && ((locationIt.rc != RC_HC_MALON_EGG) || CVarGetInteger("gRandomizeShuffleWeirdEgg", RO_GENERIC_NO)) &&
((locationIt.rcType != RCTYPE_FROG_SONG) || CVar_GetS32("gRandomizeShuffleFrogSongRupees", RO_GENERIC_NO)) && ((locationIt.rcType != RCTYPE_FROG_SONG) || CVarGetInteger("gRandomizeShuffleFrogSongRupees", RO_GENERIC_NO)) &&
((locationIt.rcType != RCTYPE_MAP_COMPASS) || CVar_GetS32("gRandomizeStartingMapsCompasses", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && ((locationIt.rcType != RCTYPE_MAP_COMPASS) || CVarGetInteger("gRandomizeStartingMapsCompasses", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) &&
((locationIt.rcType != RCTYPE_SMALL_KEY) || CVar_GetS32("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && ((locationIt.rcType != RCTYPE_SMALL_KEY) || CVarGetInteger("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) &&
((locationIt.rcType != RCTYPE_BOSS_KEY) || CVar_GetS32("gRandomizeBossKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && ((locationIt.rcType != RCTYPE_BOSS_KEY) || CVarGetInteger("gRandomizeBossKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) &&
((locationIt.rcType != RCTYPE_GANON_BOSS_KEY) || CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_VANILLA) && ((locationIt.rcType != RCTYPE_GANON_BOSS_KEY) || CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_VANILLA) &&
(locationIt.rcType != RCTYPE_GF_KEY && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD || (locationIt.rcType != RCTYPE_GF_KEY && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD ||
(CVar_GetS32("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_OPEN && locationIt.rcType != RCTYPE_GF_KEY && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || (CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_OPEN && locationIt.rcType != RCTYPE_GF_KEY && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) ||
(CVar_GetS32("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_FAST && (CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_FAST &&
((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVar_GetS32("gRandomizeShuffleGerudoToken", RO_GENERIC_NO) == RO_GENERIC_YES) || ((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVarGetInteger("gRandomizeShuffleGerudoToken", RO_GENERIC_NO) == RO_GENERIC_YES) ||
(locationIt.rc == RC_GF_NORTH_F1_CARPENTER && CVar_GetS32("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)) (locationIt.rc == RC_GF_NORTH_F1_CARPENTER && CVarGetInteger("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA))
) || ) ||
(CVar_GetS32("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_NORMAL && (CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_NORMAL &&
((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVar_GetS32("gRandomizeShuffleGerudoToken", RO_GENERIC_NO) == RO_GENERIC_YES) || ((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVarGetInteger("gRandomizeShuffleGerudoToken", RO_GENERIC_NO) == RO_GENERIC_YES) ||
(locationIt.rcType == RCTYPE_GF_KEY && CVar_GetS32("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)) (locationIt.rcType == RCTYPE_GF_KEY && CVarGetInteger("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA))
) )
) )
); );

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