mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-09-03 11:01:32 -04:00
Rando: Shuffle Ocarina Buttons (Rando V3) (#3735)
* Shuffle Ocarina Buttons * Address review * Add trick names * Temporarily remove the ocarina button ice trap models * Update soh/soh/Enhancements/randomizer/3drando/location_access/locacc_death_mountain.cpp Fix lost closing brackets from merge resolution. --------- Co-authored-by: Christopher Leggett <chris@leggett.dev>
This commit is contained in:
@@ -1626,23 +1626,23 @@ void func_800ED458(s32 arg0) {
|
||||
}
|
||||
|
||||
Audio_OcaUpdateBtnMap(customControls, dpad, rStick);
|
||||
if (D_8016BA18 & sOcarinaD4BtnMap) {
|
||||
if (D_8016BA18 & sOcarinaD4BtnMap && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_A))) {
|
||||
osSyncPrintf("Presss NA_KEY_D4 %08x\n", sOcarinaD4BtnMap);
|
||||
sCurOcarinaBtnVal = 2;
|
||||
sCurOcarinaBtnIdx = 0;
|
||||
} else if (D_8016BA18 & sOcarinaF4BtnMap) {
|
||||
} else if (D_8016BA18 & sOcarinaF4BtnMap && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_DOWN))) {
|
||||
osSyncPrintf("Presss NA_KEY_F4 %08x\n", sOcarinaF4BtnMap);
|
||||
sCurOcarinaBtnVal = 5;
|
||||
sCurOcarinaBtnIdx = 1;
|
||||
} else if (D_8016BA18 & sOcarinaA4BtnMap) {
|
||||
} else if (D_8016BA18 & sOcarinaA4BtnMap && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_RIGHT))) {
|
||||
osSyncPrintf("Presss NA_KEY_A4 %08x\n", sOcarinaA4BtnMap);
|
||||
sCurOcarinaBtnVal = 9;
|
||||
sCurOcarinaBtnIdx = 2;
|
||||
} else if (D_8016BA18 & sOcarinaB4BtnMap) {
|
||||
} else if (D_8016BA18 & sOcarinaB4BtnMap && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_LEFT))) {
|
||||
osSyncPrintf("Presss NA_KEY_B4 %08x\n", sOcarinaA4BtnMap);
|
||||
sCurOcarinaBtnVal = 0xB;
|
||||
sCurOcarinaBtnIdx = 3;
|
||||
} else if (D_8016BA18 & sOcarinaD5BtnMap) {
|
||||
} else if (D_8016BA18 & sOcarinaD5BtnMap && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_UP))) {
|
||||
osSyncPrintf("Presss NA_KEY_D5 %08x\n", sOcarinaD5BtnMap);
|
||||
sCurOcarinaBtnVal = 0xE;
|
||||
sCurOcarinaBtnIdx = 4;
|
||||
|
||||
@@ -2664,6 +2664,13 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
if (item >= RG_OCARINA_A_BUTTON && item <= RG_OCARINA_C_RIGHT_BUTTON) {
|
||||
u8 index = item - RG_OCARINA_A_BUTTON;
|
||||
Flags_SetRandomizerInf(RAND_INF_HAS_OCARINA_A + index);
|
||||
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
temp = gSaveContext.inventory.items[slot];
|
||||
osSyncPrintf("Item_Register(%d)=%d %d\n", slot, item, temp);
|
||||
INV_CONTENT(item) = item;
|
||||
|
||||
@@ -117,7 +117,16 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
|
||||
|
||||
this->unk_194++;
|
||||
|
||||
bool skipScarecrow = play->msgCtx.msgMode == MSGMODE_OCARINA_PLAYING &&
|
||||
int ocarinaButtonCount = 0;
|
||||
for (int i = RAND_INF_HAS_OCARINA_A; i <= RAND_INF_HAS_OCARINA_C_DOWN; i++) {
|
||||
if (Flags_GetRandomizerInf(i)) {
|
||||
ocarinaButtonCount++;
|
||||
}
|
||||
}
|
||||
|
||||
bool hasTwoOcarinaButtons = !IS_RANDO || ocarinaButtonCount >= 2;
|
||||
|
||||
bool skipScarecrow = hasTwoOcarinaButtons && play->msgCtx.msgMode == MSGMODE_OCARINA_PLAYING &&
|
||||
((CVarGetInteger("gSkipScarecrow", 0) && gSaveContext.scarecrowSpawnSongSet) ||
|
||||
(IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG)));
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
aButtonColor = (Color_RGB8){ 80, 255, 150 };
|
||||
}
|
||||
if (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_A)) {
|
||||
aButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||
}
|
||||
|
||||
Color_RGB8 cButtonsColor = {255, 255, 50};
|
||||
if (CVarGetInteger("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
@@ -21,18 +24,33 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
if (CVarGetInteger("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
cUpButtonColor = CVarGetColor24("gCosmetics.Hud_CUpButton.Value", cUpButtonColor);
|
||||
}
|
||||
if (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_UP)) {
|
||||
cUpButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||
}
|
||||
|
||||
Color_RGB8 cDownButtonColor = cButtonsColor;
|
||||
if (CVarGetInteger("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
cDownButtonColor = CVarGetColor24("gCosmetics.Hud_CDownButton.Value", cDownButtonColor);
|
||||
}
|
||||
if (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_DOWN)) {
|
||||
cDownButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||
}
|
||||
|
||||
Color_RGB8 cLeftButtonColor = cButtonsColor;
|
||||
if (CVarGetInteger("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
cLeftButtonColor = CVarGetColor24("gCosmetics.Hud_CLeftButton.Value", cLeftButtonColor);
|
||||
}
|
||||
if (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_LEFT)) {
|
||||
cLeftButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||
}
|
||||
|
||||
Color_RGB8 cRightButtonColor = cButtonsColor;
|
||||
if (CVarGetInteger("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
cRightButtonColor = CVarGetColor24("gCosmetics.Hud_CRightButton.Value", cRightButtonColor);
|
||||
}
|
||||
if (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_HAS_OCARINA_C_RIGHT)) {
|
||||
cRightButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||
}
|
||||
|
||||
static s16 D_8082A070[][4] = {
|
||||
{ 255, 0, 0, 255 },
|
||||
|
||||
Reference in New Issue
Block a user