mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 14:45:31 -07:00
Merge pull request #1436 from leggettc18/better_icon_hash
Randomizer: Better Icon Hashes
This commit is contained in:
commit
956c04cfc4
8 changed files with 150 additions and 54 deletions
|
@ -186,6 +186,7 @@ set(Header_Files__soh__Enhancements__randomizer
|
||||||
"soh/Enhancements/randomizer/adult_trade_shuffle.h"
|
"soh/Enhancements/randomizer/adult_trade_shuffle.h"
|
||||||
"soh/Enhancements/randomizer/randomizer_check_objects.h"
|
"soh/Enhancements/randomizer/randomizer_check_objects.h"
|
||||||
"soh/Enhancements/randomizer/draw.h"
|
"soh/Enhancements/randomizer/draw.h"
|
||||||
|
"soh/Enhancements/randomizer/rando_hash.h"
|
||||||
)
|
)
|
||||||
source_group("Header Files\\soh\\Enhancements\\randomizer" FILES ${Header_Files__soh__Enhancements__randomizer})
|
source_group("Header Files\\soh\\Enhancements\\randomizer" FILES ${Header_Files__soh__Enhancements__randomizer})
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <sstream>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
#include "cosmetics.hpp"
|
#include "cosmetics.hpp"
|
||||||
|
@ -541,8 +542,18 @@ std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t>
|
||||||
}
|
}
|
||||||
Settings::Keysanity.RestoreDelayedOption();
|
Settings::Keysanity.RestoreDelayedOption();
|
||||||
}
|
}
|
||||||
|
std::ostringstream fileNameStream;
|
||||||
return "./Randomizer/" + Settings::seed + ".json";
|
for (int i = 0; i < Settings::hashIconIndexes.size(); i++) {
|
||||||
|
if (i) {
|
||||||
|
fileNameStream << '-';
|
||||||
|
}
|
||||||
|
if (Settings::hashIconIndexes[i] < 10) {
|
||||||
|
fileNameStream << '0';
|
||||||
|
}
|
||||||
|
fileNameStream << std::to_string(Settings::hashIconIndexes[i]);
|
||||||
|
}
|
||||||
|
std::string fileName = fileNameStream.str();
|
||||||
|
return "./Randomizer/" + fileName + ".json";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetInput(const char* hintText) {
|
std::string GetInput(const char* hintText) {
|
||||||
|
|
|
@ -39,6 +39,7 @@ int Playthrough_Init(uint32_t seed, std::unordered_map<RandomizerSettingKey, uin
|
||||||
}
|
}
|
||||||
unsigned int finalHash = std::hash<std::string>{}(Settings::seed + settingsStr);
|
unsigned int finalHash = std::hash<std::string>{}(Settings::seed + settingsStr);
|
||||||
Random_Init(finalHash);
|
Random_Init(finalHash);
|
||||||
|
Settings::hash = std::to_string(finalHash);
|
||||||
|
|
||||||
Logic::UpdateHelpers();
|
Logic::UpdateHelpers();
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ using namespace SFX;
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
std::string seed;
|
std::string seed;
|
||||||
|
std::string hash;
|
||||||
std::string version = RANDOMIZER_VERSION "-" COMMIT_NUMBER;
|
std::string version = RANDOMIZER_VERSION "-" COMMIT_NUMBER;
|
||||||
std::array<uint8_t, 5> hashIconIndexes;
|
std::array<uint8_t, 5> hashIconIndexes;
|
||||||
|
|
||||||
|
|
|
@ -863,6 +863,7 @@ void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettin
|
||||||
extern std::string seed;
|
extern std::string seed;
|
||||||
extern std::string version;
|
extern std::string version;
|
||||||
extern std::array<uint8_t, 5> hashIconIndexes;
|
extern std::array<uint8_t, 5> hashIconIndexes;
|
||||||
|
extern std::string hash;
|
||||||
|
|
||||||
extern bool skipChildZelda;
|
extern bool skipChildZelda;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -36,12 +37,16 @@ namespace {
|
||||||
std::string placementtxt;
|
std::string placementtxt;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
static RandomizerHash randomizerHash;
|
|
||||||
static SpoilerData spoilerData;
|
static SpoilerData spoilerData;
|
||||||
|
|
||||||
void GenerateHash() {
|
void GenerateHash() {
|
||||||
for (size_t i = 0; i < Settings::hashIconIndexes.size(); i++) {
|
std::string hash = Settings::hash;
|
||||||
int number = Settings::seed[i] - '0';
|
// adds leading 0s to the hash string if it has less than 10 digits.
|
||||||
|
while (hash.length() < 10) {
|
||||||
|
hash = "0" + hash;
|
||||||
|
}
|
||||||
|
for (size_t i = 0, j = 0; i < Settings::hashIconIndexes.size(); i++, j += 2) {
|
||||||
|
int number = std::stoi(hash.substr(j, 2));
|
||||||
Settings::hashIconIndexes[i] = number;
|
Settings::hashIconIndexes[i] = number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,20 +54,6 @@ void GenerateHash() {
|
||||||
// spoilerData = { 0 };
|
// spoilerData = { 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
const RandomizerHash& GetRandomizerHash() {
|
|
||||||
return randomizerHash;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns the randomizer hash as concatenated string, separated by comma.
|
|
||||||
const std::string GetRandomizerHashAsString() {
|
|
||||||
std::string hash = "";
|
|
||||||
for (const std::string& str : randomizerHash) {
|
|
||||||
hash += str + ", ";
|
|
||||||
}
|
|
||||||
hash.erase(hash.length() - 2); // Erase last comma
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
|
|
||||||
const SpoilerData& GetSpoilerData() {
|
const SpoilerData& GetSpoilerData() {
|
||||||
return spoilerData;
|
return spoilerData;
|
||||||
}
|
}
|
||||||
|
@ -703,7 +694,6 @@ const char* SpoilerLog_Write(int language) {
|
||||||
|
|
||||||
rootNode->SetAttribute("version", Settings::version.c_str());
|
rootNode->SetAttribute("version", Settings::version.c_str());
|
||||||
rootNode->SetAttribute("seed", Settings::seed.c_str());
|
rootNode->SetAttribute("seed", Settings::seed.c_str());
|
||||||
rootNode->SetAttribute("hash", GetRandomizerHashAsString().c_str());
|
|
||||||
|
|
||||||
jsonData.clear();
|
jsonData.clear();
|
||||||
|
|
||||||
|
@ -739,12 +729,23 @@ const char* SpoilerLog_Write(int language) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string jsonString = jsonData.dump(4);
|
std::string jsonString = jsonData.dump(4);
|
||||||
|
std::ostringstream fileNameStream;
|
||||||
|
for (int i = 0; i < Settings::hashIconIndexes.size(); i ++) {
|
||||||
|
if (i) {
|
||||||
|
fileNameStream << '-';
|
||||||
|
}
|
||||||
|
if (Settings::hashIconIndexes[i] < 10) {
|
||||||
|
fileNameStream << '0';
|
||||||
|
}
|
||||||
|
fileNameStream << std::to_string(Settings::hashIconIndexes[i]);
|
||||||
|
}
|
||||||
|
std::string fileName = fileNameStream.str();
|
||||||
std::ofstream jsonFile(Ship::Window::GetPathRelativeToAppDirectory(
|
std::ofstream jsonFile(Ship::Window::GetPathRelativeToAppDirectory(
|
||||||
(std::string("Randomizer/") + std::string(Settings::seed) + std::string(".json")).c_str()));
|
(std::string("Randomizer/") + fileName + std::string(".json")).c_str()));
|
||||||
jsonFile << std::setw(4) << jsonString << std::endl;
|
jsonFile << std::setw(4) << jsonString << std::endl;
|
||||||
jsonFile.close();
|
jsonFile.close();
|
||||||
|
|
||||||
return Settings::seed.c_str();
|
return fileName.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlacementLog_Msg(std::string_view msg) {
|
void PlacementLog_Msg(std::string_view msg) {
|
||||||
|
@ -764,7 +765,6 @@ bool PlacementLog_Write() {
|
||||||
|
|
||||||
rootNode->SetAttribute("version", Settings::version.c_str());
|
rootNode->SetAttribute("version", Settings::version.c_str());
|
||||||
rootNode->SetAttribute("seed", Settings::seed.c_str());
|
rootNode->SetAttribute("seed", Settings::seed.c_str());
|
||||||
rootNode->SetAttribute("hash", GetRandomizerHashAsString().c_str());
|
|
||||||
|
|
||||||
// WriteSettings(placementLog, true); // Include hidden settings.
|
// WriteSettings(placementLog, true); // Include hidden settings.
|
||||||
// WriteExcludedLocations(placementLog);
|
// WriteExcludedLocations(placementLog);
|
||||||
|
|
111
soh/soh/Enhancements/randomizer/rando_hash.h
Normal file
111
soh/soh/Enhancements/randomizer/rando_hash.h
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "randomizerTypes.h"
|
||||||
|
#include <array>
|
||||||
|
#include "variables.h"
|
||||||
|
#include <string>
|
||||||
|
#include <textures/icon_item_static/icon_item_static.h>
|
||||||
|
#include <textures/icon_item_24_static/icon_item_24_static.h>
|
||||||
|
|
||||||
|
std::array<Sprite, 100> gSeedTextures = { {
|
||||||
|
{ dgDekuNutIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0 },
|
||||||
|
{ dgDekuStickIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1 },
|
||||||
|
{ dgBombIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 2 },
|
||||||
|
{ dgFairyBowIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 3 },
|
||||||
|
{ dgFireArrowIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 4 },
|
||||||
|
{ dgDinsFireIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 5 },
|
||||||
|
{ dgFairySlingshotIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 6 },
|
||||||
|
{ dgFairyOcarinaIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 7 },
|
||||||
|
{ dgOcarinaofTimeIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 8 },
|
||||||
|
{ dgBombchuIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 9 },
|
||||||
|
{ dgHookshotIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 10 },
|
||||||
|
{ dgLongshotIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 11 },
|
||||||
|
{ dgIceArrowIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 12 },
|
||||||
|
{ dgFaroresWindIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 13 },
|
||||||
|
{ dgBoomerangIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 14 },
|
||||||
|
{ dgLensofTruthIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 15 },
|
||||||
|
{ dgMagicBeansIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 16 },
|
||||||
|
{ dgMegatonHammerIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 17 },
|
||||||
|
{ dgLightArrowIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 18 },
|
||||||
|
{ dgNayrusLoveIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 19 },
|
||||||
|
{ dgEmptyBottleIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 20 },
|
||||||
|
{ dgRedPotionIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 21 },
|
||||||
|
{ dgGreenPotionIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 22 },
|
||||||
|
{ dgBluePotionIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 23 },
|
||||||
|
{ dgBottledFairyIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 24 },
|
||||||
|
{ dgFishIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 25 },
|
||||||
|
{ dgMilkFullIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 26 },
|
||||||
|
{ dgRutosLetterIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 27 },
|
||||||
|
{ dgBlueFireIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 28 },
|
||||||
|
{ dgBugIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 29 },
|
||||||
|
{ dgBigPoeIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 30 },
|
||||||
|
{ dgMilkhalfIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 31 },
|
||||||
|
{ dgPoeIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32 },
|
||||||
|
{ dgZeldasLetterIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 33 },
|
||||||
|
{ dgKeatonMaskIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 34 },
|
||||||
|
{ dgSkullMaskIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 35 },
|
||||||
|
{ dgSpookyMaskIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 36 },
|
||||||
|
{ dgBunnyHoodIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 37 },
|
||||||
|
{ dgGoronMaskIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 38 },
|
||||||
|
{ dgZoraMaskIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 39 },
|
||||||
|
{ dgGerudoMaskIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 40 },
|
||||||
|
{ dgMaskofTruthIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 41 },
|
||||||
|
{ dgSoldOutIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 42 },
|
||||||
|
{ dgPocketEggIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 43 },
|
||||||
|
{ dgPocketCuccoIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 44 },
|
||||||
|
{ dgCojiroIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 45 },
|
||||||
|
{ dgOddMushroomIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 46 },
|
||||||
|
{ dgOddPotionIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 47 },
|
||||||
|
{ dgPoachersSawIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 48 },
|
||||||
|
{ dgBrokenBiggoronSwordIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 49 },
|
||||||
|
{ dgPrescriptionIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 50 },
|
||||||
|
{ dgEyeBallFrogIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 51 },
|
||||||
|
{ dgEyeDropsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 52 },
|
||||||
|
{ dgClaimCheckIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 53 },
|
||||||
|
{ dgKokiriSwordIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 54 },
|
||||||
|
{ dgMasterSwordIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 55 },
|
||||||
|
{ dgBiggoronSwordIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 56 },
|
||||||
|
{ dgDekuShieldIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 57 },
|
||||||
|
{ dgHylianShieldIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 58 },
|
||||||
|
{ dgMirrorShieldIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 59 },
|
||||||
|
{ dgKokiriTunicIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 60 },
|
||||||
|
{ dgGoronTunicIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 61 },
|
||||||
|
{ dgZoraTunicIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 62 },
|
||||||
|
{ dgKokiriBootsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 63 },
|
||||||
|
{ dgIronBootsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64 },
|
||||||
|
{ dgHoverBootsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 65 },
|
||||||
|
{ dgBulletBag30IconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 66 },
|
||||||
|
{ dgBulletBag40IconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 67 },
|
||||||
|
{ dgBulletBag50IconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 68 },
|
||||||
|
{ dgQuiver30IconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 69 },
|
||||||
|
{ dgBombBag20IconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 70 },
|
||||||
|
{ dgGoronsBraceletIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 71 },
|
||||||
|
{ dgSilverGauntletsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 72 },
|
||||||
|
{ dgGoldenGauntletsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 73 },
|
||||||
|
{ dgSilverScaleIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 74 },
|
||||||
|
{ dgGoldenScaleIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 75 },
|
||||||
|
{ dgBrokenGiantsKnifeIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 76 },
|
||||||
|
{ dgAdultsWalletIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 77 },
|
||||||
|
{ dgGiantsWalletIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 78 },
|
||||||
|
{ dgDekuSeedsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 79 },
|
||||||
|
{ dgFishingPoleIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 80 },
|
||||||
|
{ dgForestMedallionIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 81 },
|
||||||
|
{ dgFireMedallionIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 82 },
|
||||||
|
{ dgWaterMedallionIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 83 },
|
||||||
|
{ dgSpiritMedallionIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 84 },
|
||||||
|
{ dgShadowMedallionIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 85 },
|
||||||
|
{ dgLightMedallionIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 86 },
|
||||||
|
{ dgKokiriEmeraldIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 87 },
|
||||||
|
{ dgGoronRubyIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 88 },
|
||||||
|
{ dgZoraSapphireIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 89 },
|
||||||
|
{ dgStoneOfAgonyIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 90 },
|
||||||
|
{ dgGerudosCardIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 91 },
|
||||||
|
{ dgGoldSkulltulaIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 92 },
|
||||||
|
{ dgHeartContainerIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 93 },
|
||||||
|
{ dgBossKeyIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 94 },
|
||||||
|
{ dgCompassIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 95 },
|
||||||
|
{ dgDungeonMapIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 96 },
|
||||||
|
{ dgSmallKeyIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 97 },
|
||||||
|
{ dgSmallMagicJarIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 98 },
|
||||||
|
{ dgBigMagicJarIconTex, 24, 24, G_IM_FMT_RGBA, G_IM_SIZ_32b, 99 },
|
||||||
|
} };
|
|
@ -20,11 +20,11 @@
|
||||||
#include "randomizer_check_objects.h"
|
#include "randomizer_check_objects.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
|
#include "rando_hash.h"
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
using namespace std::literals::string_literals;
|
using namespace std::literals::string_literals;
|
||||||
|
|
||||||
std::unordered_map<uint8_t, Sprite> gSeedTextures;
|
|
||||||
std::unordered_map<std::string, RandomizerCheck> SpoilerfileCheckNameToEnum;
|
std::unordered_map<std::string, RandomizerCheck> SpoilerfileCheckNameToEnum;
|
||||||
std::set<RandomizerCheck> excludedLocations;
|
std::set<RandomizerCheck> excludedLocations;
|
||||||
|
|
||||||
|
@ -64,36 +64,6 @@ static const char* frenchRupeeNames[36] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
Randomizer::Randomizer() {
|
Randomizer::Randomizer() {
|
||||||
Sprite bowSprite = { dgFairyBowIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0 };
|
|
||||||
gSeedTextures[0] = bowSprite;
|
|
||||||
|
|
||||||
Sprite bombchuSprite = { dgBombchuIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1 };
|
|
||||||
gSeedTextures[1] = bombchuSprite;
|
|
||||||
|
|
||||||
Sprite beansSprite = { dgMagicBeansIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 2 };
|
|
||||||
gSeedTextures[2] = beansSprite;
|
|
||||||
|
|
||||||
Sprite milkSprite = { dgMilkFullIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 3 };
|
|
||||||
gSeedTextures[3] = milkSprite;
|
|
||||||
|
|
||||||
Sprite frogSprite = { dgEyeBallFrogIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 4 };
|
|
||||||
gSeedTextures[4] = frogSprite;
|
|
||||||
|
|
||||||
Sprite mirrorShieldSprite = { dgMirrorShieldIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 5 };
|
|
||||||
gSeedTextures[5] = mirrorShieldSprite;
|
|
||||||
|
|
||||||
Sprite hoverBootsSprite = { dgHoverBootsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 6 };
|
|
||||||
gSeedTextures[6] = hoverBootsSprite;
|
|
||||||
|
|
||||||
Sprite megatonHammerSprite = { dgMegatonHammerIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 7 };
|
|
||||||
gSeedTextures[7] = megatonHammerSprite;
|
|
||||||
|
|
||||||
Sprite silverGauntletsSprite = { dgSilverGauntletsIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 8 };
|
|
||||||
gSeedTextures[8] = silverGauntletsSprite;
|
|
||||||
|
|
||||||
Sprite ootOcarinaSprite = { dgOcarinaofTimeIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b, 9 };
|
|
||||||
gSeedTextures[9] = ootOcarinaSprite;
|
|
||||||
|
|
||||||
for (auto areaIt : RandomizerCheckObjects::GetAllRCObjects()) {
|
for (auto areaIt : RandomizerCheckObjects::GetAllRCObjects()) {
|
||||||
for (auto locationIt : areaIt.second) {
|
for (auto locationIt : areaIt.second) {
|
||||||
SpoilerfileCheckNameToEnum[locationIt.rcSpoilerName] = locationIt.rc;
|
SpoilerfileCheckNameToEnum[locationIt.rcSpoilerName] = locationIt.rc;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue