Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6785f23
Import Models
Caladius Oct 22, 2025
2dfab99
Give and Draw for Models
Caladius Oct 22, 2025
74843e2
Logic updates, need to do Evans Song
Caladius Oct 23, 2025
22f9888
Update OnFileCreate
Caladius Oct 23, 2025
a649d70
Fixes
Caladius Oct 23, 2025
bb8e3e5
clang
Caladius Oct 23, 2025
ceac5c2
Implement Japas Jam Session
Caladius Oct 23, 2025
a9a3fb6
Update to latest dev
Caladius Nov 6, 2025
d08ea20
Update naming uniformity
Caladius Nov 8, 2025
8728867
Rename Logic
Caladius Nov 8, 2025
5e3f65f
ugh
Caladius Nov 8, 2025
1e7ad30
Fixes VB, Logic, and removes magic numbers from Starting Items Macro.
Caladius Nov 14, 2025
6c6abe1
Update to latest develop
Caladius Nov 24, 2025
a243963
Adds Item Tracker implementation
Caladius Nov 24, 2025
75e6370
Adds Scarecrow song check and makes feedback changes.
Caladius Nov 25, 2025
ff91d7e
Stop error chime from starting an EDM album.
Caladius Nov 25, 2025
9e06375
Merge Conflict and Update
Caladius Nov 26, 2025
8d9eb09
Update mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp
Caladius Dec 3, 2025
956c47e
Update mm/2s2h/Rando/Logic/Logic.h
Caladius Dec 3, 2025
a0323c6
Update mm/2s2h/Rando/Logic/Logic.h
Caladius Dec 3, 2025
297f340
Update mm/2s2h/Enhancements/Songs/SkipScarecrowSong.cpp
Caladius Dec 3, 2025
15d7ce8
Undo Swim change (no idea why i did this)
Caladius Dec 7, 2025
2091fd3
Merge remote-tracking branch 'origin/develop' into develop-ocarina-bu…
Caladius Dec 7, 2025
ac97760
Merge branch 'develop-ocarina-buttons' of https://github.com/Caladius…
Caladius Dec 7, 2025
9422b0e
Reworked Hook
Caladius Dec 7, 2025
ad2a7ec
Merge remote-tracking branch 'upstream/develop' into finish-ocarina-b…
Eblo Jan 6, 2026
7829d8b
Cleanup
Eblo Jan 6, 2026
b8c4c67
Clean up
Eblo Jan 7, 2026
b6ef8ee
Merge remote-tracking branch 'upstream/develop' into finish-ocarina-b…
Eblo Jan 7, 2026
63ab61c
Merge pull request #19 from Eblo/finish-ocarina-buttons
Caladius Jan 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mm/2s2h/GameInteractor/GameInteractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ typedef enum {
VB_ENEMY_DROP_COLLECTIBLE,
VB_DRAW_SLIME_RANDO_ITEM,
VB_ENABLE_OBJECT_DEPENDENCY,
VB_OCARINA_TRIGGER_SONG,
VB_TOTO_START_SOUND_CHECK,
VB_JAPAS_START_JAM_SESSION,
} GIVanillaBehavior;

