mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-27 11:02:55 -04:00
Merge branch 'HarbourMasters:develop' into develop-pausewarp
This commit is contained in:
+20
-4
@@ -668,6 +668,7 @@ void Flags_SetSwitch(PlayState* play, s32 flag) {
|
||||
} else {
|
||||
play->actorCtx.flags.tempSwch |= (1 << (flag - 0x20));
|
||||
}
|
||||
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_SWITCH, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -680,6 +681,7 @@ void Flags_UnsetSwitch(PlayState* play, s32 flag) {
|
||||
} else {
|
||||
play->actorCtx.flags.tempSwch &= ~(1 << (flag - 0x20));
|
||||
}
|
||||
GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_SWITCH, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -728,6 +730,7 @@ s32 Flags_GetTreasure(PlayState* play, s32 flag) {
|
||||
void Flags_SetTreasure(PlayState* play, s32 flag) {
|
||||
lusprintf(__FILE__, __LINE__, 2, "Treasure Flag Set - %#x", flag);
|
||||
play->actorCtx.flags.chest |= (1 << flag);
|
||||
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_TREASURE, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -742,6 +745,7 @@ s32 Flags_GetClear(PlayState* play, s32 flag) {
|
||||
*/
|
||||
void Flags_SetClear(PlayState* play, s32 flag) {
|
||||
play->actorCtx.flags.clear |= (1 << flag);
|
||||
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_CLEAR, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -749,6 +753,7 @@ void Flags_SetClear(PlayState* play, s32 flag) {
|
||||
*/
|
||||
void Flags_UnsetClear(PlayState* play, s32 flag) {
|
||||
play->actorCtx.flags.clear &= ~(1 << flag);
|
||||
GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_CLEAR, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -795,6 +800,7 @@ void Flags_SetCollectible(PlayState* play, s32 flag) {
|
||||
play->actorCtx.flags.tempCollect |= (1 << (flag - 0x20));
|
||||
}
|
||||
}
|
||||
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_COLLECTIBLE, flag);
|
||||
}
|
||||
|
||||
void func_8002CDE4(PlayState* play, TitleCardContext* titleCtx) {
|
||||
@@ -1982,7 +1988,7 @@ s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
|
||||
(gSaveContext.n64ddFlag && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
|
||||
(IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
if ((getItemEntry.getItemId != GI_NONE)) {
|
||||
player->getItemEntry = getItemEntry;
|
||||
@@ -2018,8 +2024,8 @@ s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEn
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
|
||||
((!gSaveContext.n64ddFlag && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
|
||||
(gSaveContext.n64ddFlag && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
|
||||
((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
|
||||
(IS_RANDO && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
@@ -2060,7 +2066,7 @@ s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
|
||||
((!gSaveContext.n64ddFlag && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (gSaveContext.n64ddFlag && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
|
||||
((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
@@ -4718,6 +4724,7 @@ s32 Flags_GetEventChkInf(s32 flag) {
|
||||
*/
|
||||
void Flags_SetEventChkInf(s32 flag) {
|
||||
gSaveContext.eventChkInf[flag >> 4] |= (1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4725,6 +4732,7 @@ void Flags_SetEventChkInf(s32 flag) {
|
||||
*/
|
||||
void Flags_UnsetEventChkInf(s32 flag) {
|
||||
gSaveContext.eventChkInf[flag >> 4] &= ~(1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_CHECK_INF, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4739,6 +4747,7 @@ s32 Flags_GetItemGetInf(s32 flag) {
|
||||
*/
|
||||
void Flags_SetItemGetInf(s32 flag) {
|
||||
gSaveContext.itemGetInf[flag >> 4] |= (1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_ITEM_GET_INF, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4746,6 +4755,7 @@ void Flags_SetItemGetInf(s32 flag) {
|
||||
*/
|
||||
void Flags_UnsetItemGetInf(s32 flag) {
|
||||
gSaveContext.itemGetInf[flag >> 4] &= ~(1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagUnset(FLAG_ITEM_GET_INF, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4760,6 +4770,7 @@ s32 Flags_GetInfTable(s32 flag) {
|
||||
*/
|
||||
void Flags_SetInfTable(s32 flag) {
|
||||
gSaveContext.infTable[flag >> 4] |= (1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_INF_TABLE, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4767,6 +4778,7 @@ void Flags_SetInfTable(s32 flag) {
|
||||
*/
|
||||
void Flags_UnsetInfTable(s32 flag) {
|
||||
gSaveContext.infTable[flag >> 4] &= ~(1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagUnset(FLAG_INF_TABLE, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4781,6 +4793,7 @@ s32 Flags_GetEventInf(s32 flag) {
|
||||
*/
|
||||
void Flags_SetEventInf(s32 flag) {
|
||||
gSaveContext.eventInf[flag >> 4] |= (1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_INF, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4788,6 +4801,7 @@ void Flags_SetEventInf(s32 flag) {
|
||||
*/
|
||||
void Flags_UnsetEventInf(s32 flag) {
|
||||
gSaveContext.eventInf[flag >> 4] &= ~(1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_INF, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4802,6 +4816,7 @@ s32 Flags_GetRandomizerInf(RandomizerInf flag) {
|
||||
*/
|
||||
void Flags_SetRandomizerInf(RandomizerInf flag) {
|
||||
gSaveContext.randomizerInf[flag >> 4] |= (1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_RANDOMIZER_INF, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4809,6 +4824,7 @@ void Flags_SetRandomizerInf(RandomizerInf flag) {
|
||||
*/
|
||||
void Flags_UnsetRandomizerInf(RandomizerInf flag) {
|
||||
gSaveContext.randomizerInf[flag >> 4] &= ~(1 << (flag & 0xF));
|
||||
GameInteractor_ExecuteOnFlagUnset(FLAG_RANDOMIZER_INF, flag);
|
||||
}
|
||||
|
||||
u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
|
||||
@@ -246,7 +246,7 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
||||
case 3:
|
||||
if (sp3F != 0) {
|
||||
Flags_SetEnv(play, 0);
|
||||
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
Flags_SetEnv(play, 2);
|
||||
}
|
||||
}
|
||||
@@ -497,7 +497,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
// cmd->base == 8: Traveling back/forward in time cutscene
|
||||
// cmd->base == 24: Dropping a fish for Jabu Jabu
|
||||
// cmd->base == 33: Zelda escaping with impa cutscene
|
||||
bool randoCsSkip = (gSaveContext.n64ddFlag && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
|
||||
bool randoCsSkip = (IS_RANDO && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
|
||||
bool debugCsSkip = (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger("gDebugEnabled", 0));
|
||||
|
||||
@@ -2113,7 +2113,7 @@ void Cutscene_HandleEntranceTriggers(PlayState* play) {
|
||||
u8 requiredAge;
|
||||
s16 i;
|
||||
|
||||
if (gSaveContext.n64ddFlag &&
|
||||
if (IS_RANDO &&
|
||||
// don't skip epona escape cutscenes
|
||||
gSaveContext.entranceIndex != 650 &&
|
||||
gSaveContext.entranceIndex != 654 &&
|
||||
@@ -2151,9 +2151,9 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
||||
|
||||
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
const bool bShouldTowerRandoSkip =
|
||||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
|
||||
(IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
|
||||
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
|
||||
gSaveContext.entranceIndex = 0x0123;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
@@ -2161,12 +2161,12 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
||||
} else if ((gSaveContext.entranceIndex == 0x00DB) && LINK_IS_ADULT && (Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) &&
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) && (Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
}
|
||||
} else if ((gSaveContext.entranceIndex == 0x05E0) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
|
||||
Item_Give(play, ITEM_OCARINA_FAIRY);
|
||||
gSaveContext.entranceIndex = 0x011E;
|
||||
@@ -2175,7 +2175,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
||||
} else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
||||
LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME)) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
||||
gSaveContext.entranceIndex = 0x0053;
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
@@ -2187,7 +2187,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
|
||||
gSaveContext.entranceIndex = 0x0517;
|
||||
// In rando, skip the cutscene for the tower falling down after the escape.
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
return;
|
||||
}
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
|
||||
+35
-1
@@ -78,6 +78,8 @@
|
||||
#include "objects/object_gi_sword_1/object_gi_sword_1.h"
|
||||
#include "objects/object_st/object_st.h"
|
||||
|
||||
#include "soh_assets.h"
|
||||
|
||||
// "Get Item" Model Draw Functions
|
||||
void GetItem_DrawMaskOrBombchu(PlayState* play, s16 drawId);
|
||||
void GetItem_DrawSoldOut(PlayState* play, s16 drawId);
|
||||
@@ -110,6 +112,7 @@ void GetItem_DrawJewelKokiri(PlayState* play, s16 drawId);
|
||||
void GetItem_DrawJewelGoron(PlayState* play, s16 drawId);
|
||||
void GetItem_DrawJewelZora(PlayState* play, s16 drawId);
|
||||
void GetItem_DrawGenericMusicNote(PlayState* play, s16 drawId);
|
||||
void GetItem_DrawTriforcePiece(PlayState* play, s16 drawId);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ void (*drawFunc)(PlayState*, s16);
|
||||
@@ -384,7 +387,8 @@ DrawItemTableEntry sDrawItemTable[] = {
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Saria's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Sun's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of time
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } } //Song of storms
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of storms
|
||||
{ GetItem_DrawTriforcePiece, { gTriforcePiece0DL } } // Triforce Piece
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1031,3 +1035,33 @@ void GetItem_DrawWallet(PlayState* play, s16 drawId) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void GetItem_DrawTriforcePiece(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Matrix_Scale(0.035f, 0.035f, 0.035f, MTXMODE_APPLY);
|
||||
|
||||
uint16_t index = gSaveContext.triforcePiecesCollected % 3;
|
||||
Gfx* triforcePieceDL;
|
||||
|
||||
switch (index) {
|
||||
case 1:
|
||||
triforcePieceDL = (Gfx*) gTriforcePiece1DL;
|
||||
break;
|
||||
case 2:
|
||||
triforcePieceDL = (Gfx*) gTriforcePiece2DL;
|
||||
break;
|
||||
default:
|
||||
triforcePieceDL = (Gfx*) gTriforcePiece0DL;
|
||||
break;
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, triforcePieceDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
+11
-11
@@ -381,7 +381,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
// Offset keys in randomizer slightly higher for their GID replacement
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
yOffset = 350.0f;
|
||||
} else {
|
||||
yOffset = 430.0f;
|
||||
@@ -488,7 +488,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
||||
RandomizerCheck randoCheck =
|
||||
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
|
||||
|
||||
if (gSaveContext.n64ddFlag && randoCheck != RC_UNKNOWN_CHECK) {
|
||||
if (IS_RANDO && randoCheck != RC_UNKNOWN_CHECK) {
|
||||
this->randoGiEntry =
|
||||
Randomizer_GetItemFromKnownCheck(randoCheck, getItemId);
|
||||
this->randoGiEntry.getItemFrom = ITEM_FROM_FREESTANDING;
|
||||
@@ -578,7 +578,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
if (getItemId != GI_NONE) {
|
||||
if (!gSaveContext.n64ddFlag || this->randoGiEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || this->randoGiEntry.getItemId == GI_NONE) {
|
||||
func_8002F554(&this->actor, play, getItemId);
|
||||
} else {
|
||||
GiveItemEntryFromActorWithFixedRange(&this->actor, play, this->randoGiEntry);
|
||||
@@ -731,7 +731,7 @@ void func_8001E5C8(EnItem00* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
if (this->getItemId != GI_NONE) {
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, this->getItemId, 50.0f, 80.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, this->randoGiEntry, 50.0f, 80.0f);
|
||||
@@ -783,7 +783,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
this->actor.params == ITEM00_BOMBS_SPECIAL || this->actor.params == ITEM00_BOMBCHU) {
|
||||
if (CVarGetInteger("gNewDrops", 0) ||
|
||||
// Keys in randomizer need to always rotate for their GID replacement
|
||||
(gSaveContext.n64ddFlag && this->actor.params == ITEM00_SMALL_KEY)) {
|
||||
(IS_RANDO && this->actor.params == ITEM00_SMALL_KEY)) {
|
||||
this->actor.shape.rot.y += 960;
|
||||
} else {
|
||||
this->actor.shape.rot.y = 0;
|
||||
@@ -951,7 +951,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
params = &this->actor.params;
|
||||
|
||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
|
||||
if (!gSaveContext.n64ddFlag || this->randoGiEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || this->randoGiEntry.getItemId == GI_NONE) {
|
||||
func_8002F554(&this->actor, play, getItemId);
|
||||
} else {
|
||||
getItemId = this->randoGiEntry.getItemId;
|
||||
@@ -1046,7 +1046,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
case ITEM00_HEART_PIECE:
|
||||
if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
|
||||
mtxScale = 21.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
GetItem_Draw(play, GID_HEART_PIECE);
|
||||
@@ -1156,7 +1156,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
case ITEM00_SMALL_KEY:
|
||||
if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
|
||||
mtxScale = 8.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
GetItem_Draw(play, GID_KEY_SMALL);
|
||||
@@ -1362,7 +1362,7 @@ static const Vtx customDropVtx[] = {
|
||||
* Draw Function used for most collectible types of En_Item00 (ammo, bombs, sticks, nuts, magic...).
|
||||
*/
|
||||
void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
|
||||
if (gSaveContext.n64ddFlag && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
|
||||
if (IS_RANDO && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
|
||||
RandomizerCheck randoCheck =
|
||||
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
|
||||
|
||||
@@ -1456,7 +1456,7 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
|
||||
* Draw Function used for the Piece of Heart type of En_Item00.
|
||||
*/
|
||||
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
RandomizerCheck randoCheck =
|
||||
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
|
||||
|
||||
@@ -1533,7 +1533,7 @@ s16 func_8001F404(s16 dropId) {
|
||||
}
|
||||
|
||||
if ((CVarGetInteger("gBombchuDrops", 0) ||
|
||||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
|
||||
(IS_RANDO && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
|
||||
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) {
|
||||
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void GameOver_Update(PlayState* play) {
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
|
||||
// search inventory for spoiling items and revert if necessary
|
||||
if (!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
|
||||
if (!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
|
||||
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
|
||||
if (INV_CONTENT(ITEM_POCKET_EGG) == gSpoilingItems[i]) {
|
||||
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
|
||||
|
||||
@@ -73,8 +73,8 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true);
|
||||
assert(horseActor != NULL);
|
||||
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
|
||||
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!gSaveContext.n64ddFlag ||
|
||||
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
||||
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!IS_RANDO ||
|
||||
(IS_RANDO && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
||||
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
|
||||
// "Set by existence of horse %d %d %d"
|
||||
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),
|
||||
|
||||
@@ -60,7 +60,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
GameInteractor_ExecuteOnPauseMenu();
|
||||
|
||||
if (!gSaveContext.sohStats.gameComplete &&
|
||||
(!gSaveContext.isBossRush || !gSaveContext.isBossRushPaused)) {
|
||||
(!IS_BOSS_RUSH || !gSaveContext.isBossRushPaused)) {
|
||||
gSaveContext.sohStats.pauseTimer++;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,8 +394,8 @@ void Map_InitData(PlayState* play, s16 room) {
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_LAKE_HYLIA) {
|
||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) &&
|
||||
((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) ||
|
||||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)))) {
|
||||
((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) ||
|
||||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)))) {
|
||||
extendedMapIndex = 0x15;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_GERUDO_VALLEY) {
|
||||
@@ -403,8 +403,8 @@ void Map_InitData(PlayState* play, s16 room) {
|
||||
extendedMapIndex = 0x16;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_GERUDOS_FORTRESS) {
|
||||
if ((!gSaveContext.n64ddFlag && GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) ||
|
||||
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
|
||||
if ((!IS_RANDO && GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) ||
|
||||
(IS_RANDO && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
|
||||
extendedMapIndex = 0x17;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1617,9 +1617,9 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
// Increments text id based on piece of heart count, assumes the piece of heart text is all
|
||||
// in order and that you don't have more than the intended amount of heart pieces.
|
||||
textId += (gSaveContext.inventory.questItems & 0xF0000000 & 0xF0000000) >> 0x1C;
|
||||
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
|
||||
} else if (!IS_RANDO && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
|
||||
textId = 0xB; // Traded Giant's Knife for Biggoron Sword
|
||||
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xB4 && (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE)))) {
|
||||
} else if (!IS_RANDO && (msgCtx->textId == 0xB4 && (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE)))) {
|
||||
textId = 0xB5; // Destroyed Gold Skulltula
|
||||
}
|
||||
// Ocarina Staff + Dialog
|
||||
@@ -2517,7 +2517,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
if (msgCtx->lastPlayedSong < OCARINA_SONG_SARIAS &&
|
||||
(msgCtx->ocarinaAction < OCARINA_ACTION_PLAYBACK_MINUET ||
|
||||
msgCtx->ocarinaAction >= OCARINA_ACTION_PLAYBACK_SARIA)) {
|
||||
if (msgCtx->disableWarpSongs || (interfaceCtx->restrictions.warpSongs == 3 && !gSaveContext.n64ddFlag)) {
|
||||
if (msgCtx->disableWarpSongs || (interfaceCtx->restrictions.warpSongs == 3 && !IS_RANDO)) {
|
||||
Message_StartTextbox(play, 0x88C, NULL); // "You can't warp here!"
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else if ((gSaveContext.eventInf[0] & 0xF) != 1) {
|
||||
@@ -2603,7 +2603,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
msgCtx->lastPlayedSong = msgCtx->ocarinaStaff->state;
|
||||
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_SUCCESS;
|
||||
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
Item_Give(play, ITEM_SONG_MINUET + gOcarinaSongItemMap[msgCtx->ocarinaStaff->state]);
|
||||
}
|
||||
|
||||
|
||||
@@ -792,7 +792,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
case 4100:
|
||||
csInfo->keyFrames = D_801225D4;
|
||||
// RANDO: Waterfall opening cutscene skips to the end of the cutscene data earlier by doing this
|
||||
if (!(gSaveContext.n64ddFlag)) {
|
||||
if (!(IS_RANDO)) {
|
||||
csInfo->keyFrameCnt = 5;
|
||||
} else {
|
||||
csInfo->keyFrameCnt = 2;
|
||||
|
||||
+37
-22
@@ -884,7 +884,7 @@ void func_80083108(PlayState* play) {
|
||||
}
|
||||
}
|
||||
// Don't hide the HUD in the Chamber of Sages when in Boss Rush.
|
||||
} else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !gSaveContext.isBossRush) {
|
||||
} else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !IS_BOSS_RUSH) {
|
||||
Interface_ChangeAlpha(1);
|
||||
} else if (play->sceneNum == SCENE_FISHING_POND) {
|
||||
gSaveContext.unk_13E7 = 2;
|
||||
@@ -1413,7 +1413,7 @@ void Inventory_SwapAgeEquipment(void) {
|
||||
|
||||
// When becoming adult, remove swordless flag since we'll get master sword
|
||||
// Only in rando to keep swordless link bugs in vanilla
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
Flags_UnsetInfTable(INFTABLE_SWORDLESS);
|
||||
}
|
||||
|
||||
@@ -1467,7 +1467,7 @@ void Inventory_SwapAgeEquipment(void) {
|
||||
} else {
|
||||
// When becoming child, set swordless flag if player doesn't have kokiri sword
|
||||
// Only in rando to keep swordless link bugs in vanilla
|
||||
if (gSaveContext.n64ddFlag && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
|
||||
if (IS_RANDO && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
|
||||
Flags_SetInfTable(INFTABLE_SWORDLESS);
|
||||
}
|
||||
|
||||
@@ -1533,7 +1533,7 @@ void Inventory_SwapAgeEquipment(void) {
|
||||
gSaveContext.equips.equipment = gSaveContext.childEquips.equipment;
|
||||
gSaveContext.equips.equipment &= 0xFFF0;
|
||||
gSaveContext.equips.equipment |= 0x0001;
|
||||
} else if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_STARTING_AGE) == RO_AGE_ADULT) {
|
||||
} else if (IS_RANDO && Randomizer_GetSettingValue(RSK_STARTING_AGE) == RO_AGE_ADULT) {
|
||||
/*If in rando and starting age is adult, childEquips is not initialized and buttonItems[0]
|
||||
will be ITEM_NONE. When changing age from adult -> child, reset equips to "default"
|
||||
(only kokiri tunic/boots equipped, no sword, no C-button items, no D-Pad items).
|
||||
@@ -1837,7 +1837,7 @@ u8 Item_Give(PlayState* play, u8 item) {
|
||||
|
||||
// In rando, when buying Giant's Knife, also check
|
||||
// for 0xE in case we don't have Kokiri Sword
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (IS_RANDO && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
|
||||
|
||||
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD];
|
||||
|
||||
@@ -1944,13 +1944,13 @@ u8 Item_Give(PlayState* play, u8 item) {
|
||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||
} else if (item == ITEM_WALLET_ADULT) {
|
||||
Inventory_ChangeUpgrade(UPG_WALLET, 1);
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
|
||||
Rupees_ChangeBy(200);
|
||||
}
|
||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||
} else if (item == ITEM_WALLET_GIANT) {
|
||||
Inventory_ChangeUpgrade(UPG_WALLET, 2);
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
|
||||
Rupees_ChangeBy(500);
|
||||
}
|
||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||
@@ -1994,7 +1994,7 @@ u8 Item_Give(PlayState* play, u8 item) {
|
||||
}
|
||||
}
|
||||
// update the adult/child equips when rando'd (accounting for equp swapped hookshot as child)
|
||||
if (gSaveContext.n64ddFlag && LINK_IS_CHILD) {
|
||||
if (IS_RANDO && LINK_IS_CHILD) {
|
||||
for (i = 1; i < ARRAY_COUNT(gSaveContext.adultEquips.buttonItems); i++) {
|
||||
if (gSaveContext.adultEquips.buttonItems[i] == ITEM_HOOKSHOT) {
|
||||
gSaveContext.adultEquips.buttonItems[i] = ITEM_LONGSHOT;
|
||||
@@ -2004,7 +2004,7 @@ u8 Item_Give(PlayState* play, u8 item) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gSaveContext.n64ddFlag && LINK_IS_ADULT) {
|
||||
if (IS_RANDO && LINK_IS_ADULT) {
|
||||
for (i = 1; i < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); i++) {
|
||||
if (gSaveContext.childEquips.buttonItems[i] == ITEM_HOOKSHOT) {
|
||||
gSaveContext.childEquips.buttonItems[i] = ITEM_LONGSHOT;
|
||||
@@ -2149,7 +2149,7 @@ u8 Item_Give(PlayState* play, u8 item) {
|
||||
}
|
||||
|
||||
// update the adult/child equips when rando'd
|
||||
if (gSaveContext.n64ddFlag && LINK_IS_CHILD) {
|
||||
if (IS_RANDO && LINK_IS_CHILD) {
|
||||
for (i = 1; i < ARRAY_COUNT(gSaveContext.adultEquips.buttonItems); i++) {
|
||||
if (gSaveContext.adultEquips.buttonItems[i] == ITEM_OCARINA_FAIRY) {
|
||||
gSaveContext.adultEquips.buttonItems[i] = ITEM_OCARINA_TIME;
|
||||
@@ -2159,7 +2159,7 @@ u8 Item_Give(PlayState* play, u8 item) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gSaveContext.n64ddFlag && LINK_IS_ADULT) {
|
||||
if (IS_RANDO && LINK_IS_ADULT) {
|
||||
for (i = 1; i < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); i++) {
|
||||
if (gSaveContext.childEquips.buttonItems[i] == ITEM_OCARINA_FAIRY) {
|
||||
gSaveContext.childEquips.buttonItems[i] = ITEM_OCARINA_TIME;
|
||||
@@ -2515,7 +2515,7 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
|
||||
|
||||
if (item == RG_TYCOON_WALLET) {
|
||||
Inventory_ChangeUpgrade(UPG_WALLET, 3);
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
|
||||
Rupees_ChangeBy(999);
|
||||
}
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
@@ -2528,6 +2528,21 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
if (item == RG_TRIFORCE_PIECE) {
|
||||
gSaveContext.triforcePiecesCollected++;
|
||||
GameInteractor_SetTriforceHuntPieceGiven(true);
|
||||
|
||||
// Teleport to credits when goal is reached.
|
||||
if (gSaveContext.triforcePiecesCollected == Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED)) {
|
||||
gSaveContext.sohStats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = GAMEPLAYSTAT_TOTAL_TIME;
|
||||
gSaveContext.sohStats.gameComplete = 1;
|
||||
Play_PerformSave(play);
|
||||
GameInteractor_SetTriforceHuntCreditsWarpActive(true);
|
||||
}
|
||||
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
if (item == RG_PROGRESSIVE_BOMBCHUS) {
|
||||
if (INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE) {
|
||||
INV_CONTENT(ITEM_BOMBCHU) = ITEM_BOMBCHU;
|
||||
@@ -2561,7 +2576,7 @@ u8 Item_CheckObtainability(u8 item) {
|
||||
osSyncPrintf("item_get_non_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.inventory.items[slot]);
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
if (item == ITEM_SINGLE_MAGIC || item == ITEM_DOUBLE_MAGIC || item == ITEM_DOUBLE_DEFENSE) {
|
||||
return ITEM_NONE;
|
||||
}
|
||||
@@ -2578,25 +2593,25 @@ u8 Item_CheckObtainability(u8 item) {
|
||||
return ITEM_NONE;
|
||||
} else if ((gBitFlags[item - ITEM_SWORD_KOKIRI] << gEquipShifts[EQUIP_SWORD]) &
|
||||
gSaveContext.inventory.equipment) {
|
||||
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
|
||||
return IS_RANDO ? ITEM_NONE : item;
|
||||
} else {
|
||||
return ITEM_NONE;
|
||||
}
|
||||
} else if ((item >= ITEM_SHIELD_DEKU) && (item <= ITEM_SHIELD_MIRROR)) {
|
||||
if ((gBitFlags[item - ITEM_SHIELD_DEKU] << gEquipShifts[EQUIP_SHIELD]) & gSaveContext.inventory.equipment) {
|
||||
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
|
||||
return IS_RANDO ? ITEM_NONE : item;
|
||||
} else {
|
||||
return ITEM_NONE;
|
||||
}
|
||||
} else if ((item >= ITEM_TUNIC_KOKIRI) && (item <= ITEM_TUNIC_ZORA)) {
|
||||
if ((gBitFlags[item - ITEM_TUNIC_KOKIRI] << gEquipShifts[EQUIP_TUNIC]) & gSaveContext.inventory.equipment) {
|
||||
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
|
||||
return IS_RANDO ? ITEM_NONE : item;
|
||||
} else {
|
||||
return ITEM_NONE;
|
||||
}
|
||||
} else if ((item >= ITEM_BOOTS_KOKIRI) && (item <= ITEM_BOOTS_HOVER)) {
|
||||
if ((gBitFlags[item - ITEM_BOOTS_KOKIRI] << gEquipShifts[EQUIP_BOOTS]) & gSaveContext.inventory.equipment) {
|
||||
return gSaveContext.n64ddFlag ? ITEM_NONE : item;
|
||||
return IS_RANDO ? ITEM_NONE : item;
|
||||
} else {
|
||||
return ITEM_NONE;
|
||||
}
|
||||
@@ -2813,7 +2828,7 @@ s32 Inventory_ConsumeFairy(PlayState* play) {
|
||||
}
|
||||
|
||||
bool Inventory_HatchPocketCucco(PlayState* play) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
return Inventory_ReplaceItem(play, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
|
||||
}
|
||||
|
||||
@@ -5081,7 +5096,7 @@ void Interface_Draw(PlayState* play) {
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor.r, rColor.g, rColor.b, interfaceCtx->magicAlpha);
|
||||
// Draw Rupee icon. Hide in Boss Rush.
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, PosX_RC, PosY_RC, 16, 16, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
@@ -5199,7 +5214,7 @@ void Interface_Draw(PlayState* play) {
|
||||
svar5 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)];
|
||||
|
||||
// Draw Rupee Counter. Hide in Boss Rush.
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
for (svar1 = 0, svar3 = 16; svar1 < svar5; svar1++, svar2++, svar3 += 8) {
|
||||
OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]),
|
||||
8, 16, PosX_RC + svar3, PosY_RC, 8, 16, 1 << 10, 1 << 10);
|
||||
@@ -6137,7 +6152,7 @@ void Interface_Draw(PlayState* play) {
|
||||
void Interface_DrawTotalGameplayTimer(PlayState* play) {
|
||||
// Draw timer based on the Gameplay Stats total time.
|
||||
|
||||
if ((gSaveContext.isBossRush && gSaveContext.bossRushOptions[BR_OPTIONS_TIMER] == BR_CHOICE_TIMER_YES) ||
|
||||
if ((IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_TIMER] == BR_CHOICE_TIMER_YES) ||
|
||||
(CVarGetInteger("gGameplayStats.ShowIngameTimer", 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2)) {
|
||||
|
||||
s32 X_Margins_Timer = 0;
|
||||
@@ -6624,7 +6639,7 @@ void Interface_Update(PlayState* play) {
|
||||
play->nextEntranceIndex = gSaveContext.entranceIndex;
|
||||
|
||||
// In ER, handle sun song respawn from last entrance from grottos
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
Grotto_ForceGrottoReturn();
|
||||
}
|
||||
|
||||
|
||||
+10
-7
@@ -179,7 +179,7 @@ void Play_Destroy(GameState* thisx) {
|
||||
}
|
||||
|
||||
// In ER, remove link from epona when entering somewhere that doesn't support epona
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
|
||||
Entrance_HandleEponaState();
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ void Play_Init(GameState* thisx) {
|
||||
// eventChkInf[5] & 0x200 = Got Impa's reward
|
||||
// entranceIndex 0x7A, Castle Courtyard - Day from crawlspace
|
||||
// entranceIndex 0x400, Zelda's Courtyard
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
|
||||
if (gSaveContext.entranceIndex == 0x7A) {
|
||||
gSaveContext.entranceIndex = 0x400;
|
||||
@@ -1181,7 +1181,7 @@ void Play_Update(PlayState* play) {
|
||||
play->gameplayFrames++;
|
||||
// Gameplay stat tracking
|
||||
if (!gSaveContext.sohStats.gameComplete &&
|
||||
(!gSaveContext.isBossRush || (gSaveContext.isBossRush && !gSaveContext.isBossRushPaused))) {
|
||||
(!IS_BOSS_RUSH || (IS_BOSS_RUSH && !gSaveContext.isBossRushPaused))) {
|
||||
gSaveContext.sohStats.playTimer++;
|
||||
gSaveContext.sohStats.sceneTimer++;
|
||||
gSaveContext.sohStats.roomTimer++;
|
||||
@@ -1419,7 +1419,7 @@ skip:
|
||||
Environment_Update(play, &play->envCtx, &play->lightCtx, &play->pauseCtx, &play->msgCtx,
|
||||
&play->gameOverCtx, play->state.gfxCtx);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GivePlayerRandoRewardSariaGift(play, RC_LW_GIFT_FROM_SARIA);
|
||||
GivePlayerRandoRewardSongOfTime(play, RC_SONG_FROM_OCARINA_OF_TIME);
|
||||
GivePlayerRandoRewardZeldaLightArrowsGift(play, RC_TOT_LIGHT_ARROWS_CUTSCENE);
|
||||
@@ -1918,7 +1918,7 @@ void* Play_LoadFile(PlayState* play, RomFile* file) {
|
||||
|
||||
void Play_InitEnvironment(PlayState* play, s16 skyboxId) {
|
||||
// For entrance rando, ensure the correct weather state and sky mode is applied
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
Entrance_OverrideWeatherState();
|
||||
}
|
||||
Skybox_Init(&play->state, &play->skyboxCtx, skyboxId);
|
||||
@@ -1955,7 +1955,7 @@ void Play_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn) {
|
||||
|
||||
OTRPlay_SpawnScene(play, sceneNum, spawn);
|
||||
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
Entrance_OverrideSpawnScene(sceneNum, spawn);
|
||||
}
|
||||
}
|
||||
@@ -2318,7 +2318,10 @@ void Play_PerformSave(PlayState* play) {
|
||||
} else {
|
||||
Save_SaveFile();
|
||||
}
|
||||
if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF) {
|
||||
uint8_t triforceHuntCompleted =
|
||||
gSaveContext.n64ddFlag && gSaveContext.triforcePiecesCollected == Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED) &&
|
||||
Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT);
|
||||
if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF || triforceHuntCompleted) {
|
||||
Overlay_DisplayText(3.0f, "Game Saved");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
|
||||
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/randomizer/draw.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -1292,6 +1293,8 @@ void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 dr
|
||||
|
||||
if (this->getItemEntry.modIndex == MOD_RANDOMIZER && this->getItemEntry.getItemId == RG_ICE_TRAP) {
|
||||
Player_DrawGetItemIceTrap(play, this, refPos, drawIdPlusOne, height);
|
||||
} else if (this->getItemEntry.modIndex == MOD_RANDOMIZER && this->getItemEntry.getItemId == RG_TRIFORCE_PIECE) {
|
||||
Randomizer_DrawTriforcePieceGI(play, this->getItemEntry);
|
||||
} else if (this->getItemEntry.drawFunc != NULL) {
|
||||
this->getItemEntry.drawFunc(play, &this->getItemEntry);
|
||||
} else {
|
||||
|
||||
@@ -403,9 +403,10 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
|
||||
|
||||
camera = GET_ACTIVE_CAM(play);
|
||||
camId = camera->camDataIdx;
|
||||
if (camId == -1 && CVarGetInteger("gNoRestrictItems", 0)) {
|
||||
if (camId == -1 && (CVarGetInteger("gNoRestrictItems", 0) || CVarGetInteger("gCrowdControl", 0))) {
|
||||
// This prevents a crash when using items that change the
|
||||
// camera (such as din's fire) on scenes with prerendered backgrounds
|
||||
// camera (such as din's fire), voiding out or dying on
|
||||
// scenes with prerendered backgrounds.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -578,7 +579,7 @@ s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
|
||||
size_t size;
|
||||
|
||||
// In ER, override roomNum to load based on scene and spawn
|
||||
if (gSaveContext.n64ddFlag && gSaveContext.respawnFlag <= 0 &&
|
||||
if (IS_RANDO && gSaveContext.respawnFlag <= 0 &&
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
roomNum = Entrance_OverrideSpawnSceneRoom(play->sceneNum, play->curSpawn, roomNum);
|
||||
}
|
||||
|
||||
@@ -2091,7 +2091,7 @@ void func_8009EE44(PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
|
||||
bool playerHasCojiro = INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO;
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
|
||||
playerHasCojiro = PLAYER_HAS_SHUFFLED_ADULT_TRADE_ITEM(ITEM_COJIRO);
|
||||
}
|
||||
if ((play->roomCtx.unk_74[0] == 0) && playerHasCojiro) {
|
||||
|
||||
@@ -284,6 +284,20 @@ void SkelAnime_DrawLimbOpa(PlayState* play, s32 limbIndex, void** skeleton, Vec3
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
// Checks the skeleton header to draw the appropriate skeleton type instead of harcoding the type in the actor's draw function...
|
||||
void SkelAnime_DrawSkeletonOpa(PlayState* play, SkelAnime* skelAnime, OverrideLimbDrawOpa overrideLimbDraw,
|
||||
PostLimbDrawOpa postLimbDraw, void* arg) {
|
||||
if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_NORMAL) {
|
||||
SkelAnime_DrawOpa(play, skelAnime->skeleton, skelAnime->jointTable, overrideLimbDraw, postLimbDraw, arg);
|
||||
}
|
||||
else if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_FLEX)
|
||||
{
|
||||
FlexSkeletonHeader* flexHeader = (FlexSkeletonHeader*)skelAnime->skeletonHeader;
|
||||
SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, flexHeader->dListCount,
|
||||
overrideLimbDraw, postLimbDraw, arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw all limbs of type `StandardLimb` in a given skeleton to the polyOpa buffer
|
||||
*/
|
||||
@@ -1436,6 +1450,7 @@ s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skelet
|
||||
|
||||
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
|
||||
|
||||
skelAnime->skeletonHeader = skeletonHeader;
|
||||
skelAnime->limbCount = skeletonHeader->limbCount + 1;
|
||||
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->segment);
|
||||
if (jointTable == NULL) {
|
||||
@@ -1469,6 +1484,7 @@ s32 SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader
|
||||
|
||||
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
|
||||
|
||||
skelAnime->skeletonHeader = skeletonHeader;
|
||||
skelAnime->limbCount = skeletonHeader->sh.limbCount + 1;
|
||||
skelAnime->dListCount = skeletonHeader->dListCount;
|
||||
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->sh.segment);
|
||||
@@ -1506,6 +1522,7 @@ s32 SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* sk
|
||||
|
||||
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
|
||||
|
||||
skelAnime->skeletonHeader = skeletonHeader;
|
||||
skelAnime->limbCount = skeletonHeader->limbCount + 1;
|
||||
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->segment);
|
||||
skelAnime->jointTable =
|
||||
|
||||
@@ -155,7 +155,7 @@ void Sram_OpenSave() {
|
||||
}
|
||||
|
||||
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !gSaveContext.n64ddFlag) {
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !IS_RANDO) {
|
||||
i = gSaveContext.eventChkInf[4] & ~1;
|
||||
gSaveContext.eventChkInf[4] = i;
|
||||
|
||||
@@ -176,7 +176,7 @@ void Sram_OpenSave() {
|
||||
gSaveContext.equips.equipment |= 2;
|
||||
}
|
||||
|
||||
if (!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
|
||||
if (!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
|
||||
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[i]) {
|
||||
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
|
||||
@@ -218,11 +218,10 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset];
|
||||
}
|
||||
|
||||
gSaveContext.n64ddFlag = fileChooseCtx->n64ddFlag;
|
||||
|
||||
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
|
||||
// Set N64DD Flags for save file
|
||||
fileChooseCtx->n64ddFlags[fileChooseCtx->buttonIndex] = 1;
|
||||
fileChooseCtx->n64ddFlag = 1;
|
||||
gSaveContext.n64ddFlag = 1;
|
||||
gSaveContext.questId = 2;
|
||||
|
||||
Randomizer_InitSaveFile();
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) {
|
||||
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
|
||||
|
||||
// Initialize this with the mud wall, so it can't be affected by toggling while the actor is loaded
|
||||
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
@@ -275,7 +275,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
|
||||
}
|
||||
|
||||
// Break the floor immediately in Boss Rush so the player can jump in the hole immediately.
|
||||
if (this->collider.base.acFlags & 2 || blueFireArrowHit || gSaveContext.isBossRush) {
|
||||
if (this->collider.base.acFlags & 2 || blueFireArrowHit || IS_BOSS_RUSH) {
|
||||
Vec3f effectPos;
|
||||
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
|
||||
if (Flags_GetSwitch(play, 0x38)) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
|
||||
if(gSaveContext.n64ddFlag) {
|
||||
if(IS_RANDO) {
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
Magic_Fill(play);
|
||||
if(Flags_GetTreasure(play, this->fountainType + 1)) {
|
||||
@@ -934,8 +934,7 @@ void BgDyYoseizo_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthState]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, BgDyYoseizo_OverrideLimbDraw, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BgDyYoseizo_OverrideLimbDraw, NULL, this);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
BgDyYoseizo_ParticleDraw(this, play);
|
||||
|
||||
@@ -45,8 +45,8 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
|
||||
this->somePos.y = thisx->world.pos.y;
|
||||
this->somePos.z = thisx->world.pos.z;
|
||||
if (((Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) ||
|
||||
(!gSaveContext.n64ddFlag && (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) ||
|
||||
(gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
|
||||
(!IS_RANDO && (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) ||
|
||||
(IS_RANDO && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
|
||||
(play->sceneNum == SCENE_KAKARIKO_VILLAGE)) {
|
||||
thisx->world.pos.x = -89.0f;
|
||||
thisx->world.pos.z = -1375.0f;
|
||||
|
||||
@@ -51,7 +51,7 @@ void BgGjyoBridge_Init(Actor* thisx, PlayState* play) {
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
int bridge = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE);
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT) || (gSaveContext.n64ddFlag && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT) || (IS_RANDO && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
|
||||
this->actionFunc = func_808787A4;
|
||||
} else {
|
||||
this->dyna.actor.draw = NULL;
|
||||
@@ -84,7 +84,7 @@ u8 CheckPlayerPosition(Player* player, PlayState* play) {
|
||||
void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
||||
(INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) && CheckPlayerPosition(player, play)) {
|
||||
LaunchBridgeCutscene(this, play);
|
||||
@@ -146,7 +146,7 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) {
|
||||
if (gSaveContext.n64ddFlag || (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) &&
|
||||
if (IS_RANDO || (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) &&
|
||||
(play->csCtx.npcActions[2]->action == 2)) {
|
||||
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
@@ -105,7 +105,7 @@ void func_80890740(BgIceShelter* this, PlayState* play) {
|
||||
s32 type = (this->dyna.actor.params >> 8) & 7;
|
||||
|
||||
// Initialize this with the red ice, so it can't be affected by toggling while the actor is loaded
|
||||
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
|
||||
Collider_InitCylinder(play, &this->cylinder1);
|
||||
// If "Blue Fire Arrows" is enabled, set up a collider on the red ice that responds to them
|
||||
|
||||
@@ -82,7 +82,7 @@ void BgSpot00Hanebasi_Init(Actor* thisx, PlayState* play) {
|
||||
if (gSaveContext.sceneSetupIndex != 6) {
|
||||
// Don't close the bridge in rando to accomodate hyrule castle exit
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && !(gSaveContext.n64ddFlag)) {
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && !(IS_RANDO)) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ void BgSpot01Idosoko_Init(Actor* thisx, PlayState* play) {
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
// If dungeon entrance randomizer is on, remove the well stone as adult Link when
|
||||
// child Link has drained the water to the well
|
||||
if (!LINK_IS_ADULT || (gSaveContext.n64ddFlag &&
|
||||
if (!LINK_IS_ADULT || (IS_RANDO &&
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
||||
@@ -131,7 +131,7 @@ void func_808AC908(BgSpot02Objects* this, PlayState* play) {
|
||||
|
||||
// We want to do most of the same things in rando, but we're not in a cutscene and the flag for
|
||||
// destroying the royal tombstone is already set.
|
||||
if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
|
||||
if (IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
|
||||
this->timer = 25;
|
||||
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
|
||||
@@ -174,7 +174,7 @@ void func_808ACA08(BgSpot02Objects* this, PlayState* play) {
|
||||
|
||||
// This shouldn't execute in rando even without the check since we never
|
||||
// enter the cutscene context.
|
||||
if (play->csCtx.frames == 402 && !(gSaveContext.n64ddFlag)) {
|
||||
if (play->csCtx.frames == 402 && !(IS_RANDO)) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Player_PlaySfx(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE_KID);
|
||||
} else {
|
||||
@@ -220,7 +220,7 @@ void func_808ACC34(BgSpot02Objects* this, PlayState* play) {
|
||||
// This is the actionFunc that the game settles on when you load the Graveyard
|
||||
// When we're in rando and the flag for the gravestone being destroyed gets set,
|
||||
// set the actionFunc to the function where the gravestone explodes.
|
||||
if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
|
||||
if (IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
|
||||
this->actionFunc = func_808AC908;
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ void BgSpot06Objects_Destroy(Actor* thisx, PlayState* play) {
|
||||
// Due to Ships resource caching, the water box collisions for the river have to be manually reset
|
||||
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z;
|
||||
|
||||
if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)) {
|
||||
if (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)) {
|
||||
// For randomizer when leaving lake hylia while the water level is lowered,
|
||||
// reset the "raise lake hylia water" flag back to on if the water temple is cleared
|
||||
Flags_SetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER);
|
||||
@@ -451,7 +451,7 @@ void BgSpot06Objects_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
// Bail early for water control system for child or non-rando
|
||||
if (LINK_IS_CHILD || !gSaveContext.n64ddFlag) {
|
||||
if (LINK_IS_CHILD || !IS_RANDO) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -596,7 +596,7 @@ void BgSpot06Objects_WaterPlaneCutsceneRise(BgSpot06Objects* this, PlayState* pl
|
||||
this->actionFunc = BgSpot06Objects_DoNothing;
|
||||
|
||||
// On rando, this is used with the water control system switch to finalize raising the water
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
this->lakeHyliaWaterLevel = 0;
|
||||
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_RAISED;
|
||||
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z;
|
||||
|
||||
@@ -60,7 +60,7 @@ void BgSpot12Saku_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
// If ER is on, force the gate to always use its permanent flag
|
||||
// (which it only uses in Child Gerudo Fortress in the vanilla game)
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) {
|
||||
thisx->params = 0x0002;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ void BgSpot12Saku_Update(Actor* thisx, PlayState* play) {
|
||||
BgSpot12Saku* this = (BgSpot12Saku*)thisx;
|
||||
|
||||
// If ER is on, when the guard opens the GtG gate its permanent flag will be set.
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
|
||||
Flags_GetSwitch(play, 0x3A)) {
|
||||
Flags_SetSwitch(play, 0x2);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void BgTokiSwd_Init(Actor* thisx, PlayState* play) {
|
||||
BgTokiSwd_SetupAction(this, func_808BAF40);
|
||||
|
||||
if (LINK_IS_ADULT) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
if (!CUR_UPG_VALUE(UPG_BOMB_BAG)) {
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
if (gSaveContext.equips.buttonItems[i] == ITEM_BOMB) {
|
||||
@@ -84,7 +84,7 @@ void BgTokiSwd_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
this->actor.draw = NULL;
|
||||
} else if (gSaveContext.n64ddFlag) {
|
||||
} else if (IS_RANDO) {
|
||||
// don't give child link a kokiri sword if we don't have one
|
||||
uint32_t kokiriSwordBitMask = 1 << 0;
|
||||
if (!(gSaveContext.inventory.equipment & kokiriSwordBitMask)) {
|
||||
@@ -119,7 +119,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
|
||||
if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !gSaveContext.n64ddFlag) || gSaveContext.n64ddFlag) {
|
||||
if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !IS_RANDO) || IS_RANDO) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Item_Give(play, ITEM_SWORD_MASTER);
|
||||
@@ -135,7 +135,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
||||
} else {
|
||||
Player* player = GET_PLAYER(play);
|
||||
if (Actor_IsFacingPlayer(&this->actor, 0x2000) &&
|
||||
(!gSaveContext.n64ddFlag || (gSaveContext.n64ddFlag && player->getItemId == GI_NONE))) {
|
||||
(!IS_RANDO || (IS_RANDO && player->getItemId == GI_NONE))) {
|
||||
func_8002F580(&this->actor, play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void BgTreemouth_Init(Actor* thisx, PlayState* play) {
|
||||
BgTreemouth_SetupAction(this, func_808BC8B8);
|
||||
// If dungeon entrance randomizer is on, keep the tree mouth open
|
||||
// when Link is adult and sword & shield have been shown to Mido
|
||||
} else if ((LINK_IS_ADULT && (!gSaveContext.n64ddFlag ||
|
||||
} else if ((LINK_IS_ADULT && (!IS_RANDO ||
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) == RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) ||
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) || (gSaveContext.sceneSetupIndex == 7)) {
|
||||
this->unk_168 = 0.0f;
|
||||
|
||||
@@ -1165,8 +1165,7 @@ void BossDodongo_Draw(Actor* thisx, PlayState* play) {
|
||||
Matrix_RotateZ(this->unk_23C, MTXMODE_APPLY);
|
||||
Matrix_RotateX((this->unk_1C4 / 32768.0f) * 3.14159f, MTXMODE_APPLY);
|
||||
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, BossDodongo_OverrideLimbDraw,
|
||||
BossDodongo_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossDodongo_OverrideLimbDraw, BossDodongo_PostLimbDraw, this);
|
||||
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
|
||||
@@ -1632,7 +1631,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
|
||||
|
||||
if (this->unk_1DA == 820) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_Spawn(
|
||||
&play->actorCtx, play, ACTOR_ITEM_B_HEART,
|
||||
Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
@@ -1651,7 +1650,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
func_80064534(play, &play->csCtx);
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD);
|
||||
} else {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_ADULT, false);
|
||||
|
||||
@@ -913,7 +913,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
||||
this->actionFunc = BossFd_Wait;
|
||||
this->actor.world.pos.y -= 1000.0f;
|
||||
}
|
||||
if (this->timers[0] == 7 && !gSaveContext.isBossRush) {
|
||||
if (this->timers[0] == 7 && !IS_BOSS_RUSH) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||
}
|
||||
@@ -1857,7 +1857,7 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) {
|
||||
Matrix_RotateX(-this->bodySegsRot[segIndex].x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-13.0f, -5.0f, 13.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->actor.scale.x * 0.1f, this->actor.scale.y * 0.1f, this->actor.scale.z * 0.1f, MTXMODE_APPLY);
|
||||
SkelAnime_DrawOpa(play, this->skelAnimeRightArm.skeleton, this->skelAnimeRightArm.jointTable,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeRightArm,
|
||||
BossFd_OverrideRightArmDraw, NULL, this);
|
||||
Matrix_Pop();
|
||||
osSyncPrintf("RH\n");
|
||||
@@ -1869,7 +1869,7 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) {
|
||||
Matrix_RotateX(-this->bodySegsRot[segIndex].x, MTXMODE_APPLY);
|
||||
Matrix_Translate(13.0f, -5.0f, 13.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->actor.scale.x * 0.1f, this->actor.scale.y * 0.1f, this->actor.scale.z * 0.1f, MTXMODE_APPLY);
|
||||
SkelAnime_DrawOpa(play, this->skelAnimeLeftArm.skeleton, this->skelAnimeLeftArm.jointTable,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeLeftArm,
|
||||
BossFd_OverrideLeftArmDraw, NULL, this);
|
||||
Matrix_Pop();
|
||||
osSyncPrintf("BD\n");
|
||||
@@ -1966,7 +1966,7 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) {
|
||||
Matrix_Pop();
|
||||
osSyncPrintf("BHCE\n");
|
||||
Matrix_Scale(this->actor.scale.x * 0.1f, this->actor.scale.y * 0.1f, this->actor.scale.z * 0.1f, MTXMODE_APPLY);
|
||||
SkelAnime_DrawOpa(play, this->skelAnimeHead.skeleton, this->skelAnimeHead.jointTable, BossFd_OverrideHeadDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeHead, BossFd_OverrideHeadDraw,
|
||||
BossFd_PostHeadDraw, &this->actor);
|
||||
osSyncPrintf("SK\n");
|
||||
{
|
||||
|
||||
@@ -789,7 +789,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) {
|
||||
this->deathCamera = 0;
|
||||
func_80064534(play, &play->csCtx);
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0,
|
||||
0, WARP_DUNGEON_ADULT);
|
||||
} else {
|
||||
@@ -1226,8 +1226,7 @@ void BossFd2_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128);
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, BossFd2_OverrideLimbDraw, BossFd2_PostLimbDraw, &this->actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossFd2_OverrideLimbDraw, BossFd2_PostLimbDraw, &this->actor);
|
||||
BossFd2_DrawMane(this, play);
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
}
|
||||
|
||||
@@ -570,7 +570,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
|
||||
this->csCamFov = 60.0f;
|
||||
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE) || gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE) || IS_RANDO || IS_BOSS_RUSH) {
|
||||
// watched cutscene already, skip most of it
|
||||
this->csState = 17;
|
||||
this->csTimer = 0;
|
||||
@@ -581,7 +581,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
BossGanon_SetIntroCsCamera(this, 11);
|
||||
this->unk_198 = 2;
|
||||
this->timers[2] = 110;
|
||||
if (!(gSaveContext.isBossRush && gSaveContext.bossRushOptions[BR_OPTIONS_HEAL] == BR_CHOICE_HEAL_NEVER)) {
|
||||
if (!(IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_HEAL] == BR_CHOICE_HEAL_NEVER)) {
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
}
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
@@ -904,7 +904,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
this->csTimer = 0;
|
||||
this->csCamFov = 60.0f;
|
||||
BossGanon_SetIntroCsCamera(this, 12);
|
||||
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
|
||||
if (!IS_RANDO && !IS_BOSS_RUSH) {
|
||||
Message_StartTextbox(play, 0x70CB, NULL);
|
||||
}
|
||||
}
|
||||
@@ -928,7 +928,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
this->csState = 19;
|
||||
this->csTimer = 0;
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Message_StartTextbox(play, 0x70CC, NULL);
|
||||
}
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfRaiseHandStartAnim, -5.0f);
|
||||
@@ -972,7 +972,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
if ((this->csTimer > 80) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
|
||||
// In rando, skip past dark waves section straight to title card phase of the cutscene.
|
||||
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
||||
if (IS_RANDO || IS_BOSS_RUSH) {
|
||||
this->timers[2] = 30;
|
||||
this->csCamAt.x = this->unk_1FC.x - 10.0f;
|
||||
this->csCamAt.y = this->unk_1FC.y + 30.0f;
|
||||
@@ -1282,7 +1282,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
// Skip Ganondorf dying and go straight to next scene.
|
||||
// The cutscene skip met a mixed reaction, so until we figure out a better way of doing it,
|
||||
// it will stay not-skipped outside of Boss Rush (originally implemented for randomizer).
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
this->csState = 1;
|
||||
this->csTimer = 0;
|
||||
} else {
|
||||
@@ -1539,7 +1539,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
if (this->csTimer == 180) {
|
||||
play->sceneLoadFlag = 0x14;
|
||||
if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || gSaveContext.isBossRush)) {
|
||||
if ((IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || IS_BOSS_RUSH)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
|
||||
play->nextEntranceIndex = 0x517;
|
||||
}
|
||||
@@ -1562,7 +1562,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
sBossGanonZelda = (EnZl3*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ZL3, 0.0f,
|
||||
6000.0f, 0.0f, 0, 0, 0, 0x2000);
|
||||
|
||||
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
|
||||
if (!IS_RANDO && !IS_BOSS_RUSH) {
|
||||
this->csState = 101;
|
||||
} else {
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
@@ -1690,7 +1690,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
// fallthrough
|
||||
case 104:
|
||||
// In rando, fade out the white here as the earlier part is skipped.
|
||||
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
||||
if (IS_RANDO || IS_BOSS_RUSH) {
|
||||
Math_ApproachZeroF(&this->whiteFillAlpha, 1.0f, 10.0f);
|
||||
}
|
||||
|
||||
@@ -1712,7 +1712,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
if (this->csTimer == 50) {
|
||||
// In rando, skip the rest of the cutscene after the crystal around Zelda dissapears.
|
||||
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
|
||||
if (!IS_RANDO && !IS_BOSS_RUSH) {
|
||||
sBossGanonZelda->unk_3C8 = 4;
|
||||
} else {
|
||||
this->csState = 108;
|
||||
@@ -3891,8 +3891,7 @@ void BossGanon_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGanondorfNormalEyeTex));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
BossGanon_OverrideLimbDraw, BossGanon_PostLimbDraw, &this->actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossGanon_OverrideLimbDraw, BossGanon_PostLimbDraw, &this->actor);
|
||||
|
||||
this->unk_2EC[0].x = this->unk_2EC[1].x;
|
||||
this->unk_2EC[0].y = this->unk_2EC[1].y + 30.0f;
|
||||
|
||||
@@ -234,7 +234,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
|
||||
sBossGanon2Zelda->actor.shape.rot.y = -0x7000;
|
||||
|
||||
// In rando, skip past the cutscene to the part where the player takes control again.
|
||||
if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
|
||||
if (!IS_RANDO && !IS_BOSS_RUSH) {
|
||||
this->csState = 1;
|
||||
this->csTimer = 0;
|
||||
} else {
|
||||
@@ -2819,8 +2819,7 @@ void BossGanon2_Draw(Actor* thisx, PlayState* play) {
|
||||
BossGanon2_SetObjectSegment(this, play, OBJECT_GANON, true);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGanondorfEmptyEyeTex));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGanondorfEmptyEyeTex));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, NULL, BossGanon2_PostLimbDraw2, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, BossGanon2_PostLimbDraw2, this);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -2837,9 +2836,7 @@ void BossGanon2_Draw(Actor* thisx, PlayState* play) {
|
||||
Matrix_Translate(0.0f, 4000.0f, -4000.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, BossGanon2_OverrideLimbDraw, BossGanon2_PostLimbDraw,
|
||||
this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossGanon2_OverrideLimbDraw, BossGanon2_PostLimbDraw, this);
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
BossGanon2_GenShadowTexture(shadowTexture, this, play);
|
||||
BossGanon2_DrawShadowTexture(shadowTexture, this, play);
|
||||
|
||||
@@ -959,12 +959,12 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
|
||||
case DEATH_THROES:
|
||||
switch (this->work[GND_ACTION_STATE]) {
|
||||
case DEATH_SPASM:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->fwork[GND_END_FRAME]) && !gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->fwork[GND_END_FRAME]) && !IS_RANDO && !IS_BOSS_RUSH) {
|
||||
this->fwork[GND_END_FRAME] = Animation_GetLastFrame(&gPhantomGanonAirDamageAnim);
|
||||
Animation_Change(&this->skelAnime, &gPhantomGanonAirDamageAnim, 0.5f, 0.0f,
|
||||
this->fwork[GND_END_FRAME], ANIMMODE_ONCE_INTERP, 0.0f);
|
||||
this->work[GND_ACTION_STATE] = DEATH_LIMP;
|
||||
} else if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
||||
} else if (IS_RANDO || IS_BOSS_RUSH) {
|
||||
// Skip to death scream animation and move ganondrof to middle
|
||||
this->deathState = DEATH_SCREAM;
|
||||
this->timers[0] = 50;
|
||||
@@ -991,7 +991,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
|
||||
bodyDecayLevel = 1;
|
||||
break;
|
||||
}
|
||||
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
||||
if (IS_RANDO || IS_BOSS_RUSH) {
|
||||
break;
|
||||
}
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8);
|
||||
@@ -1105,7 +1105,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
|
||||
this->deathCamera = 0;
|
||||
func_80064534(play, &play->csCtx);
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
|
||||
GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0, true);
|
||||
}
|
||||
@@ -1511,7 +1511,8 @@ void BossGanondrof_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, BossGanondrof_GetNullDList(play->state.gfxCtx));
|
||||
}
|
||||
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, BossGanondrof_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
|
||||
BossGanondrof_OverrideLimbDraw,
|
||||
BossGanondrof_PostLimbDraw, this);
|
||||
osSyncPrintf("DRAW 22\n");
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
|
||||
@@ -1118,7 +1118,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
|
||||
this->timer = 70;
|
||||
this->decayingProgress = 0;
|
||||
this->subCameraFollowSpeed = 0.0f;
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||
}
|
||||
@@ -1152,7 +1152,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, childPos.x,
|
||||
this->actor.world.pos.y, childPos.z, 0, 0, 0, WARP_DUNGEON_CHILD);
|
||||
} else {
|
||||
@@ -2148,7 +2148,8 @@ void BossGoma_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, BossGoma_EmptyDlist(play->state.gfxCtx));
|
||||
}
|
||||
|
||||
SkelAnime_DrawOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, BossGoma_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelanime,
|
||||
BossGoma_OverrideLimbDraw,
|
||||
BossGoma_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -1116,7 +1116,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
||||
BossMo_SpawnDroplet(MO_FX_DROPLET, (BossMoEffect*)play->specialEffects, &spD4, &spE0,
|
||||
((300 - indS1) * .0015f) + 0.13f);
|
||||
}
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1,
|
||||
this->actor.world.pos.x, -280.0f, this->actor.world.pos.z, 0, 0, 0,
|
||||
WARP_DUNGEON_ADULT);
|
||||
|
||||
@@ -1204,7 +1204,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) {
|
||||
} else if (this->effects[0].alpha == 0) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y, ROOM_CENTER_Z, 0, 0, 0,
|
||||
WARP_DUNGEON_ADULT, true);
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART,
|
||||
(Math_SinS(this->actor.shape.rot.y) * 200.0f) + ROOM_CENTER_X, ROOM_CENTER_Y,
|
||||
Math_CosS(this->actor.shape.rot.y) * 200.0f + ROOM_CENTER_Z, 0, 0, 0, 0, true);
|
||||
@@ -2737,8 +2737,7 @@ void BossSst_DrawHand(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, sBodyStaticDList);
|
||||
}
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
BossSst_OverrideHandDraw, BossSst_PostHandDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossSst_OverrideHandDraw, BossSst_PostHandDraw, this);
|
||||
if (this->trailCount >= 2) {
|
||||
BossSstHandTrail* trail;
|
||||
BossSstHandTrail* trail2;
|
||||
|
||||
@@ -2365,7 +2365,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
|
||||
sp35 = 0;
|
||||
|
||||
// Skip ahead to last part of the cutscene in rando
|
||||
if (this->work[CS_TIMER_2] == 10 && (gSaveContext.n64ddFlag || gSaveContext.isBossRush)) {
|
||||
if (this->work[CS_TIMER_2] == 10 && (IS_RANDO || IS_BOSS_RUSH)) {
|
||||
this->work[CS_TIMER_2] = 860;
|
||||
}
|
||||
|
||||
@@ -2550,7 +2550,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
|
||||
|
||||
// Add separate timings for the "beam" that opens and closes around the sisters
|
||||
// Needed because we skip ahead in cutscene timer value so it never gets called otherwise
|
||||
if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
||||
if (IS_RANDO || IS_BOSS_RUSH) {
|
||||
if (this->work[CS_TIMER_2] < 900) {
|
||||
Math_ApproachF(&this->workf[UNK_F18], 255.0f, 0.1f, 5.0f);
|
||||
} else if (this->work[CS_TIMER_2] > 910) {
|
||||
@@ -2795,7 +2795,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
|
||||
func_80064534(play, &play->csCtx);
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0,
|
||||
0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0, true);
|
||||
@@ -3510,8 +3510,7 @@ void BossTw_Draw(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
|
||||
Matrix_Push();
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, BossTw_OverrideLimbDraw, BossTw_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossTw_OverrideLimbDraw, BossTw_PostLimbDraw, this);
|
||||
Matrix_Pop();
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
}
|
||||
@@ -3866,9 +3865,7 @@ void BossTw_TwinrovaDraw(Actor* thisx, PlayState* play2) {
|
||||
(u32)this->fogB, 0, this->fogNear, this->fogFar);
|
||||
|
||||
Matrix_Push();
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, BossTw_TwinrovaOverrideLimbDraw, BossTw_TwinrovaPostLimbDraw,
|
||||
thisx);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossTw_TwinrovaOverrideLimbDraw, BossTw_TwinrovaPostLimbDraw, thisx);
|
||||
Matrix_Pop();
|
||||
|
||||
Matrix_MultVec3f(&D_8094A9EC, &this->beamOrigin);
|
||||
|
||||
@@ -1653,7 +1653,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
sCsState++;
|
||||
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||
}
|
||||
@@ -1665,7 +1665,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RU1, sWarpPos[sp7C].x, sWarpPos[sp7C].y,
|
||||
sWarpPos[sp7C].z, 0, 0, 0, 0, true);
|
||||
} else {
|
||||
@@ -3231,7 +3231,7 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (play->gameplayFrames * -10) % 32, 16,
|
||||
0x20, 1, 0, (play->gameplayFrames * -5) % 32, 16, 32));
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
|
||||
BossVa_BodyOverrideLimbDraw, BossVa_BodyPostLimbDraw, this);
|
||||
}
|
||||
break;
|
||||
@@ -3239,8 +3239,7 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
|
||||
case BOSSVA_SUPPORT_2:
|
||||
case BOSSVA_SUPPORT_3:
|
||||
if (!this->isDead) {
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, BossVa_SupportOverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossVa_SupportOverrideLimbDraw,
|
||||
BossVa_SupportPostLimbDraw, this);
|
||||
}
|
||||
break;
|
||||
@@ -3248,20 +3247,18 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
|
||||
case BOSSVA_ZAPPER_2:
|
||||
case BOSSVA_ZAPPER_3:
|
||||
if (!this->isDead) {
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, BossVa_ZapperOverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossVa_ZapperOverrideLimbDraw,
|
||||
BossVa_ZapperPostLimbDraw, this);
|
||||
}
|
||||
break;
|
||||
case BOSSVA_STUMP_1:
|
||||
case BOSSVA_STUMP_2:
|
||||
case BOSSVA_STUMP_3:
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, NULL, NULL, NULL);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
|
||||
break;
|
||||
default:
|
||||
if (!this->isDead) {
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
|
||||
BossVa_BariOverrideLimbDraw, BossVa_BariPostLimbDraw, this);
|
||||
Collider_UpdateSpheres(0, &this->colliderSph);
|
||||
if (sCsState < BOSSVA_BATTLE) {
|
||||
|
||||
@@ -1012,8 +1012,7 @@ void DemoDu_Draw_01(Actor* thisx, PlayState* play2) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
|
||||
this);
|
||||
SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ f32 DemoEffect_InterpolateCsFrames(PlayState* play, s32 csActionId) {
|
||||
*/
|
||||
void DemoEffect_InitJewel(PlayState* play, DemoEffect* this) {
|
||||
this->initDrawFunc = DemoEffect_DrawJewel;
|
||||
if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) {
|
||||
if (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) {
|
||||
this->initDrawFunc = DemoEffect_DrawGetItem;
|
||||
}
|
||||
if (!LINK_IS_ADULT) {
|
||||
@@ -156,7 +156,7 @@ void DemoEffect_InitJewel(PlayState* play, DemoEffect* this) {
|
||||
Actor_SetScale(&this->actor, 0.10f);
|
||||
}
|
||||
this->csActionId = 1;
|
||||
this->actor.shape.rot.x = (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) ? 0 : 16384;
|
||||
this->actor.shape.rot.x = (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) ? 0 : 16384;
|
||||
DemoEffect_InitJewelColor(this);
|
||||
this->jewel.alpha = 0;
|
||||
this->jewelCsRotation.x = this->jewelCsRotation.y = this->jewelCsRotation.z = 0;
|
||||
@@ -635,7 +635,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
|
||||
|
||||
Actor_SetScale(thisx, 0.20f);
|
||||
|
||||
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
switch (play->csCtx.npcActions[this->csActionId]->action) {
|
||||
case 2:
|
||||
DemoEffect_MedalSparkle(this, play, 0);
|
||||
@@ -648,7 +648,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
|
||||
switch (play->csCtx.npcActions[this->csActionId]->action) {
|
||||
case 2:
|
||||
if (gSaveContext.entranceIndex == 0x0053 ||
|
||||
(gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
(IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
|
||||
} else {
|
||||
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
|
||||
@@ -664,7 +664,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
|
||||
this->actor.shape.rot.y += this->getItem.rotation;
|
||||
}
|
||||
if (gSaveContext.entranceIndex == 0x0053 ||
|
||||
(gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
(IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
|
||||
} else {
|
||||
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
|
||||
@@ -1545,7 +1545,7 @@ void DemoEffect_UpdateJewelAdult(DemoEffect* this, PlayState* play) {
|
||||
this->actor.shape.rot.y += 0x0400;
|
||||
DemoEffect_PlayJewelSfx(this, play);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
switch (this->jewel.type) {
|
||||
case DEMO_EFFECT_JEWEL_KOKIRI:
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
@@ -1615,14 +1615,14 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
|
||||
default:
|
||||
DemoEffect_MoveToCsEndpoint(this, play, this->csActionId, 0);
|
||||
if (gSaveContext.entranceIndex == 0x0053 ||
|
||||
(gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
(IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
DemoEffect_MoveJewelSplit(&thisx->world, this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
|
||||
hasCmdAction = play->csCtx.state && play->csCtx.npcActions[this->csActionId];
|
||||
if (!hasCmdAction) {
|
||||
@@ -1636,7 +1636,7 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
|
||||
DemoEffect_PlayJewelSfx(this, play);
|
||||
this->effectFlags &= ~1;
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
switch (this->jewel.type) {
|
||||
case DEMO_EFFECT_JEWEL_KOKIRI:
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
@@ -2087,7 +2087,7 @@ void DemoEffect_DrawGetItem(Actor* thisx, PlayState* play) {
|
||||
this->getItem.isLoaded = 1;
|
||||
return;
|
||||
}
|
||||
if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) {
|
||||
if (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_BARINADE, RG_ZORA_SAPPHIRE);
|
||||
this->getItem.drawId = getItemEntry.gid;
|
||||
func_8002EBCC(thisx, play, 0);
|
||||
|
||||
@@ -337,8 +337,7 @@ void func_8097D29C(DemoGo* this, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTexture));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
|
||||
this);
|
||||
SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ void DemoIk_Type1Draw(DemoIk* this, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, DemoIk_SetColors(gfxCtx, 245, 225, 155, 30, 30, 0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, DemoIk_SetColors(gfxCtx, 255, 40, 0, 40, 0, 0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A, DemoIk_SetColors(gfxCtx, 255, 255, 255, 20, 40, 30));
|
||||
SkelAnime_DrawOpa(play, skelAnime->skeleton, skelAnime->jointTable, NULL, DemoIk_Type1PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, DemoIk_Type1PostLimbDraw, this);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
@@ -460,8 +460,7 @@ void DemoIk_Type2Draw(DemoIk* this, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, DemoIk_SetColors(gfxCtx, 245, 225, 155, 30, 30, 0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, DemoIk_SetColors(gfxCtx, 255, 40, 0, 40, 0, 0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A, DemoIk_SetColors(gfxCtx, 255, 255, 255, 20, 40, 30));
|
||||
SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
|
||||
DemoIk_Type2OverrideLimbDraw, DemoIk_Type2PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, skelAnime, DemoIk_Type2OverrideLimbDraw, DemoIk_Type2PostLimbDraw, this);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
|
||||
@@ -868,7 +868,7 @@ void func_80986B2C(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
// In entrance rando have impa bring link back to the front of castle grounds
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
|
||||
play->nextEntranceIndex = 0x0138;
|
||||
} else {
|
||||
play->nextEntranceIndex = 0xCD;
|
||||
@@ -928,7 +928,7 @@ void GivePlayerRandoRewardImpa(Actor* impa, PlayState* play, RandomizerCheck che
|
||||
|
||||
void func_80986C30(DemoIm* this, PlayState* play) {
|
||||
if (func_80986A5C(this, play)) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GivePlayerRandoRewardImpa(this, play, RC_SONG_FROM_IMPA);
|
||||
} else {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardLullabyCs);
|
||||
@@ -960,7 +960,7 @@ void func_80986D40(DemoIm* this, PlayState* play) {
|
||||
if (gSaveContext.sceneSetupIndex == 6) {
|
||||
this->action = 19;
|
||||
this->drawConfig = 1;
|
||||
} else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !gSaveContext.n64ddFlag) {
|
||||
} else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !IS_RANDO) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
|
||||
this->action = 23;
|
||||
@@ -1231,8 +1231,7 @@ void DemoIm_DrawSolid(DemoIm* this, PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
|
||||
DemoIm_OverrideLimbDraw, DemoIm_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, skelAnime, DemoIm_OverrideLimbDraw, DemoIm_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ void DemoKankyo_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
// In ER, override the warp song locations. Also removes the warp song cutscene
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) &&
|
||||
thisx->params == 0x000F) { // Warp Song particles
|
||||
Entrance_SetWarpSongEntrance();
|
||||
}
|
||||
@@ -808,7 +808,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
|
||||
this->unk_150[i].unk_23 = 0;
|
||||
|
||||
// Skip the first part of warp song cutscenes in rando
|
||||
if (gSaveContext.n64ddFlag && this->actor.params == DEMOKANKYO_WARP_OUT) {
|
||||
if (IS_RANDO && this->actor.params == DEMOKANKYO_WARP_OUT) {
|
||||
this->unk_150[i].unk_22 = 2;
|
||||
} else {
|
||||
this->unk_150[i].unk_22++;
|
||||
|
||||
@@ -88,7 +88,7 @@ s32 DemoKekkai_CheckEventFlag(s32 params) {
|
||||
if ((params < KEKKAI_TOWER) || (params > KEKKAI_FOREST)) {
|
||||
return true;
|
||||
}
|
||||
if (gSaveContext.n64ddFlag && params > KEKKAI_TOWER) {
|
||||
if (IS_RANDO && params > KEKKAI_TOWER) {
|
||||
return Flags_GetRandomizerInf(trialParamToRandInf(params));
|
||||
}
|
||||
return Flags_GetEventChkInf(eventFlags[params]);
|
||||
@@ -148,7 +148,7 @@ void DemoKekkai_Init(Actor* thisx, PlayState* play) {
|
||||
this->collider2.dim.height = thisx->scale.y * 5000.0f;
|
||||
this->collider2.dim.yShift = 300;
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
if (TrialsDoneCount() == NUM_TRIALS) {
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
@@ -161,7 +161,7 @@ void DemoKekkai_Init(Actor* thisx, PlayState* play) {
|
||||
case KEKKAI_SHADOW:
|
||||
case KEKKAI_SPIRIT:
|
||||
case KEKKAI_FOREST:
|
||||
if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(trialParamToRandInf(thisx->params))) {
|
||||
if (IS_RANDO && Flags_GetRandomizerInf(trialParamToRandInf(thisx->params))) {
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ void DemoKekkai_TrialBarrierDispel(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
DemoKekkai* this = (DemoKekkai*)thisx;
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
Flags_SetRandomizerInf(trialParamToRandInf(thisx->params));
|
||||
// May or may not be needed. Not sure if needed for anything
|
||||
// that randoInf isn't already covering. Leaving it for safety.
|
||||
|
||||
@@ -254,7 +254,7 @@ void func_8098E960(DemoSa* this, PlayState* play) {
|
||||
|
||||
if ((gSaveContext.chamberCutsceneNum == 0) && (gSaveContext.sceneSetupIndex < 4)) {
|
||||
player = GET_PLAYER(play);
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
this->action = 1;
|
||||
play->csCtx.segment = D_8099010C;
|
||||
gSaveContext.cutsceneTrigger = 2;
|
||||
@@ -821,8 +821,7 @@ void DemoSa_DrawOpa(DemoSa* this, PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
|
||||
DemoSa_OverrideLimbDraw, NULL, &this->actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, skelAnime, DemoSa_OverrideLimbDraw, NULL, &this->actor);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
|
||||
play->nextEntranceIndex = entrances[destinationIdx];
|
||||
|
||||
// In ER, load the correct entrance based on the grotto link is falling into
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
Grotto_OverrideActorEntrance(&this->actor);
|
||||
}
|
||||
|
||||
|
||||
@@ -532,8 +532,7 @@ void DoorKiller_DrawDoor(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
DoorKiller_SetTexture(&this->actor, play);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, NULL);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
void DoorKiller_DrawRubble(Actor* thisx, PlayState* play) {
|
||||
|
||||
@@ -252,7 +252,7 @@ void DoorWarp1_SetupBlueCrystal(DoorWarp1* this, PlayState* play) {
|
||||
-255;
|
||||
}
|
||||
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
play->envCtx.adjFogNear = -500;
|
||||
this->warpTimer = 30;
|
||||
} else {
|
||||
@@ -299,7 +299,7 @@ void DoorWarp1_SetPlayerPos(DoorWarp1* this, PlayState* play) {
|
||||
|
||||
player->actor.velocity.y = 0.0f;
|
||||
player->actor.world.pos.x = this->actor.world.pos.x;
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
player->actor.world.pos.y = this->actor.world.pos.y + 55.0f;
|
||||
} else {
|
||||
player->actor.world.pos.y = this->actor.world.pos.y;
|
||||
@@ -323,7 +323,7 @@ void func_80999214(DoorWarp1* this, PlayState* play) {
|
||||
|
||||
Math_SmoothStepToF(&this->crystalAlpha, 255.0f, 0.2f, 5.0f, 0.1f);
|
||||
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
darkness = (f32)(40 - this->warpTimer) / 40.0f;
|
||||
darkness = CLAMP_MIN(darkness, 0);
|
||||
} else {
|
||||
@@ -366,7 +366,7 @@ void func_80999348(DoorWarp1* this, PlayState* play) {
|
||||
void DoorWarp1_FloatPlayer(DoorWarp1* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!gSaveContext.isBossRush) {
|
||||
if (!IS_BOSS_RUSH) {
|
||||
player->actor.gravity = -0.1f;
|
||||
}
|
||||
}
|
||||
@@ -533,7 +533,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) {
|
||||
if (DoorWarp1_PlayerInRange(this, play)) {
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GivePlayerRandoReward(this, player, play, 0, 0);
|
||||
return;
|
||||
}
|
||||
@@ -573,7 +573,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP);
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN);
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x47A;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
} else {
|
||||
@@ -586,11 +586,11 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_DEKU_TREE_BOSS) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) || gSaveContext.n64ddFlag) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) || IS_RANDO) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP);
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE);
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x0457;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
// Skip Mido complaining about dead Deku tree
|
||||
@@ -609,7 +609,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
|
||||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
|
||||
Entrance_OverrideBlueWarp();
|
||||
}
|
||||
@@ -636,7 +636,7 @@ void DoorWarp1_RutoWarpIdle(DoorWarp1* this, PlayState* play) {
|
||||
|
||||
if (this->rutoWarpState != WARP_BLUE_RUTO_STATE_INITIAL && DoorWarp1_PlayerInRange(this, play)) {
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GivePlayerRandoReward(this, GET_PLAYER(play), play, 1, 0);
|
||||
return;
|
||||
}
|
||||
@@ -670,7 +670,7 @@ void func_80999EE0(DoorWarp1* this, PlayState* play) {
|
||||
Play_CameraSetAtEye(play, sRutoWarpSubCamId, &at, &eye);
|
||||
Play_CameraSetFov(play, sRutoWarpSubCamId, 90.0f);
|
||||
this->rutoWarpState = WARP_BLUE_RUTO_STATE_TALKING;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
Message_StartTextbox(play, 0x4022, NULL);
|
||||
}
|
||||
DoorWarp1_SetupAction(this, func_80999FE4);
|
||||
@@ -707,7 +707,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP);
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x10E;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
} else {
|
||||
@@ -716,7 +716,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
|
||||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
|
||||
Entrance_OverrideBlueWarp();
|
||||
}
|
||||
@@ -761,13 +761,13 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, PlayState* play) {
|
||||
|
||||
if (DoorWarp1_PlayerInRange(this, play)) {
|
||||
// Heal player in Boss Rush
|
||||
if (gSaveContext.isBossRush) {
|
||||
if (IS_BOSS_RUSH) {
|
||||
BossRush_HandleBlueWarpHeal(play);
|
||||
}
|
||||
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GivePlayerRandoReward(this, player, play, 0, 1);
|
||||
return;
|
||||
}
|
||||
@@ -826,14 +826,14 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
this->warpTimer++;
|
||||
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
|
||||
if (gSaveContext.isBossRush) {
|
||||
if (IS_BOSS_RUSH) {
|
||||
BossRush_HandleBlueWarp(play, this->actor.world.pos.x, this->actor.world.pos.z);
|
||||
} else if (play->sceneNum == SCENE_FOREST_TEMPLE_BOSS) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x608;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
} else {
|
||||
@@ -855,7 +855,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP);
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x564;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
// Change Death Mountain cloud since we aren't warping to the cutscene
|
||||
@@ -878,7 +878,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP);
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x60C;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
// Fill Lake Hylia since we aren't warping to the cutscene
|
||||
@@ -898,10 +898,10 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_SPIRIT_TEMPLE_BOSS) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) || gSaveContext.n64ddFlag) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) || IS_RANDO) {
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x610;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
} else {
|
||||
@@ -919,10 +919,10 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_SHADOW_TEMPLE_BOSS) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) || gSaveContext.n64ddFlag) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) || IS_RANDO) {
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
play->nextEntranceIndex = 0x580;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
} else {
|
||||
@@ -941,7 +941,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
|
||||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
|
||||
Entrance_OverrideBlueWarp();
|
||||
}
|
||||
|
||||
@@ -961,7 +961,8 @@ void EnAm_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->textureBlend);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, EnAm_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnAm_PostLimbDraw,
|
||||
this);
|
||||
|
||||
if (this->iceTimer != 0) {
|
||||
this->dyna.actor.colorFilterTimer++;
|
||||
|
||||
@@ -128,7 +128,7 @@ void func_809B0558(EnAni* this, PlayState* play) {
|
||||
}
|
||||
Flags_SetItemGetInf(ITEMGETINF_15);
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
|
||||
@@ -142,7 +142,7 @@ void func_809B05F0(EnAni* this, PlayState* play) {
|
||||
EnAni_SetupAction(this, func_809B0558);
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
|
||||
@@ -338,8 +338,7 @@ void EnAni_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -497,6 +497,6 @@ void EnAnubice_Draw(Actor* thisx, PlayState* play) {
|
||||
EnAnubice* this = (EnAnubice*)thisx;
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnAnubice_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnAnubice_OverrideLimbDraw,
|
||||
EnAnubice_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
@@ -401,6 +401,5 @@ void EnAttackNiw_Draw(Actor* thisx, PlayState* play) {
|
||||
EnAttackNiw* this = (EnAttackNiw*)thisx;
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
func_809B5F98, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, func_809B5F98, NULL, this);
|
||||
}
|
||||
|
||||
@@ -1292,7 +1292,7 @@ void EnBb_Draw(Actor* thisx, PlayState* play) {
|
||||
if (this->moveMode != BBMOVE_HIDDEN) {
|
||||
if (this->actor.params <= ENBB_BLUE) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, EnBb_PostLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnBb_PostLimbDraw,
|
||||
this);
|
||||
|
||||
if (this->fireIceTimer != 0) {
|
||||
|
||||
@@ -892,8 +892,7 @@ void EnBigokuta_Draw(Actor* thisx, PlayState* play) {
|
||||
Matrix_RotateY(-rotY, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnBigokuta_OverrideLimbDraw, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnBigokuta_OverrideLimbDraw, NULL, this);
|
||||
} else {
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280);
|
||||
|
||||
@@ -132,5 +132,5 @@ void EnBird_Update(Actor* thisx, PlayState* play) {
|
||||
void EnBird_Draw(Actor* thisx, PlayState* play) {
|
||||
EnBird* this = (EnBird*)thisx;
|
||||
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
|
||||
this->prizeSelect = gSaveContext.n64ddFlag ? 0 : (s16)Rand_ZeroFloat(4.99f);
|
||||
this->prizeSelect = IS_RANDO ? 0 : (s16)Rand_ZeroFloat(4.99f);
|
||||
this->actor.targetMode = 1;
|
||||
this->actionFunc = EnBomBowMan_SetupWaitAsleep;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
|
||||
// Check for beaten Dodongo's Cavern if Rando is disabled
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) || BREG(2)) {
|
||||
this->actor.textId = 0xBF;
|
||||
} else {
|
||||
@@ -152,7 +152,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
|
||||
|
||||
// In randomizer, only check for bomb bag when bombchus aren't in logic
|
||||
// and only check for bombchus when bombchus are in logic
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
u8 bombchusInLogic = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC);
|
||||
if ((!bombchusInLogic && INV_CONTENT(ITEM_BOMB) == ITEM_NONE) ||
|
||||
(bombchusInLogic && INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE)) {
|
||||
@@ -187,7 +187,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, PlayState* play) {
|
||||
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
|
||||
|
||||
bool bombchuBowlingClosed;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
// when rando'd, check if we have bombchus if chus are in logic
|
||||
// and check if we have a bomb bag if chus aren't in logic
|
||||
u8 explosive = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) ? ITEM_BOMBCHU : ITEM_BOMB;
|
||||
@@ -431,7 +431,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||
} else {
|
||||
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
||||
@@ -444,7 +444,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
|
||||
prizeTemp = EXITEM_BOMBCHUS_BOWLING;
|
||||
break;
|
||||
case 3:
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
||||
if (Flags_GetItemGetInf(ITEMGETINF_12)) {
|
||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||
@@ -577,8 +577,7 @@ void EnBomBowlMan_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTextureIndex]));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnBomBowlMan_OverrideLimbDraw, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnBomBowlMan_OverrideLimbDraw, NULL, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) {
|
||||
this->getItemId = GI_BOMB_BAG_40;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
switch (this->prizeIndex) {
|
||||
case EXITEM_BOMB_BAG_BOWLING:
|
||||
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20);
|
||||
@@ -202,7 +202,7 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) {
|
||||
|
||||
player->stateFlags1 &= ~0x20000000;
|
||||
this->actor.parent = NULL;
|
||||
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
|
||||
@@ -215,7 +215,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actionFunc = EnBomBowlPit_Reset;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
|
||||
@@ -226,7 +226,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) {
|
||||
void EnBomBowlPit_Reset(EnBomBowlPit* this, PlayState* play) {
|
||||
if (((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) &&
|
||||
Message_ShouldAdvance(play)) ||
|
||||
(gSaveContext.n64ddFlag && this->getItemId == GI_ICE_TRAP)) {
|
||||
(IS_RANDO && this->getItemId == GI_ICE_TRAP)) {
|
||||
// "Normal termination"/"completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
if (this->getItemId == GI_HEART_PIECE) {
|
||||
|
||||
@@ -192,7 +192,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
|
||||
SkelAnime_Init(play, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
|
||||
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
this->getItemEntry = Randomizer_GetItemFromActor(this->dyna.actor.id, play->sceneNum, this->dyna.actor.params, this->dyna.actor.params >> 5 & 0x7F);
|
||||
} else {
|
||||
this->getItemEntry = ItemTable_RetrieveEntry(MOD_NONE, this->dyna.actor.params >> 5 & 0x7F);
|
||||
@@ -206,7 +206,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
|
||||
// Delete chests in Boss Rush. Mainly for the chest in King Dodongo's boss room.
|
||||
if (gSaveContext.isBossRush) {
|
||||
if (IS_BOSS_RUSH) {
|
||||
EnBox_SetupAction(this, EnBox_Destroy);
|
||||
}
|
||||
}
|
||||
@@ -448,7 +448,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
|
||||
|
||||
// treasure chest game rando
|
||||
if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
|
||||
if (gSaveContext.n64ddFlag && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
|
||||
if (IS_RANDO && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
|
||||
if((this->dyna.actor.params & 0xF) < 2) {
|
||||
Flags_SetCollectible(play, 0x1B);
|
||||
}
|
||||
@@ -476,7 +476,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
|
||||
|
||||
// RANDOTODO treasure chest game rando
|
||||
if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
|
||||
if (gSaveContext.n64ddFlag && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
|
||||
if (IS_RANDO && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
|
||||
if((this->dyna.actor.params & 0xF) < 2) {
|
||||
if(Flags_GetCollectible(play, 0x1B)) {
|
||||
sItem = blueRupee;
|
||||
@@ -506,7 +506,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
|
||||
}
|
||||
// Chests need to have a negative getItemId in order to not immediately give their item
|
||||
// when approaching.
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
sItem.getItemId = 0 - sItem.getItemId;
|
||||
sItem.getItemFrom = ITEM_FROM_CHEST;
|
||||
GiveItemEntryFromActorWithFixedRange(&this->dyna.actor, play, sItem);
|
||||
@@ -626,8 +626,8 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_SetFocus(&this->dyna.actor, 40.0f);
|
||||
}
|
||||
|
||||
if (((!gSaveContext.n64ddFlag && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
|
||||
(gSaveContext.n64ddFlag && ABS(sItem.getItemId) == RG_ICE_TRAP)) &&
|
||||
if (((!IS_RANDO && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
|
||||
(IS_RANDO && ABS(sItem.getItemId) == RG_ICE_TRAP)) &&
|
||||
this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 && this->iceSmokeTimer < 100) {
|
||||
if (!CVarGetInteger("gAddTraps.enabled", 0)) {
|
||||
EnBox_SpawnIceSmoke(this, play);
|
||||
|
||||
@@ -326,6 +326,5 @@ void EnBrob_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
Matrix_Translate(0.0f, this->unk_1AE, 0.0f, MTXMODE_APPLY);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, EnBrob_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnBrob_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ void EnButte_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (this->drawSkelAnime) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
|
||||
Collider_UpdateSpheres(0, &this->collider);
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
|
||||
EnCow* this = (EnCow*)thisx;
|
||||
s32 pad;
|
||||
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_COWS)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_COWS)) {
|
||||
EnCow_MoveForRandomizer(thisx, play);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ void func_809DF96C(EnCow* this, PlayState* play) {
|
||||
// when randomized with cowsanity, if we haven't gotten the
|
||||
// reward from this cow yet, give that, otherwise use the
|
||||
// vanilla cow behavior
|
||||
if (gSaveContext.n64ddFlag &&
|
||||
if (IS_RANDO &&
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_COWS) &&
|
||||
!EnCow_HasBeenMilked(this, play)) {
|
||||
EnCow_SetCowMilked(this, play);
|
||||
@@ -442,14 +442,12 @@ void EnCow_Draw(Actor* thisx, PlayState* play) {
|
||||
EnCow* this = (EnCow*)thisx;
|
||||
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnCow_OverrideLimbDraw, EnCow_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnCow_OverrideLimbDraw, EnCow_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
void func_809E0070(Actor* thisx, PlayState* play) {
|
||||
EnCow* this = (EnCow*)thisx;
|
||||
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
|
||||
}
|
||||
|
||||
@@ -513,6 +513,5 @@ void EnCrow_Draw(Actor* thisx, PlayState* play) {
|
||||
EnCrow* this = (EnCrow*)thisx;
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnCrow_OverrideLimbDraw, EnCrow_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnCrow_OverrideLimbDraw, EnCrow_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
@@ -469,8 +469,7 @@ void EnCs_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
|
||||
|
||||
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
|
||||
s32 childLinkObjectIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "z_en_daiku.h"
|
||||
#include "overlays/actors/ovl_En_GeldB/z_en_geldb.h"
|
||||
#include "objects/object_daiku/object_daiku.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
|
||||
|
||||
@@ -403,6 +404,7 @@ void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) {
|
||||
this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
|
||||
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] |= EVENTCHKINF_CARPENTERS_FREE_MASK(this->actor.params & 3);
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_CARPENTERS_FREE_INDEX << 4) + (this->actor.params & 3));
|
||||
|
||||
this->actor.gravity = -1.0f;
|
||||
this->escapeSubCamTimer = sEscapeSubCamParams[this->actor.params & 3].maxFramesActive;
|
||||
@@ -602,8 +604,7 @@ void EnDaiku_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255);
|
||||
}
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDaiku_OverrideLimbDraw, EnDaiku_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDaiku_OverrideLimbDraw, EnDaiku_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -559,8 +559,7 @@ void EnDaikuKakariko_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255);
|
||||
}
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDaikuKakariko_OverrideLimbDraw, EnDaikuKakariko_PostLimbDraw, thisx);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDaikuKakariko_OverrideLimbDraw, EnDaikuKakariko_PostLimbDraw, thisx);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -1289,7 +1289,7 @@ void EnDekubaba_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
if (this->actionFunc != EnDekubaba_DeadStickDrop) {
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL,
|
||||
EnDekubaba_PostLimbDraw, this);
|
||||
|
||||
if (this->actionFunc == EnDekubaba_Wait) {
|
||||
|
||||
@@ -535,7 +535,7 @@ void EnDekunuts_Draw(Actor* thisx, PlayState* play) {
|
||||
if (this->actor.params == DEKUNUTS_FLOWER) {
|
||||
Gfx_DrawDListOpa(play, gDekuNutsFlowerDL);
|
||||
} else {
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDekunuts_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDekunuts_OverrideLimbDraw,
|
||||
NULL, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,6 +463,5 @@ void EnDha_Draw(Actor* thisx, PlayState* play) {
|
||||
EnDha* this = (EnDha*)thisx;
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDha_OverrideLimbDraw, EnDha_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDha_OverrideLimbDraw, EnDha_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ void func_809EEA00(EnDivingGame* this, PlayState* play) {
|
||||
if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actor.parent = NULL;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
|
||||
@@ -470,7 +470,7 @@ void func_809EEA90(EnDivingGame* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actionFunc = func_809EEAF8;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
|
||||
@@ -578,7 +578,6 @@ void EnDivingGame_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, EnDivingGame_EmptyDList(play->state.gfxCtx));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDivingGame_OverrideLimbDraw, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDivingGame_OverrideLimbDraw, NULL, this);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ void EnDns_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.gravity = -1.0f;
|
||||
this->actor.textId = D_809F040C[this->actor.params];
|
||||
this->dnsItemEntry = sItemEntries[this->actor.params];
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
// Ugly, but the best way we can identify which grotto we are in, same method 3DRando uses, but we'll need to account for entrance rando
|
||||
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
|
||||
this->scrubIdentity = Randomizer_IdentifyScrub(play->sceneNum, this->actor.params, respawnData);
|
||||
@@ -412,7 +412,7 @@ void EnDns_Talk(EnDns* this, PlayState* play) {
|
||||
|
||||
void func_809EFDD0(EnDns* this, PlayState* play) {
|
||||
u16 pendingGetItemId;
|
||||
if (!gSaveContext.n64ddFlag || !this->scrubIdentity.isShuffled) {
|
||||
if (!IS_RANDO || !this->scrubIdentity.isShuffled) {
|
||||
if (this->actor.params == 0x9) {
|
||||
if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
|
||||
pendingGetItemId = GI_STICK_UPGRADE_20;
|
||||
@@ -533,7 +533,7 @@ void EnDns_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->dustTimer++;
|
||||
this->actor.textId = D_809F040C[this->actor.params];
|
||||
if (gSaveContext.n64ddFlag && this->scrubIdentity.isShuffled) {
|
||||
if (IS_RANDO && this->scrubIdentity.isShuffled) {
|
||||
this->actor.textId = 0x9000 + (this->scrubIdentity.randomizerInf - RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT);
|
||||
}
|
||||
Actor_SetFocus(&this->actor, 60.0f);
|
||||
@@ -554,6 +554,5 @@ void EnDns_Draw(Actor* thisx, PlayState* play) {
|
||||
EnDns* this = (EnDns*)thisx;
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, &this->actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, &this->actor);
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
|
||||
this->judgeTimer = 0;
|
||||
}
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
switch (Player_GetMask(play)) {
|
||||
case PLAYER_MASK_SKULL:
|
||||
|
||||
@@ -437,7 +437,7 @@ void EnDntJiji_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
Matrix_Push();
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(blinkTex[this->eyeState]));
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->flowerPos.x, this->flowerPos.y, this->flowerPos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
@@ -252,7 +252,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
|
||||
if (!LINK_IS_ADULT && !Flags_GetItemGetInf(ITEMGETINF_1D)) {
|
||||
this->hitCounter++;
|
||||
if (this->hitCounter >= 3) {
|
||||
if(gSaveContext.n64ddFlag) {
|
||||
if(IS_RANDO) {
|
||||
this->actionFunc = EnDntNomal_TargetGivePrize;
|
||||
} else {
|
||||
OnePointCutscene_Init(play, 4140, -99, &this->actor, MAIN_CAM);
|
||||
@@ -862,7 +862,7 @@ void EnDntNomal_DrawStageScrub(Actor* thisx, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(blinkTex[this->eyeState]));
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDntNomal_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDntNomal_OverrideLimbDraw,
|
||||
EnDntNomal_PostLimbDraw, this);
|
||||
Matrix_Translate(this->flowerPos.x, this->flowerPos.y, this->flowerPos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
@@ -883,7 +883,7 @@ void EnDntNomal_DrawTargetScrub(Actor* thisx, PlayState* play) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, EnDntNomal_PostLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnDntNomal_PostLimbDraw,
|
||||
this);
|
||||
Matrix_Translate(this->flowerPos.x, this->flowerPos.y, this->flowerPos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
@@ -648,7 +648,8 @@ void EnDodojr_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
if ((this->actionFunc != func_809F73AC) && (this->actionFunc != func_809F7BE4)) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, func_809F7D50, func_809F7DFC,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, func_809F7D50,
|
||||
func_809F7DFC,
|
||||
&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -923,7 +923,7 @@ void EnDodongo_Draw(Actor* thisx, PlayState* play2) {
|
||||
s32 index;
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDodongo_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDodongo_OverrideLimbDraw,
|
||||
EnDodongo_PostLimbDraw, this);
|
||||
|
||||
if (this->iceTimer != 0) {
|
||||
|
||||
@@ -515,8 +515,7 @@ void EnDog_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g,
|
||||
colors[this->actor.params & 0xF].b, 0);
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDog_OverrideLimbDraw, EnDog_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDog_OverrideLimbDraw, EnDog_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,8 @@ void EnDoor_Draw(Actor* thisx, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDoor_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
|
||||
EnDoor_OverrideLimbDraw,
|
||||
NULL, &this->actor);
|
||||
if (this->actor.world.rot.y != 0) {
|
||||
if (this->actor.world.rot.y > 0) {
|
||||
|
||||
@@ -96,7 +96,7 @@ void EnDs_GiveOddPotion(EnDs* this, PlayState* play) {
|
||||
gSaveContext.timer2State = 0;
|
||||
} else {
|
||||
u32 itemId = GI_ODD_POTION;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_ODD_MUSHROOM, GI_ODD_POTION);
|
||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
|
||||
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_MUSHROOM);
|
||||
@@ -111,7 +111,7 @@ void EnDs_TalkAfterBrewOddPotion(EnDs* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = EnDs_GiveOddPotion;
|
||||
u32 itemId = GI_ODD_POTION;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_ODD_MUSHROOM, GI_ODD_POTION);
|
||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
|
||||
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_MUSHROOM);
|
||||
@@ -138,7 +138,7 @@ void EnDs_BrewOddPotion2(EnDs* this, PlayState* play) {
|
||||
this->brewTimer -= 1;
|
||||
} else {
|
||||
this->actionFunc = EnDs_BrewOddPotion3;
|
||||
this->brewTimer = gSaveContext.n64ddFlag ? 0 : 60;
|
||||
this->brewTimer = IS_RANDO ? 0 : 60;
|
||||
Flags_UnsetSwitch(play, 0x3F);
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ void EnDs_BrewOddPotion1(EnDs* this, PlayState* play) {
|
||||
this->brewTimer -= 1;
|
||||
} else {
|
||||
this->actionFunc = EnDs_BrewOddPotion2;
|
||||
this->brewTimer = gSaveContext.n64ddFlag ? 0 : 20;
|
||||
this->brewTimer = IS_RANDO ? 0 : 20;
|
||||
}
|
||||
|
||||
Math_StepToF(&this->unk_1E4, 1.0f, 0.01f);
|
||||
@@ -162,7 +162,7 @@ void EnDs_OfferOddPotion(EnDs* this, PlayState* play) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
this->actionFunc = EnDs_BrewOddPotion1;
|
||||
this->brewTimer = gSaveContext.n64ddFlag ? 0 : 60;
|
||||
this->brewTimer = IS_RANDO ? 0 : 60;
|
||||
Flags_SetSwitch(play, 0x3F);
|
||||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
player->exchangeItemId = EXCH_ITEM_NONE;
|
||||
@@ -175,7 +175,7 @@ void EnDs_OfferOddPotion(EnDs* this, PlayState* play) {
|
||||
}
|
||||
|
||||
u8 EnDs_RandoCanGetGrannyItem() {
|
||||
return gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
return IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_GRANNYS_SHOP) &&
|
||||
// Traded odd mushroom when adult trade is on
|
||||
((Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) && Flags_GetItemGetInf(ITEMGETINF_30)) ||
|
||||
@@ -263,7 +263,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
|
||||
this->actionFunc = EnDs_OfferOddPotion;
|
||||
} else if (
|
||||
// Always offer blue potion when adult trade is off
|
||||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
|
||||
(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
|
||||
Flags_GetItemGetInf(ITEMGETINF_30)) { // Traded odd mushroom
|
||||
player->actor.textId = 0x500C;
|
||||
this->actionFunc = EnDs_OfferBluePotion;
|
||||
@@ -328,6 +328,5 @@ void EnDs_Draw(Actor* thisx, PlayState* play) {
|
||||
EnDs* this = (EnDs*)thisx;
|
||||
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDs_OverrideLimbDraw, EnDs_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDs_OverrideLimbDraw, EnDs_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
EnDu_SetupAction(this, func_809FE3C0);
|
||||
} else if (play->msgCtx.ocarinaMode >= OCARINA_MODE_06) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
@@ -442,8 +442,8 @@ void func_809FE890(EnDu* this, PlayState* play) {
|
||||
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
|
||||
CsCmdActorAction* csAction;
|
||||
|
||||
if (play->csCtx.state == CS_STATE_IDLE || gSaveContext.n64ddFlag) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (play->csCtx.state == CS_STATE_IDLE || IS_RANDO) {
|
||||
if (IS_RANDO) {
|
||||
play->csCtx.state = CS_STATE_IDLE;
|
||||
}
|
||||
func_8002DF54(play, &this->actor, 1);
|
||||
@@ -518,9 +518,9 @@ void func_809FEB08(EnDu* this, PlayState* play) {
|
||||
EnDu_SetupAction(this, func_809FE3C0);
|
||||
return;
|
||||
}
|
||||
if ((!gSaveContext.n64ddFlag && CUR_UPG_VALUE(UPG_STRENGTH) <= 0) ||
|
||||
(gSaveContext.n64ddFlag && !Flags_GetTreasure(play, 0x1E))) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if ((!IS_RANDO && CUR_UPG_VALUE(UPG_STRENGTH) <= 0) ||
|
||||
(IS_RANDO && !Flags_GetTreasure(play, 0x1E))) {
|
||||
if (IS_RANDO) {
|
||||
Flags_SetTreasure(play, 0x1E);
|
||||
}
|
||||
this->actor.textId = 0x301C;
|
||||
@@ -548,7 +548,7 @@ void func_809FEC70(EnDu* this, PlayState* play) {
|
||||
EnDu_SetupAction(this, func_809FECE4);
|
||||
} else {
|
||||
f32 xzRange = this->actor.xzDistToPlayer + 1.0f;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_DARUNIAS_JOY, GI_BRACELET);
|
||||
|
||||
@@ -137,7 +137,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
|
||||
onCounter = true;
|
||||
case EXITEM_BOMB_BAG_BOWLING:
|
||||
this->unk_17C = func_8002EBCC;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
this->giDrawId =
|
||||
Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20).gid;
|
||||
} else {
|
||||
@@ -150,7 +150,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
|
||||
this->actionFunc = EnExItem_BowlPrize;
|
||||
} else {
|
||||
this->actionFunc = EnExItem_SetupBowlCounter;
|
||||
this->actor.shape.yOffset = gSaveContext.n64ddFlag ? -10.0f : -18.0f;
|
||||
this->actor.shape.yOffset = IS_RANDO ? -10.0f : -18.0f;
|
||||
}
|
||||
break;
|
||||
case EXITEM_HEART_PIECE_COUNTER:
|
||||
@@ -172,7 +172,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
|
||||
onCounter = true;
|
||||
case EXITEM_BOMBCHUS_BOWLING:
|
||||
this->unk_17C = func_8002EBCC;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
this->giDrawId = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10).gid;
|
||||
} else {
|
||||
this->giDrawId = GID_BOMBCHU;
|
||||
@@ -228,7 +228,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
|
||||
this->scale = 0.5f;
|
||||
this->unkFloat = 0.5f;
|
||||
this->actor.velocity.y = 10.0f;
|
||||
if (!gSaveContext.n64ddFlag || !Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
|
||||
if (!IS_RANDO || !Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
|
||||
switch (this->type) {
|
||||
case EXITEM_GREEN_RUPEE_CHEST:
|
||||
this->giDrawId = GID_RUPEE_GREEN;
|
||||
@@ -376,7 +376,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, -0x4000, 5, 0x1000, 0);
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag && this->timer != 0) {
|
||||
if (!IS_RANDO && this->timer != 0) {
|
||||
if (this->prizeRotateTimer != 0) {
|
||||
tmpf1 = play->view.lookAt.x - play->view.eye.x;
|
||||
tmpf2 = play->view.lookAt.y - 10.0f - play->view.eye.y;
|
||||
@@ -402,7 +402,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
|
||||
this->actor.draw = NULL;
|
||||
func_8002DF54(play, NULL, 7);
|
||||
this->actor.parent = NULL;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GET_PLAYER(play)->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD);
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
@@ -414,7 +414,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 2000.0f, 1000.0f);
|
||||
@@ -427,7 +427,7 @@ void EnExItem_TargetPrizeGive(EnExItem* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actionFunc = EnExItem_TargetPrizeFinish;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
s32 getItemId = (CUR_UPG_VALUE(UPG_BULLET_BAG) == 2) ? GI_BULLET_BAG_50 : GI_BULLET_BAG_40;
|
||||
func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
@@ -510,7 +510,7 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) {
|
||||
}
|
||||
if (this) {}
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry randoGetItem = (GetItemEntry)GET_ITEM_NONE;
|
||||
switch (this->type) {
|
||||
case EXITEM_BOMB_BAG_BOWLING:
|
||||
@@ -539,7 +539,7 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) {
|
||||
void EnExItem_DrawHeartPiece(EnExItem* this, PlayState* play) {
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry randoGetItem =
|
||||
Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem);
|
||||
|
||||
@@ -764,7 +764,6 @@ void EnFish_Draw(Actor* thisx, PlayState* play) {
|
||||
EnFish* this = (EnFish*)thisx;
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, NULL);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
|
||||
Collider_UpdateSpheres(0, &this->collider);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "vt.h"
|
||||
#include "objects/object_fr/object_fr.h"
|
||||
#include <assert.h>
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA)
|
||||
|
||||
@@ -103,6 +104,17 @@ static u16 sSongIndex[] = {
|
||||
0x0002, 0x0004, 0x0010, 0x0008, 0x0020, 0x0040, 0x0001, 0x0000,
|
||||
};
|
||||
|
||||
static u16 sSongIndexShift[] = {
|
||||
EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT,
|
||||
EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT,
|
||||
EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT,
|
||||
EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT,
|
||||
EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT,
|
||||
EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT,
|
||||
EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT,
|
||||
0x0, // FROG_NO_SONG
|
||||
};
|
||||
|
||||
// Frog to Index for Song Flag (sSongIndex) Mapping
|
||||
static u8 sFrogToSongIndex[] = {
|
||||
FROG_SARIA, FROG_SUNS, FROG_SOT, FROG_ZL, FROG_EPONA,
|
||||
@@ -955,7 +967,8 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
|
||||
if ((songIndex >= FROG_ZL) && (songIndex <= FROG_SOT)) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
|
||||
if (!IS_RANDO) {
|
||||
this->reward = GI_RUPEE_PURPLE;
|
||||
} else {
|
||||
this->getItemEntry = Randomizer_GetItemFromKnownCheck(EnFr_RandomizerCheckFromSongIndex(songIndex), GI_RUPEE_PURPLE);
|
||||
@@ -967,7 +980,8 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
|
||||
} else if (songIndex == FROG_STORMS) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
|
||||
if (!IS_RANDO) {
|
||||
this->reward = GI_HEART_PIECE;
|
||||
} else {
|
||||
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_FROGS_IN_THE_RAIN, GI_HEART_PIECE);
|
||||
@@ -979,7 +993,8 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
|
||||
} else if (songIndex == FROG_CHOIR_SONG) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
|
||||
if (!IS_RANDO) {
|
||||
this->reward = GI_HEART_PIECE;
|
||||
} else {
|
||||
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_FROGS_OCARINA_GAME, GI_HEART_PIECE);
|
||||
@@ -1034,7 +1049,7 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) {
|
||||
this->actionFunc = EnFr_Idle;
|
||||
} else {
|
||||
this->actionFunc = EnFr_GiveReward;
|
||||
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 30.0f, 100.0f);
|
||||
@@ -1047,7 +1062,7 @@ void EnFr_GiveReward(EnFr* this, PlayState* play) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnFr_SetIdle;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 30.0f, 100.0f);
|
||||
@@ -1056,7 +1071,7 @@ void EnFr_GiveReward(EnFr* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnFr_SetIdle(EnFr* this, PlayState* play) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || (gSaveContext.n64ddFlag && this->reward == RG_ICE_TRAP)) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || (IS_RANDO && this->reward == RG_ICE_TRAP)) {
|
||||
this->actionFunc = EnFr_Idle;
|
||||
}
|
||||
}
|
||||
@@ -1115,13 +1130,13 @@ void EnFr_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, sEnFrColor[frogIndex].r, sEnFrColor[frogIndex].g, sEnFrColor[frogIndex].b, 255);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnFr_OverrideLimbDraw, EnFr_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnFr_OverrideLimbDraw, EnFr_PostLimbDraw, this);
|
||||
if (this->isButterflyDrawn) {
|
||||
Matrix_Translate(this->posButterfly.x, this->posButterfly.y, this->posButterfly.z, MTXMODE_NEW);
|
||||
Matrix_Scale(0.015f, 0.015f, 0.015f, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
SkelAnime_DrawOpa(play, this->skelAnimeButterfly.skeleton, this->skelAnimeButterfly.jointTable, NULL, NULL,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeButterfly, NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -172,7 +172,7 @@ void func_80A1DB60(EnFu* this, PlayState* play) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
this->actionFunc = func_WaitForSongGive;
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ void func_80A1DBA0(EnFu* this, PlayState* play) {
|
||||
void func_80A1DBD4(EnFu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (gSaveContext.n64ddFlag && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
|
||||
if (IS_RANDO && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void func_80A1DBD4(EnFu* this, PlayState* play) {
|
||||
this->actionFunc = func_80A1DB60;
|
||||
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
||||
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
Item_Give(play, ITEM_SONG_STORMS);
|
||||
@@ -249,7 +249,7 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) {
|
||||
} else if (player->stateFlags2 & 0x1000000) {
|
||||
this->actor.textId = 0x5035;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->actionFunc = gSaveContext.n64ddFlag ? func_80A1DBD4 : EnFu_TeachSong;
|
||||
this->actionFunc = IS_RANDO ? func_80A1DBD4 : EnFu_TeachSong;
|
||||
this->behaviorFlags |= FU_WAIT;
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||
this->actionFunc = func_80A1DBA0;
|
||||
@@ -332,8 +332,7 @@ void EnFu_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->facialExpression]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthSegments[this->facialExpression]));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,
|
||||
EnFu_OverrideLimbDraw, EnFu_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelanime, EnFu_OverrideLimbDraw, EnFu_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -406,8 +406,7 @@ void EnFw_Draw(Actor* thisx, PlayState* play) {
|
||||
EnFw_DrawDust(this, play);
|
||||
Matrix_Pop();
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnFw_OverrideLimbDraw, EnFw_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnFw_OverrideLimbDraw, EnFw_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
void EnFw_AddDust(EnFw* this, Vec3f* initialPos, Vec3f* initialSpeed, Vec3f* accel, u8 initialTimer, f32 scale,
|
||||
|
||||
@@ -359,7 +359,7 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
|
||||
|
||||
void func_80A2FB40(EnGb* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
|
||||
@@ -374,7 +374,7 @@ void func_80A2FBB0(EnGb* this, PlayState* play) {
|
||||
this->dyna.actor.parent = NULL;
|
||||
this->actionFunc = func_80A2FC0C;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
|
||||
@@ -451,8 +451,7 @@ void EnGb_Draw(Actor* thisx, PlayState* play) {
|
||||
Lights_PointNoGlowSetInfo(&this->lightInfo, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, this->lightColor.r, this->lightColor.g, this->lightColor.b,
|
||||
this->lightColor.a);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, &this->dyna.actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, &this->dyna.actor);
|
||||
EnGb_DrawCagedSouls(this, play);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
|
||||
EnGe1* this = (EnGe1*)thisx;
|
||||
|
||||
// When spawning the gate operator, also spawn an extra gate operator on the wasteland side
|
||||
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) ||
|
||||
if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) ||
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) && (this->actor.params & 0xFF) == GE1_TYPE_GATE_OPERATOR) {
|
||||
// Spawn the extra gaurd with params matching the custom type added (0x0300 + 0x02)
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_GE1, -1358.0f, 88.0f, -3018.0f, 0, 0x95B0, 0,
|
||||
@@ -185,7 +185,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (EnGe1_CheckCarpentersFreed()) {
|
||||
// If the gtg gate is permanently open, don't let the gaurd charge to open it again
|
||||
if (gSaveContext.n64ddFlag && gSaveContext.sceneFlags[93].swch & 0x00000004) {
|
||||
if (IS_RANDO && gSaveContext.sceneFlags[93].swch & 0x00000004) {
|
||||
this->actionFunc = EnGe1_SetNormalText;
|
||||
} else {
|
||||
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
|
||||
@@ -235,7 +235,7 @@ void EnGe1_SetAnimationIdle(EnGe1* this) {
|
||||
}
|
||||
|
||||
s32 EnGe1_CheckCarpentersFreed(void) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_GERUDO_CARD)) {
|
||||
return 1;
|
||||
} else {
|
||||
@@ -269,7 +269,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) {
|
||||
play->nextEntranceIndex = 0x3B4;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
Entrance_OverrideGeurdoGuardCapture();
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
|
||||
s32 getItemId;
|
||||
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
if (gSaveContext.n64ddFlag && gSaveContext.minigameScore >= 1500 && !Flags_GetInfTable(INFTABLE_190)) {
|
||||
if (IS_RANDO && gSaveContext.minigameScore >= 1500 && !Flags_GetInfTable(INFTABLE_190)) {
|
||||
Flags_SetItemGetInf(ITEMGETINF_0F);
|
||||
Flags_SetInfTable(INFTABLE_190);
|
||||
this->stateFlags |= GE1_STATE_GIVE_QUIVER;
|
||||
@@ -549,7 +549,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
|
||||
}
|
||||
} else {
|
||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
switch (CUR_UPG_VALUE(UPG_QUIVER)) {
|
||||
//! @bug Asschest. See next function for details
|
||||
case 1:
|
||||
@@ -564,7 +564,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
getItemId = GI_HEART_PIECE;
|
||||
} else {
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
|
||||
@@ -572,7 +572,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
|
||||
@@ -590,7 +590,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
switch (CUR_UPG_VALUE(UPG_QUIVER)) {
|
||||
//! @bug Asschest. See next function for details
|
||||
case 1:
|
||||
@@ -605,7 +605,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
getItemId = GI_HEART_PIECE;
|
||||
} else {
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
|
||||
@@ -613,7 +613,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
|
||||
@@ -880,8 +880,7 @@ void EnGe1_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnGe1_OverrideLimbDraw, EnGe1_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGe1_OverrideLimbDraw, EnGe1_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ s32 Ge2_DetectPlayerInUpdate(PlayState* play, EnGe2* this, Vec3f* pos, s16 yRot,
|
||||
}
|
||||
|
||||
s32 EnGe2_CheckCarpentersFreed(void) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_GERUDO_CARD)) {
|
||||
return 1;
|
||||
} else {
|
||||
@@ -259,7 +259,7 @@ void EnGe2_CaptureClose(EnGe2* this, PlayState* play) {
|
||||
play->nextEntranceIndex = 0x3B4;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
Entrance_OverrideGeurdoGuardCapture();
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ void EnGe2_CaptureCharge(EnGe2* this, PlayState* play) {
|
||||
play->nextEntranceIndex = 0x3B4;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
Entrance_OverrideGeurdoGuardCapture();
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnGe2_SetActionAfterTalk;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
@@ -485,7 +485,7 @@ void EnGe2_GiveCard(EnGe2* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
||||
this->actionFunc = EnGe2_WaitTillCardGiven;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
@@ -683,8 +683,7 @@ void EnGe2_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnGe2_OverrideLimbDraw, EnGe2_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGe2_OverrideLimbDraw, EnGe2_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnGe3_Wait;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
@@ -158,7 +158,7 @@ void EnGe3_GiveCard(EnGe3* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
||||
this->actionFunc = EnGe3_WaitTillCardGiven;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
@@ -303,8 +303,7 @@ void EnGe3_Draw(Actor* thisx, PlayState* play2) {
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnGe3_OverrideLimbDraw, EnGe3_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,EnGe3_OverrideLimbDraw, EnGe3_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -1575,7 +1575,7 @@ void EnGeldB_Draw(Actor* thisx, PlayState* play) {
|
||||
play->nextEntranceIndex = 0x3B4;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
Entrance_OverrideGeurdoGuardCapture();
|
||||
}
|
||||
|
||||
@@ -1588,8 +1588,7 @@ void EnGeldB_Draw(Actor* thisx, PlayState* play) {
|
||||
if ((this->action != GELDB_WAIT) || !this->invisible) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->blinkState]));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
|
||||
if (this->action == GELDB_BLOCK) {
|
||||
s32 i;
|
||||
Vec3f blockTrisVtx0[3];
|
||||
|
||||
@@ -416,7 +416,7 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF) {
|
||||
if (!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF) {
|
||||
this->objBankIndex = Object_GetIndex(&play->objectCtx, shopItemEntries[params].objID);
|
||||
} else {
|
||||
s16 objectId = shopItemEntries[params].objID;
|
||||
@@ -474,7 +474,7 @@ s32 EnGirlA_CanBuy_Arrows(PlayState* play, EnGirlA* this) {
|
||||
}
|
||||
|
||||
s32 EnGirlA_CanBuy_Bombs(PlayState* play, EnGirlA* this) {
|
||||
if (!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
if (!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (AMMO(ITEM_BOMB) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
|
||||
@@ -605,7 +605,7 @@ s32 EnGirlA_CanBuy_DekuShield(PlayState* play, EnGirlA* this) {
|
||||
|
||||
s32 EnGirlA_CanBuy_GoronTunic(PlayState* play, EnGirlA* this) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD &&
|
||||
(!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
|
||||
(!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gBitFlags[9] & gSaveContext.inventory.equipment) {
|
||||
@@ -622,7 +622,7 @@ s32 EnGirlA_CanBuy_GoronTunic(PlayState* play, EnGirlA* this) {
|
||||
|
||||
s32 EnGirlA_CanBuy_ZoraTunic(PlayState* play, EnGirlA* this) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD &&
|
||||
(!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
|
||||
(!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gBitFlags[10] & gSaveContext.inventory.equipment) {
|
||||
@@ -678,7 +678,7 @@ s32 EnGirlA_CanBuy_Unk20(PlayState* play, EnGirlA* this) {
|
||||
s32 EnGirlA_CanBuy_Bombchus(PlayState* play, EnGirlA* this) {
|
||||
// When in rando, don't allow buying bombchus when the player doesn't have required explosives
|
||||
// If bombchus are in logic, the player needs to have bombchus; otherwise they need a bomb bag
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
u8 bombchusInLogic = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC);
|
||||
if ((!bombchusInLogic && CUR_CAPACITY(UPG_BOMB_BAG) == 0) ||
|
||||
(bombchusInLogic && INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE)) {
|
||||
@@ -1027,7 +1027,7 @@ void EnGirlA_BuyEvent_ObtainBombchuPack(PlayState* play, EnGirlA* this) {
|
||||
|
||||
// Normally, buying a bombchu pack sets a flag indicating the pack is now sold out
|
||||
// If they're in logic for rando, skip setting that flag so they can be purchased repeatedly
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1254,7 +1254,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
|
||||
this->itemGiveFunc = itemEntry->itemGiveFunc;
|
||||
this->buyEventFunc = itemEntry->buyEventFunc;
|
||||
// If chus are in logic, make the 10 pack affordable without a wallet upgrade
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) &&
|
||||
this->getItemId == GI_BOMBCHUS_10) {
|
||||
this->basePrice = 99;
|
||||
} else {
|
||||
|
||||
@@ -96,7 +96,7 @@ void EnGm_Destroy(Actor* thisx, PlayState* play) {
|
||||
s32 func_80A3D7C8(void) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
return 0;
|
||||
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
|
||||
} else if ((IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
return 1;
|
||||
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) { // Don't have giant's knife
|
||||
@@ -215,7 +215,7 @@ void func_80A3DC44(EnGm* this, PlayState* play) {
|
||||
return;
|
||||
case 1:
|
||||
Flags_SetInfTable(INFTABLE_B1);
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
//Resets "Talked to Medigoron" flag in infTable to restore initial conversation state
|
||||
Flags_UnsetInfTable(INFTABLE_B1);
|
||||
@@ -256,7 +256,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
||||
} else {
|
||||
GetItemEntry itemEntry;
|
||||
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||
@@ -281,7 +281,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
||||
|
||||
void func_80A3DF00(EnGm* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||
}
|
||||
@@ -289,7 +289,7 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80A3DF60;
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||
@@ -362,8 +362,7 @@ void EnGm_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, &this->actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, &this->actor);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
||||
|
||||
switch (thisx->params & 0xF0) {
|
||||
case 0x90:
|
||||
if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
|
||||
if (!IS_RANDO && gSaveContext.bgsFlag) {
|
||||
return 0x305E;
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
|
||||
if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
|
||||
@@ -113,8 +113,8 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
||||
return 0x3053;
|
||||
}
|
||||
case 0x00:
|
||||
if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
|
||||
if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
|
||||
if (Flags_GetInfTable(INFTABLE_10F)) {
|
||||
return 0x3042;
|
||||
} else {
|
||||
@@ -859,7 +859,7 @@ void func_80A405CC(EnGo* this, PlayState* play) {
|
||||
|
||||
void EnGo_BiggoronActionFunc(EnGo* this, PlayState* play) {
|
||||
if (((this->actor.params & 0xF0) == 0x90) && (this->interactInfo.talkState == NPC_TALK_STATE_ACTION)) {
|
||||
if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
|
||||
if (!IS_RANDO && gSaveContext.bgsFlag) {
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {
|
||||
@@ -958,7 +958,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
|
||||
this->unk_20C = 0;
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
getItemId = GI_SWORD_BGS;
|
||||
} else {
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS);
|
||||
@@ -967,7 +967,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
|
||||
this->unk_20C = 1;
|
||||
}
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_EYEDROPS, GI_CLAIM_CHECK);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
Randomizer_ConsumeAdultTradeItem(play, ITEM_EYEDROPS);
|
||||
@@ -976,7 +976,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_SWORD_BROKEN) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_BROKEN_SWORD, GI_PRESCRIPTION);
|
||||
Randomizer_ConsumeAdultTradeItem(play, ITEM_SWORD_BROKEN);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
@@ -992,7 +992,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
|
||||
|
||||
yDist = fabsf(this->actor.yDistToPlayer) + 1.0f;
|
||||
xzDist = this->actor.xzDistToPlayer + 1.0f;
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, getItemId, xzDist, yDist);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, getItemEntry, xzDist, yDist);
|
||||
@@ -1166,8 +1166,7 @@ void EnGo_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGoronCsEyeOpenTex));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnGo_OverrideLimbDraw, EnGo_PostLimbDraw, &this->actor);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGo_OverrideLimbDraw, EnGo_PostLimbDraw, &this->actor);
|
||||
EnGo_DrawDust(this, play);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -335,7 +335,7 @@ u16 EnGo2_GoronFireGenericGetTextId(EnGo2* this) {
|
||||
u16 EnGo2_GetTextIdGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
||||
if (Flags_GetInfTable(INFTABLE_11E)) {
|
||||
return 0x3013;
|
||||
} else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || gSaveContext.n64ddFlag) && this->waypoint > 7 && this->waypoint < 12) {
|
||||
} else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || IS_RANDO) && this->waypoint > 7 && this->waypoint < 12) {
|
||||
return 0x3012;
|
||||
} else {
|
||||
return 0x3011;
|
||||
@@ -350,7 +350,7 @@ s16 EnGo2_UpdateTalkStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
if (this->actor.textId == 0x3012) {
|
||||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
if(!gSaveContext.n64ddFlag) {
|
||||
if(!IS_RANDO) {
|
||||
EnGo2_GetItem(this, play, CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30);
|
||||
} else {
|
||||
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_GC_ROLLING_GORON_AS_CHILD, GI_BOMB_BAG_40));
|
||||
@@ -416,11 +416,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
|
||||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
||||
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
return 0x3043;
|
||||
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE) ? 0x3021 : Flags_GetInfTable(INFTABLE_E0) ? 0x302A : 0x3008;
|
||||
@@ -439,11 +439,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
||||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityEntrance(PlayState* play, EnGo2* this) {
|
||||
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
return 0x3043;
|
||||
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return Flags_GetInfTable(INFTABLE_F0) ? 0x3015 : 0x3014;
|
||||
@@ -462,11 +462,11 @@ s16 EnGo2_UpdateTalkStateGoronCityEntrance(PlayState* play, EnGo2* this) {
|
||||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityIsland(PlayState* play, EnGo2* this) {
|
||||
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
return 0x3043;
|
||||
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return Flags_GetInfTable(INFTABLE_F4) ? 0x3017 : 0x3016;
|
||||
@@ -485,11 +485,11 @@ s16 EnGo2_UpdateTalkStateGoronCityIsland(PlayState* play, EnGo2* this) {
|
||||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
||||
if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
return 0x3043;
|
||||
} else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
} else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
|
||||
(IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
|
||||
@@ -513,7 +513,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
||||
u16 EnGo2_GetTextIdGoronCityLink(PlayState* play, EnGo2* this) {
|
||||
// For rando, prioritize opening the doors in GC when Link the goron has been stopped when
|
||||
// the doors are not opened, otherwise let him talk about the DMC exit or that gorons are saved
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
if (!Flags_GetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING)) {
|
||||
return 0x3030;
|
||||
} else if (!Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
||||
@@ -543,7 +543,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x3036:
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
EnGo2_GetItem(this, play, GI_TUNIC_GORON);
|
||||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
@@ -605,7 +605,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
|
||||
u16 EnGo2_GetTextIdGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
|
||||
if (!IS_RANDO && gSaveContext.bgsFlag) {
|
||||
player->exchangeItemId = EXCH_ITEM_CLAIM_CHECK;
|
||||
return 0x305E;
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
|
||||
@@ -627,11 +627,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
||||
switch (EnGo2_GetDialogState(this, play)) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (this->actor.textId == 0x305E) {
|
||||
if((!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) || (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F))) {
|
||||
if((!IS_RANDO && gSaveContext.bgsFlag) || (IS_RANDO && Flags_GetTreasure(play, 0x1F))) {
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
|
||||
if(gSaveContext.n64ddFlag) {
|
||||
if(IS_RANDO) {
|
||||
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS));
|
||||
Flags_SetTreasure(play, 0x1F);
|
||||
} else {
|
||||
@@ -663,7 +663,7 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
if ((this->actor.textId == 0x3054) || (this->actor.textId == 0x3055)) {
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_BROKEN_SWORD, GI_PRESCRIPTION);
|
||||
Randomizer_ConsumeAdultTradeItem(play, ITEM_SWORD_BROKEN);
|
||||
EnGo2_GetItemEntry(this, play, getItemEntry);
|
||||
@@ -1070,7 +1070,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
||||
u16 textId;
|
||||
|
||||
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
|
||||
if ((!gSaveContext.n64ddFlag && gSaveContext.bgsFlag)) {
|
||||
if ((!IS_RANDO && gSaveContext.bgsFlag)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||
this->actor.textId = 0x3003;
|
||||
} else {
|
||||
@@ -1080,7 +1080,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
||||
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||
if (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F)) {
|
||||
if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
|
||||
textId = 0x3003;
|
||||
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
|
||||
textId = 0x305E;
|
||||
@@ -1089,7 +1089,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
||||
}
|
||||
this->actor.textId = textId;
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F)) {
|
||||
if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
|
||||
textId = 0x305E;
|
||||
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
|
||||
textId = 0x3002;
|
||||
@@ -1219,8 +1219,8 @@ s32 EnGo2_IsCameraModified(EnGo2* this, PlayState* play) {
|
||||
(this->actor.params & 0x1F) == GORON_CITY_STAIRWELL || (this->actor.params & 0x1F) == GORON_DMT_BIGGORON ||
|
||||
(this->actor.params & 0x1F) == GORON_MARKET_BAZAAR) {
|
||||
return true;
|
||||
} else if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
|
||||
} else if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
|
||||
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -1278,8 +1278,8 @@ void EnGo2_SelectGoronWakingUp(EnGo2* this) {
|
||||
EnGo2_BiggoronWakingUp(this);
|
||||
break;
|
||||
case GORON_CITY_LINK:
|
||||
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
|
||||
if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
|
||||
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
EnGo2_WakingUp(this);
|
||||
break;
|
||||
@@ -1624,8 +1624,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
||||
case GORON_CITY_LOWEST_FLOOR:
|
||||
case GORON_CITY_STAIRWELL:
|
||||
case GORON_CITY_LOST_WOODS:
|
||||
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
this->actionFunc = EnGo2_CurledUp;
|
||||
@@ -1640,8 +1640,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
||||
if ((Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED))) {
|
||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
|
||||
if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||
(IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
|
||||
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
EnGo2_GetItemAnimation(this, play);
|
||||
} else {
|
||||
@@ -1862,7 +1862,7 @@ void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnGo2_SetGetItem;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
|
||||
if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
@@ -1876,7 +1876,7 @@ void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
|
||||
|
||||
// For randomizer, handle updating the states for the gorons after receiving the item based on
|
||||
// the goron type rather then the item being received
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
switch (this->actor.params & 0x1F) {
|
||||
case GORON_DMT_BIGGORON:
|
||||
// Resolves #1301. unk_13EE is used to set the opacity of the HUD. The trade sequence discussion with Biggoron
|
||||
@@ -1925,12 +1925,12 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
this->actor.shape.rot.y += 0x5B0;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->animTimer = gSaveContext.n64ddFlag ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
|
||||
this->animTimer = IS_RANDO ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
|
||||
this->eyeMouthTexState = 2;
|
||||
this->unk_20C = 0;
|
||||
this->goronState++;
|
||||
func_800F483C(0x28, 5);
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!IS_RANDO) {
|
||||
OnePointCutscene_Init(play, 4190, -99, &this->actor, MAIN_CAM);
|
||||
}
|
||||
break;
|
||||
@@ -1959,7 +1959,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
|
||||
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
this->skelAnime.curFrame = this->skelAnime.endFrame;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_EYEDROPS, GI_CLAIM_CHECK);
|
||||
Randomizer_ConsumeAdultTradeItem(play, ITEM_EYEDROPS);
|
||||
EnGo2_GetItemEntry(this, play, getItemEntry);
|
||||
@@ -2190,8 +2190,7 @@ void EnGo2_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnGo2_OverrideLimbDraw, EnGo2_PostLimbDraw, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGo2_OverrideLimbDraw, EnGo2_PostLimbDraw, this);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -804,7 +804,8 @@ void EnGoma_Draw(Actor* thisx, PlayState* play) {
|
||||
Matrix_RotateX(this->actor.shape.rot.x / (f32)0x8000 * M_PI, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->actor.shape.rot.z / (f32)0x8000 * M_PI, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
SkelAnime_DrawOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, EnGoma_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelanime,
|
||||
EnGoma_OverrideLimbDraw,
|
||||
NULL, this);
|
||||
break;
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ void func_80A4E648(EnGs* this, PlayState* play) {
|
||||
Actor_GetScreenPos(play, &this->actor, &sp26, &sp24);
|
||||
if ((sp26 >= 0) && (sp26 <= SCREEN_WIDTH) && (sp24 >= 0) && (sp24 <= SCREEN_HEIGHT) && (this->unk_19C != 3)) {
|
||||
if (func_8002F2CC(&this->actor, play, 40.0f) == 1) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (IS_RANDO) {
|
||||
// if we're rando'd, always use the non-mask text id
|
||||
this->actor.textId = 0x2053;
|
||||
} else {
|
||||
|
||||
@@ -231,8 +231,7 @@ void EnGuest_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, func_80A50708(play->state.gfxCtx, 160, 60, 220, 255));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(D_80A50BA4[this->unk_30E]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnGuest_OverrideLimbDraw, NULL, this);
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGuest_OverrideLimbDraw, NULL, this);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -141,6 +141,7 @@ void EnHata_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_37Opa(play->state.gfxCtx);
|
||||
Matrix_Scale(1.0f, 1.1f, 1.0f, MTXMODE_APPLY);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHata_OverrideLimbDraw,
|
||||
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
|
||||
EnHata_OverrideLimbDraw,
|
||||
EnHata_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user