Rando cleanup (#3157)

* Remove 3drando setting descriptions

* Remove 3drando cosmetics

* Remove part of 3drando's menu

* Remove 3drando's music & sfx randomizers

* Remove 3drando's patch system

* Remove 3drando's citra logging

* Remove some of 3drando's custom messages

Some can't be removed (like the ganon la hint) as they are used

* Remove useless params in item_location.cpp

These types of SpoilerCollectionCheck just checked the rand inf corresponding to check and ignored the scene & flags params.

* Remove 3drando's unused check categories

* Remove some of 3drando's menu system

* Remove 3drando's preset system

* Remove some unused settings code

* Remove some unused settings

* Remove some unused ItemLocation params

* Remove SpoilerCollectionCheck::Fishing param
This commit is contained in:
Pepe20129 2023-09-10 19:46:35 +02:00 committed by GitHub
parent 5cf0eeef52
commit ccc933c59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 1203 additions and 7570 deletions

View File

@ -2,55 +2,10 @@
enum class Category {
cNull,
cKokiriForest,
cForest,
cGrotto,
cMinigame,
cChestMinigame,
cLostWoods,
cDekuScrub,
cDekuScrubUpgrades,
cNeedSpiritualStones,
cSacredForestMeadow,
cHyruleField,
cLakeHylia,
cGerudo,
cGerudoValley,
cGerudoFortress,
cHauntedWasteland,
cDesertColossus,
cInnerMarket,
cMarket,
cHyruleCastle,
cKakarikoVillage,
cKakariko,
cSkulltulaHouse,
cGraveyard,
cDeathMountainTrail,
cDeathMountain,
cGoronCity,
cDeathMountainCrater,
cZorasRiver,
cZorasDomain,
cZorasFountain,
cLonLonRanch,
cDekuTree,
cDodongosCavern,
cJabuJabusBelly,
cForestTemple,
cFireTemple,
cWaterTemple,
cSpiritTemple,
cShadowTemple,
cBottomOfTheWell,
cIceCavern,
cGerudoTrainingGrounds,
cGanonsCastle,
cSkulltula,
cBossHeart,
cTempleOfTime,
cFairies,
cOutsideGanonsCastle,
cSong,
cSongDungeonReward,
cCow,
@ -66,6 +21,5 @@ enum class Category {
enum class OptionCategory {
Setting,
Cosmetic,
Toggle,
};
};

View File

@ -1,152 +0,0 @@
#include "cosmetics.hpp"
#include "random.hpp"
#include <sstream>
namespace Cosmetics {
bool ValidHexString(std::string_view hexStr) {
return hexStr.find_first_not_of("0123456789ABCDEFabcdef") == std::string_view::npos && hexStr.length() == 6;
}
Color_RGBAf HexStrToColorRGBAf(const std::string& hexStr) {
uint32_t hex = std::stoi(hexStr, nullptr, 16);
return Color_RGBAf{
.r = ((hex & 0xFF0000) >> 16) / 255.0f,
.g = ((hex & 0x00FF00) >> 8) / 255.0f,
.b = (hex & 0x0000FF) / 255.0f,
.a = 1.0f,
};
}
Color_RGBA8 HexStrToColorRGBA8(const std::string& hexStr) {
uint32_t hex = std::stoi(hexStr, nullptr, 16);
return Color_RGBA8{
.r = (uint8_t)((hex & 0xFF0000) >> 16),
.g = (uint8_t)((hex & 0x00FF00) >> 8),
.b = (uint8_t)(hex & 0x0000FF),
.a = 0xFF,
};
}
std::string CustomColorOptionText(std::string_view color) {
return std::string(CUSTOM_COLOR_STR.substr(0, CUSTOM_COLOR_STR.length() - 6)).append(color);
}
std::string GetCustomColor(const std::string& str) {
return str.substr(str.length() - 6);
}
const std::array<std::string_view, 13> gauntletColors = {
"FFFFFF", //Silver
"FECF0F", //Gold
"000006", //Black
"025918", //Green
"06025A", //Blue
"600602", //Bronze
"FF0000", //Red
"025DB0", //Sky Blue
"FA6A90", //Pink
"FF00FF", //Magenta
"D83A00", //Orange
"5B8A06", //Lime
"800080", //Purple
};
const std::array<std::string_view, 28> tunicColors = {
"168A0E", //Kokiri Green
"96000E", //Goron Red
"002A8E", //Zora Blue
"202020", //Black
"FFFFFF", //White
"FF4A0A", //Orange
"86FF23", //Yellow
"0094B0", //Cyan
"362076", //Indigo
"7B0080", //Purple
"F04F7D", //Pink
"323232", //Dark Gray
"E44B4B", //Salmon
"5A1A20", //Wine Red
"7E705B", //Beige
"583923", //Brown
"72602B", //Sand
"6b7E5D", //Tea Green
"3C5800", //Dark Green
"6CFFF8", //Powder Blue
"005A4B", //Teal
"0259FF", //Sky Blue
"33405E", //Faded Blue
"635AD2", //Lavender
"9C1B4B", //Magenta
"52314F", //Mauve
"505A59", //Silver
"F16F16", //Gold
};
const std::array<std::string_view, 20> naviInnerColors = {
"FFFFFF", //White
"00FF00", //Green
"9696FF", //Light Blue
"FFFF00", //Yellow
"FF0000", //Red
"FF00FF", //Magenta
"FECC3C", //Gold
"000000", //Black
"FFFFFF", //Tatl
"49146C", //Tael
"2C9EC4", //Fi
"E6DE83", //Ciela
"D14902", //Epona
"629C5F", //Ezlo
"A83317", //KoRL
"032660", //Linebeck
"D62E31", //Loftwing
"192426", //Midna
"977A6C", //Phantom Zelda
"FF0000", //Rainbow (starts at red)
};
const std::array<std::string_view, 20> naviOuterColors = {
"0000FF", //White
"00FF00", //Green
"9696FF", //Light Blue
"C89B00", //Yellow
"FF0000", //Red
"C8009B", //Magenta
"FEC007", //Gold
"000000", //Black
"C89800", //Tatl
"FF0000", //Tael
"2C1983", //Fi
"C6BE5B", //Ciela
"551F08", //Epona
"3F5D37", //Ezlo
"DED7C5", //KoRL
"EFFFFF", //Linebeck
"FDE6CC", //Loftwing
"D28330", //Midna
"6F4667", //Phantom Zelda
"FF0000", //Rainbow (starts at red)
};
const std::array<std::string_view, 13> weaponTrailColors = {
"FFFFFF", //White
"000000", //Black
"FF0000", //Red
"00FF00", //Green
"0000FF", //Blue
"FFFF00", //Yellow
"00FFFF", //Cyan
"FF00FF", //Magenta
"FFA500", //Orange
"FFD700", //Gold
"800080", //Purple
"FF69B4", //Pink
"FF0000", //Rainbow (starts at red)
};
//Generate random hex color
std::string RandomColor() {
std::ostringstream color;
color << std::hex << (rand() % 0x1000000); //use default rand to not interfere with main settings
return color.str();
}
} //namespace Cosmetics

View File

@ -1,51 +0,0 @@
#pragma once
#include <array>
#include <string>
#include <vector>
#include <cstdint>
namespace Cosmetics {
constexpr std::string_view RANDOM_CHOICE_STR = "Random Choice";
constexpr std::string_view RANDOM_COLOR_STR = "Random Color";
constexpr std::string_view CUSTOM_COLOR_STR = "Custom #FFFFFF";
constexpr std::string_view CUSTOM_COLOR_PREFIX = "Custom #";
constexpr std::string_view RANDOM_CHOICE_DESC = "A random color from the list of colors will be\nchosen.";
constexpr std::string_view RANDOM_COLOR_DESC = "A completely random color will be chosen.";
constexpr std::string_view CUSTOM_COLOR_DESC = "Press A and type in a custom 6 digit hex color.";
enum CosmeticSettings {
RANDOM_CHOICE,
RANDOM_COLOR,
CUSTOM_COLOR,
NON_COLOR_COUNT,
};
struct Color_RGBAf {
float r;
float g;
float b;
float a;
};
struct Color_RGBA8 {
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t a;
};
extern const std::array<std::string_view, 13> gauntletColors;
extern const std::array<std::string_view, 28> tunicColors;
extern const std::array<std::string_view, 20> naviInnerColors;
extern const std::array<std::string_view, 20> naviOuterColors;
extern const std::array<std::string_view, 13> weaponTrailColors;
bool ValidHexString(std::string_view hexStr);
Color_RGBAf HexStrToColorRGBAf(const std::string& hexStr);
Color_RGBA8 HexStrToColorRGBA8(const std::string& hexStr);
std::string CustomColorOptionText(std::string_view color);
std::string GetCustomColor(const std::string& str);
std::string RandomColor();
} //namespace Cosmetics

View File

@ -1,5 +1,4 @@
#include "custom_messages.hpp"
#include "debug.hpp"
#include "shops.hpp"
#include "z64item.h"
@ -121,9 +120,7 @@ constexpr std::array DungeonColors = {
};
std::set<MessageEntry, MessageEntryComp> messageEntries;
std::vector<MessageEntry> arrangedMessageEntries;
std::stringstream messageData;
std::string arrangedMessageData;
//textBoxType and textBoxPosition are defined here: https://wiki.cloudmodding.com/oot/Text_Format#Message_Id
void CreateMessage(uint32_t textId, uint32_t unk_04, uint32_t textBoxType, uint32_t textBoxPosition,
@ -161,229 +158,6 @@ constexpr std::array DungeonColors = {
CreateMessage(textId, unk_04, textBoxType, textBoxPosition, text.GetEnglish(), text.GetFrench(), text.GetSpanish());
}
uint32_t NumMessages() {
return messageEntries.size();
}
std::pair<const char*, uint32_t> RawMessageEntryData() {
arrangedMessageEntries.assign(messageEntries.begin(), messageEntries.end());
const char* data = (const char*)arrangedMessageEntries.data();
uint32_t size = arrangedMessageEntries.size() * sizeof(MessageEntry);
return { data, size };
}
std::pair<const char*, uint32_t> RawMessageData() {
arrangedMessageData = messageData.str();
const char* data = arrangedMessageData.data();
uint32_t size = arrangedMessageData.size();
return { data, size };
}
void CreateAlwaysIncludedMessages() {
// Bombchu (10) Purchase Prompt
CreateMessage(0x8C, 0, 2, 3,
INSTANT_TEXT_ON()+"Bombchu (10): 99 Rupees"+INSTANT_TEXT_OFF()+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"Buy"+NEWLINE()+"Don't buy"+COLOR(QM_WHITE)+MESSAGE_END(),
INSTANT_TEXT_ON()+"Bombchus (10): 99 rubis"+INSTANT_TEXT_OFF()+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"Acheter"+NEWLINE()+"Ne pas acheter"+COLOR(QM_WHITE)+MESSAGE_END(),
INSTANT_TEXT_ON()+"Bombchus (10): 99 rupias"+INSTANT_TEXT_OFF()+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"Comprar"+NEWLINE()+"No comprar"+COLOR(QM_WHITE)+MESSAGE_END());
//Gold Skulltula Tokens (there are two text IDs the game uses)
for (const uint32_t textId : {0xB4, 0xB5}) {
CreateMessage(textId, 0, 2, 3,
INSTANT_TEXT_ON()+"You destroyed a "+COLOR(QM_RED)+"Gold Skulltula"+COLOR(QM_WHITE)+". You got a"+NEWLINE()+"token proving you destroyed it!"+NEWLINE()+NEWLINE()+"You have "+COLOR(QM_RED)+SKULLTULAS_DESTROYED()+COLOR(QM_WHITE)+" tokens!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
INSTANT_TEXT_ON()+"Vous venez de détruire une "+COLOR(QM_RED)+"Skulltula d'or"+COLOR(QM_WHITE)+"!"+NEWLINE()+"Ce symbole prouve votre prouesse!"+NEWLINE()+NEWLINE()+"Vous avez "+COLOR(QM_RED)+SKULLTULAS_DESTROYED()+COLOR(QM_WHITE)+" jetons!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
INSTANT_TEXT_ON()+"¡Has eliminado una "+COLOR(QM_RED)+"skulltula dorada"+COLOR(QM_WHITE)+" y has"+NEWLINE()+"conseguido un símbolo para probarlo!"+NEWLINE()+NEWLINE()+"¡Tienes "+COLOR(QM_RED)+SKULLTULAS_DESTROYED()+COLOR(QM_WHITE)+" símbolos!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
//Bombchu (10) Description
CreateMessage(0xBC, 0, 2, 3,
INSTANT_TEXT_ON()+COLOR(QM_RED)+"Bombchu (10): 99 Rupees"+NEWLINE()+COLOR(QM_WHITE)+"These look like toy mice, but they're"+NEWLINE()+"actually self-propelled time bombs!"+INSTANT_TEXT_OFF()+SHOP_MESSAGE_BOX()+MESSAGE_END(),
INSTANT_TEXT_ON()+COLOR(QM_RED)+"Bombchus (10): 99 rubis"+NEWLINE()+COLOR(QM_WHITE)+"Profilée comme une souris mécanique, il"+NEWLINE()+"s'agit en fait d'une bombe à retardement"+NEWLINE()+"autopropulsée!"+INSTANT_TEXT_OFF()+SHOP_MESSAGE_BOX()+MESSAGE_END(),
INSTANT_TEXT_ON()+COLOR(QM_RED)+"Bombchus (10): 99 rupias"+NEWLINE()+COLOR(QM_WHITE)+"Aunque parezcan ratoncitos de juguete,"+NEWLINE()+"¡son bombas de relojería autopropulsadas!"+INSTANT_TEXT_OFF()+SHOP_MESSAGE_BOX()+MESSAGE_END());
//Boss Keys
for (uint32_t bossKey = 0; bossKey <= (DUNGEON_SHADOW_TEMPLE - DUNGEON_FOREST_TEMPLE); bossKey++) {
uint32_t dungeon = DUNGEON_FOREST_TEMPLE + bossKey;
CreateMessage(0x9D4 + bossKey, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_BOSS)+INSTANT_TEXT_ON()+"You got the "+COLOR(DungeonColors[dungeon])+EnglishDungeonNames[dungeon]+NEWLINE()+"Boss Key"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_BOSS)+INSTANT_TEXT_ON()+"Vous trouvez la "+COLOR(DungeonColors[dungeon])+"Clé d'Or "+NEWLINE()+FrenchDungeonArticles[dungeon]+" "+FrenchDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_BOSS)+INSTANT_TEXT_ON()+"¡Tienes la "+COLOR(DungeonColors[dungeon])+"gran llave "+SpanishDungeonArticles[dungeon]+NEWLINE()+SpanishDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
CreateMessage(0x9D9, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_BOSS)+INSTANT_TEXT_ON()+"You got the "+COLOR(DungeonColors[DUNGEON_GANONS_CASTLE_FIRST_PART])+EnglishDungeonNames[DUNGEON_GANONS_CASTLE_FIRST_PART]+NEWLINE()+"Boss Key"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_BOSS)+INSTANT_TEXT_ON()+"Vous trouvez la "+COLOR(DungeonColors[DUNGEON_GANONS_CASTLE_FIRST_PART])+"Clé d'Or "+NEWLINE()+FrenchDungeonArticles[DUNGEON_GANONS_CASTLE_FIRST_PART]+" "+FrenchDungeonNames[DUNGEON_GANONS_CASTLE_FIRST_PART]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_BOSS)+INSTANT_TEXT_ON()+"¡Tienes la "+COLOR(DungeonColors[DUNGEON_GANONS_CASTLE_FIRST_PART])+"gran llave "+SpanishDungeonArticles[DUNGEON_GANONS_CASTLE_FIRST_PART]+NEWLINE()+SpanishDungeonNames[DUNGEON_GANONS_CASTLE_FIRST_PART]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
//Compasses
for (uint32_t dungeon = DUNGEON_DEKU_TREE; dungeon <= DUNGEON_ICE_CAVERN; dungeon++) {
CreateMessage(0x9DA + dungeon, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_COMPASS)+INSTANT_TEXT_ON()+"You got the "+COLOR(DungeonColors[dungeon])+EnglishDungeonNames[dungeon]+NEWLINE()+"Compass"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_COMPASS)+INSTANT_TEXT_ON()+"Vous trouvez la "+COLOR(DungeonColors[dungeon])+"boussole "+NEWLINE()+FrenchDungeonArticles[dungeon]+FrenchDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_COMPASS)+INSTANT_TEXT_ON()+"¡Tienes la "+COLOR(DungeonColors[dungeon])+"brújula "+SpanishDungeonArticles[dungeon]+NEWLINE()+SpanishDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
//Maps
for (uint32_t dungeon = DUNGEON_DEKU_TREE; dungeon <= DUNGEON_ICE_CAVERN; dungeon++) {
CreateMessage(0x9E4 + dungeon, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_DUNGEON_MAP)+INSTANT_TEXT_ON()+"You got the "+COLOR(DungeonColors[dungeon])+EnglishDungeonNames[dungeon]+NEWLINE()+"Map"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_DUNGEON_MAP)+INSTANT_TEXT_ON()+"Vous trouvez la "+COLOR(DungeonColors[dungeon])+"carte "+NEWLINE()+FrenchDungeonArticles[dungeon]+FrenchDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_DUNGEON_MAP)+INSTANT_TEXT_ON()+"¡Has obtenido el "+COLOR(DungeonColors[dungeon])+"mapa "+SpanishDungeonArticles[dungeon]+NEWLINE()+SpanishDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
//Small Keys
for (uint32_t smallKey = 0; smallKey <= (DUNGEON_BOTTOM_OF_THE_WELL - DUNGEON_FOREST_TEMPLE); smallKey++) {
uint32_t dungeon = DUNGEON_FOREST_TEMPLE + smallKey;
CreateMessage(0x9EE + smallKey, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"You got a "+COLOR(DungeonColors[dungeon])+EnglishDungeonNames[dungeon]+NEWLINE()+"Small Key"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"Vous trouvez une "+COLOR(DungeonColors[dungeon])+"Petite Clé"+NEWLINE()+FrenchDungeonArticles[dungeon]+FrenchDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"¡Has obtenido una "+COLOR(DungeonColors[dungeon])+"llave pequeña "+SpanishDungeonArticles[dungeon]+NEWLINE()+SpanishDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
for (uint32_t smallKey = 0; smallKey <= (DUNGEON_GANONS_CASTLE_FIRST_PART - DUNGEON_GERUDO_TRAINING_GROUNDS); smallKey++) {
uint32_t dungeon = DUNGEON_GERUDO_TRAINING_GROUNDS + smallKey;
CreateMessage(0x9F4 + smallKey, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"You got a "+COLOR(DungeonColors[dungeon])+EnglishDungeonNames[dungeon]+NEWLINE()+"Small Key"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"Vous trouvez une "+COLOR(DungeonColors[dungeon])+"Petite Clé"+NEWLINE()+FrenchDungeonArticles[dungeon]+FrenchDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"¡Has obtenido una "+COLOR(DungeonColors[dungeon])+"llave pequeña "+SpanishDungeonArticles[dungeon]+NEWLINE()+SpanishDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
//Key Rings
for (uint32_t smallKey = 0; smallKey <= (DUNGEON_BOTTOM_OF_THE_WELL - DUNGEON_FOREST_TEMPLE); smallKey++) {
uint32_t dungeon = DUNGEON_FOREST_TEMPLE + smallKey;
CreateMessage(0x9300 + smallKey, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"You got a "+COLOR(DungeonColors[dungeon])+EnglishDungeonNames[dungeon]+NEWLINE()+"Key Ring"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"Vous trouvez un "+COLOR(DungeonColors[dungeon])+"trousseau"+NEWLINE()+FrenchDungeonArticles[dungeon]+FrenchDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"¡Has obtenido un "+COLOR(DungeonColors[dungeon])+"llavero "+SpanishDungeonArticles[dungeon]+NEWLINE()+SpanishDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
for (uint32_t smallKey = 0; smallKey <= (DUNGEON_GANONS_CASTLE_FIRST_PART - DUNGEON_GERUDO_TRAINING_GROUNDS); smallKey++) {
uint32_t dungeon = DUNGEON_GERUDO_TRAINING_GROUNDS + smallKey;
CreateMessage(0x9306 + smallKey, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"You got a "+COLOR(DungeonColors[dungeon])+EnglishDungeonNames[dungeon]+NEWLINE()+"Key Ring"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"Vous trouvez un "+COLOR(DungeonColors[dungeon])+"trousseau"+NEWLINE()+FrenchDungeonArticles[dungeon]+FrenchDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"¡Has obtenido un "+COLOR(DungeonColors[dungeon])+"llavero "+SpanishDungeonArticles[dungeon]+NEWLINE()+SpanishDungeonNames[dungeon]+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
//Tycoon's Wallet
CreateMessage(0x09F7, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_WALLET_GIANT)+INSTANT_TEXT_ON()+"You got a "+COLOR(QM_RED)+"Tycoon's Wallet"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+NEWLINE()+"It's gigantic! Now you can carry"+NEWLINE()+"up to "+COLOR(QM_YELLOW)+"999 "+COLOR(QM_WHITE)+COLOR(QM_YELLOW)+"Rupees"+COLOR(QM_WHITE)+"!"+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_WALLET_GIANT)+INSTANT_TEXT_ON()+"Vous obtenez la "+COLOR(QM_RED)+"Bourse de Magnat"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+NEWLINE()+"Elle peut contenir jusqu'à "+COLOR(QM_YELLOW)+"999 "+COLOR(QM_WHITE)+COLOR(QM_YELLOW)+"rubis"+COLOR(QM_WHITE)+"!"+NEWLINE()+"C'est gigantesque!"+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_WALLET_GIANT)+INSTANT_TEXT_ON()+"¡Has conseguido una "+COLOR(QM_RED)+"bolsa para ricachones"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+NEWLINE()+"¡Qué descomunal! Ya puedes llevar"+NEWLINE()+"hasta "+COLOR(QM_YELLOW)+"999 "+COLOR(QM_WHITE)+COLOR(QM_YELLOW)+"rupias"+COLOR(QM_WHITE)+"!"+MESSAGE_END());
//Saria's Song Default Hint
CreateMessage(0x0A00, 0, 2, 3,
UNSKIPPABLE()+"Have you tried talking to the gossip"+NEWLINE()+ "stones around Hyrule? They might have"+NEWLINE()+"some good advice... Hee hee!"+WAIT_FOR_INPUT()+"If you learn something from the gossip stones,"+NEWLINE()+"I will remember it!"+EVENT_TRIGGER()+MESSAGE_END(),
UNSKIPPABLE()+"As-tu parlé aux pierres à potins"+NEWLINE()+ "dans Hyrule? Elles sont de bons conseils..."+NEWLINE()+"Hi hi!"+WAIT_FOR_INPUT()+"Si elles te révèlent quelque chose,"+NEWLINE()+"je m'en souviendrai!"+EVENT_TRIGGER()+MESSAGE_END(),
UNSKIPPABLE()+"¿Has probado a consultarle a las"+NEWLINE()+ "piedras chismosas esparcidas por Hyrule? Puede"+NEWLINE()+"que sean de ayuda a tu empresa... ¡Ji, ji!"+WAIT_FOR_INPUT()+"¡Puedo recordarte todo lo que aprendas de ellas,"+NEWLINE()+"si así lo deseas!"+EVENT_TRIGGER()+MESSAGE_END());
//Poe Collector (when enough has been sold)
CreateMessage(0x70F8, 0, 0, 0,
UNSKIPPABLE()+"Wait a minute! WOW!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"You have earned enough points!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Young man, you are a genuine "+COLOR(QM_RED)+"ghost hunter"+COLOR(QM_WHITE)+"!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Is that what you expected me to say?"+NEWLINE()+"Heh heh heh!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Because of you, I have extra inventory of"+NEWLINE()+COLOR(QM_RED)+"Big Poes"+COLOR(QM_WHITE)+", so this will be the last time I can"+NEWLINE()
+"buy one of these ghosts."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"You're thinking about what I promised would"+NEWLINE()+"happen when you earned enough points."+NEWLINE()+"Heh heh."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Don't worry. I didn't forget. Just take this."+MESSAGE_END(),
UNSKIPPABLE()+"Ooooh! WHOA!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Tu as obtenu suffisamment de points!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Tu es un véritable "+COLOR(QM_RED)+"chasseur de fantômes"+COLOR(QM_WHITE)+"!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Il est content, hein?"+NEWLINE()+"Il est content le monsieur?"+NEWLINE()+"Hé hé hé!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Grâce à toi, mon stock d'"+COLOR(QM_RED)+"Âmes"+COLOR(QM_WHITE)+" est plein!"+NEWLINE()+"C'est donc la dernière fois que nous"+NEWLINE()+"faisons affaire."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Je sais, je sais..."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Nous avions passé un pacte..."+NEWLINE()+"Tu as eu tes points et je t'en félicite..."+NEWLINE()+"Hé hé hé!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Alors prends donc ceci, mon bon ami!"+MESSAGE_END(),
UNSKIPPABLE()+"¡Un momento! ¡OYE!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"¡Has conseguido los puntos suficientes!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"¡Jovencito, eres un auténtico "+COLOR(QM_RED)+"cazador de"+NEWLINE()+"fantasmas"+COLOR(QM_WHITE)+"!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"¿Era eso lo que esperabas que dijera?"+NEWLINE()+"¡Je, je je!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Gracias a ti, ya tengo la cantidad necesaria"+NEWLINE()+"de "+COLOR(QM_RED)+"grandes poes"+COLOR(QM_WHITE)+", así que esta será la"+NEWLINE()
+"última vez que te compre unos de ese tipo."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"¿Recuerdas lo que te dije que ocurriría"+NEWLINE()+"cuando tuvieses suficientes puntos?"+NEWLINE()+"Je, je, je."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Tranquilo, que no se me ha olvidado."+NEWLINE()+"Toma esto."+MESSAGE_END());
//Ice Trap
CreateMessage(0x9002, 0, 2, 3,
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+COLOR(QM_RED)+"FOOL!"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+COLOR(QM_RED)+"IDIOT!"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+COLOR(QM_RED)+"¡TONTO!"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END());
//Business Scrubs
//The less significant byte represents the price of the item
for (uint32_t price = 0; price <= 95; price += 5) {
CreateMessage(0x9000 + price, 0, 0, 0,
INSTANT_TEXT_ON()+"I'll sell you something good for "+COLOR(QM_RED)+std::to_string(price)+" Rupees"+COLOR(QM_WHITE)+"!"+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"OK"+NEWLINE()+"No way"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END(),
INSTANT_TEXT_ON()+"Je te vends un truc super pour "+COLOR(QM_RED)+std::to_string(price)+" Rubis"+COLOR(QM_WHITE)+"!"+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"D'accord"+NEWLINE()+"Hors de question"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END(),
INSTANT_TEXT_ON()+"¡Te puedo vender algo bueno por "+COLOR(QM_RED)+std::to_string(price)+" rupias"+COLOR(QM_WHITE)+"!"+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"Vale"+NEWLINE()+"Ni hablar"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END());
}
//Poe Collector
//The last digit represent the number of poes needed to collect
for (uint32_t poes = 1; poes <= 10; poes++) {
CreateMessage(0x9080 + poes, 0, 0, 0,
UNSKIPPABLE()+"Oh, you brought a Poe today!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Hmmmm!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Very interesting! This is a "+COLOR(QM_RED)+"Big Poe"+COLOR(QM_WHITE)+"!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"I'll buy it for "+COLOR(QM_RED)+"50 Rupees"+COLOR(QM_WHITE)+"."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"On top of that, I'll put "+COLOR(QM_RED)+"100 points "+COLOR(QM_WHITE)+"on"+NEWLINE()+"your card."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"If you earn "+COLOR(QM_RED)+std::to_string(poes * 100)+" points"+COLOR(QM_WHITE)+", you'll be a"+NEWLINE()+"happy man! Heh heh."+MESSAGE_END(),
UNSKIPPABLE()+"Oh! Tu as apporté un fantôme!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Hmmmm!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Magnifique!"+NEWLINE()+"C'est une "+COLOR(QM_RED)+"Âme"+COLOR(QM_WHITE)+"!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Je t'en donne "+COLOR(QM_RED)+"50 Rubis"+COLOR(QM_WHITE)+"."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Et en plus, j'inscris "+COLOR(QM_RED)+"100 points "+COLOR(QM_WHITE)+NEWLINE()+"sur ta carte."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Obtiens "+COLOR(QM_RED)+std::to_string(poes * 100)+" points"+COLOR(QM_WHITE)+" et tu ne"+NEWLINE()+"seras pas déçu..."+NEWLINE()+"Hé hé hé."+MESSAGE_END(),
UNSKIPPABLE()+"¡Vaya! ¡Traes un poe!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"¡Mmm! ¿A ver?"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"¡Qué interesante! ¡Es un "+COLOR(QM_RED)+"gran poe"+COLOR(QM_WHITE)+"!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"Te daré "+COLOR(QM_RED)+"50 rupias "+COLOR(QM_WHITE)+"por él."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Y además agregaré "+COLOR(QM_RED)+"100 puntos "+COLOR(QM_WHITE)+"a tu"+NEWLINE()+"tarjeta."+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()
+"¡Si llegas a "+COLOR(QM_RED)+std::to_string(poes * 100)+" puntos"+COLOR(QM_WHITE)+", serás muy feliz!"+NEWLINE()+"Je, je, je..."+MESSAGE_END());
}
//Talon (this is to prevent accidentally skipping Malon in HC)
CreateMessage(0x9100, 0, 2, 0,
UNSKIPPABLE()+"You should go talk to my daughter Malon,"+NEWLINE()+"she has an item for you."+NEWLINE()+SET_SPEED(3)+"........."+SET_SPEED(0)+WAIT_FOR_INPUT()+"I have to think about some stuff now,"+NEWLINE()+"please don't distract me."+MESSAGE_END(),
UNSKIPPABLE()+"Zzzz... Muh... Malon..."+NEWLINE()+"Parler avec... Malon..."+NEWLINE()+SET_SPEED(3)+"........."+SET_SPEED(0)+WAIT_FOR_INPUT()+"Si fatigué..."+NEWLINE()+"Quelle vie..."+MESSAGE_END(),
UNSKIPPABLE()+"Habla con Malon, tiene algo que darte..."+SET_SPEED(3)+"........."+SET_SPEED(0)+MESSAGE_END());
//Bow Shooting Gallery reminder
CreateMessage(0x9140, 0, 0, 0,
UNSKIPPABLE()+"Wonderful! Bravo! Perfect!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Here's a fantastic present! But I have"+COLOR(QM_RED)+NEWLINE()+"something else "+COLOR(QM_WHITE)+"for you once you have a bow."+SET_SPEED(30)+" "+EVENT_TRIGGER()+MESSAGE_END(),
UNSKIPPABLE()+"Merveilleux! Bravo! C'est parfait!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"Voici un prix fantastique! J'aurai "+COLOR(QM_RED)+"autre chose"+COLOR(QM_WHITE)+NEWLINE()+"pour toi quand tu auras un arc."+SET_SPEED(30)+" "+EVENT_TRIGGER()+MESSAGE_END(),
UNSKIPPABLE()+"¡Espectacular! ¡Bravo! ¡Perfecto!"+WAIT_FOR_INPUT()+NEWLINE()+UNSKIPPABLE()+"¡Toma este sensacional regalo! Pero te tengo"+NEWLINE()+"guardado "+COLOR(QM_RED)+"algo más "+COLOR(QM_WHITE)+"para cuando traigas tu"+NEWLINE()+"propio arco."+SET_SPEED(30)+" "+EVENT_TRIGGER()+MESSAGE_END());
//Shopsanity items
//64 textboxes, 2 for each of 32 potential shopsanity items
for(uint32_t shopitems = 0; shopitems < NonShopItems.size(); shopitems++) {
Text name = NonShopItems[shopitems].Name;
std::string price = std::to_string(NonShopItems[shopitems].Price);
//Prevent names from being too long and overflowing textbox
if (name.GetEnglish() == "Piece of Heart (Treasure Chest Minigame)") {
name = Text{"Piece of Heart", "Quart de Coeur", "Pieza de corazón"};
} else if (name.GetEnglish() == "Green Rupee (Treasure Chest Minigame)") {
name = Text{"Green Rupee", "Rubis Vert", "Rupia verde"};
}
//Message to display when hovering over the item
if (NonShopItems[shopitems].Repurchaseable) { //Different checkbox for repurchaseable items
CreateMessage(0x9200+shopitems*2, 0, 0, 0,
INSTANT_TEXT_ON()+COLOR(QM_RED)+name.GetEnglish()+": "+price+" Rupees"+NEWLINE()+COLOR(QM_WHITE)+"Special deal!"+NEWLINE()+"Buy as many as you want!"+SHOP_MESSAGE_BOX()+MESSAGE_END(),
INSTANT_TEXT_ON()+COLOR(QM_RED)+name.GetFrench()+": "+price+" rubis"+NEWLINE()+COLOR(QM_WHITE)+"Offre spéciale!"+NEWLINE()+"Achetez-en à volonté!"+SHOP_MESSAGE_BOX()+MESSAGE_END(),
INSTANT_TEXT_ON()+COLOR(QM_RED)+name.GetSpanish()+": "+price+" rupias"+NEWLINE()+COLOR(QM_WHITE)+"¡Oferta especial!"+NEWLINE()+"¡Compra todo lo que quieras!"+SHOP_MESSAGE_BOX()+MESSAGE_END());
}
else { //Normal textbox
CreateMessage(0x9200+shopitems*2, 0, 0, 0,
INSTANT_TEXT_ON()+COLOR(QM_RED)+name.GetEnglish()+": "+price+" Rupees"+NEWLINE()+COLOR(QM_WHITE)+"Special deal! ONE LEFT!"+NEWLINE()+"Get it while it lasts!"+SHOP_MESSAGE_BOX()+MESSAGE_END(),
INSTANT_TEXT_ON()+COLOR(QM_RED)+name.GetFrench()+": "+price+" rubis"+NEWLINE()+COLOR(QM_WHITE)+"Offre spéciale! DERNIER EN STOCK!"+NEWLINE()+"Faites vite!"+SHOP_MESSAGE_BOX()+MESSAGE_END(),
INSTANT_TEXT_ON()+COLOR(QM_RED)+name.GetSpanish()+": "+price+" rupias"+NEWLINE()+COLOR(QM_WHITE)+"¡Oferta especial! ¡SOLO QUEDA UNA UNIDAD!"+NEWLINE()+"¡Hazte con ella antes de que se agote!"+SHOP_MESSAGE_BOX()+MESSAGE_END());
}
//Message to display when going to buy the item
CreateMessage(0x9200+shopitems*2+1, 0, 0, 0,
INSTANT_TEXT_ON()+name.GetEnglish()+": "+price+" Rupees"+INSTANT_TEXT_OFF()+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"Buy"+NEWLINE()+"Don't buy"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END(),
INSTANT_TEXT_ON()+name.GetFrench()+": "+price+" rubis"+INSTANT_TEXT_OFF()+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"Acheter"+NEWLINE()+"Ne pas acheter"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END(),
INSTANT_TEXT_ON()+name.GetSpanish()+": "+price+" rupias"+INSTANT_TEXT_OFF()+NEWLINE()+NEWLINE()+TWO_WAY_CHOICE()+COLOR(QM_GREEN)+"Comprar"+NEWLINE()+"No comprar"+COLOR(QM_WHITE)+INSTANT_TEXT_OFF()+MESSAGE_END());
}
//easter egg
CreateMessage(0x96F, 0, 2, 2,
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"Oh hey, you watched all the credits!"+NEWLINE()+CENTER_TEXT()+"Here's a prize for your patience."+NEWLINE()+CENTER_TEXT()+"Unlocking MQ and saving..."+NEWLINE()+NEWLINE()+CENTER_TEXT()+COLOR(QM_RED)+"Do not remove the Game Card"+NEWLINE()+CENTER_TEXT()+"or turn the power off."+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"The Legend of Zelda Ocarina of Time 3D"+NEWLINE()+CENTER_TEXT()+"Master Quest va être déverrouillé."+NEWLINE()+CENTER_TEXT()+"Sauvegarde... Veuillez patienter."+NEWLINE()+NEWLINE()+CENTER_TEXT()+COLOR(QM_RED)+"N'éteignez pas la console et"+NEWLINE()+CENTER_TEXT()+"ne retirez pas la carte de jeu"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"Desbloqueando The Legend of Zelda"+NEWLINE()+CENTER_TEXT()+"Ocarina of Time 3D Master Quest."+NEWLINE()+CENTER_TEXT()+"Guardando. Espera un momento..."+NEWLINE()+NEWLINE()+CENTER_TEXT()+COLOR(QM_RED)+"No saques la tarjeta de juego"+NEWLINE()+CENTER_TEXT()+"ni apagues la consola."+INSTANT_TEXT_OFF()+MESSAGE_END());
CreateMessage(0x970, 0, 2, 3,
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"Master Quest doesn't affect the Randomizer,"+NEWLINE()+CENTER_TEXT()+"so you can use 3 more save slots now."+NEWLINE()+NEWLINE()+CENTER_TEXT()+"Thanks for playing!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"Vous pouvez désormais jouer à"+NEWLINE()+CENTER_TEXT()+"The Legend of Zelda Ocarina of Time 3D"+NEWLINE()+CENTER_TEXT()+"Master Quest!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"¡Ya puedes jugar The Legend of Zelda"+NEWLINE()+CENTER_TEXT()+"Ocarina of Time 3D Master Quest!"+INSTANT_TEXT_OFF()+MESSAGE_END());
//Messages for the new Lake Hylia switch
CreateMessage(0x346, 0, 1, 3,
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"Water level control system."+NEWLINE()+CENTER_TEXT()+"Keep away!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"Contrôle du niveau d'eau."+NEWLINE()+CENTER_TEXT()+"Ne pas toucher!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+INSTANT_TEXT_ON()+CENTER_TEXT()+"Control del nivel del agua."+NEWLINE()+CENTER_TEXT()+"¡No te acerques!"+INSTANT_TEXT_OFF()+MESSAGE_END());
CreateMessage(0x1B3, 0, 0, 3,
UNSKIPPABLE()+"This switch is rustier than you think."+WAIT_FOR_INPUT()+"Something must be wrong with the pipe"+NEWLINE()+"system in the Water Temple."+MESSAGE_END(),
UNSKIPPABLE()+"Cet interrupteur est très rouillé."+WAIT_FOR_INPUT()+"Quelque chose ne va pas avec"+NEWLINE()+"la tuyauterie du Temple de l'Eau."+MESSAGE_END(),
UNSKIPPABLE()+"El interruptor está más oxidado de lo que"+NEWLINE()+"aparenta."+WAIT_FOR_INPUT()+"Algo debe andar mal en el sistema de"+NEWLINE()+"cañerías del Templo del Agua."+MESSAGE_END());
//Treasure chest shop keys. If they're not randomized leave the base game text
if (Settings::ShuffleChestMinigame.Is(SHUFFLECHESTMINIGAME_SINGLE_KEYS)) {
CreateMessage(0x0F3, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"You got a "+COLOR(QM_RED)+"Treasure Chest Shop"+NEWLINE()+"Small Key"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"Vous trouvez une "+COLOR(QM_RED)+"Petite Clé"+NEWLINE()+"de la Chasse-aux-Trésors"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"¡Has obtenido una "+COLOR(QM_RED)+"llave pequeña del"+NEWLINE()+"Cofre del Tesoro"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
} else if (Settings::ShuffleChestMinigame.Is(SHUFFLECHESTMINIGAME_PACK)) {
CreateMessage(0x0F3, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"You got all 6 "+COLOR(QM_RED)+"Treasure Chest Shop"+NEWLINE()+"Small Keys"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"Vous trouvez les "+COLOR(QM_RED)+"petites clés"+NEWLINE()+"de la Chasse-aux-Trésors"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_KEY_SMALL)+INSTANT_TEXT_ON()+"¡Has obtenido todas las 6 "+COLOR(QM_RED)+"llaves"+NEWLINE()+"pequeñas del Cofre del Tesoro"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+MESSAGE_END());
}
}
Text AddColorsAndFormat(Text text, const std::vector<uint8_t>& colors /*= {}*/) {
//for each language
@ -465,7 +239,7 @@ constexpr std::array DungeonColors = {
textStr->replace(firstHashtag, 1, COLOR(color));
size_t secondHashtag = textStr->find('#');
if (secondHashtag == std::string::npos) {
CitraPrint("ERROR: Couldn't find second '#' in " + (*textStr));
//CitraPrint("ERROR: Couldn't find second '#' in " + (*textStr));
} else {
textStr->replace(secondHashtag, 1, COLOR(QM_WHITE));
}
@ -477,9 +251,7 @@ constexpr std::array DungeonColors = {
void ClearMessages() {
messageEntries.clear();
arrangedMessageEntries.clear();
messageData.str("");
arrangedMessageData = "";
}
std::string MESSAGE_END() { return "\x7F\x00"s; }
@ -513,7 +285,7 @@ constexpr std::array DungeonColors = {
std::string UNSKIPPABLE() { return "\x7F\x19"s; }
std::string TWO_WAY_CHOICE() { return "\x7F\x1A\xFF\xFF\xFF\xFF"s; }
std::string NEWLINE() { return "\x7F\x1C"s; }
std::string COLOR(uint8_t x) { return "\x7F\x1D"s + char(x); }
std::string COLOR(uint8_t x) { return "\x7F\x1D"s + char(x); }
std::string CENTER_TEXT() { return "\x7F\x1E"s; }
std::string IF_NOT_MQ() { return "\x7F\x29"s; }
std::string MQ_ELSE() { return "\x7F\x2A"s; }

View File

@ -47,23 +47,10 @@ typedef struct {
MessageLanguageInfo info[10];
} MessageEntry; // size = 0x60
typedef struct {
char magic[4]; //"QM\0\0"
uint32_t unk_04;
uint32_t numEntries;
uint32_t unk_0C;
} MessageFileHeader;
void CreateMessage(uint32_t textId, uint32_t unk_04, uint32_t textBoxType, uint32_t textBoxPosition,
std::string englishText, std::string frenchText, std::string spanishText);
void CreateMessageFromTextObject(uint32_t textId, uint32_t unk_04, uint32_t textBoxType, uint32_t textBoxPosition, const Text& text);
uint32_t NumMessages();
std::pair<const char*, uint32_t> RawMessageEntryData();
std::pair<const char*, uint32_t> RawMessageData();
void CreateAlwaysIncludedMessages();
Text AddColorsAndFormat(Text text, const std::vector<uint8_t>& colors = {});
void ClearMessages();

View File

@ -1,5 +0,0 @@
#include "debug.hpp"
void CitraPrint (std::string_view str) {
}

View File

@ -1,5 +0,0 @@
#pragma once
#include <string_view>
void CitraPrint(std::string_view str);

View File

@ -5,7 +5,6 @@
#include "item_list.hpp"
#include "item_pool.hpp"
#include "item_location.hpp"
#include "debug.hpp"
#include "spoiler_log.hpp"
#include "hints.hpp"
#include "location_access.hpp"

View File

@ -2,7 +2,6 @@
#include "keys.hpp"
#include "location_access.hpp"
#include "debug.hpp"
#include <string>
#include <list>
@ -85,13 +84,13 @@ public:
}
void printAgeTimeAccess() {
CitraPrint("Name: ");
CitraPrint(name);
//CitraPrint("Name: ");
//CitraPrint(name);
auto message = "Child Day: " + std::to_string(CheckConditionAtAgeTime(Logic::IsChild, Logic::AtDay)) + "\t"
"Child Night: " + std::to_string(CheckConditionAtAgeTime(Logic::IsChild, Logic::AtNight)) + "\t"
"Adult Day: " + std::to_string(CheckConditionAtAgeTime(Logic::IsAdult, Logic::AtDay)) + "\t"
"Adult Night: " + std::to_string(CheckConditionAtAgeTime(Logic::IsAdult, Logic::AtNight));
CitraPrint(message);
//CitraPrint(message);
}
bool ConditionsMet(bool allAgeTimes = false) const {

View File

@ -13,7 +13,6 @@
#include "hint_list.hpp"
#include "entrance.hpp"
#include "shops.hpp"
#include "debug.hpp"
#include <vector>
#include <list>
@ -917,7 +916,6 @@ void VanillaFill() {
//Finish up
CreateItemOverrides();
CreateEntranceOverrides();
CreateAlwaysIncludedMessages();
CreateWarpSongTexts();
}
@ -1072,7 +1070,6 @@ int Fill() {
printf("Done");
CreateItemOverrides();
CreateEntranceOverrides();
CreateAlwaysIncludedMessages();
if (GossipStoneHints.IsNot(HINTS_NO_HINTS)) {
printf("\x1b[10;10HCreating Hints...");
CreateAllHints();
@ -1081,7 +1078,7 @@ int Fill() {
if (ShuffleMerchants.Is(SHUFFLEMERCHANTS_HINTS)) {
CreateMerchantsHints();
}
//Always execute ganon hint generation for the funny line
//Always execute ganon hint generation for the funny line
CreateGanonText();
CreateAltarText();
CreateDampesDiaryText();

View File

@ -266,12 +266,6 @@ static void AddHint(Text hint, const uint32_t gossipStone, const std::vector<uin
Location(gossipStone)->SetHintedLocation(hintedLocation);
Location(gossipStone)->SetHintType(hintType);
Location(gossipStone)->SetHintedRegion(GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText().GetEnglish());
//create the in game message
// uint32_t messageId = 0x400 + Location(gossipStone)->GetFlag();
// uint32_t sariaMessageId = 0xA00 + Location(gossipStone)->GetFlag();
// CreateMessageFromTextObject(messageId, 0, 2, 3, AddColorsAndFormat(hint, colors));
// CreateMessageFromTextObject(sariaMessageId, 0, 2, 3, AddColorsAndFormat(hint + EVENT_TRIGGER(), colors));
}
static void CreateLocationHint(const std::vector<uint32_t>& possibleHintLocations) {

View File

@ -70,10 +70,10 @@ ItemOverride_Value Item::Value() const {
if (getItemId == GI_ICE_TRAP) {
val.looksLikeItemId = RandomElement(IceTrapModels);
}
if (!Settings::ColoredBossKeys && (getItemId >= 0x95 && getItemId <= 0x9A)) { //Boss keys
if (getItemId >= 0x95 && getItemId <= 0x9A) { //Boss keys
val.looksLikeItemId = GI_KEY_BOSS;
}
if (!Settings::ColoredKeys && (getItemId >= 0xAF && getItemId <= 0xB7)) { //Small keys
if (getItemId >= 0xAF && getItemId <= 0xB7) { //Small keys
val.looksLikeItemId = GI_KEY_SMALL;
}
if (type == ITEMTYPE_SHOP) {

File diff suppressed because it is too large Load Diff

View File

@ -50,7 +50,6 @@ typedef union ItemOverride_Key {
char pad_;
uint8_t scene;
uint8_t type;
uint8_t flag;
};
} ItemOverride_Key;
@ -119,20 +118,16 @@ class SpoilerCollectionCheck {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_CHEST, scene, flag);
}
static auto Cow(uint8_t scene, uint8_t flag) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_COW, scene, flag);
static auto Cow() {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_COW, 0x00, 0x00);
}
static auto Fishing(uint8_t bit) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_MINIGAME, 0x00, bit);
static auto Fishing() {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_MINIGAME, 0x00, 0x00);
}
static auto Scrub(uint8_t scene, uint8_t bit) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_SCRUB, scene, bit);
}
static auto Biggoron(uint8_t mask) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_BIGGORON, 0x00, mask);
static auto Scrub() {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_SCRUB, 0x00, 0x00);
}
static auto GerudoToken() {
@ -147,28 +142,28 @@ class SpoilerCollectionCheck {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_GRAVEDIGGER, scene, flag);
}
static auto ShopItem(uint8_t scene, uint8_t itemSlot) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_SHOP_ITEM, scene, itemSlot);
static auto ShopItem() {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_SHOP_ITEM, 0x00, 0x00);
}
static auto MagicBeans(uint8_t scene, uint8_t flag) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_MAGIC_BEANS, scene, flag);
static auto MagicBeans() {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_MAGIC_BEANS, 0x00, 0x00);
}
static auto Merchant(int8_t scene, uint8_t flag) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_MERCHANT, scene, flag);
static auto Merchant() {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_MERCHANT, 0x00, 0x00);
}
static auto RandomizerInf(int8_t scene, uint8_t flag) {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF, scene, flag);
static auto RandomizerInf() {
return SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF, 0x00, 0x00);
}
};
class ItemLocation {
public:
ItemLocation() = default;
ItemLocation(RandomizerCheck rc_, uint8_t scene_, ItemLocationType type_, uint8_t flag_, std::string name_, uint32_t hintKey_, uint32_t vanillaItem_, std::vector<Category> categories_, uint16_t price_ = 0, SpoilerCollectionCheck collectionCheck_ = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup_ = SpoilerCollectionCheckGroup::GROUP_NO_GROUP)
: rc(rc_), scene(scene_), type(type_), flag(flag_), name(std::move(name_)), hintKey(hintKey_), vanillaItem(vanillaItem_), categories(std::move(categories_)), price(price_), collectionCheck(collectionCheck_), collectionCheckGroup(collectionCheckGroup_) {}
ItemLocation(RandomizerCheck rc_, uint8_t scene_, ItemLocationType type_, std::string name_, uint32_t hintKey_, uint32_t vanillaItem_, std::vector<Category> categories_, uint16_t price_ = 0, SpoilerCollectionCheck collectionCheck_ = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup_ = SpoilerCollectionCheckGroup::GROUP_NO_GROUP)
: rc(rc_), scene(scene_), type(type_), name(std::move(name_)), hintKey(hintKey_), vanillaItem(vanillaItem_), categories(std::move(categories_)), price(price_), collectionCheck(collectionCheck_), collectionCheckGroup(collectionCheckGroup_) {}
ItemOverride_Key Key() const {
ItemOverride_Key key;
@ -176,7 +171,6 @@ public:
key.scene = scene;
key.type = static_cast<uint8_t>(type); //TODO make sure these match up
key.flag = flag;
return key;
}
@ -196,10 +190,6 @@ public:
return scene;
}
uint8_t GetFlag() const {
return flag;
}
bool IsAddedToPool() const {
return addedToPool;
}
@ -384,26 +374,16 @@ public:
}
void AddExcludeOption() {
//setting description /*--------------------------------------------------*/
std::string_view desc = "Decide which locations you want to exclude from\n"
"the location pool. Locations that require an item\n"
"to be placed at them based on your current\n"
"settings cannot be excluded and won't be shown\n"
"unless you change your settings.\n"
"\n"
"If you exclude too many locations, it might not\n"
"be possible to fill the world.";
//add option to forbid any location from progress items
if (name.length() < 23) {
excludedOption = Option::Bool(name, {"Include", "Exclude"}, {desc});
excludedOption = Option::Bool(name, {"Include", "Exclude"});
} else {
//insert a newline character if the text is too long for one row
size_t lastSpace = name.rfind(' ', 23);
std::string settingText = name;
settingText.replace(lastSpace, 1, "\n ");
excludedOption = Option::Bool(settingText, {"Include", "Exclude"}, {desc});
excludedOption = Option::Bool(settingText, {"Include", "Exclude"});
}
// RANDOTODO: this without string compares and loops
@ -418,48 +398,48 @@ public:
}
}
static auto Base(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Base, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
static auto Base(RandomizerCheck rc, uint8_t scene, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Base, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
}
static auto Chest(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Chest, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_CHEST, scene, flag), collectionCheckGroup};
return ItemLocation{rc, scene, ItemLocationType::Chest, std::move(name), hintKey, vanillaItem, std::move(categories), 0, SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_CHEST, scene, flag), collectionCheckGroup};
}
static auto Chest(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck, SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Chest, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
static auto Chest(RandomizerCheck rc, uint8_t scene, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck, SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Chest, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
}
static auto Collectable(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Collectable, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_COLLECTABLE, scene, flag), collectionCheckGroup};
return ItemLocation{rc, scene, ItemLocationType::Collectable, std::move(name), hintKey, vanillaItem, std::move(categories), 0, SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_COLLECTABLE, scene, flag), collectionCheckGroup};
}
static auto Collectable(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck, SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Collectable, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
static auto Collectable(RandomizerCheck rc, uint8_t scene, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck, SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Collectable, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
}
static auto GSToken(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, std::vector<Category>&& categories, SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::GSToken, flag, std::move(name), hintKey, GOLD_SKULLTULA_TOKEN, std::move(categories), 0, SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_GOLD_SKULLTULA, scene, flag), collectionCheckGroup};
return ItemLocation{rc, scene, ItemLocationType::GSToken, std::move(name), hintKey, GOLD_SKULLTULA_TOKEN, std::move(categories), 0, SpoilerCollectionCheck(SpoilerCollectionCheckType::SPOILER_CHK_GOLD_SKULLTULA, scene, flag), collectionCheckGroup};
}
static auto GrottoScrub(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::GrottoScrub, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
static auto GrottoScrub(RandomizerCheck rc, uint8_t scene, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::GrottoScrub, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
}
static auto Delayed(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Delayed, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
static auto Delayed(RandomizerCheck rc, uint8_t scene, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::Delayed, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
}
static auto Reward(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::TempleReward, flag, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
static auto Reward(RandomizerCheck rc, uint8_t scene, std::string&& name, const uint32_t hintKey, const uint32_t vanillaItem, std::vector<Category>&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) {
return ItemLocation{rc, scene, ItemLocationType::TempleReward, std::move(name), hintKey, vanillaItem, std::move(categories), 0, collectionCheck, collectionCheckGroup};
}
static auto OtherHint(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, std::vector<Category>&& categories) {
return ItemLocation{rc, scene, ItemLocationType::OtherHint, flag, std::move(name), NONE, NONE, std::move(categories)};
static auto OtherHint(RandomizerCheck rc, std::string&& name) {
return ItemLocation{rc, 0, ItemLocationType::OtherHint, std::move(name), NONE, NONE, {}};
}
static auto HintStone(RandomizerCheck rc, uint8_t scene, uint8_t flag, std::string&& name, std::vector<Category>&& categories) {
return ItemLocation{rc, scene, ItemLocationType::HintStone, flag, std::move(name), NONE, NONE, std::move(categories)};
static auto HintStone(RandomizerCheck rc, std::string&& name) {
return ItemLocation{rc, 0, ItemLocationType::HintStone, std::move(name), NONE, NONE, {}};
}
void ResetVariables() {
@ -479,7 +459,6 @@ private:
RandomizerCheck rc;
uint8_t scene;
ItemLocationType type;
uint8_t flag;
bool checked = false;
std::string name;
@ -493,7 +472,7 @@ private:
HintType hintType;
std::string hintedRegion;
uint32_t delayedItem = NONE;
Option excludedOption = Option::Bool(name, {"Include", "Exclude"}, {"", ""});
Option excludedOption = Option::Bool(name, {"Include", "Exclude"});
uint16_t price = 0;
SpoilerCollectionCheck collectionCheck;
SpoilerCollectionCheckGroup collectionCheckGroup;

View File

@ -162,8 +162,8 @@ Entrance* Area::GetExit(uint32_t exitToReturn) {
return &exit;
}
}
auto message = "ERROR: EXIT " + AreaTable(exitToReturn)->regionName + " DOES NOT EXIST IN " + this->regionName;
CitraPrint(message);
//auto message = "ERROR: EXIT " + AreaTable(exitToReturn)->regionName + " DOES NOT EXIST IN " + this->regionName;
//CitraPrint(message);
return nullptr;
}

View File

@ -214,7 +214,7 @@ public:
"Child Night: " + std::to_string(childNight) + "\t"
"Adult Day: " + std::to_string(adultDay) + "\t"
"Adult Night: " + std::to_string(adultNight);
CitraPrint(message);
//CitraPrint(message);
}
};

View File

@ -8,7 +8,6 @@
#include "settings.hpp"
#include "dungeon.hpp"
#include "setting_descriptions.hpp"
using namespace Settings;
@ -462,11 +461,6 @@ namespace Logic {
}
uint8_t GetDifficultyValueFromString(Option& glitchOption) {
for (size_t i = 0; i < GlitchDifficulties.size(); i++) {
if (glitchOption.GetSelectedOptionText() == GlitchDifficulties[i]) {
return i + 1;
}
}
return 0;
}

View File

@ -5,15 +5,12 @@
#include <sstream>
#include <ctime>
#include "cosmetics.hpp"
#include "menu.hpp"
#include "patch.hpp"
#include "preset.hpp"
#include "playthrough.hpp"
#include "randomizer.hpp"
#include "settings.hpp"
#include "spoiler_log.hpp"
#include "location_access.hpp"
#include "debug.hpp"
#include <spdlog/spdlog.h>
#include "../../randomizer/randomizerTypes.h"
#include <boost_custom/container_hash/hash_32.hpp>
@ -22,496 +19,9 @@ namespace {
bool seedChanged;
uint16_t pastSeedLength;
std::vector<std::string> presetEntries;
std::vector<Menu*> menuList;
Option* currentSetting;
Menu* currentMenu;
} // namespace
void PrintTopScreen() {
SPDLOG_DEBUG("\x1b[2;11H%sOcarina of Time 3D Randomizer%s", CYAN, RESET);
SPDLOG_DEBUG("\x1b[3;18H%s%s-%s%s", CYAN, RANDOMIZER_VERSION, COMMIT_NUMBER, RESET);
SPDLOG_DEBUG("\x1b[4;10HA/B/D-pad: Navigate Menu\n");
SPDLOG_DEBUG(" Select: Exit to Homebrew Menu\n");
SPDLOG_DEBUG(" Y: New Random Seed\n");
SPDLOG_DEBUG(" X: Input Custom Seed\n");
SPDLOG_DEBUG("\x1b[11;7HCurrent Seed: %u", Settings::seed);
}
void MenuInit() {
Settings::InitSettings();
seedChanged = false;
Menu* main = new Menu("Main", MenuType::MainMenu, &Settings::mainMenu, MAIN_MENU);
menuList.push_back(main);
currentMenu = main;
srand(time(NULL));
if (!CreatePresetDirectories()) {
printf("\x1b[20;5Failed to create preset directories.");
printf("\x1b[21;5Loading presets might crash.");
}
// If cached presets exist, load them
LoadCachedSettings();
LoadCachedCosmetics();
// If Randomize all settings in a category is selected
// Re-randomize them
Settings::RandomizeAllSettings();
PrintTopScreen();
PrintMainMenu();
}
#define KEY_DUP 0
#define KEY_DDOWN 1
#define KEY_DLEFT 2
#define KEY_DRIGHT 3
#define KEY_A 4
#define KEY_B 5
#define KEY_Y 6
#define KEY_X 7
void MoveCursor(uint32_t kDown, bool updatedByHeld) {
// Option sub menus need special checking for locked options
if (currentMenu->mode == OPTION_SUB_MENU) {
// Cancel if holding and reached first/last selectable option
if (updatedByHeld) {
bool noSelectableOption = true;
if (kDown & KEY_DUP) {
for (int i = currentMenu->menuIdx - 1; i >= 0; i--) {
if (!currentMenu->settingsList->at(i)->IsHidden() &&
!currentMenu->settingsList->at(i)->IsLocked()) {
noSelectableOption = false;
break;
}
}
}
if (kDown & KEY_DDOWN) {
for (size_t i = currentMenu->menuIdx + 1; i < currentMenu->settingsList->size(); i++) {
if (!currentMenu->settingsList->at(i)->IsHidden() &&
!currentMenu->settingsList->at(i)->IsLocked()) {
noSelectableOption = false;
break;
}
}
}
if (noSelectableOption) {
return;
}
}
// Loop through settings until an unlocked one is reached
do {
if ((kDown & KEY_DUP) != 0) {
currentMenu->menuIdx--;
}
if ((kDown & KEY_DDOWN) != 0) {
currentMenu->menuIdx++;
}
// Bounds checking
if (currentMenu->menuIdx == currentMenu->settingsList->size()) {
currentMenu->menuIdx = 0;
} else if (currentMenu->menuIdx == 0xFFFF) {
currentMenu->menuIdx = static_cast<uint16_t>(currentMenu->settingsList->size() - 1);
}
currentSetting = currentMenu->settingsList->at(currentMenu->menuIdx);
} while (currentSetting->IsLocked() || currentSetting->IsHidden());
}
// All other menus except reset-to-defaults confirmation
else if (currentMenu->mode != RESET_TO_DEFAULTS) {
// Cancel if holding and reached first/last menu
if (updatedByHeld) {
if ((kDown & KEY_DUP && currentMenu->menuIdx == 0) ||
(kDown & KEY_DDOWN && currentMenu->menuIdx == currentMenu->itemsList->size() - 1)) {
return;
}
}
if (kDown & KEY_DUP) {
currentMenu->menuIdx--;
}
if (kDown & KEY_DDOWN) {
currentMenu->menuIdx++;
}
// Bounds checking
uint16_t max = -1;
if (currentMenu->mode == LOAD_PRESET || currentMenu->mode == DELETE_PRESET) { // Number of presets if applicable
max = presetEntries.size();
} else if (currentMenu->mode == GENERATE_MODE) { // Generate menu: 2 options
max = 2;
} else if (currentMenu->itemsList != nullptr) {
max = currentMenu->itemsList->size(); // Default max: Number of items in menu
}
if (currentMenu->menuIdx == max) {
currentMenu->menuIdx = 0;
} else if (currentMenu->menuIdx == 0xFFFF) {
currentMenu->menuIdx = max - 1;
}
// Scroll Check
if (currentMenu->menuIdx > currentMenu->settingBound + (MAX_SUBMENUS_ON_SCREEN - 1)) {
currentMenu->settingBound = currentMenu->menuIdx - (MAX_SUBMENUS_ON_SCREEN - 1);
} else if (currentMenu->menuIdx < currentMenu->settingBound) {
currentMenu->settingBound = currentMenu->menuIdx;
}
}
}
void MenuUpdate(uint32_t kDown, bool updatedByHeld) {
// Check for menu change
// If user pressed A on a non-option, non-action menu, they're navigating to a new menu
if (kDown & KEY_A && currentMenu->mode != OPTION_SUB_MENU && currentMenu->type != MenuType::Action) {
if (currentMenu->itemsList->size() > currentMenu->menuIdx) {
Menu* newMenu;
newMenu = currentMenu->itemsList->at(currentMenu->menuIdx);
menuList.push_back(newMenu);
currentMenu = menuList.back();
ModeChangeInit();
kDown = 0;
}
// If they pressed B on any menu other than main, go backwards to the previous menu
} else if (kDown & KEY_B && currentMenu->mode != MAIN_MENU) {
// Want to reset generate menu when leaving
if (currentMenu->mode == POST_GENERATE) {
currentMenu->mode = GENERATE_MODE;
}
PrintTopScreen();
menuList.pop_back();
currentMenu = menuList.back();
ModeChangeInit();
kDown = 0;
}
if (currentMenu->mode != POST_GENERATE) {
// New Random Seed
if (kDown & KEY_Y) {
Settings::seed = rand();
seedChanged = true;
}
// Input Custom Seed
if (kDown & KEY_X) {
// Settings::seed = GetInput("Enter Seed");
seedChanged = true;
}
// Reprint seed if it changed
if (seedChanged) {
printf("\x1b[11;21H%u", Settings::seed);
seedChanged = false;
}
}
// Print current menu (if applicable)
MoveCursor(kDown, updatedByHeld); // Move cursor, if applicable
if (currentMenu->mode == MAIN_MENU) {
PrintMainMenu();
ClearDescription();
} else if (currentMenu->mode == OPTION_SUB_MENU) {
UpdateOptionSubMenu(kDown);
PrintOptionSubMenu();
} else if (currentMenu->mode == LOAD_PRESET) {
UpdatePresetsMenu(kDown);
PrintPresetsMenu();
} else if (currentMenu->mode == DELETE_PRESET) {
UpdatePresetsMenu(kDown);
PrintPresetsMenu();
} else if (currentMenu->mode == RESET_TO_DEFAULTS) {
UpdateResetToDefaultsMenu(kDown);
PrintResetToDefaultsMenu();
} else if (currentMenu->mode == GENERATE_MODE) {
UpdateGenerateMenu(kDown);
if (currentMenu->mode != POST_GENERATE) {
PrintGenerateMenu();
}
} else if (currentMenu->mode == SUB_MENU) {
PrintSubMenu();
}
}
void ModeChangeInit() {
if (currentMenu->mode == OPTION_SUB_MENU) {
// loop through until we reach an unlocked setting
while (currentMenu->settingsList->at(currentMenu->menuIdx)->IsLocked() ||
currentMenu->settingsList->at(currentMenu->menuIdx)->IsHidden()) {
currentMenu->menuIdx++;
}
currentSetting = currentMenu->settingsList->at(currentMenu->menuIdx);
} else if (currentMenu->mode == SAVE_PRESET) {
ClearDescription();
if (SaveSpecifiedPreset(GetInput("Preset Name").substr(0, 19), OptionCategory::Setting)) {
printf("\x1b[24;5HPreset Saved!");
printf("\x1b[26;5HPress B to return to the preset menu.");
} else {
printf("\x1b[24;5HFailed to save preset.");
printf("\x1b[26;5HPress B to return to the preset menu.");
}
} else if (currentMenu->mode == LOAD_PRESET || currentMenu->mode == DELETE_PRESET) {
presetEntries = GetSettingsPresets();
} else if (currentMenu->mode == GENERATE_MODE) {
}
}
void UpdateCustomCosmeticColors(uint32_t kDown) {
if (kDown & KEY_A) {
if (currentSetting->GetSelectedOptionText().compare(0, 8, Cosmetics::CUSTOM_COLOR_PREFIX) == 0) {
std::string newColor = GetInput("Enter a 6 digit hex color").substr(0, 6);
if (Cosmetics::ValidHexString(newColor)) {
currentSetting->SetSelectedOptionText(Cosmetics::CustomColorOptionText(newColor));
}
}
}
}
void UpdateOptionSubMenu(uint32_t kDown) {
if ((kDown & KEY_DRIGHT) != 0) {
currentSetting->NextOptionIndex();
}
if ((kDown & KEY_DLEFT) != 0) {
currentSetting->PrevOptionIndex();
}
// Bounds checking
currentSetting->SanitizeSelectedOptionIndex();
currentSetting->SetVariable();
Settings::ForceChange(kDown, currentSetting);
UpdateCustomCosmeticColors(kDown);
}
void UpdatePresetsMenu(uint32_t kDown) {
// clear any potential message
ClearDescription();
if (kDown & KEY_A && currentMenu->mode == LOAD_PRESET && !presetEntries.empty()) {
if (LoadPreset(presetEntries[currentMenu->menuIdx], OptionCategory::Setting)) {
Settings::ResolveExcludedLocationConflicts();
for (Menu* menu : Settings::GetAllOptionMenus()) {
menu->ResetMenuIndex();
}
printf("\x1b[24;5HPreset Loaded!");
} else {
printf("\x1b[24;5HFailed to load preset.");
}
} else if (kDown & KEY_A && currentMenu->mode == DELETE_PRESET && !presetEntries.empty()) {
if (DeletePreset(presetEntries[currentMenu->menuIdx], OptionCategory::Setting)) {
presetEntries.erase(presetEntries.begin() + currentMenu->menuIdx);
if (currentMenu->menuIdx == presetEntries.size()) { // Catch when last preset is deleted
currentMenu->menuIdx--;
}
printf("\x1b[24;5HPreset Deleted.");
} else {
printf("\x1b[24;5HFailed to delete preset.");
}
}
}
void UpdateResetToDefaultsMenu(uint32_t kDown) {
// clear any potential message
ClearDescription();
if (kDown & KEY_A) {
Settings::SetDefaultSettings();
printf("\x1b[24;5HSettings have been reset to defaults.");
}
}
void UpdateGenerateMenu(uint32_t kDown) {
if ((kDown & KEY_A) != 0) {
Settings::PlayOption = currentMenu->menuIdx;
// GenerateRandomizer();
// This is just a dummy mode to stop the prompt from appearing again
currentMenu->mode = POST_GENERATE;
}
}
void PrintMainMenu() {
printf("\x1b[0;%dHMain Settings", 1 + (BOTTOM_WIDTH - 13) / 2);
for (uint8_t i = 0; i < MAX_SUBMENUS_ON_SCREEN; i++) {
if (i >= Settings::mainMenu.size())
break;
Menu* menu = Settings::mainMenu[i];
uint8_t row = 3 + i;
// make the current menu green
if (currentMenu->menuIdx == i) {
printf("\x1b[%d;%dH%s>", row, 2, GREEN);
printf("\x1b[%d;%dH%s%s", row, 3, menu->name.c_str(), RESET);
} else {
printf("\x1b[%d;%dH%s", row, 3, menu->name.c_str());
}
}
}
void PrintOptionSubMenu() {
// bounds checking incase settings go off screen
// this is complicated to account for hidden settings and there's probably a better way to do it
uint16_t hiddenSettings = 0;
uint16_t visibleSettings = 0;
for (uint16_t i = currentMenu->settingBound; visibleSettings < MAX_SUBMENU_SETTINGS_ON_SCREEN; i++) {
if (i >= currentMenu->settingsList->size()) {
break;
}
if (currentMenu->settingsList->at(i)->IsHidden()) {
hiddenSettings++;
} else {
visibleSettings++;
}
}
bool isLastVisibleSetting = true;
for (size_t i = currentMenu->menuIdx + 1; i < currentMenu->settingsList->size(); i++) {
if (!currentMenu->settingsList->at(i)->IsHidden()) {
isLastVisibleSetting = false;
break;
}
}
if (currentMenu->menuIdx >=
currentMenu->settingBound - (isLastVisibleSetting ? 0 : 1) + MAX_SUBMENU_SETTINGS_ON_SCREEN + hiddenSettings) {
currentMenu->settingBound = currentMenu->menuIdx;
uint8_t offset = 0;
// skip over hidden settings
while (offset < MAX_SUBMENU_SETTINGS_ON_SCREEN - (isLastVisibleSetting ? 1 : 2)) {
currentMenu->settingBound--;
if (currentMenu->settingBound == 0) {
break;
}
offset += currentMenu->settingsList->at(currentMenu->settingBound)->IsHidden() ? 0 : 1;
}
} else if (currentMenu->menuIdx < currentMenu->settingBound + 1) {
currentMenu->settingBound = std::max(currentMenu->menuIdx - 1, 0);
}
// print menu name
printf("\x1b[0;%dH%s", 1 + (BOTTOM_WIDTH - currentMenu->name.length()) / 2, currentMenu->name.c_str());
// keep count of hidden settings to not make blank spaces appear in the list
hiddenSettings = 0;
for (uint8_t i = 0; i - hiddenSettings < MAX_SUBMENU_SETTINGS_ON_SCREEN; i++) {
// break if there are no more settings to print
if (i + currentMenu->settingBound >= currentMenu->settingsList->size())
break;
Option* setting = currentMenu->settingsList->at(i + currentMenu->settingBound);
uint8_t row = 3 + ((i - hiddenSettings) * 2);
// make the current setting green
if (currentMenu->menuIdx == i + currentMenu->settingBound) {
printf("\x1b[%d;%dH%s>", row, 1, GREEN);
printf("\x1b[%d;%dH%s:", row, 2, setting->GetName().data());
printf("\x1b[%d;%dH%s%s", row, 26, setting->GetSelectedOptionText().data(), RESET);
// dim to make a locked setting grey
} else if (setting->IsLocked()) {
printf("\x1b[%d;%dH%s%s:", row, 2, DIM, setting->GetName().data());
printf("\x1b[%d;%dH%s%s", row, 26, setting->GetSelectedOptionText().data(), RESET);
// don't display hidden settings
} else if (setting->IsHidden()) {
hiddenSettings++;
continue;
} else {
printf("\x1b[%d;%dH%s:", row, 2, setting->GetName().data());
printf("\x1b[%d;%dH%s", row, 26, setting->GetSelectedOptionText().data());
}
}
PrintOptionDescription();
}
void PrintSubMenu() {
printf("\x1b[0;%dH%s", 1 + (BOTTOM_WIDTH - currentMenu->name.length()) / 2, currentMenu->name.c_str());
for (uint8_t i = 0; i < MAX_SUBMENUS_ON_SCREEN; i++) {
if (i >= currentMenu->itemsList->size())
break;
uint8_t row = 3 + i;
// make the current menu green
if (currentMenu->menuIdx == currentMenu->settingBound + i) {
printf("\x1b[%d;%dH%s>", row, 2, GREEN);
printf("\x1b[%d;%dH%s%s", row, 3, currentMenu->itemsList->at(currentMenu->settingBound + i)->name.c_str(),
RESET);
} else {
printf("\x1b[%d;%dH%s", row, 3, currentMenu->itemsList->at(currentMenu->settingBound + i)->name.c_str());
}
}
}
void PrintPresetsMenu() {
if (presetEntries.empty()) {
printf("\x1b[10;4HNo Presets Detected!");
printf("\x1b[12;4HPress B to return to the preset menu.");
return;
}
if (currentMenu->mode == LOAD_PRESET) {
printf("\x1b[0;%dHSelect a Preset to Load", 1 + (BOTTOM_WIDTH - 23) / 2);
} else if (currentMenu->mode == DELETE_PRESET) {
printf("\x1b[0;%dHSelect a Preset to Delete", 1 + (BOTTOM_WIDTH - 25) / 2);
}
for (uint8_t i = 0; i < MAX_SUBMENU_SETTINGS_ON_SCREEN; i++) {
if (i >= presetEntries.size())
break;
std::string preset = presetEntries[i];
uint8_t row = 3 + (i * 2);
// make the current preset green
if (currentMenu->menuIdx == i) {
printf("\x1b[%d;%dH%s>", row, 14, GREEN);
printf("\x1b[%d;%dH%s%s", row, 15, preset.c_str(), RESET);
} else {
printf("\x1b[%d;%dH%s", row, 15, preset.c_str());
}
}
}
void PrintResetToDefaultsMenu() {
printf("\x1b[10;4HPress A to reset to default settings.");
printf("\x1b[12;4HPress B to return to the preset menu.");
}
void PrintGenerateMenu() {
printf("\x1b[3;%dHHow will you play?", 1+(BOTTOM_WIDTH-18)/2);
std::vector<std::string> playOptions = {"3ds Console", "Citra Emulator"};
for (uint8_t i = 0; i < playOptions.size(); i++) {
std::string option = playOptions[i];
uint8_t row = 6 + (i * 2);
//make the current selection green
if (currentMenu->menuIdx == i) {
printf("\x1b[%d;%dH%s>", row, 14, GREEN);
printf("\x1b[%d;%dH%s%s", row, 15, option.c_str(), RESET);
} else {
printf("\x1b[%d;%dH%s", row, 15, option.c_str());
}
}
}
void ClearDescription() {
//clear the previous description
std::string spaces = "";
spaces.append(9 * TOP_WIDTH, ' ');
printf("\x1b[22;0H%s", spaces.c_str());
}
void PrintOptionDescription() {
ClearDescription();
std::string_view description = currentSetting->GetSelectedOptionDescription();
printf("\x1b[22;0H%s", description.data());
}
std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettings, std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks,
std::string seedString) {
@ -568,8 +78,4 @@ std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t>
}
std::string fileName = fileNameStream.str();
return "./Randomizer/" + fileName + ".json";
}
std::string GetInput(const char* hintText) {
return std::string();
}
}