typedef enum {
Expand Down
1 change: 1 addition & 0 deletions mm/2s2h/Rando/ActorBehavior/ActorBehavior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void Rando::ActorBehavior::OnFileLoad() {
Rando::ActorBehavior::InitEnTotoBehavior();
Rando::ActorBehavior::InitEnTrtBehavior();
Rando::ActorBehavior::InitEnYbBehavior();
Rando::ActorBehavior::InitEnZobBehavior();
Rando::ActorBehavior::InitEnZogBehavior();
Rando::ActorBehavior::InitEnZotBehavior();
Rando::ActorBehavior::InitEnZowBehavior();
Expand Down
1 change: 1 addition & 0 deletions mm/2s2h/Rando/ActorBehavior/ActorBehavior.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ void InitEnTalkBehavior();
void InitEnTotoBehavior();
void InitEnTrtBehavior();
void InitEnYbBehavior();
void InitEnZobBehavior();
void InitEnZogBehavior();
void InitEnZotBehavior();
void InitEnZowBehavior();
Expand Down
16 changes: 16 additions & 0 deletions mm/2s2h/Rando/ActorBehavior/EnToto.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "ActorBehavior.h"
#include <libultraship/bridge/consolevariablebridge.h>
#include "2s2h/Rando/Logic/Logic.h"

extern "C" {
#include "variables.h"
Expand Down Expand Up @@ -38,4 +39,19 @@ void Rando::ActorBehavior::InitEnTotoBehavior() {
Message_BombersNotebookQueueEvent(gPlayState, BOMBERS_NOTEBOOK_EVENT_MET_TOTO);
Message_BombersNotebookQueueEvent(gPlayState, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN);
});

COND_VB_SHOULD(VB_TOTO_START_SOUND_CHECK, IS_RANDO && RANDO_SAVE_OPTIONS[RO_SHUFFLE_OCARINA_BUTTONS], {
EnToto* totoActor = va_arg(args, EnToto*);
if (totoActor->text->textId == 0x2B24) {
if (!(Rando::Logic::canPlaySong(OCARINA_SONG_WIND_FISH_HUMAN) ||
Rando::Logic::canPlaySong(OCARINA_SONG_WIND_FISH_DEKU) ||
Rando::Logic::canPlaySong(OCARINA_SONG_WIND_FISH_GORON) ||
Rando::Logic::canPlaySong(OCARINA_SONG_WIND_FISH_ZORA))) {
Message_ContinueTextbox(gPlayState, 0x2B25);
func_80BA36C0(totoActor, gPlayState, 0);
Flags_UnsetSwitch(gPlayState, ENTOTO_GET_SWITCH_FLAG_1(&totoActor->actor));
*should = false;
}
}
});
}
21 changes: 21 additions & 0 deletions mm/2s2h/Rando/ActorBehavior/EnZob.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "ActorBehavior.h"
#include "2s2h/CustomMessage/CustomMessage.h"
#include "2s2h/GameInteractor/GameInteractor.h"
#include "2s2h/Rando/Logic/Logic.h"

extern "C" {
#include "variables.h"

#include "overlays/actors/ovl_En_Zob/z_en_zob.h"
}

void Rando::ActorBehavior::InitEnZobBehavior() {
COND_VB_SHOULD(VB_JAPAS_START_JAM_SESSION, IS_RANDO && RANDO_SAVE_OPTIONS[RO_SHUFFLE_OCARINA_BUTTONS], {
EnZob* japas = va_arg(args, EnZob*);
if (!(Rando::Logic::canPlaySong(OCARINA_SONG_EVAN_PART1) ||
Rando::Logic::canPlaySong(OCARINA_SONG_EVAN_PART2))) {
Message_StartTextbox(gPlayState, 0x1214, NULL);
*should = false;
}
});
}
9 changes: 9 additions & 0 deletions mm/2s2h/Rando/ActorBehavior/Player.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "ActorBehavior.h"
#include <libultraship/bridge/consolevariablebridge.h>
#include "2s2h/Rando/Logic/Logic.h"

extern "C" {
#include "variables.h"
Expand Down Expand Up @@ -30,4 +31,12 @@ void Rando::ActorBehavior::InitPlayerBehavior() {
RespawnOnWaterTouch(GET_PLAYER(gPlayState));
}
});
COND_VB_SHOULD(VB_OCARINA_TRIGGER_SONG, IS_RANDO && RANDO_SAVE_OPTIONS[RO_SHUFFLE_OCARINA_BUTTONS], {
u8 songPlayed = va_arg(args, u8);

if (!Rando::Logic::canPlaySong(songPlayed)) {
gPlayState->msgCtx.textColorAlpha = 0;
*should = false;
}
});
}
26 changes: 24 additions & 2 deletions mm/2s2h/Rando/DrawItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,23 @@ void DrawAbilityItem(RandoItemId randoItemId, Actor* actor) {

Gfx_SetupDL25_Xlu(gPlayState->state.gfxCtx);

MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, gPlayState->state.gfxCtx);
gSPDisplayList(POLY_XLU_DISP++, (Gfx*)abilityItemModel[randoItemId - RI_ABILITY_SWIM]);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gPlayState->state.gfxCtx);
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)abilityItemModel[randoItemId - RI_ABILITY_SWIM]);

