From 723375a34450087729de4f7bdd8d31f56feb55ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Thu, 20 Mar 2025 02:19:19 +0000 Subject: [PATCH] fix type signature of Randomizer_DrawMysteryItem (#5156) --- soh/soh/Enhancements/randomizer/3drando/shops.cpp | 3 +++ soh/soh/Enhancements/randomizer/draw.cpp | 2 +- soh/soh/Enhancements/randomizer/draw.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/shops.cpp b/soh/soh/Enhancements/randomizer/3drando/shops.cpp index edaf8aa5d..75120fa41 100644 --- a/soh/soh/Enhancements/randomizer/3drando/shops.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/shops.cpp @@ -275,6 +275,9 @@ int GetShopsanityReplaceAmount() { return 7; } else if (ctx->GetOption(RSK_SHOPSANITY_COUNT).Is(RO_SHOPSANITY_COUNT_EIGHT_ITEMS)) { return 8; //temporarily unreachable due to logic limitations + } else { + assert(false); + return 0; } } else { //Random, get number in [1, 7] return Random(1, 8); diff --git a/soh/soh/Enhancements/randomizer/draw.cpp b/soh/soh/Enhancements/randomizer/draw.cpp index 73b4142de..9c9cfd829 100644 --- a/soh/soh/Enhancements/randomizer/draw.cpp +++ b/soh/soh/Enhancements/randomizer/draw.cpp @@ -504,7 +504,7 @@ extern "C" void Randomizer_DrawTriforcePieceGI(PlayState* play, GetItemEntry get CLOSE_DISPS(play->state.gfxCtx); } -extern "C" void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry getItemEntry) { +extern "C" void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry* getItemEntry) { Color_RGB8 color = { 0, 60, 100 }; if (CVarGetInteger(CVAR_COSMETIC("World.MysteryItem.Changed"), 0)) { color = CVarGetColor24(CVAR_COSMETIC("World.MysteryItem.Value"), color); diff --git a/soh/soh/Enhancements/randomizer/draw.h b/soh/soh/Enhancements/randomizer/draw.h index aaac71e06..22d8466c6 100644 --- a/soh/soh/Enhancements/randomizer/draw.h +++ b/soh/soh/Enhancements/randomizer/draw.h @@ -23,7 +23,7 @@ void Randomizer_DrawOcarinaButton(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawBronzeScale(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawFishingPoleGI(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawSkeletonKey(PlayState* play, GetItemEntry* getItemEntry); -void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry getItemEntry); +void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawBombchuBagInLogic(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawBombchuBag(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawOverworldKey(PlayState* play, GetItemEntry* getItemEntry);