From d0968a99c154e1409f80d6428910c28d2ff20af6 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Tue, 26 Jul 2022 19:25:17 -0400 Subject: [PATCH] Removes some unneeded function definitions (some of which were already commented out). --- soh/soh/Enhancements/randomizer/randomizer.h | 2 - soh/soh/OTRGlobals.cpp | 72 -------------------- soh/soh/OTRGlobals.h | 3 - 3 files changed, 77 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.h b/soh/soh/Enhancements/randomizer/randomizer.h index a89c1f706..1994cfdc4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.h +++ b/soh/soh/Enhancements/randomizer/randomizer.h @@ -43,10 +43,8 @@ class Randomizer { std::string GetAdultAltarText() const; std::string GetGanonText() const; std::string GetGanonHintText() const; - //CustomMessageEntry GetHintFromCheck(RandomizerCheck check); GetItemID GetRandomizedItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId); GetItemID GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum); - //std::string GetCustomGetItemMessage(GlobalContext* globalCtx, GetItemID giid); static void CreateCustomMessages(); }; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index c931edbd0..6d379ef35 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1423,78 +1423,6 @@ extern "C" CustomMessageEntry Randomizer_CopyScrubMessage(u16 scrubTextId) { return CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, price); } -extern "C" int CopyScrubMessage(u16 scrubTextId, char* buffer, const int maxBufferSize) { - std::string scrubText(""); - int language = CVar_GetS32("gLanguages", 0); - int price = 0; - switch (scrubTextId) { - case 0x10A2: - price = 10; - break; - case 0x10DC: - case 0x10DD: - price = 40; - break; - } - switch (language) { - case 0: default: - scrubText += 0x12; // add the sound - scrubText += 0x38; // sound id - scrubText += 0x82; // sound id - scrubText += "All right! You win! In return for"; - scrubText += 0x01; // newline - scrubText += "sparing me, I will sell you a"; - scrubText += 0x01; // newline - scrubText += 0x05; // change the color - scrubText += 0x42; // green - scrubText += "mysterious item"; - scrubText += 0x05; // change the color - scrubText += 0x40; // white - scrubText += "!"; - scrubText += 0x01; // newline - scrubText += 0x05; // change the color - scrubText += 0x41; // red - scrubText += std::to_string(price); - scrubText += price > 1 ? " Rupees" : " Rupee"; - scrubText += 0x05; // change the color - scrubText += 0x40; // white - scrubText += " it is!"; - scrubText += 0x07; // go to a new message - scrubText += 0x10; // message id - scrubText += 0xA3; // message id - break; - case 2: - scrubText += 0x12; // add the sound - scrubText += 0x38; // sound id - scrubText += 0x82; // sound id - scrubText += "J'abandonne! Tu veux bien m'acheter"; - scrubText += 0x01; // newline - scrubText += "un "; - scrubText += 0x05; // change the color - scrubText += 0x42; // green - scrubText += "objet myst\x96rieux"; - //scrubText += "; - scrubText += 0x05; // change the color - scrubText += 0x40; // white - scrubText += "?"; - scrubText += 0x01; // newline - scrubText += "\x84"; - scrubText += "a fera "; - scrubText += 0x05; // change the color - scrubText += 0x41; // red - scrubText += std::to_string(price) + " Rubis"; - scrubText += 0x05; // change the color - scrubText += 0x40; // white - scrubText += "!"; - scrubText += 0x07; // go to a new message - scrubText += 0x10; // message id - scrubText += 0xA3; // message id - break; - } - - return CopyStringToCharBuffer(scrubText, buffer, maxBufferSize); -} - extern "C" CustomMessageEntry Randomizer_CopyAltarMessage() { return (LINK_IS_ADULT) ? CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, 0x7088) : CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, 0x7040); diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 4a924ed61..76212c676 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -87,9 +87,6 @@ Sprite* GetSeedTexture(uint8_t index); void Randomizer_LoadSettings(const char* spoilerFileName); u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey); RandomizerCheck Randomizer_GetCheckFromActor(s16 actorId, s16 actorParams, s16 sceneNum); -int Randomizer_CopyAltarMessage(char* buffer, const int maxBufferSize); -int Randomizer_CopyGanonText(char* buffer, const int maxBufferSize); -int Randomizer_CopyGanonHintText(char* buffer, const int maxBufferSize); void Randomizer_LoadHintLocations(const char* spoilerFileName); void Randomizer_LoadItemLocations(const char* spoilerFileName, bool silent); s16 Randomizer_GetItemModelFromId(s16 itemId);