summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPepe20129 <72659707+Pepe20129@users.noreply.github.com>2024-12-21 16:08:40 +0100
committerGitHub <noreply@github.com>2024-12-21 08:08:40 -0700
commit6fb974bfebc11bcfdb4827e7239c63f9ee2d7bcc (patch)
treec7606cf40aedec648f62c799e56ebf73d5917f45
parent845e37936e1b8dc73a12f60dce3783c7434499ed (diff)
Rando Cleanup (#4741)
* Delete empty files * Small Cleanup * Remove some now useless comments * Re-add log
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/category.hpp6
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/entrance.cpp0
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/item_location.cpp0
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/item_pool.cpp27
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/keys.hpp0
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/location_access.cpp7
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/menu.cpp1
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/menu.hpp12
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/playthrough.cpp2
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/rando_main.cpp4
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/randomizer.hpp4
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/settings.cpp0
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/settings.hpp0
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp7
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/utils.cpp7
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/utils.hpp6
16 files changed, 20 insertions, 63 deletions
diff --git a/soh/soh/Enhancements/randomizer/3drando/category.hpp b/soh/soh/Enhancements/randomizer/3drando/category.hpp
deleted file mode 100644
index fc230b435..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/category.hpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-enum class OptionCategory {
- Setting,
- Toggle,
-}; \ No newline at end of file
diff --git a/soh/soh/Enhancements/randomizer/3drando/entrance.cpp b/soh/soh/Enhancements/randomizer/3drando/entrance.cpp
deleted file mode 100644
index e69de29bb..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/entrance.cpp
+++ /dev/null
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_location.cpp b/soh/soh/Enhancements/randomizer/3drando/item_location.cpp
deleted file mode 100644
index e69de29bb..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/item_location.cpp
+++ /dev/null
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
index 43ebabe6e..3505cf640 100644
--- a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
@@ -679,16 +679,16 @@ void GenerateItemPool() {
RG_FIRE_ARROWS,
RG_ICE_ARROWS,
RG_LIGHT_ARROWS,
- RG_DOUBLE_DEFENSE, //Double defense
+ RG_DOUBLE_DEFENSE,
RG_CLAIM_CHECK,
- RG_PROGRESSIVE_HOOKSHOT, //Progressive hookshot
- RG_PROGRESSIVE_STRENGTH, //Progressive strength
- RG_PROGRESSIVE_BOMB_BAG, //Progressive bomb bag
- RG_PROGRESSIVE_BOW, //Progressive bow
- RG_PROGRESSIVE_SLINGSHOT, //Progressive slingshot
- RG_PROGRESSIVE_WALLET, //Progressive wallet
- RG_PROGRESSIVE_SCALE, //Progressive scale
- RG_PROGRESSIVE_MAGIC_METER, //Progressive magic
+ RG_PROGRESSIVE_HOOKSHOT,
+ RG_PROGRESSIVE_STRENGTH,
+ RG_PROGRESSIVE_BOMB_BAG,
+ RG_PROGRESSIVE_BOW,
+ RG_PROGRESSIVE_SLINGSHOT,
+ RG_PROGRESSIVE_WALLET,
+ RG_PROGRESSIVE_SCALE,
+ RG_PROGRESSIVE_MAGIC_METER,
};
//Check song shuffle and dungeon reward shuffle just for ice traps
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_ANYWHERE)) {
@@ -742,7 +742,7 @@ void GenerateItemPool() {
if (ctx->GetOption(RSK_SHUFFLE_MASTER_SWORD)) {
AddItemToMainPool(RG_MASTER_SWORD);
- ctx->possibleIceTrapModels.push_back(RG_MASTER_SWORD); //Master Sword without the GI enum
+ ctx->possibleIceTrapModels.push_back(RG_MASTER_SWORD);
} else {
if (!ctx->GetOption(RSK_STARTING_MASTER_SWORD)) {
ctx->PlaceItemInLocation(RC_TOT_MASTER_SWORD, RG_MASTER_SWORD, false, true);
@@ -761,7 +761,7 @@ void GenerateItemPool() {
if (ctx->GetOption(RSK_ITEM_POOL).Is(RO_ITEM_POOL_PLENTIFUL)) {
AddItemToPool(PendingJunkPool, RG_PROGRESSIVE_OCARINA);
}
- ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_OCARINA); //Progressive ocarina
+ ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_OCARINA);
} else {
if (ctx->GetOption(RSK_STARTING_OCARINA).Is(RO_STARTING_OCARINA_OFF)) {
ctx->PlaceItemInLocation(RC_LW_GIFT_FROM_SARIA, RG_PROGRESSIVE_OCARINA, false, true);
@@ -780,7 +780,6 @@ void GenerateItemPool() {
AddItemToMainPool(RG_OCARINA_C_LEFT_BUTTON);
AddItemToMainPool(RG_OCARINA_C_RIGHT_BUTTON);
- //TODO: Re-add when custom models work with ice traps
ctx->possibleIceTrapModels.push_back(RG_OCARINA_A_BUTTON);
ctx->possibleIceTrapModels.push_back(RG_OCARINA_C_UP_BUTTON);
ctx->possibleIceTrapModels.push_back(RG_OCARINA_C_DOWN_BUTTON);
@@ -911,7 +910,7 @@ void GenerateItemPool() {
if (ctx->GetOption(RSK_ITEM_POOL).Is(RO_ITEM_POOL_PLENTIFUL)) {
AddItemToPool(PendingJunkPool, RG_MAGIC_BEAN_PACK);
}
- ctx->possibleIceTrapModels.push_back(RG_MAGIC_BEAN_PACK); //Magic bean pack
+ ctx->possibleIceTrapModels.push_back(RG_MAGIC_BEAN_PACK);
} else {
ctx->PlaceItemInLocation(RC_ZR_MAGIC_BEAN_SALESMAN, RG_MAGIC_BEAN, false, true);
}
@@ -1410,7 +1409,7 @@ void GenerateItemPool() {
if (/*ProgressiveGoronSword TODO: Implement Setting*/false) {
ReplaceMaxItem(RG_BIGGORON_SWORD, 0);
AddItemToMainPool(RG_PROGRESSIVE_GORONSWORD, 2);
- ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_GORONSWORD); // Progressive Goron Sword
+ ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_GORONSWORD);
} else {
ctx->possibleIceTrapModels.push_back(RG_BIGGORON_SWORD);
}
diff --git a/soh/soh/Enhancements/randomizer/3drando/keys.hpp b/soh/soh/Enhancements/randomizer/3drando/keys.hpp
deleted file mode 100644
index e69de29bb..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/keys.hpp
+++ /dev/null
diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access.cpp
index aa384e665..c1535ed97 100644
--- a/soh/soh/Enhancements/randomizer/3drando/location_access.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/location_access.cpp
@@ -353,13 +353,6 @@ void RegionTable_Init() {
exit.GetConnectedRegion()->entrances.push_front(&exit);
}
}
- /*
- //Events
-}, {
- //Locations
-}, {
- //Exits
-*/
}
void ReplaceFirstInString(std::string& s, std::string const& toReplace, std::string const& replaceWith) {
diff --git a/soh/soh/Enhancements/randomizer/3drando/menu.cpp b/soh/soh/Enhancements/randomizer/3drando/menu.cpp
index ab064bfe0..b15bfd552 100644
--- a/soh/soh/Enhancements/randomizer/3drando/menu.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/menu.cpp
@@ -7,7 +7,6 @@
#include "menu.hpp"
#include "playthrough.hpp"
-#include "randomizer.hpp"
#include "spoiler_log.hpp"
#include "location_access.hpp"
#include "soh/Enhancements/debugger/performanceTimer.h"
diff --git a/soh/soh/Enhancements/randomizer/3drando/menu.hpp b/soh/soh/Enhancements/randomizer/3drando/menu.hpp
index f9393d90e..e0e6e4210 100644
--- a/soh/soh/Enhancements/randomizer/3drando/menu.hpp
+++ b/soh/soh/Enhancements/randomizer/3drando/menu.hpp
@@ -13,16 +13,4 @@
#define DELETE_PRESET 6
#define RESET_TO_DEFAULTS 8
-// #define RESET "\x1b[0m"
-// #define DIM "\x1b[2m"
-
-// #define BLACK "\x1b[30m"
-// #define RED "\x1b[31m"
-// #define GREEN "\x1b[32m"
-// #define YELLOW "\x1b[33m"
-// #define BLUE "\x1b[34m"
-// #define MEGANTA "\x1b[35m"
-// #define CYAN "\x1b[36m"
-// #define WHITE "\x1b[37m"
-
bool GenerateRandomizer(std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks, std::string seedInput); \ No newline at end of file
diff --git a/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp b/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp
index 53b02e036..23503638d 100644
--- a/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp
@@ -97,7 +97,7 @@ int Playthrough_Repeat(std::set<RandomizerCheck> excludedLocations, std::set<Ran
ctx->GetSettings()->SetSeedString(std::to_string(rand() % 0xFFFFFFFF));
repeatedSeed = boost::hash_32<std::string>{}(ctx->GetSettings()->GetSeedString());
ctx->GetSettings()->SetSeed(repeatedSeed % 0xFFFFFFFF);
- //CitraPrint("testing seed: " + std::to_string(Settings::seed));
+ SPDLOG_DEBUG("testing seed: %d", repeatedSeed);
ClearProgress();
Playthrough_Init(ctx->GetSettings()->GetSeed(), excludedLocations, enabledTricks);
SPDLOG_INFO("Seeds Generated: {}", i + 1);
diff --git a/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp b/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
index 9a0ba20b4..7a396aa6b 100644
--- a/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
@@ -4,7 +4,6 @@
#include "location_access.hpp"
#include "rando_main.hpp"
#include "../context.h"
-// #include <soh/Enhancements/randomizer.h>
#include <libultraship/bridge.h>
#include <Context.h>
#include <libultraship/libultra/types.h>
@@ -14,9 +13,6 @@
void RandoMain::GenerateRando(std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks,
std::string seedString) {
- // std::string settingsFileName = "./randomizer/latest_settings.json";
- // CVarSetString(CVAR_RANDOMIZER_SETTING("LoadedPreset"), settingsFileName.c_str());
-
Rando::Context::GetInstance()->SetSeedGenerated(GenerateRandomizer(excludedLocations, enabledTricks, seedString));
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
diff --git a/soh/soh/Enhancements/randomizer/3drando/randomizer.hpp b/soh/soh/Enhancements/randomizer/3drando/randomizer.hpp
deleted file mode 100644
index 1b02c9037..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/randomizer.hpp
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-
-#define RANDOMIZER_VERSION "v3.1"
-#define COMMIT_NUMBER "develop"
diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp
deleted file mode 100644
index e69de29bb..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp
+++ /dev/null
diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.hpp b/soh/soh/Enhancements/randomizer/3drando/settings.hpp
deleted file mode 100644
index e69de29bb..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/settings.hpp
+++ /dev/null
diff --git a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
index 58409d0ec..bed532e9b 100644
--- a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
@@ -6,7 +6,6 @@
#include "../entrance.h"
#include "random.hpp"
#include "../trial.h"
-#include "utils.hpp"
#include "hints.hpp"
#include "pool_functions.hpp"
#include "soh/Enhancements/randomizer/randomizer_check_objects.h"
@@ -147,6 +146,12 @@ static void WriteSettings() {
}
}
+// Removes any line breaks from s.
+std::string RemoveLineBreaks(std::string s) {
+ s.erase(std::remove(s.begin(), s.end(), '\n'), s.end());
+ return s;
+}
+
// Writes the excluded locations to the spoiler log, if there are any.
static void WriteExcludedLocations() {
auto ctx = Rando::Context::GetInstance();
diff --git a/soh/soh/Enhancements/randomizer/3drando/utils.cpp b/soh/soh/Enhancements/randomizer/3drando/utils.cpp
deleted file mode 100644
index 1cbe8c072..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/utils.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "utils.hpp"
-
-// Removes any line breaks from s.
-std::string RemoveLineBreaks(std::string s) {
- s.erase(std::remove(s.begin(), s.end(), '\n'), s.end());
- return s;
-} \ No newline at end of file
diff --git a/soh/soh/Enhancements/randomizer/3drando/utils.hpp b/soh/soh/Enhancements/randomizer/3drando/utils.hpp
deleted file mode 100644
index 3f5f69882..000000000
--- a/soh/soh/Enhancements/randomizer/3drando/utils.hpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-#include <algorithm>
-#include <string>
-
-std::string RemoveLineBreaks(std::string s);