View File

@ -5,22 +5,14 @@
#include <set>
#include "soh/Enhancements/randomizer/randomizerTypes.h"
#define MAIN_MENU 0
#define OPTION_SUB_MENU 1
#define SUB_MENU 2
#define GENERATE_MODE 3
#define LOAD_PRESET 4
#define SAVE_PRESET 5
#define DELETE_PRESET 6
#define POST_GENERATE 7
#define RESET_TO_DEFAULTS 8
#define MAX_SUBMENUS_ON_SCREEN 27
#define MAX_SUBMENU_SETTINGS_ON_SCREEN 13
#define TOP_WIDTH 50
#define BOTTOM_WIDTH 40
#define SCREEN_HEIGHT 30
#define RESET "\x1b[0m"
#define DIM "\x1b[2m"
@ -33,21 +25,4 @@
#define CYAN "\x1b[36m"
#define WHITE "\x1b[37m"
void ModeChangeInit();
void UpdateOptionSubMenu(uint32_t kDown);
void UpdatePresetsMenu(uint32_t kdown);
void UpdateResetToDefaultsMenu(uint32_t kdown);
void UpdateGenerateMenu(uint32_t kDown);
void PrintMainMenu();
void PrintOptionSubMenu();
void PrintSubMenu();
void PrintPresetsMenu();
void PrintResetToDefaultsMenu();
void PrintGenerateMenu();
void ClearDescription();
void PrintOptionDescription();
std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSetting, std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks, std::string seedInput);
std::string GetInput(const char* hintText);
extern void MenuInit();
extern void MenuUpdate(uint32_t kDown, bool updatedByHeld);
std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSetting, std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks, std::string seedInput);