CLOSE_DISPS(gPlayState->state.gfxCtx);
}

void DrawOcarinaButtonItem(RandoItemId randoItemId, Actor* actor) {
Gfx* ocarinaButtonModel[5] = {
(Gfx*)gOcarinaAButtonDL, (Gfx*)gOcarinaCDownButtonDL, (Gfx*)gOcarinaCLeftButtonDL,
(Gfx*)gOcarinaCRightButtonDL, (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_A_BUTTON]);

CLOSE_DISPS(gPlayState->state.gfxCtx);
}
Expand Down Expand Up @@ -539,6 +554,13 @@ void Rando::DrawItem(RandoItemId randoItemId, Actor* actor) {
case RI_MAX_TRAP:
DrawTrapModel();
break;
case RI_OCARINA_A_BUTTON:
case RI_OCARINA_C_DOWN_BUTTON:
case RI_OCARINA_C_LEFT_BUTTON:
case RI_OCARINA_C_RIGHT_BUTTON:
case RI_OCARINA_C_UP_BUTTON:
DrawOcarinaButtonItem(randoItemId, actor);
break;
case RI_NONE:
case RI_UNKNOWN:
break;
Expand Down
7 changes: 7 additions & 0 deletions mm/2s2h/Rando/GiveItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ void Rando::GiveItem(RandoItemId randoItemId) {
case RI_TRAP:
Rando::MiscBehavior::OfferTrapItem();
break;
case RI_OCARINA_A_BUTTON:
case RI_OCARINA_C_DOWN_BUTTON:
case RI_OCARINA_C_LEFT_BUTTON:
case RI_OCARINA_C_RIGHT_BUTTON:
case RI_OCARINA_C_UP_BUTTON:
Flags_SetRandoInf(RANDO_INF_OBTAINED_OCARINA_A_BUTTON + (randoItemId - RI_OCARINA_A_BUTTON));
break;
case RI_JUNK:
case RI_NONE:
break;
Expand Down
71 changes: 70 additions & 1 deletion mm/2s2h/Rando/Logic/Logic.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ extern std::map<RandoRegionId, RandoRegion> Regions;
#define CAN_USE_HUMAN_SWORD (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) >= EQUIP_VALUE_SWORD_KOKIRI)
#define CAN_USE_SWORD (CAN_USE_HUMAN_SWORD || HAS_ITEM(ITEM_SWORD_GREAT_FAIRY) || CAN_BE_DEITY)
// Be careful here, as some checks require you to play the song as a specific form
#define CAN_PLAY_SONG(song) (HAS_ITEM(ITEM_OCARINA_OF_TIME) && CHECK_QUEST_ITEM(QUEST_SONG_##song))
#define CAN_PLAY_SONG(song) \
(HAS_ITEM(ITEM_OCARINA_OF_TIME) && CHECK_QUEST_ITEM(QUEST_SONG_##song) && \
Rando::Logic::canPlaySong(Ship_GetOcarinaSongByQuestId(QUEST_SONG_##song)))
#define CAN_RIDE_EPONA (CAN_PLAY_SONG(EPONA))
#define GBT_CAN_REVERSE_WATER_FLOW \
(RANDO_EVENTS[RE_GREAT_BAY_RED_SWITCH_1] && RANDO_EVENTS[RE_GREAT_BAY_RED_SWITCH_2] && \
Expand Down Expand Up @@ -136,6 +138,73 @@ inline std::string LogicString(std::string condition) {
return condition;
}

inline bool canPlaySong(u8 songId) {
switch (songId) {
case OCARINA_SONG_SONATA:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_A_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON));
case OCARINA_SONG_GORON_LULLABY:
case OCARINA_SONG_GORON_LULLABY_INTRO:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_A_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON));
case OCARINA_SONG_NEW_WAVE:
case OCARINA_SONG_ELEGY:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON));
case OCARINA_SONG_OATH:
case OCARINA_SONG_WIND_FISH_ZORA:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_A_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON));
case OCARINA_SONG_TIME:
case OCARINA_SONG_INVERTED_TIME:
case OCARINA_SONG_DOUBLE_TIME:
case OCARINA_SONG_WIND_FISH_GORON:
case OCARINA_SONG_EVAN_PART1:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_A_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON));
case OCARINA_SONG_HEALING:
case OCARINA_SONG_SARIAS:
case OCARINA_SONG_EVAN_PART2:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON));
case OCARINA_SONG_EPONAS:
case OCARINA_SONG_WIND_FISH_HUMAN:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON));
case OCARINA_SONG_SOARING:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON));
case OCARINA_SONG_STORMS:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_A_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON));
case OCARINA_SONG_SUNS:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON));
case OCARINA_SONG_WIND_FISH_DEKU:
return (Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_A_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON) &&
Flags_GetRandoInf(RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON));
// case OCARINA_SONG_SCARECROW_SPAWN:
// break;
default:
return true;
}
}

