summaryrefslogtreecommitdiff
path: root/mm/2s2h/Rando/DrawItem.cpp
diff options
context:
space:
mode:
authorCaladius <Caladius@users.noreply.github.com>2026-01-09 13:03:58 -0500
committerGitHub <noreply@github.com>2026-01-09 13:03:58 -0500
commitb06178e41709d57a97514f638722a87a08080952 (patch)
treecdc736c1d8d4ea52f4726bc464b226cd17c55402 /mm/2s2h/Rando/DrawItem.cpp
parent7835c952b5c4da8cfbec47532853be74b39cc541 (diff)
[Rando] Shuffle Ocarina Buttons (#1303)
* Import Models * Give and Draw for Models * Logic updates, need to do Evans Song * Update OnFileCreate * Fixes * clang * Implement Japas Jam Session * Update naming uniformity * Rename Logic * ugh * Fixes VB, Logic, and removes magic numbers from Starting Items Macro. * Adds Item Tracker implementation * Adds Scarecrow song check and makes feedback changes. * Stop error chime from starting an EDM album. * Update mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com> * Update mm/2s2h/Rando/Logic/Logic.h Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com> * Update mm/2s2h/Rando/Logic/Logic.h Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com> * Update mm/2s2h/Enhancements/Songs/SkipScarecrowSong.cpp Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com> * Undo Swim change (no idea why i did this) * Reworked Hook * Cleanup * Clean up Fix bug with SkipScarecrowSong Fix Zora Ballad logic Grant Ocarina buttons when not shuffled Fix VB_PLAY_OCARINA_NOTE boolean Re-instantiate starting items RI adjustment Swap Ocarina right and left --------- Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com>
Diffstat (limited to 'mm/2s2h/Rando/DrawItem.cpp')
-rw-r--r--mm/2s2h/Rando/DrawItem.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/mm/2s2h/Rando/DrawItem.cpp b/mm/2s2h/Rando/DrawItem.cpp
index dd8eae0ac..87c18cdf9 100644
--- a/mm/2s2h/Rando/DrawItem.cpp
+++ b/mm/2s2h/Rando/DrawItem.cpp
@@ -401,6 +401,21 @@ void DrawAbilityItem(RandoItemId randoItemId, Actor* actor) {
CLOSE_DISPS(gPlayState->state.gfxCtx);
}
+void DrawOcarinaButtonItem(RandoItemId randoItemId, Actor* actor) {
+ Gfx* ocarinaButtonModel[5] = {
+ (Gfx*)gOcarinaAButtonDL, (Gfx*)gOcarinaCDownButtonDL, (Gfx*)gOcarinaCRightButtonDL,
+ (Gfx*)gOcarinaCLeftButtonDL, (Gfx*)gOcarinaCUpButtonDL,
+ };
+
+ OPEN_DISPS(gPlayState->state.gfxCtx);
+ Gfx_SetupDL25_Opa(gPlayState->state.gfxCtx);
+
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gPlayState->state.gfxCtx);
+ gSPDisplayList(POLY_OPA_DISP++, (Gfx*)ocarinaButtonModel[randoItemId - RI_OCARINA_BUTTON_A]);
+
+ CLOSE_DISPS(gPlayState->state.gfxCtx);
+}
+
// clang-format off
std::unordered_map<RandoItemId, std::function<void()>> soulDrawMap = {
{ RI_SOUL_ENEMY_ALIEN, DrawAlien },
@@ -656,6 +671,13 @@ void Rando::DrawItem(RandoItemId randoItemId, Actor* actor) {
case RI_MAX_TRAP:
DrawTrapModel();
break;
+ case RI_OCARINA_BUTTON_A:
+ case RI_OCARINA_BUTTON_C_DOWN:
+ case RI_OCARINA_BUTTON_C_LEFT:
+ case RI_OCARINA_BUTTON_C_RIGHT:
+ case RI_OCARINA_BUTTON_C_UP:
+ DrawOcarinaButtonItem(randoItemId, actor);
+ break;
case RI_NONE:
case RI_UNKNOWN:
break;