View File

@ -1,128 +0,0 @@
#include "music.hpp"
#include <cstdlib>
namespace Music {
const std::array<SeqType, SEQ_COUNT> seqTypesMusic = {
/* NA_BGM_FIELD */ SEQ_BGM_WORLD,
/* NA_BGM_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_KAKARIKO_ADULT */ SEQ_BGM_WORLD,
/* NA_BGM_ENEMY */ SEQ_NOSHUFFLE, // Temporarily unshuffled: Override plays incorrect in some areas, like Lake Hylia, by continuously repeating the start
/* NA_BGM_BOSS00 */ SEQ_BGM_BATTLE,
/* NA_BGM_FAIRY_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_MARKET */ SEQ_BGM_WORLD,
/* NA_BGM_TITLE */ SEQ_BGM_WORLD,
/* NA_BGM_LINK_HOUSE */ SEQ_BGM_WORLD,
/* NA_BGM_GAME_OVER */ SEQ_FANFARE,
/* NA_BGM_BOSS_CLEAR */ SEQ_FANFARE,
/* NA_BGM_ITEM_GET */ SEQ_FANFARE,
/* NA_BGM_OPENING_GANON */ SEQ_FANFARE,
/* NA_BGM_HEART_GET */ SEQ_FANFARE,
/* NA_BGM_OCA_LIGHT */ SEQ_OCARINA,
/* NA_BGM_BUYO_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_KAKARIKO_KID */ SEQ_BGM_WORLD,
/* NA_BGM_GODESS */ SEQ_BGM_EVENT,
/* NA_BGM_HIME */ SEQ_BGM_EVENT,
/* NA_BGM_FIRE_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_OPEN_TRE_BOX */ SEQ_FANFARE,
/* NA_BGM_FORST_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_HIRAL_GARDEN */ SEQ_BGM_WORLD,
/* NA_BGM_GANON_TOWER */ SEQ_BGM_WORLD,
/* NA_BGM_RONRON */ SEQ_BGM_WORLD,
/* NA_BGM_GORON */ SEQ_BGM_WORLD,
/* NA_BGM_SPIRIT_STONE */ SEQ_FANFARE,
/* NA_BGM_OCA_FLAME */ SEQ_OCARINA,
/* NA_BGM_OCA_WIND */ SEQ_OCARINA,
/* NA_BGM_OCA_WATER */ SEQ_OCARINA,
/* NA_BGM_OCA_SOUL */ SEQ_OCARINA,
/* NA_BGM_OCA_DARKNESS */ SEQ_OCARINA,
/* NA_BGM_MIDDLE_BOSS */ SEQ_BGM_ERROR,
/* NA_BGM_S_ITEM_GET */ SEQ_FANFARE,
/* NA_BGM_SHRINE_OF_TIME */ SEQ_BGM_WORLD,
/* NA_BGM_EVENT_CLEAR */ SEQ_FANFARE,
/* NA_BGM_KOKIRI */ SEQ_BGM_WORLD,
/* NA_BGM_OCA_YOUSEI */ SEQ_FANFARE,
/* NA_BGM_MAYOIMORI */ SEQ_BGM_WORLD,
/* NA_BGM_SOUL_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_HORSE */ SEQ_BGM_EVENT,
/* NA_BGM_HORSE_GOAL */ SEQ_FANFARE,
/* NA_BGM_INGO */ SEQ_BGM_WORLD,
/* NA_BGM_MEDAL_GET */ SEQ_FANFARE,
/* NA_BGM_OCA_SARIA */ SEQ_OCARINA,
/* NA_BGM_OCA_EPONA */ SEQ_OCARINA,
/* NA_BGM_OCA_ZELDA */ SEQ_OCARINA,
/* NA_BGM_OCA_SUNMOON */ SEQ_NOSHUFFLE, /* Remove Sun's Song from the Ocarina pool for now due to bugs */
/* NA_BGM_OCA_TIME */ SEQ_OCARINA,
/* NA_BGM_OCA_STORM */ SEQ_OCARINA,
/* NA_BGM_NAVI */ SEQ_BGM_EVENT,
/* NA_BGM_DEKUNOKI */ SEQ_BGM_EVENT,
/* NA_BGM_FUSHA */ SEQ_BGM_WORLD,
/* NA_BGM_HIRAL_DEMO */ SEQ_NOSHUFFLE,
/* NA_BGM_MINI_GAME */ SEQ_BGM_EVENT,
/* NA_BGM_SEAK */ SEQ_BGM_EVENT,
/* NA_BGM_ZORA */ SEQ_BGM_WORLD,
/* NA_BGM_APPEAR */ SEQ_FANFARE,
/* NA_BGM_ADULT_LINK */ SEQ_BGM_EVENT,
/* NA_BGM_MASTER_SWORD */ SEQ_FANFARE,
/* NA_BGM_INTRO_GANON */ SEQ_BGM_EVENT,
/* NA_BGM_SHOP */ SEQ_BGM_WORLD,
/* NA_BGM_KENJA */ SEQ_BGM_EVENT,
/* NA_BGM_FILE_SELECT */ SEQ_NOSHUFFLE,
/* NA_BGM_ICE_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_GATE_OPEN */ SEQ_NOSHUFFLE,
/* NA_BGM_OWL */ SEQ_BGM_EVENT,
/* NA_BGM_DARKNESS_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_AQUA_DUNGEON */ SEQ_BGM_WORLD,
/* NA_BGM_BRIDGE */ SEQ_NOSHUFFLE,
/* NA_BGM_SARIA */ SEQ_NOSHUFFLE,
/* NA_BGM_GERUDO */ SEQ_BGM_WORLD,
/* NA_BGM_DRUGSTORE */ SEQ_BGM_WORLD,
/* NA_BGM_KOTAKE_KOUME */ SEQ_BGM_EVENT,
/* NA_BGM_ESCAPE */ SEQ_BGM_EVENT,
/* NA_BGM_UNDERGROUND */ SEQ_BGM_WORLD,
/* NA_BGM_GANON_BATTLE_1 */ SEQ_BGM_BATTLE,
/* NA_BGM_GANON_BATTLE_2 */ SEQ_BGM_BATTLE,
/* NA_BGM_END_DEMO */ SEQ_NOSHUFFLE,
/* NA_BGM_STAFF_1 */ SEQ_NOSHUFFLE,
/* NA_BGM_STAFF_2 */ SEQ_NOSHUFFLE,
/* NA_BGM_STAFF_3 */ SEQ_NOSHUFFLE,
/* NA_BGM_STAFF_4 */ SEQ_NOSHUFFLE,
/* NA_BGM_BOSS01 */ SEQ_BGM_BATTLE,
/* NA_BGM_MINI_GAME_2 */ SEQ_BGM_ERROR,
};
std::array<uint32_t, SEQ_COUNT> seqOverridesMusic;
/* Initializes the list of music overrides to unshuffled */
void InitMusicRandomizer() {
for(int i = 0; i < SEQ_COUNT; i++)
seqOverridesMusic[i] = BGM_BASE + i;
}
/* Shuffles the sequences grouping them by type */
/* type is a bitmask of SeqType */
void ShuffleSequences(int type) {
std::vector<uint32_t> seqs;
// Get all sequences of the desired type(s) into a vector
for (int i = 0; i < SEQ_COUNT; i++) {
if (seqTypesMusic[i] & type) {
seqs.push_back(seqOverridesMusic[i]);
}
}
// Shuffle the vector...
for (std::size_t i = 0; i < seqs.size(); i++)
{
std::swap(seqs[i], seqs[rand() % seqs.size()]);
}
// ...and feed it back into the overrides array
for (int i = 0; i < SEQ_COUNT; i++) {
if (seqTypesMusic[i] & type)
{
seqOverridesMusic[i] = seqs.back();
seqs.pop_back();
}
}
}
} // namespace Music