inline bool CanAccessDungeon(DungeonSceneIndex dungeonIndex) {
bool hasSongAccess = false;
bool hasFormAccess = false;
Expand Down
7 changes: 7 additions & 0 deletions mm/2s2h/Rando/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ std::unordered_map<int32_t, const char*> accessTrialsOptions = {
std::vector<int32_t> incompatibleWithVanilla = {
RO_SHUFFLE_BOSS_SOULS,
RO_SHUFFLE_SWIM,
RO_SHUFFLE_OCARINA_BUTTONS,
RO_PLENTIFUL_ITEMS,
};

Expand Down Expand Up @@ -280,6 +281,12 @@ static void DrawItemsTab() {
"into deep water will respawn Link.",
.disabled = IncompatibleWithLogicSetting(RO_SHUFFLE_SWIM),
.disabledTooltip = "Incompatible with current Logic Setting" } }));
CVarCheckbox("Shuffle Ocarina Buttons", Rando::StaticData::Options[RO_SHUFFLE_OCARINA_BUTTONS].cvar,
CheckboxOptions({ { .tooltip = "Shuffles the Buttons used to play Ocarina Notes,\n"
"you will be unable to play a song until you find all\n"
"notes for the given melody.",
.disabled = IncompatibleWithLogicSetting(RO_SHUFFLE_OCARINA_BUTTONS),
.disabledTooltip = "Incompatible with current Logic Setting" } }));
CVarCheckbox("Deku Stick Bag", "gPlaceholderBool",
CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
CVarCheckbox("Deku Nut Bag", "gPlaceholderBool",
Expand Down
12 changes: 12 additions & 0 deletions mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ void Rando::MiscBehavior::OnFileCreate(s16 fileNum) {
Flags_SetRandoInf(RANDO_INF_OBTAINED_SWIM);
}

// Shuffle Ocarina Buttons or grant the Rando INF if not enabled
if (RANDO_SAVE_OPTIONS[RO_SHUFFLE_OCARINA_BUTTONS] == RO_GENERIC_YES) {
for (int i = RI_OCARINA_A_BUTTON; i <= RI_OCARINA_C_UP_BUTTON; i++) {
itemPool.push_back((RandoItemId)i);
}
} else {
for (int i = RANDO_INF_OBTAINED_OCARINA_A_BUTTON; i <= RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON;
i++) {
Flags_SetRandoInf(i);
}
}

// Remove starting items from the pool (but only one per entry in startingItems)
for (RandoItemId startingItem : startingItems) {
auto it = std::find(itemPool.begin(), itemPool.end(), startingItem);
Expand Down
5 changes: 5 additions & 0 deletions mm/2s2h/Rando/StaticData/Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ std::map<RandoItemId, RandoStaticItem> Items = {
RI(RI_MUSHROOM, "a", "Magic Mushroom", RITYPE_MAJOR, ITEM_MUSHROOM, GI_MUSHROOM, GID_MUSHROOM),
RI(RI_NONE, "", "literally nothing", RITYPE_JUNK, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OCARINA, "the", "Ocarina of Time", RITYPE_MAJOR, ITEM_OCARINA_OF_TIME, GI_OCARINA_OF_TIME, GID_OCARINA),
RI(RI_OCARINA_A_BUTTON, "the", "A Button", RITYPE_MAJOR, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OCARINA_C_DOWN_BUTTON, "the", "C Down Button", RITYPE_MAJOR, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OCARINA_C_LEFT_BUTTON, "the", "C Left Button", RITYPE_MAJOR, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OCARINA_C_RIGHT_BUTTON, "the", "C Right Button", RITYPE_MAJOR, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OCARINA_C_UP_BUTTON, "the", "C Up Button", RITYPE_MAJOR, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OWL_CLOCK_TOWN_SOUTH, "the", "Clock Town Owl Statue", RITYPE_LESSER, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OWL_GREAT_BAY_COAST, "the", "Great Bay Coast Owl Statue", RITYPE_LESSER, ITEM_NONE, GI_NONE, GID_NONE),
RI(RI_OWL_IKANA_CANYON, "the", "Ikana Canyon Owl Statue", RITYPE_LESSER, ITEM_NONE, GI_NONE, GID_NONE),
Expand Down
1 change: 1 addition & 0 deletions mm/2s2h/Rando/StaticData/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ std::map<RandoOptionId, RandoStaticOption> Options = {
RO(RO_SHUFFLE_GRASS_DROPS, RO_GENERIC_OFF),
RO(RO_SHUFFLE_TRAPS, RO_GENERIC_OFF),
RO(RO_SHUFFLE_OWL_STATUES, RO_GENERIC_OFF),
RO(RO_SHUFFLE_OCARINA_BUTTONS, RO_GENERIC_OFF),
RO(RO_SHUFFLE_POT_DROPS, RO_GENERIC_OFF),
RO(RO_SHUFFLE_SHOPS, RO_GENERIC_OFF),
RO(RO_SHUFFLE_SNOWBALL_DROPS, RO_GENERIC_OFF),
Expand Down
11 changes: 11 additions & 0 deletions mm/2s2h/Rando/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -2381,6 +2381,11 @@ typedef enum {
RI_MUSHROOM,
RI_NONE,
RI_OCARINA,
RI_OCARINA_A_BUTTON,
RI_OCARINA_C_DOWN_BUTTON,
RI_OCARINA_C_LEFT_BUTTON,
RI_OCARINA_C_RIGHT_BUTTON,
RI_OCARINA_C_UP_BUTTON,
RI_OWL_CLOCK_TOWN_SOUTH,
RI_OWL_GREAT_BAY_COAST,
RI_OWL_IKANA_CANYON,
Expand Down Expand Up @@ -2803,6 +2808,7 @@ typedef enum {
RO_SHUFFLE_GOLD_SKULLTULAS,
RO_SHUFFLE_TRAPS,
RO_SHUFFLE_OWL_STATUES,
RO_SHUFFLE_OCARINA_BUTTONS,
RO_SHUFFLE_POT_DROPS,
RO_SHUFFLE_SHOPS,
RO_SHUFFLE_SNOWBALL_DROPS,
Expand Down Expand Up @@ -2870,6 +2876,11 @@ typedef enum {
RANDO_INF_OBTAINED_SOUL_OF_ODOLWA,
RANDO_INF_OBTAINED_SOUL_OF_TWINMOLD,
RANDO_INF_OBTAINED_SWIM,
RANDO_INF_OBTAINED_OCARINA_A_BUTTON,
RANDO_INF_OBTAINED_OCARINA_C_DOWN_BUTTON,
RANDO_INF_OBTAINED_OCARINA_C_LEFT_BUTTON,
RANDO_INF_OBTAINED_OCARINA_C_RIGHT_BUTTON,
RANDO_INF_OBTAINED_OCARINA_C_UP_BUTTON,
RANDO_INF_MAX,
} RandoInf;

Expand Down
24 changes: 24 additions & 0 deletions mm/2s2h/ShipUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,30 @@ ImVec4 Ship_GetItemColorTint(uint32_t itemId) {
}
}

std::unordered_map<u8, u8> questToOcarinaSongMap = {
{ QUEST_SONG_SONATA, OCARINA_SONG_SONATA },
{ QUEST_SONG_LULLABY, OCARINA_SONG_GORON_LULLABY },
{ QUEST_SONG_BOSSA_NOVA, OCARINA_SONG_NEW_WAVE },
{ QUEST_SONG_ELEGY, OCARINA_SONG_ELEGY },
{ QUEST_SONG_OATH, OCARINA_SONG_OATH },
{ QUEST_SONG_SARIA, OCARINA_SONG_SARIAS },
{ QUEST_SONG_TIME, OCARINA_SONG_TIME },
{ QUEST_SONG_HEALING, OCARINA_SONG_HEALING },
{ QUEST_SONG_EPONA, OCARINA_SONG_EPONAS },
{ QUEST_SONG_SOARING, OCARINA_SONG_SOARING },
{ QUEST_SONG_STORMS, OCARINA_SONG_STORMS },
{ QUEST_SONG_SUN, OCARINA_SONG_SUNS },
{ QUEST_SONG_LULLABY_INTRO, OCARINA_SONG_GORON_LULLABY_INTRO },
};

extern "C" u8 Ship_GetOcarinaSongByQuestId(u8 questSong) {
if (questToOcarinaSongMap.contains(questSong)) {
return questToOcarinaSongMap.find(questSong)->second;
}

return OCARINA_SONG_MAX;
}

extern "C" const char* Ship_GetSceneName(s16 sceneId) {
if (sceneNames.contains(sceneId)) {
return sceneNames[sceneId];
Expand Down
1 change: 1 addition & 0 deletions mm/2s2h/ShipUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ f32 Ship_GetExtendedAspectRatioMultiplier();
void Ship_ExtendedCullingActorAdjustProjectedZ(Actor* actor);
void Ship_ExtendedCullingActorAdjustProjectedX(Actor* actor);
void Ship_ExtendedCullingActorRestoreProjectedPos(PlayState* play, Actor* actor);
u8 Ship_GetOcarinaSongByQuestId(u8 questsong);
const char* Ship_GetSceneName(s16 sceneId);
bool Ship_IsCStringEmpty(const char* str);
void Ship_CreateQuadVertexGroup(Vtx* vtxList, s32 xStart, s32 yStart, s32 width, s32 height, u8 flippedH);
Expand Down
15 changes: 15 additions & 0 deletions mm/assets/2s2h_assets.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,18 @@ static const ALIGN_ASSET(2) char gTriforcePieceCompletedDL[] = dgTriforcePieceCo

#define dgTrapDL "__OTR__objects/object_trap/gTrapDL"
static const ALIGN_ASSET(2) char gTrapDL[] = dgTrapDL;

#define dgOcarinaAButtonDL "__OTR__objects/object_ocarina_a_button/gOcarinaAButtonDL"
static const ALIGN_ASSET(2) char gOcarinaAButtonDL[] = dgOcarinaAButtonDL;

#define dgOcarinaCDownButtonDL "__OTR__objects/object_ocarina_c_down_button/gOcarinaCDownButtonDL"
static const ALIGN_ASSET(2) char gOcarinaCDownButtonDL[] = dgOcarinaCDownButtonDL;

#define dgOcarinaCLeftButtonDL "__OTR__objects/object_ocarina_c_left_button/gOcarinaCLeftButtonDL"
static const ALIGN_ASSET(2) char gOcarinaCLeftButtonDL[] = dgOcarinaCLeftButtonDL;

#define dgOcarinaCRightButtonDL "__OTR__objects/object_ocarina_c_right_button/gOcarinaCRightButtonDL"
static const ALIGN_ASSET(2) char gOcarinaCRightButtonDL[] = dgOcarinaCRightButtonDL;

#define dgOcarinaCUpButtonDL "__OTR__objects/object_ocarina_c_up_button/gOcarinaCUpButtonDL"
static const ALIGN_ASSET(2) char gOcarinaCUpButtonDL[] = dgOcarinaCUpButtonDL;
Loading
Loading