diff --git a/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL new file mode 100644 index 00000000000..939042daaf1 --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_tri_0 b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_tri_0 new file mode 100644 index 00000000000..8c320d24362 --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_tri_0 @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_tri_1 b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_tri_1 new file mode 100644 index 00000000000..0990859d5a2 --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_tri_1 @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_0 b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_0 new file mode 100644 index 00000000000..37e6186e948 --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_0 @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_1 b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_1 new file mode 100644 index 00000000000..4360eedc507 --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_1 @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_cull b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_cull new file mode 100644 index 00000000000..cedf6351d19 --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/gMysteryItemDL_vtx_cull @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/mat_gMysteryItemDL_f3dlite_mysteryItem_light_material b/OTRExporter/assets/objects/object_mystery_item/mat_gMysteryItemDL_f3dlite_mysteryItem_light_material new file mode 100644 index 00000000000..4dc39e81139 --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/mat_gMysteryItemDL_f3dlite_mysteryItem_light_material @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/mat_gMysteryItemDL_f3dlite_mysteryItem_material b/OTRExporter/assets/objects/object_mystery_item/mat_gMysteryItemDL_f3dlite_mysteryItem_material new file mode 100644 index 00000000000..6941bb55fdd --- /dev/null +++ b/OTRExporter/assets/objects/object_mystery_item/mat_gMysteryItemDL_f3dlite_mysteryItem_material @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/OTRExporter/assets/objects/object_mystery_item/noise_tex b/OTRExporter/assets/objects/object_mystery_item/noise_tex new file mode 100644 index 00000000000..aaf4e331f15 Binary files /dev/null and b/OTRExporter/assets/objects/object_mystery_item/noise_tex differ diff --git a/soh/assets/soh_assets.h b/soh/assets/soh_assets.h index b1feac469c5..fb9bc5e402f 100644 --- a/soh/assets/soh_assets.h +++ b/soh/assets/soh_assets.h @@ -44,6 +44,8 @@ static const ALIGN_ASSET(2) char gTitleRandomizerSubtitleTex[] = dgTitleRandomiz #define dgTitleBossRushSubtitleTex "__OTR__objects/object_mag/gTitleBossRushSubtitleTex" static const ALIGN_ASSET(2) char gTitleBossRushSubtitleTex[] = dgTitleBossRushSubtitleTex; +#define dgMysteryItemDL "__OTR__objects/object_mystery_item/gMysteryItemDL" +static const ALIGN_ASSET(2) char gMysteryItemDL[] = dgMysteryItemDL; // overlays #define dgOptionsDividerChangeLangVtx "__OTR__overlays/ovl_file_choose/gOptionsDividerChangeLangVtx" static const ALIGN_ASSET(2) char gOptionsDividerChangeLangVtx[] = dgOptionsDividerChangeLangVtx; diff --git a/soh/include/functions.h b/soh/include/functions.h index 2420d2a6aad..53b03f4505b 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -572,7 +572,7 @@ void Flags_UnsetRandomizerInf(RandomizerInf flag); u16 func_80037C30(PlayState* play, s16 arg1); s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3); s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4); -GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play); +GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play, RandomizerCheck* check); s16 GetChestGameRandoGiDrawId(s8 room, s16 ogDrawId, PlayState* play); // ? func_80038600(?); @@ -870,7 +870,7 @@ void Cutscene_HandleEntranceTriggers(PlayState* play); void Cutscene_HandleConditionalTriggers(PlayState* play); void Cutscene_SetSegment(PlayState* play, void* segment); void GetItem_Draw(PlayState* play, s16 drawId); -void GetItemEntry_Draw(PlayState* play, GetItemEntry getItemEntry); +void GetItemEntry_Draw(PlayState* play, GetItemEntry getItemEntry, RandomizerCheck check); void SoundSource_InitAll(PlayState* play); void SoundSource_UpdateAll(PlayState* play); void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* pos, s32 duration, u16 sfxId); diff --git a/soh/include/variables.h b/soh/include/variables.h index 8fd457d18a8..afc8a560ad5 100644 --- a/soh/include/variables.h +++ b/soh/include/variables.h @@ -171,6 +171,7 @@ extern "C" extern u8 gWalkSpeedToggle1; extern u8 gWalkSpeedToggle2; extern f32 iceTrapScale; + extern f32 mysteryItemScale; extern const s16 D_8014A6C0[]; #define gTatumsPerBeat (D_8014A6C0[1]) diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp index 97b2921c666..60dacd2a1be 100644 --- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp +++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp @@ -305,6 +305,7 @@ static std::map cosmeticOptions = { COSMETIC_OPTION("World_Moon", "Moon", GROUP_WORLD, ImVec4(240, 255, 180, 255), false, true, true), COSMETIC_OPTION("World_GossipStone", "Gossip Stone", GROUP_WORLD, ImVec4(200, 200, 200, 255), false, true, true), COSMETIC_OPTION("World_RedIce", "Red Ice", GROUP_WORLD, ImVec4(255, 0, 0, 255), false, true, false), + COSMETIC_OPTION("World_MysteryItem", "Mystery Item", GROUP_WORLD, ImVec4(0, 60, 100, 255), false, true, false), COSMETIC_OPTION("Navi_IdlePrimary", "Idle Primary", GROUP_NAVI, ImVec4(255, 255, 255, 255), false, true, false), COSMETIC_OPTION("Navi_IdleSecondary", "Idle Secondary", GROUP_NAVI, ImVec4( 0, 0, 255, 0), false, true, true), diff --git a/soh/soh/Enhancements/randomizer/draw.cpp b/soh/soh/Enhancements/randomizer/draw.cpp index 34c17356c7e..75c0eebd13a 100644 --- a/soh/soh/Enhancements/randomizer/draw.cpp +++ b/soh/soh/Enhancements/randomizer/draw.cpp @@ -9,6 +9,7 @@ #include "objects/object_gi_bosskey/object_gi_bosskey.h" #include "objects/object_gi_hearts/object_gi_hearts.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" +#include "soh_assets.h" extern "C" u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey); @@ -173,3 +174,25 @@ extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getIt CLOSE_DISPS(play->state.gfxCtx); } + +extern "C" void Randomizer_DrawMysteryItem(PlayState* play) { + Color_RGB8 color = { 0, 60, 100 }; + if (CVarGetInteger("gCosmetics.World_MysteryItem.Changed", 0)) { + color = CVarGetColor24("gCosmetics.World_MysteryItem.Value", color); + } + + OPEN_DISPS(play->state.gfxCtx); + + Gfx_SetupDL_25Xlu(play->state.gfxCtx); + + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); + + gDPSetGrayscaleColor(POLY_XLU_DISP++, color.r, color.g, color.b, 255); + gSPGrayscale(POLY_XLU_DISP++, true); + + gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gMysteryItemDL); + + gSPGrayscale(POLY_XLU_DISP++, false); + + CLOSE_DISPS(play->state.gfxCtx); +} diff --git a/soh/soh/Enhancements/randomizer/draw.h b/soh/soh/Enhancements/randomizer/draw.h index d9f0ed36b44..0d5bc1dadbb 100644 --- a/soh/soh/Enhancements/randomizer/draw.h +++ b/soh/soh/Enhancements/randomizer/draw.h @@ -10,6 +10,7 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEntry); extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry); extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getItemEntry); +extern "C" void Randomizer_DrawMysteryItem(PlayState* play); extern "C" void Randomizer_DrawIceTrap(PlayState* play, GetItemEntry getItemEntry); #endif diff --git a/soh/soh/Enhancements/randomizer/randomizer.h b/soh/soh/Enhancements/randomizer/randomizer.h index c8a3335936a..1285128791f 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.h +++ b/soh/soh/Enhancements/randomizer/randomizer.h @@ -9,6 +9,7 @@ #include #include #include "soh/Enhancements/randomizer/randomizer_check_objects.h" +#include "soh/Enhancements/randomizer/randomizer_check_tracker.h" #include "soh/Enhancements/randomizer/randomizer_tricks.h" #include #include "soh/Enhancements/item-tables/ItemTableTypes.h" diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index 1c880c21d0c..78d87e89750 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -1027,7 +1027,8 @@ void CheckTrackerWindow::InitElement() { Color_Saved_Extra = CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default); GameInteractor::Instance->RegisterGameHook([](uint32_t fileNum) { - doInitialize = true; + Teardown(); + LoadSettings(); }); GameInteractor::Instance->RegisterGameHook([](uint32_t fileNum) { Teardown(); diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h index 0ed3a8526a3..6699d92c622 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace CheckTracker { @@ -51,6 +52,8 @@ typedef enum { //repeat... #define INDEX_TO_16BIT_LITTLE_ENDIAN_BITMASK(idx) (0x8000 >> (7 - (idx % 8) + ((idx % 16) / 8) * 8)) +bool IsVisibleInCheckTracker(RandomizerCheckObject rcObj); + } // namespace CheckTracker \ No newline at end of file diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 7e1845dd0da..c7562629033 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1947,6 +1947,10 @@ extern "C" ItemObtainability Randomizer_GetItemObtainabilityFromRandomizerCheck( return OTRGlobals::Instance->gRandomizer->GetItemObtainabilityFromRandomizerCheck(randomizerCheck); } +extern "C" bool Randomizer_IsVisibleInCheckTracker(RandomizerCheck check) { + return CheckTracker::IsVisibleInCheckTracker(RandomizerCheckObjects::GetAllRCObjects().find(check)->second); +} + CustomMessage Randomizer_GetCustomGetItemMessage(Player* player) { s16 giid; if (player->getItemEntry.objectId != OBJECT_INVALID) { diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 29d4a3f84fc..b860149823e 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -142,6 +142,7 @@ GetItemEntry Randomizer_GetItemFromActor(s16 actorId, s16 sceneNum, s16 actorPar GetItemEntry Randomizer_GetItemFromActorWithoutObtainabilityCheck(s16 actorId, s16 sceneNum, s16 actorParams, GetItemID ogId); GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId); GetItemEntry Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(RandomizerCheck randomizerCheck, GetItemID ogId); +bool Randomizer_IsVisibleInCheckTracker(RandomizerCheck check); ItemObtainability Randomizer_GetItemObtainabilityFromRandomizerCheck(RandomizerCheck randomizerCheck); int CustomMessage_RetrieveIfExists(PlayState* play); void Overlay_DisplayText(float duration, const char* text); diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index ce2777fcd6b..77cde5310ec 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -1537,6 +1537,10 @@ void DrawRandomizerMenu() { "Play unique fanfares when obtaining quest items " "(medallions/stones/songs). Note that these fanfares are longer than usual." ); + UIWidgets::PaddedEnhancementCheckbox("Freestanding Mystery Items", "gFreestandingMystery", true, false); + UIWidgets::Tooltip( + "Displays a \"Mystery Item\" model in place of any freestanding/GS/shop items that were shuffled,\n" + "so you never know what you're getting."); ImGui::EndMenu(); } diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 75041996672..2ed5824cf5b 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -6170,7 +6170,7 @@ s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f return true; } -GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play) { +GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play, RandomizerCheck* check) { if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) { // RANDOTODO update this logic when we implement keysanity // because 3drando replaces the keys not the rupees @@ -6181,26 +6181,31 @@ GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play) { switch(room) { case 1: if(!Flags_GetCollectible(play, 0x1B)) { + if (check != NULL) *check = RC_MARKET_TREASURE_CHEST_GAME_ITEM_1; return Randomizer_GetItemFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_1, GI_RUPEE_GREEN); } break; case 2: if(!Flags_GetCollectible(play, 0x1C)) { + if (check != NULL) *check = RC_MARKET_TREASURE_CHEST_GAME_ITEM_2; return Randomizer_GetItemFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_2, GI_RUPEE_GREEN); } break; case 3: if(!Flags_GetCollectible(play, 0x1D)) { + if (check != NULL) *check = RC_MARKET_TREASURE_CHEST_GAME_ITEM_3; return Randomizer_GetItemFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_3, GI_RUPEE_BLUE); } break; case 4: if(!Flags_GetCollectible(play, 0x1E)) { + if (check != NULL) *check = RC_MARKET_TREASURE_CHEST_GAME_ITEM_4; return Randomizer_GetItemFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_4, GI_RUPEE_BLUE); } break; case 5: if(!Flags_GetCollectible(play, 0x1F)) { + if (check != NULL) *check = RC_MARKET_TREASURE_CHEST_GAME_ITEM_5; return Randomizer_GetItemFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_ITEM_5, GI_RUPEE_RED); } break; @@ -6209,6 +6214,7 @@ GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play) { } if(ogDrawId == GID_HEART_PIECE) { + if (check != NULL) *check = RC_MARKET_TREASURE_CHEST_GAME_REWARD; return Randomizer_GetItemFromKnownCheck(RC_MARKET_TREASURE_CHEST_GAME_REWARD, GI_HEART_PIECE); } @@ -6216,7 +6222,7 @@ GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play) { } s16 GetChestGameRandoGiDrawId(s8 room, s16 ogDrawId, PlayState* play) { - GetItemEntry randoGetItem = GetChestGameRandoGetItem(room, ogDrawId, play); + GetItemEntry randoGetItem = GetChestGameRandoGetItem(room, ogDrawId, play, NULL); if (randoGetItem.itemId != ITEM_NONE) { return randoGetItem.gid; diff --git a/soh/src/code/z_draw.c b/soh/src/code/z_draw.c index 7c6b71c6c9c..9639f823695 100644 --- a/soh/src/code/z_draw.c +++ b/soh/src/code/z_draw.c @@ -111,6 +111,8 @@ void GetItem_DrawJewelGoron(PlayState* play, s16 drawId); void GetItem_DrawJewelZora(PlayState* play, s16 drawId); void GetItem_DrawGenericMusicNote(PlayState* play, s16 drawId); +extern void Randomizer_DrawMysteryItem(PlayState*); + typedef struct { /* 0x00 */ void (*drawFunc)(PlayState*, s16); /* 0x04 */ Gfx* dlists[8]; @@ -399,8 +401,10 @@ void GetItem_Draw(PlayState* play, s16 drawId) { * Draw "Get Item" Model from a `GetItemEntry` * Uses the Custom Draw Function if it exists, or just calls `GetItem_Draw` */ -void GetItemEntry_Draw(PlayState* play, GetItemEntry getItemEntry) { - if (getItemEntry.drawFunc != NULL) { +void GetItemEntry_Draw(PlayState* play, GetItemEntry getItemEntry, RandomizerCheck check) { + if (CVarGetInteger("gFreestandingMystery", 0) && check != RC_MAX && Randomizer_IsVisibleInCheckTracker(check)) { + Randomizer_DrawMysteryItem(play); + } else if (getItemEntry.drawFunc != NULL) { getItemEntry.drawFunc(play, &getItemEntry); } else { GetItem_Draw(play, getItemEntry.gid); diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index fc8bbd669e5..c3d14de3064 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1375,7 +1375,7 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) { f32 mtxScale = 10.67f; Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); EnItem00_CustomItemsParticles(&this->actor, play, this->randoGiEntry); - GetItemEntry_Draw(play, this->randoGiEntry); + GetItemEntry_Draw(play, this->randoGiEntry, randoCheck); } else if (this->actor.params == ITEM00_BOMBCHU) { OPEN_DISPS(play->state.gfxCtx); @@ -1469,7 +1469,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) { f32 mtxScale = 16.0f; Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); EnItem00_CustomItemsParticles(&this->actor, play, this->randoGiEntry); - GetItemEntry_Draw(play, this->randoGiEntry); + GetItemEntry_Draw(play, this->randoGiEntry, randoCheck); } else { s32 pad; diff --git a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index 28224864c99..14c61189ac1 100644 --- a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -2092,7 +2092,7 @@ void DemoEffect_DrawGetItem(Actor* thisx, PlayState* play) { this->getItem.drawId = getItemEntry.gid; func_8002EBCC(thisx, play, 0); func_8002ED80(thisx, play, 0); - GetItemEntry_Draw(play, getItemEntry); + GetItemEntry_Draw(play, getItemEntry, RC_BARINADE); return; } func_8002EBCC(thisx, play, 0); diff --git a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index d5941d34859..22c16a970f1 100644 --- a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -528,7 +528,7 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) { if (randoGetItem.getItemId != GI_NONE) { EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem); - GetItemEntry_Draw(play, randoGetItem); + GetItemEntry_Draw(play, randoGetItem, RC_MAX); return; } } @@ -543,7 +543,7 @@ void EnExItem_DrawHeartPiece(EnExItem* this, PlayState* play) { GetItemEntry randoGetItem = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE); EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem); - GetItemEntry_Draw(play, randoGetItem); + GetItemEntry_Draw(play, randoGetItem, RC_MAX); } else { GetItem_Draw(play, GID_HEART_PIECE); } diff --git a/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index f575f60af43..056d4b7d96e 100644 --- a/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -1335,7 +1335,7 @@ void EnGirlA_Draw(Actor* thisx, PlayState* play) { GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId); EnItem00_CustomItemsParticles(&this->actor, play, getItemEntry); - GetItemEntry_Draw(play, getItemEntry); + GetItemEntry_Draw(play, getItemEntry, shopItemIdentity.randomizerCheck); return; } diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index ba9f3ccd2fa..315b8ca76e2 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -211,13 +211,14 @@ void EnSi_Draw(Actor* thisx, PlayState* play) { if (!gSaveContext.n64ddFlag) { GetItem_Draw(play, GID_SKULL_TOKEN_2); } else { - getItem = Randomizer_GetItemFromActor(this->actor.id, play->sceneNum, this->actor.params, GI_SKULL_TOKEN); + RandomizerCheck check = Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->actor.params); + getItem = Randomizer_GetItemFromKnownCheck(check, GI_SKULL_TOKEN); EnItem00_CustomItemsParticles(&this->actor, play, getItem); if (getItem.itemId != ITEM_SKULL_TOKEN) { f32 mtxScale = 1.5f; Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); } - GetItemEntry_Draw(play, getItem); + GetItemEntry_Draw(play, getItem, check); } } } diff --git a/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index 35f6d5457b7..01d0386f891 100644 --- a/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -99,8 +99,8 @@ void ItemBHeart_Draw(Actor* thisx, PlayState* play) { } if (gSaveContext.n64ddFlag) { - GetItemEntry_Draw(play, Randomizer_GetItemFromActor(this->actor.id, - play->sceneNum,this->actor.params, GI_HEART_CONTAINER_2)); + RandomizerCheck check = Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->actor.params); + GetItemEntry_Draw(play, Randomizer_GetItemFromKnownCheck(check, GI_HEART_CONTAINER_2), check); } else { if (flag) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index e7822399cae..985a41243c6 100644 --- a/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -230,10 +230,11 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, PlayState* play) { func_8002ED80(&this->actor, play, 0); if(gSaveContext.n64ddFlag && play->sceneNum == 16) { - GetItemEntry randoGetItem = GetChestGameRandoGetItem(this->actor.room, this->giDrawId, play); + RandomizerCheck check = RC_MAX; + GetItemEntry randoGetItem = GetChestGameRandoGetItem(this->actor.room, this->giDrawId, play, &check); EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem); if (randoGetItem.itemId != ITEM_NONE) { - GetItemEntry_Draw(play, randoGetItem); + GetItemEntry_Draw(play, randoGetItem, check); return; } } @@ -248,9 +249,12 @@ void ItemEtcetera_Draw(Actor* thisx, PlayState* play) { if (gSaveContext.n64ddFlag) { GetItemEntry randoGetItem = (GetItemEntry)GET_ITEM_NONE; + RandomizerCheck check = RC_MAX; if (type == ITEM_ETC_ARROW_FIRE) { + check = RC_LH_SUN; randoGetItem = Randomizer_GetItemFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE); } else if (type == ITEM_ETC_LETTER) { + check = RC_LH_UNDERWATER_ITEM; randoGetItem = Randomizer_GetItemFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO); } @@ -259,7 +263,7 @@ void ItemEtcetera_Draw(Actor* thisx, PlayState* play) { if (randoGetItem.itemId != ITEM_NONE) { func_8002EBCC(&this->actor, play, 0); func_8002ED80(&this->actor, play, 0); - GetItemEntry_Draw(play, randoGetItem); + GetItemEntry_Draw(play, randoGetItem, check); return; } } diff --git a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index 3e4694423da..e3adeeedbf3 100644 --- a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -217,7 +217,7 @@ void ItemOcarina_Draw(Actor* thisx, PlayState* play) { if (gSaveContext.n64ddFlag) { GetItemEntry randoGetItem = Randomizer_GetItemFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT); EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem); - GetItemEntry_Draw(play, randoGetItem); + GetItemEntry_Draw(play, randoGetItem, RC_HF_OCARINA_OF_TIME_ITEM); return; }