View File

@ -1,29 +0,0 @@
#pragma once
#include <array>
#include <vector>
#include <stdint.h>
namespace Music {
const uint32_t BGM_BASE = 0x1000585;
const int SEQ_COUNT = 85;
enum SeqType {
SEQ_NOSHUFFLE = 0,
SEQ_BGM_WORLD = 1 << 0,
SEQ_BGM_EVENT = 1 << 1,
SEQ_BGM_BATTLE = 1 << 2,
SEQ_OCARINA = 1 << 3,
SEQ_FANFARE = 1 << 4,
// A soundtrack in this category has the issue where if another soundtrack that isn't
// in this category overrides it, it will keep playing when it should be stopped.
// For example when beating a mini-boss or finishing the zora diving game.
SEQ_BGM_ERROR = 1 << 5,
};
extern const std::array<SeqType, SEQ_COUNT> seqTypesMusic;
extern std::array<uint32_t, SEQ_COUNT> seqOverridesMusic;
void InitMusicRandomizer();
void ShuffleSequences(int type);
} // namespace Music

View File

@ -1,25 +0,0 @@
#include "patch.hpp"
#include "cosmetics.hpp"
#include "custom_messages.hpp"
#include "music.hpp"
#include "sound_effects.hpp"
#include "shops.hpp"
#include "spoiler_log.hpp"
#include "entrance.hpp"
#include "hints.hpp"
#include <array>
#include <cstring>
#include <fstream>
#include <memory>
#include <string>
#include <vector>
// For specification on the IPS file format, visit: https://zerosoft.zophar.net/ips.php
using FILEPtr = std::unique_ptr<FILE, decltype(&std::fclose)>;
void WriteFloatToBuffer(std::vector<char>& buffer, float f, size_t offset) {
memcpy(buffer.data() + offset, &f, sizeof(float));
}

View File

@ -1,12 +0,0 @@
#pragma once
#include <set>
#include "playthrough.hpp"
#include "settings.hpp"
#define V_TO_P(addr) (addr - 0x100000)
#define P_TO_V(offset) (offset + 0x100000)
#define PATCH_CONSOLE 0
#define PATCH_CITRA 1
#define PATCH_SIZE_MAX 65535
bool WriteAllPatches();

View File

@ -90,7 +90,7 @@ int Playthrough_Repeat(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSet
Settings::seedString = std::to_string(rand() % 0xFFFFFFFF);
repeatedSeed = boost::hash_32<std::string>{}(Settings::seedString);
Settings::seed = repeatedSeed % 0xFFFFFFFF;
CitraPrint("testing seed: " + std::to_string(Settings::seed));
//CitraPrint("testing seed: " + std::to_string(Settings::seed));
ClearProgress();
Playthrough_Init(Settings::seed, cvarSettings, excludedLocations, enabledTricks);
printf("\x1b[15;15HSeeds Generated: %d\n", i + 1);

View File

@ -1,202 +0,0 @@
#include "preset.hpp"
#include <array>
#include <cstdio>
#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <vector>
#include "category.hpp"
#include "settings.hpp"
#include "tinyxml2.h"
#include "utils.hpp"
namespace fs = std::filesystem;
static const std::string CACHED_SETTINGS_FILENAME = "CACHED_SETTINGS";
static const std::string CACHED_COSMETICS_FILENAME = "CACHED_COSMETICS";
static std::string_view GetBasePath(OptionCategory category) {
static constexpr std::array<std::string_view, 2> paths{
"/3ds/presets/oot3dr/settings/",
"/3ds/presets/oot3dr/cosmetics/",
};
switch(category) {
case OptionCategory::Setting :
case OptionCategory::Cosmetic :
return paths[static_cast<size_t>(category)];
case OptionCategory::Toggle :
break;
}
return "";
}
//Creates preset directories if they don't exist
bool CreatePresetDirectories() {
//Create the 3ds directory if it doesn't exist
std::filesystem::create_directory("./3ds");
//Create the presets directory if it doesn't exist
std::filesystem::create_directory("./3ds/presets");
//Create the oot3d directory if it doesn't exist
std::filesystem::create_directory("./3ds/presets/oot3dr");
//Create the cosmetics directory if it doesn't exist
std::filesystem::create_directory("./3ds/presets/oot3dr/cosmetics");
//Create the settings directory if it doesn't exist
std::filesystem::create_directory("./3ds/presets/oot3dr/settings");
return true;
}
//Gets the preset filenames
std::vector<std::string> GetSettingsPresets() {
std::vector<std::string> presetEntries = {};
for (const auto& entry : fs::directory_iterator(GetBasePath(OptionCategory::Setting))) {
if(entry.is_regular_file() && entry.path().stem().string() != CACHED_SETTINGS_FILENAME) {
presetEntries.push_back(entry.path().stem().string());
}
}
return presetEntries;
}
static std::string PresetPath(std::string_view presetName, OptionCategory category) {
return std::string(GetBasePath(category)).append(presetName).append(".xml");
}
// Presets are now saved as XML files using the tinyxml2 library.
// Documentation: https://leethomason.github.io/tinyxml2/index.html
bool SavePreset(std::string_view presetName, OptionCategory category) {
using namespace tinyxml2;
XMLDocument preset = XMLDocument(false);
// Create and insert the XML declaration
preset.InsertEndChild(preset.NewDeclaration());
// Create the root node
XMLElement* rootNode = preset.NewElement("settings");
preset.InsertEndChild(rootNode);
for (Menu* menu : Settings::GetAllOptionMenus()) {
if (menu->mode != OPTION_SUB_MENU) {
continue;
}
for (const Option* setting : *menu->settingsList) {
if (!setting->IsCategory(category)) {
continue;
}
XMLElement* newSetting = rootNode->InsertNewChildElement("setting");
newSetting->SetAttribute("name", RemoveLineBreaks(setting->GetName()).c_str());
newSetting->SetText(setting->GetSelectedOptionText().c_str());
}
}
XMLError e = preset.SaveFile(PresetPath(presetName, category).c_str());
return e == XML_SUCCESS;
}
//Read the preset XML file
bool LoadPreset(std::string_view presetName, OptionCategory category) {
using namespace tinyxml2;
XMLDocument preset;
XMLError e = preset.LoadFile(PresetPath(presetName, category).c_str());
if (e != XML_SUCCESS) {
return false;
}
XMLElement* rootNode = preset.RootElement();
if (strcmp(rootNode->Name(), "settings") != 0) {
// We do not have our <settings> root node, so it may be the old structure. We don't support that one anymore.
return false;
}
XMLElement* curNode = rootNode->FirstChildElement();
for (Menu* menu : Settings::GetAllOptionMenus()) {
if (menu->mode != OPTION_SUB_MENU) {
continue;
}
for (Option* setting : *menu->settingsList) {
if (!setting->IsCategory(category)) {
continue;
}
// Since presets are saved linearly, we can simply loop through the nodes as
// we loop through the settings to find most of the matching elements.
const std::string& settingToFind = RemoveLineBreaks(setting->GetName());
if (settingToFind == RemoveLineBreaks(curNode->Attribute("name"))) {
setting->SetSelectedIndexByString(curNode->GetText());
curNode = curNode->NextSiblingElement();
} else {
// If the current setting and element don't match, then search
// linearly from the beginning. This will get us back on track if the
// next setting and element line up with each other.
curNode = rootNode->FirstChildElement();
while (curNode != nullptr) {
if (settingToFind == RemoveLineBreaks(curNode->Attribute("name"))) {
setting->SetSelectedIndexByString(curNode->GetText());
curNode = curNode->NextSiblingElement();
break;
}
curNode = curNode->NextSiblingElement();
}
}
// Reset to the beginning if we reached the end.
if (curNode == nullptr) {
curNode = rootNode->FirstChildElement();
}
}
}
return true;
}
//Delete the selected preset
bool DeletePreset(std::string_view presetName, OptionCategory category) {
const std::string filepath = PresetPath(presetName, category);
std::filesystem::remove(filepath);
return true;
}
//Saves the new preset to a file
bool SaveSpecifiedPreset(std::string_view presetName, OptionCategory category) {
//don't save if the user cancelled
if (presetName.empty()) {
return false;
}
return SavePreset(presetName, category);
}
void SaveCachedSettings() {
SavePreset(CACHED_SETTINGS_FILENAME, OptionCategory::Setting);
}
void LoadCachedSettings() {
//If cache file exists, load it
for (const auto& entry : fs::directory_iterator(GetBasePath(OptionCategory::Setting))) {
if(entry.path().stem().string() == CACHED_SETTINGS_FILENAME) {
//File exists, open
LoadPreset(CACHED_SETTINGS_FILENAME, OptionCategory::Setting);
}
}
}
bool SaveCachedCosmetics() {
return SavePreset(CACHED_COSMETICS_FILENAME, OptionCategory::Cosmetic);
}
void LoadCachedCosmetics() {
//If cache file exists, load it
for (const auto& entry : fs::directory_iterator(GetBasePath(OptionCategory::Cosmetic))) {
if(entry.path().stem().string() == CACHED_COSMETICS_FILENAME) {
//File exists, open
LoadPreset(CACHED_COSMETICS_FILENAME, OptionCategory::Cosmetic);
}
}
}

View File

@ -1,17 +0,0 @@
#pragma once
#include <string>
#include <vector>
enum class OptionCategory;
bool CreatePresetDirectories();
std::vector<std::string> GetSettingsPresets();
bool SavePreset(std::string_view presetName, OptionCategory category);
bool LoadPreset(std::string_view presetName, OptionCategory category);
bool DeletePreset(std::string_view presetName, OptionCategory category);
bool SaveSpecifiedPreset(std::string_view presetName, OptionCategory category);
void SaveCachedSettings();
void LoadCachedSettings();
bool SaveCachedCosmetics();
void LoadCachedCosmetics();

View File

@ -9,8 +9,6 @@
#include <Context.h>
#include <libultraship/libultra/types.h>
#define TICKS_PER_SEC 268123480.0
void RandoMain::GenerateRando(std::unordered_map<RandomizerSettingKey, u8> cvarSettings, std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks,
std::string seedString) {
HintTable_Init();

View File

@ -1,581 +0,0 @@
#pragma once
#include <string_view>
#include <vector>
using string_view = std::string_view;
extern string_view openRandomize;
extern string_view worldRandomize;
extern string_view shuffleRandomize;
extern string_view dungeonRandomize;
extern string_view logicGlitchless;
extern string_view logicGlitched;
extern string_view logicNoLogic;
extern string_view logicVanilla;
extern string_view forestOpen;
extern string_view forestClosed;
extern string_view forestClosedDeku;
extern string_view kakGateOpen;
extern string_view kakGateClosed;
extern string_view doorOfTimeOpen;
extern string_view doorOfTimeSongOnly;
extern string_view doorOfTimeClosed;
extern string_view fountainNormal;
extern string_view fountainAdult;
extern string_view fountainOpen;
extern string_view gerudoNormal;
extern string_view gerudoFast;
extern string_view gerudoOpen;
extern string_view bridgeOpen;
extern string_view bridgeVanilla;
extern string_view bridgeStones;
extern string_view bridgeMedallions;
extern string_view bridgeRewards;
extern string_view bridgeDungeons;
extern string_view bridgeTokens;
extern string_view bridgeGreg;
extern string_view bridgeStoneCountDesc;
extern string_view bridgeMedallionCountDesc;
extern string_view bridgeRewardCountDesc;
extern string_view bridgeDungeonCountDesc;
extern string_view bridgeTokenCountDesc;
extern string_view bridgeRewardOptionsDesc;
extern string_view randomGanonsTrialsDesc;
extern string_view ganonsTrialCountDesc;
extern string_view ageDesc;
extern string_view shuffleEntrancesDesc;
extern string_view dungeonEntrancesDesc;
extern string_view bossEntrancesDesc;
extern string_view overworldEntrancesDesc;
extern string_view grottoEntrancesDesc;
extern string_view owlDropsDesc;
extern string_view warpSongsDesc;
extern string_view overworldSpawnsDesc;
extern string_view mixedPoolsDesc;
extern string_view mixDungeonsDesc;
extern string_view mixOverworldDesc;
extern string_view mixInteriorsDesc;
extern string_view mixGrottosDesc;
extern string_view decoupledEntrancesDesc;
extern string_view interiorEntrancesOff;
extern string_view interiorEntrancesSimple;
extern string_view interiorEntrancesAll;
extern string_view bombchuLogicDesc;
extern string_view defaultAmmoDropsDesc;
extern string_view bombchuDropsDesc;
extern string_view noAmmoDropsDesc;
extern string_view defaultHeartDropsDesc;
extern string_view noHeartDropsDesc;
extern string_view noHeartRefillDesc;
extern string_view scarceHeartsDesc;
extern string_view mqDungeonCountDesc;
extern string_view setDungeonTypesDesc;
extern string_view shuffleRewardsEndOfDungeon;
extern string_view shuffleRewardsAnyDungeon;
extern string_view shuffleRewardsOverworld;
extern string_view shuffleRewardsAnywhere;
extern string_view linksPocketDungeonReward;
extern string_view linksPocketAdvancement;
extern string_view linksPocketAnything;
extern string_view linksPocketNothing;
extern string_view songsSongLocations;
extern string_view songsDungeonRewards;
extern string_view songsAllLocations;
extern string_view shopsOff;
extern string_view shopsZero;
extern string_view shopsOne;
extern string_view shopsTwo;
extern string_view shopsThree;
extern string_view shopsFour;
extern string_view shopsRandom;
extern string_view shopPriceBalanced;
extern string_view shopPriceStarter;
extern string_view shopPriceAdult;
extern string_view shopPriceGiant;
extern string_view shopPriceTycoon;
extern string_view shopPriceAffordable;
extern string_view tokensOff;
extern string_view tokensDungeon;
extern string_view tokensOverworld;
extern string_view tokensAllTokens;
extern string_view scrubsOff;
extern string_view scrubsAffordable;
extern string_view scrubsExpensive;
extern string_view scrubsRandomPrices;
extern string_view shuffleCowsDesc;
extern string_view kokiriSwordDesc;
extern string_view ocarinasDesc;
extern string_view weirdEggDesc;
extern string_view gerudoTokenDesc;
extern string_view magicBeansDesc;
extern string_view merchantsDesc;
extern string_view merchantsHintsDesc;
extern string_view frogSongRupeesDesc;
extern string_view adultTradeDesc;
extern string_view chestMinigameDesc;
extern string_view shuffle100GsDesc;
extern string_view mapCompassStartWith;
extern string_view mapCompassVanilla;
extern string_view mapCompassOwnDungeon;
extern string_view mapCompassAnyDungeon;
extern string_view mapCompassOverworld;
extern string_view mapCompassAnywhere;
extern string_view smallKeyStartWith;
extern string_view smallKeyVanilla;
extern string_view smallKeyOwnDungeon;
extern string_view smallKeyAnyDungeon;
extern string_view smallKeyOverworld;
extern string_view smallKeyAnywhere;
extern string_view gerudoKeysVanilla;
extern string_view gerudoKeysAnyDungeon;
extern string_view gerudoKeysOverworld;
extern string_view gerudoKeysAnywhere;
extern string_view keyRingDesc;
extern string_view bossKeyStartWith;
extern string_view bossKeyVanilla;
extern string_view bossKeyOwnDungeon;
extern string_view bossKeyAnyDungeon;
extern string_view bossKeyOverworld;
extern string_view bossKeyAnywhere;
extern string_view ganonKeyStartWith;
extern string_view ganonKeyVanilla;
extern string_view ganonKeyOwnDungeon;
extern string_view ganonKeyAnyDungeon;
extern string_view ganonKeyOverworld;
extern string_view ganonKeyAnywhere;
extern string_view ganonKeyLACS;
extern string_view ganonKey100GS;
extern string_view lacsStoneCountDesc;
extern string_view lacsMedallionCountDesc;
extern string_view lacsRewardCountDesc;
extern string_view lacsDungeonCountDesc;
extern string_view lacsTokenCountDesc;
extern string_view lacsRewardOptionsDesc;
extern string_view childStealthDesc;
extern string_view skipTowerEscapeDesc;
extern string_view skipEponaRaceDesc;
extern string_view skipMinigamePhasesDesc;
extern string_view freeScarecrowDesc;
extern string_view fourPoesDesc;
extern string_view lakeHyliaOwlDesc;
extern string_view bigPoeTargetCountDesc;
extern string_view numRequiredCuccosDesc;
extern string_view kingZoraSpeedFast;
extern string_view kingZoraSpeedVanilla;
extern string_view kingZoraSpeedRandom;
extern string_view completeMaskDesc;
extern string_view glitchCutscenesDesc;
extern string_view quickTextDesc0;
extern string_view quickTextDesc1;
extern string_view quickTextDesc2;
extern string_view quickTextDesc3;
extern string_view skipSongReplaysDesc;
extern string_view keepFWWarpPointDesc;
extern string_view fastBunnyHoodDesc;
extern string_view gossipStonesHintsDesc;
extern string_view obscureHintsDesc;
extern string_view ambiguousHintsDesc;
extern string_view clearHintsDesc;
extern string_view uselessHintsDesc;
extern string_view balancedHintsDesc;
extern string_view strongHintsDesc;
extern string_view veryStrongHintsDesc;
extern string_view compassesShowRewardsDesc;
extern string_view compassesShowWotHDesc;
extern string_view mapsShowDungeonModesDesc;
extern string_view damageMultiDesc;
extern string_view startingTimeDesc;
extern string_view locationsReachableDesc;
extern string_view nightGSDesc;
extern string_view chestAnimDesc;
extern string_view chestSizeDesc;
extern string_view ingameSpoilersShowDesc;
extern string_view ingameSpoilersHideDesc;
extern string_view menuButtonDesc;
extern string_view startWithConsumablesDesc;
extern string_view startWithMaxRupeesDesc;
extern string_view itemPoolPlentiful;
extern string_view itemPoolBalanced;
extern string_view itemPoolScarce;
extern string_view itemPoolMinimal;
extern string_view iceTrapsOff;
extern string_view iceTrapsNormal;
extern string_view iceTrapsExtra;
extern string_view iceTrapsMayhem;
extern string_view iceTrapsOnslaught;
extern string_view removeDDDesc;
extern string_view progGoronSword;
extern string_view faroresWindAnywhereDesc;
extern string_view ageRestrictionsDesc;
extern string_view adultStickDesc;
extern string_view adultBoomerangDesc;
extern string_view childHammerDesc;
extern string_view adultSlingshotDesc;
extern string_view childBowDesc;
extern string_view childHookshotDesc;
extern string_view childIronBootsDesc;
extern string_view childHoverBootsDesc;
extern string_view adultMasksDesc;
extern string_view adultKokiriSwordDesc;
extern string_view childMasterSwordDesc;
extern string_view childBiggoronSwordDesc;
extern string_view adultDekuShieldDesc;
extern string_view childMirrorShieldDesc;
extern string_view childGoronTunicDesc;
extern string_view childZoraTunicDesc;
extern string_view gkDurabilityVanilla;
extern string_view gkDurabilityRandomRisk;
extern string_view gkDurabilityRandomSafe;
extern string_view blueFireArrowsDesc;
extern string_view sunlightArrowsDesc;
extern string_view mp_EnabledDesc;
extern string_view mp_SharedProgressDesc;
extern string_view mp_SyncIdDesc;
extern string_view mp_SharedHealthDesc;
extern string_view mp_SharedRupeesDesc;
extern string_view mp_SharedAmmoDesc;
extern string_view zTargetingDesc;
extern string_view cameraControlDesc;
extern string_view motionControlDesc;
extern string_view togglePlayMusicDesc;
extern string_view togglePlaySFXDesc;
extern string_view silenceNaviDesc;
extern string_view ignoreMaskReactionDesc;
extern string_view naviColorsDesc;
extern string_view necessarySimpleModeDesc;
extern string_view alwaysSimpleModeDesc;
extern string_view coloredKeysDesc;
extern string_view coloredBossKeysDesc;
extern string_view mirrorWorldDesc;
extern string_view musicRandoDesc;
extern string_view shuffleBGMDesc;
extern string_view fanfaresOffDesc;
extern string_view onlyFanfaresDesc;
extern string_view fanfaresOcarinaDesc;
extern string_view shuffleOcaMusicDesc;
extern string_view shuffleSFXOff;
extern string_view shuffleSFXAll;
extern string_view shuffleSFXSceneSpecific;
extern string_view shuffleSFXChaos;
extern string_view shuffleSFXCategorically;
extern string_view randomTrapDmgDesc;
extern string_view basicTrapDmgDesc;
extern string_view advancedTrapDmgDesc;
extern string_view ToggleAllTricksDesc;
extern string_view ToggleLogicNoneDesc;
extern string_view ToggleLogicNoviceDesc;
extern string_view ToggleLogicIntermediateDesc;
extern string_view ToggleLogicExpertDesc;
extern string_view LogicTempDesc;
extern string_view LogicGrottosWithoutAgonyDesc;
extern string_view LogicVisibleCollisionDesc;
extern string_view LogicFewerTunicRequirementsDesc;
extern string_view LogicLostWoodsGSBeanDesc;
extern string_view LogicLabDivingDesc;
extern string_view LogicLabWallGSDesc;
extern string_view LogicGraveyardPoHDesc;
extern string_view LogicChildDampeRacePoHDesc;
extern string_view LogicGVHammerChestDesc;
extern string_view LogicGerudoKitchenDesc;
extern string_view LogicLensWastelandDesc;
extern string_view LogicReverseWastelandDesc;
extern string_view LogicColossusGSDesc;
extern string_view LogicOutsideGanonsGSDesc;
extern string_view LogicManOnRoofDesc;
extern string_view LogicWindmillPoHHookshotDesc;
extern string_view LogicDMTBombableDesc;
extern string_view LogicDMTSoilGSDesc;
extern string_view LogicDMTSummitHoverDesc;
extern string_view LogicLinkGoronDinsDesc;
extern string_view LogicGoronCityLeftMostDesc;
extern string_view LogicGoronCityPotDesc;
extern string_view LogicGoronCityPotWithStrengthDesc;
extern string_view LogicChildRollingWithStrengthDesc;
extern string_view LogicCraterUpperToLowerDesc;
extern string_view LogicCraterBeanPoHWithHoversDesc;
extern string_view LogicBiggoronBoleroDesc;
extern string_view LogicZoraRiverLowerDesc;
extern string_view LogicZoraRiverUpperDesc;
extern string_view LogicZFGreatFairyDesc;
extern string_view LogicDekuB1WebsWithBowDesc;
extern string_view LogicDekuB1SkipDesc;
extern string_view LogicDekuBasementGSDesc;
extern string_view LogicDCStaircaseDesc;
extern string_view LogicDCJumpDesc;
extern string_view LogicDCSlingshotSkipDesc;
extern string_view LogicDCScarecrowGSDesc;
extern string_view LogicJabuBossGSAdultDesc;
extern string_view LogicJabuScrubJumpDiveDesc;
extern string_view LogicForestOutsideBackdoorDesc;
extern string_view LogicForestDoorFrameDesc;
extern string_view LogicForestOutdoorEastGSDesc;
extern string_view LogicFireBossDoorJumpDesc;
extern string_view LogicFireStrengthDesc;
extern string_view LogicFireScarecrowDesc;
extern string_view LogicFireFlameMazeDesc;
extern string_view LogicFireSongOfTimeDesc;
extern string_view LogicWaterTempleTorchLongshotDesc;
extern string_view LogicWaterTempleUpperBoostDesc;
extern string_view LogicWaterCentralBowDesc;
extern string_view LogicWaterCentralGSFWDesc;
extern string_view LogicWaterCrackedWallNothingDesc;
extern string_view LogicWaterCrackedWallHoversDesc;
extern string_view LogicWaterBossKeyRegionDesc;
extern string_view LogicWaterBKJumpDiveDesc;
extern string_view LogicWaterNorthBasementLedgeJumpDesc;
extern string_view LogicWaterDragonAdultDesc;
extern string_view LogicWaterDragonJumpDiveDesc;
extern string_view LogicWaterRiverGSDesc;
extern string_view LogicWaterFallingPlatformGSDesc;
extern string_view LogicSpiritLowerAdultSwitchDesc;
extern string_view LogicSpiritChildBombchuDesc;
extern string_view LogicSpiritWallDesc;
extern string_view LogicSpiritLobbyGSDesc;
extern string_view LogicSpiritMapChestDesc;
extern string_view LogicSpiritSunChestDesc;
extern string_view LogicShadowFireArrowEntryDesc;
extern string_view LogicShadowUmbrellaDesc;
extern string_view LogicShadowFreestandingKeyDesc;
extern string_view LogicShadowStatueDesc;
extern string_view LogicShadowBongoDesc;
extern string_view LogicChildDeadhandDesc;
extern string_view LogicGtgWithoutHookshotDesc;
extern string_view LogicGtgFakeWallDesc;
extern string_view LogicLensSpiritDesc;
extern string_view LogicLensShadowDesc;
extern string_view LogicLensShadowBackDesc;
extern string_view LogicLensBotwDesc;
extern string_view LogicLensGtgDesc;
extern string_view LogicLensCastleDesc;
extern string_view LogicLensJabuMQDesc;
extern string_view LogicLensSpiritMQDesc;
extern string_view LogicLensShadowMQDesc;
extern string_view LogicLensShadowMQBackDesc;
extern string_view LogicLensBotwMQDesc;
extern string_view LogicLensGtgMQDesc;
extern string_view LogicLensCastleMQDesc;
extern string_view LogicSpiritTrialHookshotDesc;
extern string_view LogicFlamingChestsDesc;
extern const std::vector<string_view> GlitchDifficulties;
extern string_view GlitchRestrictedItemsDescDisabled;
extern string_view GlitchRestrictedItemsDescNovice;
extern string_view GlitchSuperStabDescDisabled;
extern string_view GlitchSuperStabDescNovice;
extern string_view GlitchISGDescDisabled;
extern string_view GlitchISGDescNovice;
extern string_view GlitchISGDescIntermediate;
extern string_view GlitchISGDescAdvanced;
extern string_view GlitchHoverDescDisabled;
extern string_view GlitchHoverDescNovice;
extern string_view GlitchHoverDescIntermediate;
extern string_view GlitchHoverDescAdvanced;
extern string_view GlitchBombOIDescDisabled;
extern string_view GlitchBombOIDescNovice;
extern string_view GlitchBombOIDescIntermediate;
extern string_view GlitchBombOIDescAdvanced;
extern string_view GlitchBombOIDescExpert;
extern string_view GlitchHoverBoostDescDisabled;
extern string_view GlitchHoverBoostDescNovice;
extern string_view GlitchHoverBoostDescIntermediate;
extern string_view GlitchHoverBoostDescAdvanced;
extern string_view GlitchSuperSlideDescDisabled;
extern string_view GlitchSuperSlideDescNovice;
extern string_view GlitchSuperSlideDescIntermediate;
extern string_view GlitchSuperSlideDescAdvanced;
extern string_view GlitchSuperSlideDescExpert;
extern string_view GlitchMegaflipDescDisabled;
extern string_view GlitchMegaflipDescNovice;
extern string_view GlitchMegaflipDescIntermediate;
extern string_view GlitchMegaflipDescAdvanced;
extern string_view GlitchMegaflipDescExpert;
extern string_view GlitchMegaflipDescHero;
extern string_view GlitchASlideDescDisabled;
extern string_view GlitchASlideDescNovice;
extern string_view GlitchASlideDescIntermediate;
extern string_view GlitchASlideDescAdvanced;
extern string_view GlitchASlideDescExpert;
extern string_view GlitchHammerSlideDescDisabled;
extern string_view GlitchHammerSlideDescNovice;
extern string_view GlitchHammerSlideDescIntermediate;
extern string_view GlitchLedgeCancelDescDisabled;
extern string_view GlitchLedgeCancelDescNovice;
extern string_view GlitchLedgeCancelDescIntermediate;
extern string_view GlitchLedgeCancelDescAdvanced;
extern string_view GlitchActionSwapDescDisabled;
extern string_view GlitchActionSwapDescNovice;
extern string_view GlitchActionSwapDescAdvanced;
extern string_view GlitchQPADescDisabled;
extern string_view GlitchQPADescNovice;
extern string_view GlitchQPADescIntermediate;
extern string_view GlitchQPADescAdvanced;
extern string_view GlitchQPADescExpert;
extern string_view GlitchHookshotClipDescDisabled;
extern string_view GlitchHookshotClipDescNovice;
extern string_view GlitchHookshotClipDescIntermediate;
extern string_view GlitchHookshotJump_BonkDescDisabled;
extern string_view GlitchHookshotJump_BonkDescNovice;
extern string_view GlitchHookshotJump_BonkDescIntermediate;
extern string_view GlitchHookshotJump_BonkDescAdvanced;
extern string_view GlitchHookshotJump_BootsDescDisabled;
extern string_view GlitchHookshotJump_BootsDescNovice;
extern string_view GlitchHookshotJump_BootsDescIntermediate;
extern string_view GlitchHookshotJump_BootsDescAdvanced;
extern string_view GlitchCutsceneDiveDescDisabled;
extern string_view GlitchCutsceneDiveDescNovice;
extern string_view GlitchCutsceneDiveDescIntermediate;
extern string_view GlitchCutsceneDiveDescAdvanced;
extern string_view GlitchNaviDive_StickDescDisabled;
extern string_view GlitchNaviDive_StickDescNovice;
extern string_view GlitchNaviDive_StickDescIntermediate;
extern string_view GlitchNaviDive_StickDescAdvanced;
extern string_view GlitchTripleSlashClipDescDisabled;
extern string_view GlitchTripleSlashClipDescNovice;
extern string_view GlitchTripleSlashClipDescIntermediate;
extern string_view GlitchTripleSlashClipDescAdvanced;
extern string_view GlitchTripleSlashClipDescExpert;
extern string_view GlitchLedgeClipDescDisabled;
extern string_view GlitchLedgeClipDescNovice;
extern string_view GlitchLedgeClipDescIntermediate;
extern string_view GlitchLedgeClipDescAdvanced;
extern string_view GlitchSeamWalkDescDisabled;
extern string_view GlitchSeamWalkDescNovice;
extern string_view GlitchSeamWalkDescIntermediate;
extern string_view GlitchSeamWalkDescAdvanced;
extern string_view GlitchSeamWalkDescExpert;
extern string_view GlitchSeamWalkDescHero;
extern string_view GlitchWWTEscapeDesc;
extern string_view GlitchGVTentAsChildDesc;
extern string_view GlitchGFGuardSneakDesc;
extern string_view GlitchItemlessWastelandDesc;
extern string_view GlitchOccamsStatueDesc;
extern string_view GlitchZDOoBJumpSlashDesc;
extern string_view GlitchJabuStickRecoilDesc;
extern string_view GlitchJabuAdultDesc;
extern string_view GlitchBlueFireWallDesc;
extern string_view GlitchClassicHalfieDesc;
extern string_view GlitchModernHalfieDesc;
extern string_view GlitchJabuSwitchDesc;
extern string_view GlitchForestBKSkipDesc;
extern string_view GlitchFireGrunzClipDesc;

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,6 @@
#include <vector>
#include "category.hpp"
#include "cosmetics.hpp"
#include "debug.hpp"
#include "menu.hpp"
#include "pool_functions.hpp"
@ -351,43 +349,14 @@ typedef enum {
STARTINGBGS_BIGGORON_SWORD,
} StartingBiggoronSwordSetting;
typedef enum {
SHUFFLESFX_OFF,
SHUFFLESFX_ALL,
SHUFFLESFX_SCENESPECIFIC,
SHUFFLESFX_CHAOS,
} ShuffleSFXSetting;
typedef enum {
DUNGEON_NEITHER,
DUNGEON_BARREN,
DUNGEON_WOTH,
} DungeonInfo;
typedef enum {
TRAILCOLOR_VANILLAMODE,
TRAILCOLOR_FORCEDSIMPLEMODE,
TRAILCOLOR_RAINBOW,
TRAILCOLOR_RAINBOW_SIMPLEMODE,
} TrailColorMode;
typedef enum {
TRAILDURATION_DISABLED,
TRAILDURATION_VERYSHORT,
TRAILDURATION_VANILLA,
TRAILDURATION_LONG,
TRAILDURATION_VERYLONG,
TRAILDURATION_LIGHTSABER,
} TrailDuration;
typedef enum {
PLAY_ON_CONSOLE,
PLAY_ON_CITRA,
} PlayOption;
typedef struct {
uint8_t hashIndexes[5];
uint8_t playOption;
uint8_t logic;
uint8_t openForest;
@ -497,7 +466,6 @@ typedef struct {
uint8_t chestSize;
uint8_t generateSpoilerLog;
uint8_t ingameSpoilers;
uint8_t menuOpeningButton;
uint8_t randomTrapDmg;
uint8_t blueFireArrows;
uint8_t sunLightArrows;
@ -525,47 +493,6 @@ typedef struct {
uint8_t iceTrapValue;
uint8_t progressiveGoronSword;
uint8_t mp_Enabled;
uint8_t mp_SharedProgress;
uint8_t mp_SyncId;
uint8_t mp_SharedHealth;
uint8_t mp_SharedRupees;
uint8_t mp_SharedAmmo;
uint8_t zTargeting;
uint8_t cameraControl;
uint8_t motionControl;
uint8_t playMusic;
uint8_t playSFX;
uint8_t silenceNavi;
uint8_t ignoreMaskReaction;
uint8_t customTunicColors;
uint8_t customNaviColors;
uint8_t rainbowIdleNaviInnerColor;
uint8_t rainbowNPCNaviInnerColor;
uint8_t rainbowEnemyNaviInnerColor;
uint8_t rainbowPropNaviInnerColor;
uint8_t rainbowIdleNaviOuterColor;
uint8_t rainbowNPCNaviOuterColor;
uint8_t rainbowEnemyNaviOuterColor;
uint8_t rainbowPropNaviOuterColor;
uint8_t customTrailEffects;
uint8_t rainbowSwordTrailInnerColor;
uint8_t rainbowSwordTrailOuterColor;
uint8_t boomerangTrailColorMode;
uint8_t boomerangTrailDuration;
uint8_t rainbowChuTrailInnerColor;
uint8_t rainbowChuTrailOuterColor;
uint8_t bombchuTrailDuration;
uint8_t coloredKeys;
uint8_t coloredBossKeys;
uint8_t mirrorWorld;
uint8_t shuffleSFX;
uint8_t shuffleSFXCategorically;
union {
uint8_t dungeonModes[12];
struct {
@ -637,12 +564,12 @@ typedef struct {
class Option {
public:
static Option Bool(std::string name_, std::vector<std::string> options_, std::vector<std::string_view> optionDescriptions_, OptionCategory category_ = OptionCategory::Setting, uint8_t defaultOption_ = 0, bool defaultHidden_ = false) {
return Option{false, std::move(name_), std::move(options_), std::move(optionDescriptions_), category_, defaultOption_, defaultHidden_};
static Option Bool(std::string name_, std::vector<std::string> options_, OptionCategory category_ = OptionCategory::Setting, uint8_t defaultOption_ = 0, bool defaultHidden_ = false) {
return Option{false, std::move(name_), std::move(options_), category_, defaultOption_, defaultHidden_};
}
static Option U8(std::string name_, std::vector<std::string> options_, std::vector<std::string_view> optionDescriptions_, OptionCategory category_ = OptionCategory::Setting, uint8_t defaultOption_ = 0, bool defaultHidden_ = false) {
return Option{uint8_t{0}, std::move(name_), std::move(options_), std::move(optionDescriptions_), category_, defaultOption_, defaultHidden_};
static Option U8(std::string name_, std::vector<std::string> options_, OptionCategory category_ = OptionCategory::Setting, uint8_t defaultOption_ = 0, bool defaultHidden_ = false) {
return Option{uint8_t{0}, std::move(name_), std::move(options_), category_, defaultOption_, defaultHidden_};
}
template <typename T>
@ -675,11 +602,6 @@ public:
}
}
void SetOptions(std::vector<std::string> o) {
options = std::move(o);
SetToDefault();
}
size_t GetOptionCount() const {
return options.size();
}
@ -692,47 +614,10 @@ public:
return options[selectedOption];
}
void SetSelectedOptionText(std::string newText) {
options[selectedOption] = std::move(newText);
}
bool IsDefaultSelected() {
return selectedOption == defaultOption;
}
void SetToDefault() {
SetSelectedIndex(defaultOption);
hidden = defaultHidden;
}
std::string_view GetSelectedOptionDescription() const {
//bounds checking
if (selectedOption >= optionDescriptions.size()) {
return optionDescriptions[optionDescriptions.size()-1];
}
return optionDescriptions[selectedOption];
}
uint8_t GetSelectedOptionIndex() const {
return selectedOption;
}
void NextOptionIndex() {
++selectedOption;
}
void PrevOptionIndex() {
--selectedOption;
}
void SanitizeSelectedOptionIndex() {
if (selectedOption == options.size()) {
selectedOption = 0;
} else if (selectedOption == 0xFF) {
selectedOption = static_cast<uint8_t>(options.size() - 1);
}
}
void SetVariable() {
if (std::holds_alternative<bool>(var)) {
var.emplace<bool>(selectedOption != 0);
@ -760,39 +645,6 @@ public:
SetVariable();
}
void SetSelectedIndexByString(std::string newSetting) {
using namespace Cosmetics;
//Special case for custom cosmetic settings
if (options.size() > CUSTOM_COLOR) {
if (newSetting.compare(0, 8, CUSTOM_COLOR_PREFIX) == 0 && options[CUSTOM_COLOR].compare(0, 8, CUSTOM_COLOR_PREFIX) == 0) {
SetSelectedIndex(CUSTOM_COLOR);
SetSelectedOptionText(newSetting);
return;
}
}
for (size_t i = 0; i < options.size(); i++) {
std::string settingName = options[i];
if (settingName == newSetting) {
SetSelectedIndex(i);
return;
}
}
}
void Lock() {
locked = true;
}
void Unlock() {
locked = false;
}
bool IsLocked() const {
return locked;
}
void Hide() {
hidden = true;
}
@ -810,15 +662,15 @@ public:
}
private:
Option(uint8_t var_, std::string name_, std::vector<std::string> options_, std::vector<std::string_view> optionDescriptions_, OptionCategory category_, uint8_t defaultOption_, bool defaultHidden_)
: var(var_), name(std::move(name_)), options(std::move(options_)), optionDescriptions(std::move(optionDescriptions_)), category(category_), defaultOption(defaultOption_), defaultHidden(defaultHidden_) {
Option(uint8_t var_, std::string name_, std::vector<std::string> options_, OptionCategory category_, uint8_t defaultOption_, bool defaultHidden_)
: var(var_), name(std::move(name_)), options(std::move(options_)), category(category_), defaultOption(defaultOption_), defaultHidden(defaultHidden_) {
selectedOption = defaultOption;
hidden = defaultHidden;
SetVariable();
}
Option(bool var_, std::string name_, std::vector<std::string> options_, std::vector<std::string_view> optionDescriptions_, OptionCategory category_, uint8_t defaultOption_, bool defaultHidden_)
: var(var_), name(std::move(name_)), options(std::move(options_)), optionDescriptions(std::move(optionDescriptions_)), category(category_), defaultOption(defaultOption_), defaultHidden(defaultHidden_) {
Option(bool var_, std::string name_, std::vector<std::string> options_, OptionCategory category_, uint8_t defaultOption_, bool defaultHidden_)
: var(var_), name(std::move(name_)), options(std::move(options_)), category(category_), defaultOption(defaultOption_), defaultHidden(defaultHidden_) {
selectedOption = defaultOption;
hidden = defaultHidden;
SetVariable();
@ -827,10 +679,8 @@ private:
std::variant<bool, uint8_t> var;
std::string name;
std::vector<std::string> options;
std::vector<std::string_view> optionDescriptions;
uint8_t selectedOption = 0;
uint8_t delayedOption = 0;
bool locked = false;
bool hidden = false;
OptionCategory category;
uint8_t defaultOption = 0;
@ -867,20 +717,6 @@ class Menu {
Menu(std::string name_, MenuType type_, uint8_t mode_)
: name(std::move(name_)), type(type_), mode(mode_) {}
void ResetMenuIndex() {
if (mode == OPTION_SUB_MENU) {
for (size_t i = 0; i < settingsList->size(); i++) {
if (!settingsList->at(i)->IsLocked() && !settingsList->at(i)->IsHidden()) {
menuIdx = i;
settingBound = i;
return;
}
}
}
menuIdx = 0;
settingBound = 0;
}
std::string name;
MenuType type;
std::vector<Option *>* settingsList;
@ -895,8 +731,6 @@ class Menu {
namespace Settings {
void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettings, std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks);
SettingsContext FillContext();
void InitSettings();
void SetDefaultSettings();
void ResolveExcludedLocationConflicts();
void RandomizeAllSettings(const bool selectOptions = false);
void ForceChange(uint32_t kDown, Option* currentSetting);
@ -1030,7 +864,6 @@ void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettin
extern Option ChestSize;
extern Option GenerateSpoilerLog;
extern Option IngameSpoilers;
extern Option MenuOpeningButton;
extern Option RandomTrapDmg;
extern Option BlueFireArrows;
extern Option SunlightArrows;
@ -1311,88 +1144,9 @@ void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettin
extern Option GlitchEquipSwapDins;
extern Option GlitchEquipSwap;
//Multiplayer Settings
extern Option MP_Enabled;
extern Option MP_SharedProgress;
extern Option MP_SyncId;
extern Option MP_SharedHealth;
extern Option MP_SharedRupees;
extern Option MP_SharedAmmo;
//Ingame Default Settings
extern Option ZTargeting;
extern Option CameraControl;
extern Option MotionControl;
extern Option TogglePlayMusic;
extern Option TogglePlaySFX;
extern Option SilenceNavi;
extern Option IgnoreMaskReaction;
//Cosmetic Settings
extern Option CustomTunicColors;
extern Option ChildTunicColor;
extern Option KokiriTunicColor;
extern Option GoronTunicColor;
extern Option ZoraTunicColor;
extern Option SilverGauntletsColor;
extern Option GoldGauntletsColor;
extern Option CustomNaviColors;
extern Option IdleNaviInnerColor;
extern Option NPCNaviInnerColor;
extern Option EnemyNaviInnerColor;
extern Option PropNaviInnerColor;
extern Option IdleNaviOuterColor;
extern Option NPCNaviOuterColor;
extern Option EnemyNaviOuterColor;
extern Option PropNaviOuterColor;
extern Option CustomTrailEffects;
extern Option SwordTrailInnerColor;
extern Option SwordTrailOuterColor;
extern Option SwordTrailDuration;
extern Option BoomerangTrailColor;
extern Option BoomerangTrailDuration;
extern Option ChosenSimpleMode;
extern Option BombchuTrailInnerColor;
extern Option BombchuTrailOuterColor;
extern Option BombchuTrailDuration;
extern std::string finalChildTunicColor;
extern std::string finalKokiriTunicColor;
extern std::string finalGoronTunicColor;
extern std::string finalZoraTunicColor;
extern std::string finalSilverGauntletsColor;
extern std::string finalGoldGauntletsColor;
extern std::string finalIdleNaviInnerColor;
extern std::string finalNPCNaviInnerColor;
extern std::string finalEnemyNaviInnerColor;
extern std::string finalPropNaviInnerColor;
extern std::string finalIdleNaviOuterColor;
extern std::string finalNPCNaviOuterColor;
extern std::string finalEnemyNaviOuterColor;
extern std::string finalPropNaviOuterColor;
extern std::string finalSwordTrailInnerColor;
extern std::string finalSwordTrailOuterColor;
extern Cosmetics::Color_RGBA8 finalBoomerangColor;
extern uint8_t boomerangTrailColorMode;
extern std::string finalChuTrailInnerColor;
extern std::string finalChuTrailOuterColor;
extern Option ColoredKeys;
extern Option ColoredBossKeys;
extern Option MirrorWorld;
extern Option ShuffleMusic;
extern Option ShuffleBGM;
extern Option ShuffleFanfares;
extern Option ShuffleOcaMusic;
extern Option ShuffleSFX;
extern Option ShuffleSFXCategorically;
extern uint32_t LinksPocketRewardBitMask;
extern std::array<uint32_t, 9> rDungeonRewardOverrides;
extern uint8_t PlayOption;
extern std::vector<std::vector<Option *>> excludeLocationsOptionsVector;
extern std::vector<Menu *> excludeLocationsMenus;
extern std::vector<Option *> startingItemsOptions;

View File

@ -4,7 +4,6 @@
#include "random.hpp"
#include "item.hpp"
#include "shops.hpp"
#include "debug.hpp"
#include <math.h>
#include <map>

File diff suppressed because it is too large Load Diff

View File

@ -1,76 +0,0 @@
#pragma once
#include <array>
#include <vector>
#include <stdint.h>
#define SFX_BASE 0x1000001
#define SFX_COUNT 1388
#define SFX_COUNT_TRIMMED (1388 - 233)
namespace SFX {
typedef enum {
// Movement
SEQ_WALK,
SEQ_WALK_LOUD,
SEQ_JUMP,
SEQ_LAND,
SEQ_SLIP,
SEQ_SLIP_LOOP,
SEQ_BOUND,
SEQ_CRAWL,
SEQ_MOVE_LOOP,
// Combat
SEQ_WEAPON_SWING,
SEQ_WEAPON_HIT,
SEQ_THROW_LOOP,
SEQ_PROJECTILE_SHOT,
SEQ_MAGIC_CHARGE_LOOP,
SEQ_EXPLOSION,
// Monsters
SEQ_MONSTER_CRY_SHORT,
SEQ_MONSTER_CRY_MEDIUM,
SEQ_MONSTER_CRY_LONG,
SEQ_MONSTER_DAMAGED,
SEQ_MONSTER_DEAD,
SEQ_MONSTER_ATTACK,
// Voice
SEQ_VOICE_SHORT,
SEQ_VOICE_MEDIUM,
SEQ_VOICE_LONG,
// Etc
SEQ_DOOR_OPEN,
SEQ_DOOR_CLOSE,
SEQ_AMBIENCE,
// Meta
SEQTYPE_COUNT,
SEQ_NOCAT = 0xFE, // For sound effects that doesn't fit into any category
SEQ_NOSHUFFLE = 0xFF, // For DUMMYs and YOBIs that are either blank or duplicates, and for system sound effects
} SeqType;
typedef struct {
/// Contains the amount of sound effects in each group, excluding SEQ_NOCAT and SEQ_NOSHUFFLE.
uint16_t rSeqMaxes[SEQTYPE_COUNT];
/// Contains the original list of SeqTypes.
/// Can be used to check which type a sound effect is.
SeqType rSeqTypesSFX[SFX_COUNT];
/// Contains all sound effects.
uint32_t rSFXOverrides_All[SFX_COUNT];
/// Contains all sound effects excluding SEQ_NOSHUFFLE.
uint32_t rSFXOverrides_AllTrimmed[SFX_COUNT_TRIMMED];
/// Contains all sound effects grouped into their SeqTypes.
/// The size of the second dimension should be at least the amount in the largest group.
uint32_t rSFXOverrides_Types[SEQTYPE_COUNT][100];
} SFXData;
extern const std::array<SeqType, SFX_COUNT> seqTypesSFX;
const SFXData& GetSFXData();
void InitSFXRandomizer();
void ShuffleSequences(bool shuffleCategorically);
} // namespace SFX

View File

@ -359,9 +359,7 @@ static void WriteSettings(const bool printAll = false) {
std::vector<Menu*> allMenus = Settings::GetAllOptionMenus();
for (const Menu* menu : allMenus) {
if (menu->name == "Cosmetic Settings" ||
menu->name == "Ingame Defaults" ||
menu->name == "Item Usability Settings" ||
if (menu->name == "Item Usability Settings" ||
menu->name == "Multiplayer Settings") continue;
if (menu->name == "Timesaver Settings") {

View File

@ -20,7 +20,6 @@ typedef enum {
SPOILER_CHK_COW,
SPOILER_CHK_MINIGAME,
SPOILER_CHK_SCRUB,
SPOILER_CHK_BIGGORON,
SPOILER_CHK_GERUDO_MEMBERSHIP_CARD,
SPOILER_CHK_POE_POINTS,
SPOILER_CHK_SHOP_ITEM,

View File

@ -1,6 +1,5 @@
#include "starting_inventory.hpp"
#include "debug.hpp"
#include "dungeon.hpp"
#include "item_list.hpp"
#include "settings.hpp"

View File

@ -720,8 +720,6 @@ bool HasItemBeenCollected(RandomizerCheckObject obj) {
switch (type) {
case SpoilerCollectionCheckType::SPOILER_CHK_ALWAYS_COLLECTED:
return true;
case SpoilerCollectionCheckType::SPOILER_CHK_BIGGORON:
return gSaveContext.bgsFlag & flag;
case SpoilerCollectionCheckType::SPOILER_CHK_CHEST:
return gSaveContext.sceneFlags[scene].chest & (1 << flag);
case SpoilerCollectionCheckType::SPOILER_CHK_COLLECTABLE: