mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 23:10:14 -05:00
Convert GameInteractor_Should hook to use variadic arguments (#4383)
* Convert _Should to use variadic args * Convert everything to use va_arg properly * Update shop hooks to va_args * Wrong Function * Update hook_handlers.cpp --------- Co-authored-by: Malkierian <malkierian@gmail.com> Co-authored-by: Malkierian <malkierian@live.com>
This commit is contained in:
parent
9df3c41d8a
commit
5d311fac9f
@ -18,7 +18,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
void FasterHeavyBlockLift_Register() {
|
void FasterHeavyBlockLift_Register() {
|
||||||
REGISTER_VB_SHOULD(VB_PLAY_ONEPOINT_ACTOR_CS, {
|
REGISTER_VB_SHOULD(VB_PLAY_ONEPOINT_ACTOR_CS, {
|
||||||
Actor* actor = static_cast<Actor*>(opt);
|
Actor* actor = va_arg(args, Actor*);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
actor->id == ACTOR_BG_HEAVY_BLOCK &&
|
actor->id == ACTOR_BG_HEAVY_BLOCK &&
|
||||||
@ -38,7 +38,7 @@ void FasterHeavyBlockLift_Register() {
|
|||||||
Player *player = GET_PLAYER(gPlayState);
|
Player *player = GET_PLAYER(gPlayState);
|
||||||
Actor* interactRangeActor = player->interactRangeActor;
|
Actor* interactRangeActor = player->interactRangeActor;
|
||||||
s32 interactActorId = interactRangeActor->id;
|
s32 interactActorId = interactRangeActor->id;
|
||||||
LinkAnimationHeader* anim = static_cast<LinkAnimationHeader*>(opt);
|
LinkAnimationHeader* anim = va_arg(args, LinkAnimationHeader*);
|
||||||
|
|
||||||
// Same actor is used for small and large silver rocks, use actor params to identify large ones
|
// Same actor is used for small and large silver rocks, use actor params to identify large ones
|
||||||
bool isLargeSilverRock = interactActorId == ACTOR_EN_ISHI && interactRangeActor->params & 1 == 1;
|
bool isLargeSilverRock = interactActorId == ACTOR_EN_ISHI && interactRangeActor->params & 1 == 1;
|
||||||
@ -50,7 +50,7 @@ void FasterHeavyBlockLift_Register() {
|
|||||||
|
|
||||||
REGISTER_VB_SHOULD(VB_MOVE_THROWN_ACTOR, {
|
REGISTER_VB_SHOULD(VB_MOVE_THROWN_ACTOR, {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
|
||||||
Actor* heldActor = static_cast<Actor*>(opt);
|
Actor* heldActor = va_arg(args, Actor*);
|
||||||
|
|
||||||
heldActor->shape.rot.x -= 3510;
|
heldActor->shape.rot.x -= 3510;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ extern "C" {
|
|||||||
* set the entrance index to where you would normally end up after the blue warp cutscene. This
|
* set the entrance index to where you would normally end up after the blue warp cutscene. This
|
||||||
* should also account for the difference between your first and following visits to the blue warp.
|
* should also account for the difference between your first and following visits to the blue warp.
|
||||||
*/
|
*/
|
||||||
void SkipBlueWarp_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, void* opt) {
|
void SkipBlueWarp_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, va_list originalArgs) {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||||
uint8_t isBlueWarpCutscene = 0;
|
uint8_t isBlueWarpCutscene = 0;
|
||||||
// Deku Tree Blue warp
|
// Deku Tree Blue warp
|
||||||
@ -91,7 +91,7 @@ void SkipBlueWarp_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, void
|
|||||||
* received the item when skipping the blue warp cutscene, so we'll prevent that and queue it up to be given
|
* received the item when skipping the blue warp cutscene, so we'll prevent that and queue it up to be given
|
||||||
* to the player instead.
|
* to the player instead.
|
||||||
*/
|
*/
|
||||||
void SkipBlueWarp_ShouldGiveItem(GIVanillaBehavior _, bool* should, void* opt) {
|
void SkipBlueWarp_ShouldGiveItem(GIVanillaBehavior _, bool* should, va_list originalArgs) {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||||
*should = false;
|
*should = false;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ void EnKo_MoveWhenReady(EnKo* enKo, PlayState* play) {
|
|||||||
func_80A995CC(enKo, play);
|
func_80A995CC(enKo, play);
|
||||||
|
|
||||||
if ((enKo->actor.params & 0xFF) == ENKO_TYPE_CHILD_3) {
|
if ((enKo->actor.params & 0xFF) == ENKO_TYPE_CHILD_3) {
|
||||||
if (GameInteractor_Should(VB_OPEN_KOKIRI_FOREST, CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD), NULL)) {
|
if (GameInteractor_Should(VB_OPEN_KOKIRI_FOREST, CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD))) {
|
||||||
enKo->collider.dim.height -= 200;
|
enKo->collider.dim.height -= 200;
|
||||||
Path_CopyLastPoint(enKo->path, &enKo->actor.world.pos);
|
Path_CopyLastPoint(enKo->path, &enKo->actor.world.pos);
|
||||||
enKo->actionFunc = func_80A99384;
|
enKo->actionFunc = func_80A99384;
|
||||||
@ -132,7 +132,7 @@ void SkipBlueWarp_OnActorUpdate(void* actorPtr) {
|
|||||||
* This will ensure that the Deku Tree Sprout considers the Forest Temple finished when you skip the blue warp cutscene.
|
* This will ensure that the Deku Tree Sprout considers the Forest Temple finished when you skip the blue warp cutscene.
|
||||||
* Typically this checks for if you have the medallion, and when skipping the cutscene at this point you don't have it yet.
|
* Typically this checks for if you have the medallion, and when skipping the cutscene at this point you don't have it yet.
|
||||||
*/
|
*/
|
||||||
void SkipBlueWarp_ShouldDekuJrConsiderForestTempleFinished(GIVanillaBehavior _, bool* should, void* opt) {
|
void SkipBlueWarp_ShouldDekuJrConsiderForestTempleFinished(GIVanillaBehavior _, bool* should, va_list originalArgs) {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||||
if (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_11 && gSaveContext.cutsceneIndex == 0xFFF1) {
|
if (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_11 && gSaveContext.cutsceneIndex == 0xFFF1) {
|
||||||
*should = Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
|
*should = Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
|
||||||
|
@ -12,7 +12,7 @@ extern "C" {
|
|||||||
void SkipDekuTreeIntro_Register() {
|
void SkipDekuTreeIntro_Register() {
|
||||||
REGISTER_VB_SHOULD(VB_PLAY_DEKU_TREE_INTRO_CS, {
|
REGISTER_VB_SHOULD(VB_PLAY_DEKU_TREE_INTRO_CS, {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||||
BgTreemouth* treeMouth = static_cast<BgTreemouth*>(opt);
|
BgTreemouth* treeMouth = va_arg(args, BgTreemouth*);
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_DEKU_TREE_OPENED_MOUTH);
|
Flags_SetEventChkInf(EVENTCHKINF_DEKU_TREE_OPENED_MOUTH);
|
||||||
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||||
BgTreemouth_SetupAction(treeMouth, func_808BC6F8);
|
BgTreemouth_SetupAction(treeMouth, func_808BC6F8);
|
||||||
|
@ -17,7 +17,7 @@ void SkipLostWoodsBridge_Register() {
|
|||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||||
if ((gSaveContext.entranceIndex == ENTR_LOST_WOODS_9) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
if ((gSaveContext.entranceIndex == ENTR_LOST_WOODS_9) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
|
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FAIRY_OCARINA, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FAIRY_OCARINA, true)) {
|
||||||
Item_Give(gPlayState, ITEM_OCARINA_FAIRY);
|
Item_Give(gPlayState, ITEM_OCARINA_FAIRY);
|
||||||
}
|
}
|
||||||
*should = false;
|
*should = false;
|
||||||
|
@ -8,7 +8,7 @@ extern "C" {
|
|||||||
extern SaveContext gSaveContext;
|
extern SaveContext gSaveContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkipZeldaFleeingCastle_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, void* opt) {
|
void SkipZeldaFleeingCastle_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, va_list originalArgs) {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||||
if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
|
if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
|
||||||
// Normally set in the cutscene
|
// Normally set in the cutscene
|
||||||
|
@ -509,7 +509,10 @@ static void* sSavePromptNoChoiceTexs[] = {
|
|||||||
(void*)gPauseNoFRATex
|
(void*)gPauseNoFRATex
|
||||||
};
|
};
|
||||||
|
|
||||||
void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* optionalArg) {
|
void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs) {
|
||||||
|
va_list args;
|
||||||
|
va_copy(args, originalArgs);
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
// Allow not healing before ganon
|
// Allow not healing before ganon
|
||||||
case VB_GANON_HEAL_BEFORE_FIGHT: {
|
case VB_GANON_HEAL_BEFORE_FIGHT: {
|
||||||
@ -520,7 +523,7 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
// Replace the blue warp transitions with ones that lead back to the chamber of sages
|
// Replace the blue warp transitions with ones that lead back to the chamber of sages
|
||||||
case VB_BLUE_WARP_APPLY_ENTRANCE_AND_CUTSCENE: {
|
case VB_BLUE_WARP_APPLY_ENTRANCE_AND_CUTSCENE: {
|
||||||
DoorWarp1* blueWarp = static_cast<DoorWarp1*>(optionalArg);
|
DoorWarp1* blueWarp = va_arg(args, DoorWarp1*);
|
||||||
BossRush_HandleBlueWarp(gPlayState, blueWarp->actor.world.pos.x, blueWarp->actor.world.pos.z);
|
BossRush_HandleBlueWarp(gPlayState, blueWarp->actor.world.pos.x, blueWarp->actor.world.pos.z);
|
||||||
*should = false;
|
*should = false;
|
||||||
break;
|
break;
|
||||||
@ -529,7 +532,7 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
case VB_SPAWN_BLUE_WARP: {
|
case VB_SPAWN_BLUE_WARP: {
|
||||||
switch (gPlayState->sceneNum) {
|
switch (gPlayState->sceneNum) {
|
||||||
case SCENE_DEKU_TREE_BOSS: {
|
case SCENE_DEKU_TREE_BOSS: {
|
||||||
BossGoma* bossGoma = static_cast<BossGoma*>(optionalArg);
|
BossGoma* bossGoma = va_arg(args, BossGoma*);
|
||||||
static Vec3f roomCenter = { -150.0f, 0.0f, -350.0f };
|
static Vec3f roomCenter = { -150.0f, 0.0f, -350.0f };
|
||||||
Vec3f childPos = roomCenter;
|
Vec3f childPos = roomCenter;
|
||||||
|
|
||||||
@ -578,7 +581,7 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SCENE_WATER_TEMPLE_BOSS: {
|
case SCENE_WATER_TEMPLE_BOSS: {
|
||||||
BossMo* bossMo = static_cast<BossMo*>(optionalArg);
|
BossMo* bossMo = va_arg(args, BossMo*);
|
||||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, bossMo->actor.world.pos.x, -280.0f, bossMo->actor.world.pos.z, 0, 0, 0, WARP_DUNGEON_ADULT, true);
|
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, bossMo->actor.world.pos.x, -280.0f, bossMo->actor.world.pos.z, 0, 0, 0, WARP_DUNGEON_ADULT, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -607,7 +610,7 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
// Show "No" twice because the player can't continue.
|
// Show "No" twice because the player can't continue.
|
||||||
case VB_RENDER_YES_ON_CONTINUE_PROMPT: {
|
case VB_RENDER_YES_ON_CONTINUE_PROMPT: {
|
||||||
Gfx** disp = static_cast<Gfx**>(optionalArg);
|
Gfx** disp = va_arg(args, Gfx**);
|
||||||
*disp = KaleidoScope_QuadTextureIA8(*disp, sSavePromptNoChoiceTexs[gSaveContext.language], 48, 16, 12);
|
*disp = KaleidoScope_QuadTextureIA8(*disp, sSavePromptNoChoiceTexs[gSaveContext.language], 48, 16, 12);
|
||||||
*should = false;
|
*should = false;
|
||||||
break;
|
break;
|
||||||
@ -619,7 +622,7 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
// Skip past the "Save?" window when dying and go to the "Continue?" screen immediately.
|
// Skip past the "Save?" window when dying and go to the "Continue?" screen immediately.
|
||||||
case VB_TRANSITION_TO_SAVE_SCREEN_ON_DEATH: {
|
case VB_TRANSITION_TO_SAVE_SCREEN_ON_DEATH: {
|
||||||
PauseContext* pauseCtx = static_cast<PauseContext*>(optionalArg);
|
PauseContext* pauseCtx = va_arg(args, PauseContext*);
|
||||||
pauseCtx->state = 0xF;
|
pauseCtx->state = 0xF;
|
||||||
*should = false;
|
*should = false;
|
||||||
break;
|
break;
|
||||||
@ -640,6 +643,8 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BossRush_OnActorInitHandler(void* actorRef) {
|
void BossRush_OnActorInitHandler(void* actorRef) {
|
||||||
@ -708,4 +713,4 @@ void BossRush_RegisterHooks() {
|
|||||||
onBossDefeatHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnBossDefeat>(BossRush_OnBossDefeatHandler);
|
onBossDefeatHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnBossDefeat>(BossRush_OnBossDefeatHandler);
|
||||||
onActorUpdate = GameInteractor::Instance->RegisterGameHookForID<GameInteractor::OnActorUpdate>(ACTOR_DOOR_WARP1, BossRush_OnBlueWarpUpdate);
|
onActorUpdate = GameInteractor::Instance->RegisterGameHookForID<GameInteractor::OnActorUpdate>(ACTOR_DOOR_WARP1, BossRush_OnBlueWarpUpdate);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ extern SaveContext gSaveContext;
|
|||||||
extern PlayState* gPlayState;
|
extern PlayState* gPlayState;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheatsOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* opt) {
|
void CheatsOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case VB_DEKU_STICK_BREAK: {
|
case VB_DEKU_STICK_BREAK: {
|
||||||
if (CVarGetInteger(CVAR_CHEAT("DekuStickCheat"), DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
if (CVarGetInteger(CVAR_CHEAT("DekuStickCheat"), DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
||||||
|
@ -511,6 +511,7 @@ void GameInteractor_SetTriforceHuntCreditsWarpActive(uint8_t state);
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
#include <stdarg.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -565,8 +566,14 @@ struct HookInfo {
|
|||||||
#define GET_CURRENT_REGISTERING_INFO(type) HookRegisteringInfo{}
|
#define GET_CURRENT_REGISTERING_INFO(type) HookRegisteringInfo{}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define REGISTER_VB_SHOULD(flag, body) \
|
#define REGISTER_VB_SHOULD(flag, body) \
|
||||||
GameInteractor::Instance->RegisterGameHookForID<GameInteractor::OnVanillaBehavior>(flag, [](GIVanillaBehavior _, bool* should, void* opt) body)
|
GameInteractor::Instance->RegisterGameHookForID<GameInteractor::OnVanillaBehavior>( \
|
||||||
|
flag, [](GIVanillaBehavior _, bool* should, va_list _originalArgs) { \
|
||||||
|
va_list args; \
|
||||||
|
va_copy(args, _originalArgs); \
|
||||||
|
body; \
|
||||||
|
va_end(args); \
|
||||||
|
})
|
||||||
|
|
||||||
class GameInteractor {
|
class GameInteractor {
|
||||||
public:
|
public:
|
||||||
|
@ -28,7 +28,7 @@ DEFINE_HOOK(OnBossDefeat, (void* actor));
|
|||||||
DEFINE_HOOK(OnPlayerBonk, ());
|
DEFINE_HOOK(OnPlayerBonk, ());
|
||||||
DEFINE_HOOK(OnPlayDestroy, ());
|
DEFINE_HOOK(OnPlayDestroy, ());
|
||||||
DEFINE_HOOK(OnPlayDrawEnd, ());
|
DEFINE_HOOK(OnPlayDrawEnd, ());
|
||||||
DEFINE_HOOK(OnVanillaBehavior, (GIVanillaBehavior flag, bool* result, void* opt));
|
DEFINE_HOOK(OnVanillaBehavior, (GIVanillaBehavior flag, bool* result, va_list originalArgs));
|
||||||
DEFINE_HOOK(OnSaveFile, (int32_t fileNum));
|
DEFINE_HOOK(OnSaveFile, (int32_t fileNum));
|
||||||
DEFINE_HOOK(OnLoadFile, (int32_t fileNum));
|
DEFINE_HOOK(OnLoadFile, (int32_t fileNum));
|
||||||
DEFINE_HOOK(OnDeleteFile, (int32_t fileNum));
|
DEFINE_HOOK(OnDeleteFile, (int32_t fileNum));
|
||||||
@ -55,4 +55,4 @@ DEFINE_HOOK(OnUpdateFileNameSelection, (int16_t charCode));
|
|||||||
DEFINE_HOOK(OnSetGameLanguage, ());
|
DEFINE_HOOK(OnSetGameLanguage, ());
|
||||||
DEFINE_HOOK(OnFileDropped, (std::string filePath));
|
DEFINE_HOOK(OnFileDropped, (std::string filePath));
|
||||||
DEFINE_HOOK(OnAssetAltChange, ());
|
DEFINE_HOOK(OnAssetAltChange, ());
|
||||||
DEFINE_HOOK(OnKaleidoUpdate, ());
|
DEFINE_HOOK(OnKaleidoUpdate, ());
|
||||||
|
@ -119,14 +119,25 @@ void GameInteractor_ExecuteOnPlayDrawEnd() {
|
|||||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnPlayDrawEnd>();
|
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnPlayDrawEnd>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameInteractor_Should(GIVanillaBehavior flag, bool result, void* opt) {
|
bool GameInteractor_Should(GIVanillaBehavior flag, u32 result, ...) {
|
||||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnVanillaBehavior>(flag, &result, opt);
|
// Only the external function can use the Variadic Function syntax
|
||||||
GameInteractor::Instance->ExecuteHooksForID<GameInteractor::OnVanillaBehavior>(flag, flag, &result, opt);
|
// To pass the va args to the next caller must be done using va_list and reading the args into it
|
||||||
if (opt != nullptr) {
|
// Because there can be N subscribers registered to each template call, the subscribers will be responsible for
|
||||||
GameInteractor::Instance->ExecuteHooksForPtr<GameInteractor::OnVanillaBehavior>((uintptr_t)opt, flag, &result, opt);
|
// creating a copy of this va_list to avoid incrementing the original pointer between calls
|
||||||
}
|
va_list args;
|
||||||
GameInteractor::Instance->ExecuteHooksForFilter<GameInteractor::OnVanillaBehavior>(flag, &result, opt);
|
va_start(args, result);
|
||||||
return result;
|
|
||||||
|
// Because of default argument promotion, even though our incoming "result" is just a bool, it needs to be typed as
|
||||||
|
// an int to be permitted to be used in `va_start`, otherwise it is undefined behavior.
|
||||||
|
// Here we downcast back to a bool for our actual hook handlers
|
||||||
|
bool boolResult = static_cast<bool>(result);
|
||||||
|
|
||||||
|
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnVanillaBehavior>(flag, &boolResult, args);
|
||||||
|
GameInteractor::Instance->ExecuteHooksForID<GameInteractor::OnVanillaBehavior>(flag, flag, &boolResult, args);
|
||||||
|
GameInteractor::Instance->ExecuteHooksForFilter<GameInteractor::OnVanillaBehavior>(flag, &boolResult, args);
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
|
return boolResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Save Files
|
// MARK: - Save Files
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "GameInteractor.h"
|
#include "GameInteractor.h"
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -28,7 +29,7 @@ void GameInteractor_ExecuteOnOcarinaSongAction();
|
|||||||
void GameInteractor_ExecuteOnShopSlotChangeHooks(uint8_t cursorIndex, int16_t price);
|
void GameInteractor_ExecuteOnShopSlotChangeHooks(uint8_t cursorIndex, int16_t price);
|
||||||
void GameInteractor_ExecuteOnPlayDestroy();
|
void GameInteractor_ExecuteOnPlayDestroy();
|
||||||
void GameInteractor_ExecuteOnPlayDrawEnd();
|
void GameInteractor_ExecuteOnPlayDrawEnd();
|
||||||
bool GameInteractor_Should(GIVanillaBehavior flag, bool result, void* opt);
|
bool GameInteractor_Should(GIVanillaBehavior flag, uint32_t result, ...);
|
||||||
|
|
||||||
// MARK: - Save Files
|
// MARK: - Save Files
|
||||||
void GameInteractor_ExecuteOnSaveFile(int32_t fileNum);
|
void GameInteractor_ExecuteOnSaveFile(int32_t fileNum);
|
||||||
|
@ -465,10 +465,15 @@ namespace Rando {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fishsanity::OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* refActor) {
|
void Fishsanity::OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs) {
|
||||||
Actor* actor = static_cast<Actor*>(refActor);
|
va_list args;
|
||||||
|
va_copy(args, originalArgs);
|
||||||
|
|
||||||
|
Actor* actor = va_arg(args, Actor*);
|
||||||
auto fs = OTRGlobals::Instance->gRandoContext->GetFishsanity();
|
auto fs = OTRGlobals::Instance->gRandoContext->GetFishsanity();
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
if (id == VB_BOTTLE_ACTOR && actor->id == ACTOR_EN_FISH && fs->GetOverworldFishShuffled()) {
|
if (id == VB_BOTTLE_ACTOR && actor->id == ACTOR_EN_FISH && fs->GetOverworldFishShuffled()) {
|
||||||
FishIdentity fish = OTRGlobals::Instance->gRandomizer->IdentifyFish(gPlayState->sceneNum, actor->params);
|
FishIdentity fish = OTRGlobals::Instance->gRandomizer->IdentifyFish(gPlayState->sceneNum, actor->params);
|
||||||
if (fish.randomizerCheck != RC_UNKNOWN_CHECK && !Flags_GetRandomizerInf(fish.randomizerInf)) {
|
if (fish.randomizerCheck != RC_UNKNOWN_CHECK && !Flags_GetRandomizerInf(fish.randomizerInf)) {
|
||||||
@ -577,4 +582,4 @@ extern "C" {
|
|||||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ class Fishsanity {
|
|||||||
/**
|
/**
|
||||||
* @brief VB hook handler for fishsanity
|
* @brief VB hook handler for fishsanity
|
||||||
*/
|
*/
|
||||||
static void OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* refActor);
|
static void OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
@ -226,4 +226,4 @@ void Fishsanity_CloseGreyscaleColor(PlayState* play);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // FISHSANITY_H
|
#endif // FISHSANITY_H
|
||||||
|
@ -608,7 +608,6 @@ void func_8083A434_override(PlayState* play, Player* player) {
|
|||||||
player->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_CUTSCENE;
|
player->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_CUTSCENE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ShouldGiveFishingPrize(f32 sFishOnHandLength){
|
bool ShouldGiveFishingPrize(f32 sFishOnHandLength){
|
||||||
// RANDOTODO: update the enhancement sliders to not allow
|
// RANDOTODO: update the enhancement sliders to not allow
|
||||||
// values above rando fish weight values when rando'd
|
// values above rando fish weight values when rando'd
|
||||||
@ -624,7 +623,10 @@ bool ShouldGiveFishingPrize(f32 sFishOnHandLength){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* optionalArg) {
|
void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs) {
|
||||||
|
va_list args;
|
||||||
|
va_copy(args, originalArgs);
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case VB_PLAY_SLOW_CHEST_CS: {
|
case VB_PLAY_SLOW_CHEST_CS: {
|
||||||
// We force fast chests if SkipGetItemAnimation is enabled because the camera in the CS looks pretty wonky otherwise
|
// We force fast chests if SkipGetItemAnimation is enabled because the camera in the CS looks pretty wonky otherwise
|
||||||
@ -634,7 +636,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_CHEST: {
|
case VB_GIVE_ITEM_FROM_CHEST: {
|
||||||
EnBox* chest = static_cast<EnBox*>(optionalArg);
|
EnBox* chest = va_arg(args, EnBox*);
|
||||||
RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(chest->dyna.actor.id, gPlayState->sceneNum, chest->dyna.actor.params);
|
RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(chest->dyna.actor.id, gPlayState->sceneNum, chest->dyna.actor.params);
|
||||||
|
|
||||||
// if this is a treasure chest game chest then set the appropriate rando inf
|
// if this is a treasure chest game chest then set the appropriate rando inf
|
||||||
@ -717,7 +719,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VB_ITEM00_DESPAWN: {
|
case VB_ITEM00_DESPAWN: {
|
||||||
EnItem00* item00 = static_cast<EnItem00*>(optionalArg);
|
EnItem00* item00 = va_arg(args, EnItem00*);
|
||||||
if (item00->actor.params == ITEM00_HEART_PIECE || item00->actor.params == ITEM00_SMALL_KEY) {
|
if (item00->actor.params == ITEM00_HEART_PIECE || item00->actor.params == ITEM00_SMALL_KEY) {
|
||||||
RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(item00->actor.id, gPlayState->sceneNum, item00->ogParams);
|
RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(item00->actor.id, gPlayState->sceneNum, item00->ogParams);
|
||||||
if (rc != RC_UNKNOWN_CHECK) {
|
if (rc != RC_UNKNOWN_CHECK) {
|
||||||
@ -734,7 +736,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_ITEM_B_HEART_DESPAWN: {
|
case VB_ITEM_B_HEART_DESPAWN: {
|
||||||
ItemBHeart* itemBHeart = static_cast<ItemBHeart*>(optionalArg);
|
ItemBHeart* itemBHeart = va_arg(args, ItemBHeart*);
|
||||||
RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(itemBHeart->actor.id, gPlayState->sceneNum, itemBHeart->actor.params);
|
RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(itemBHeart->actor.id, gPlayState->sceneNum, itemBHeart->actor.params);
|
||||||
if (rc != RC_UNKNOWN_CHECK) {
|
if (rc != RC_UNKNOWN_CHECK) {
|
||||||
itemBHeart->sohItemEntry = Rando::Context::GetInstance()->GetFinalGIEntry(rc, true, (GetItemID)Rando::StaticData::GetLocation(rc)->GetVanillaItem());
|
itemBHeart->sohItemEntry = Rando::Context::GetInstance()->GetFinalGIEntry(rc, true, (GetItemID)Rando::StaticData::GetLocation(rc)->GetVanillaItem());
|
||||||
@ -749,7 +751,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_SET_CUCCO_COUNT: {
|
case VB_SET_CUCCO_COUNT: {
|
||||||
EnNiwLady* enNiwLady = static_cast<EnNiwLady*>(optionalArg);
|
EnNiwLady* enNiwLady = va_arg(args, EnNiwLady*);
|
||||||
// Override starting Cucco count using setting value
|
// Override starting Cucco count using setting value
|
||||||
enNiwLady->cuccosInPen = 7 - RAND_GET_OPTION(RSK_CUCCO_COUNT);
|
enNiwLady->cuccosInPen = 7 - RAND_GET_OPTION(RSK_CUCCO_COUNT);
|
||||||
*should = false;
|
*should = false;
|
||||||
@ -811,7 +813,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_ITEM_00: {
|
case VB_GIVE_ITEM_FROM_ITEM_00: {
|
||||||
EnItem00* item00 = static_cast<EnItem00*>(optionalArg);
|
EnItem00* item00 = va_arg(args, EnItem00*);
|
||||||
if (item00->actor.params == ITEM00_SOH_DUMMY) {
|
if (item00->actor.params == ITEM00_SOH_DUMMY) {
|
||||||
if (item00->randoInf != RAND_INF_MAX) {
|
if (item00->randoInf != RAND_INF_MAX) {
|
||||||
Flags_SetRandomizerInf(item00->randoInf);
|
Flags_SetRandomizerInf(item00->randoInf);
|
||||||
@ -856,7 +858,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
if (!RAND_GET_OPTION(RSK_SHUFFLE_COWS)) {
|
if (!RAND_GET_OPTION(RSK_SHUFFLE_COWS)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
EnCow* enCow = static_cast<EnCow*>(optionalArg);
|
EnCow* enCow = va_arg(args, EnCow*);
|
||||||
CowIdentity cowIdentity = OTRGlobals::Instance->gRandomizer->IdentifyCow(gPlayState->sceneNum, enCow->actor.world.pos.x, enCow->actor.world.pos.z);
|
CowIdentity cowIdentity = OTRGlobals::Instance->gRandomizer->IdentifyCow(gPlayState->sceneNum, enCow->actor.world.pos.x, enCow->actor.world.pos.z);
|
||||||
// Has this cow already rewarded an item?
|
// Has this cow already rewarded an item?
|
||||||
if (Flags_GetRandomizerInf(cowIdentity.randomizerInf)) {
|
if (Flags_GetRandomizerInf(cowIdentity.randomizerInf)) {
|
||||||
@ -873,7 +875,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
if (!EnDs_RandoCanGetGrannyItem()) {
|
if (!EnDs_RandoCanGetGrannyItem()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
EnDs* granny = static_cast<EnDs*>(optionalArg);
|
EnDs* granny = va_arg(args, EnDs*);
|
||||||
// Only setting the inf if we've actually gotten the rando item and not the vanilla blue potion
|
// Only setting the inf if we've actually gotten the rando item and not the vanilla blue potion
|
||||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_GRANNYS_SHOP);
|
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_GRANNYS_SHOP);
|
||||||
granny->actor.parent = NULL;
|
granny->actor.parent = NULL;
|
||||||
@ -882,7 +884,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_THAWING_KING_ZORA: {
|
case VB_GIVE_ITEM_FROM_THAWING_KING_ZORA: {
|
||||||
EnKz* enKz = static_cast<EnKz*>(optionalArg);
|
EnKz* enKz = va_arg(args, EnKz*);
|
||||||
// If we aren't setting up the item offer, then we're just checking if it should be possible.
|
// If we aren't setting up the item offer, then we're just checking if it should be possible.
|
||||||
if (enKz->actionFunc != (EnKzActionFunc)EnKz_SetupGetItem) {
|
if (enKz->actionFunc != (EnKzActionFunc)EnKz_SetupGetItem) {
|
||||||
// Always give the reward in rando
|
// Always give the reward in rando
|
||||||
@ -909,7 +911,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_CARPET_SALESMAN: {
|
case VB_GIVE_ITEM_FROM_CARPET_SALESMAN: {
|
||||||
EnJs* enJs = static_cast<EnJs*>(optionalArg);
|
EnJs* enJs = va_arg(args, EnJs*);
|
||||||
if (EnJs_RandoCanGetCarpetMerchantItem()){
|
if (EnJs_RandoCanGetCarpetMerchantItem()){
|
||||||
Rupees_ChangeBy(OTRGlobals::Instance->gRandoContext->GetItemLocation(RC_WASTELAND_BOMBCHU_SALESMAN)->GetPrice() * -1);
|
Rupees_ChangeBy(OTRGlobals::Instance->gRandoContext->GetItemLocation(RC_WASTELAND_BOMBCHU_SALESMAN)->GetPrice() * -1);
|
||||||
enJs->actor.parent = NULL;
|
enJs->actor.parent = NULL;
|
||||||
@ -937,7 +939,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
case VB_BE_ELIGIBLE_FOR_GIANTS_KNIFE_PURCHASE:
|
case VB_BE_ELIGIBLE_FOR_GIANTS_KNIFE_PURCHASE:
|
||||||
if (EnGm_RandoCanGetMedigoronItem()) {
|
if (EnGm_RandoCanGetMedigoronItem()) {
|
||||||
if (id == VB_GIVE_ITEM_FROM_MEDIGORON) {
|
if (id == VB_GIVE_ITEM_FROM_MEDIGORON) {
|
||||||
EnGm* enGm = static_cast<EnGm*>(optionalArg);
|
EnGm* enGm = va_arg(args, EnGm*);
|
||||||
Flags_SetInfTable(INFTABLE_B1);
|
Flags_SetInfTable(INFTABLE_B1);
|
||||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||||
enGm->actor.parent = NULL;
|
enGm->actor.parent = NULL;
|
||||||
@ -953,7 +955,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_MAGIC_BEAN_SALESMAN: {
|
case VB_GIVE_ITEM_FROM_MAGIC_BEAN_SALESMAN: {
|
||||||
EnMs* enMs = static_cast<EnMs*>(optionalArg);
|
EnMs* enMs = va_arg(args, EnMs*);
|
||||||
if (RAND_GET_OPTION(RSK_SHUFFLE_MERCHANTS) == RO_SHUFFLE_MERCHANTS_BEANS_ONLY ||
|
if (RAND_GET_OPTION(RSK_SHUFFLE_MERCHANTS) == RO_SHUFFLE_MERCHANTS_BEANS_ONLY ||
|
||||||
RAND_GET_OPTION(RSK_SHUFFLE_MERCHANTS) == RO_SHUFFLE_MERCHANTS_ALL) {
|
RAND_GET_OPTION(RSK_SHUFFLE_MERCHANTS) == RO_SHUFFLE_MERCHANTS_ALL) {
|
||||||
Rupees_ChangeBy(OTRGlobals::Instance->gRandoContext->GetItemLocation(RC_ZR_MAGIC_BEAN_SALESMAN)->GetPrice() * -1);
|
Rupees_ChangeBy(OTRGlobals::Instance->gRandoContext->GetItemLocation(RC_ZR_MAGIC_BEAN_SALESMAN)->GetPrice() * -1);
|
||||||
@ -966,7 +968,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_FROGS: {
|
case VB_GIVE_ITEM_FROM_FROGS: {
|
||||||
EnFr* enFr = static_cast<EnFr*>(optionalArg);
|
EnFr* enFr = va_arg(args, EnFr*);
|
||||||
|
|
||||||
// Skip GiveReward+SetIdle action func if the reward is an ice trap
|
// Skip GiveReward+SetIdle action func if the reward is an ice trap
|
||||||
if (enFr->actionFunc == (EnFrActionFunc)EnFr_GiveReward) {
|
if (enFr->actionFunc == (EnFrActionFunc)EnFr_GiveReward) {
|
||||||
@ -993,7 +995,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_TRADE_ODD_MUSHROOM: {
|
case VB_TRADE_ODD_MUSHROOM: {
|
||||||
EnDs* granny = static_cast<EnDs*>(optionalArg);
|
EnDs* granny = va_arg(args, EnDs*);
|
||||||
Randomizer_ConsumeAdultTradeItem(gPlayState, ITEM_ODD_MUSHROOM);
|
Randomizer_ConsumeAdultTradeItem(gPlayState, ITEM_ODD_MUSHROOM);
|
||||||
// Trigger the reward now
|
// Trigger the reward now
|
||||||
Flags_SetItemGetInf(ITEMGETINF_30);
|
Flags_SetItemGetInf(ITEMGETINF_30);
|
||||||
@ -1004,7 +1006,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_TRADE_ODD_POTION: {
|
case VB_TRADE_ODD_POTION: {
|
||||||
EnKo* enKo = static_cast<EnKo*>(optionalArg);
|
EnKo* enKo = va_arg(args, EnKo*);
|
||||||
Randomizer_ConsumeAdultTradeItem(gPlayState, ITEM_ODD_POTION);
|
Randomizer_ConsumeAdultTradeItem(gPlayState, ITEM_ODD_POTION);
|
||||||
// Trigger the reward now
|
// Trigger the reward now
|
||||||
Flags_SetItemGetInf(ITEMGETINF_31);
|
Flags_SetItemGetInf(ITEMGETINF_31);
|
||||||
@ -1017,7 +1019,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_TRADE_PRESCRIPTION: {
|
case VB_TRADE_PRESCRIPTION: {
|
||||||
EnKz* enKz = static_cast<EnKz*>(optionalArg);
|
EnKz* enKz = va_arg(args, EnKz*);
|
||||||
// If we aren't setting up the item offer, then we're just checking if it should be possible.
|
// If we aren't setting up the item offer, then we're just checking if it should be possible.
|
||||||
if (enKz->actionFunc != (EnKzActionFunc)EnKz_SetupGetItem) {
|
if (enKz->actionFunc != (EnKzActionFunc)EnKz_SetupGetItem) {
|
||||||
*should = !Flags_GetRandomizerInf(RAND_INF_ADULT_TRADES_ZD_TRADE_PRESCRIPTION);
|
*should = !Flags_GetRandomizerInf(RAND_INF_ADULT_TRADES_ZD_TRADE_PRESCRIPTION);
|
||||||
@ -1036,13 +1038,13 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
if (!RAND_GET_OPTION(RSK_SHUFFLE_COWS)) {
|
if (!RAND_GET_OPTION(RSK_SHUFFLE_COWS)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
EnCow* enCow = static_cast<EnCow*>(optionalArg);
|
EnCow* enCow = va_arg(args, EnCow*);
|
||||||
// If this is a cow we have to move, then move it now.
|
// If this is a cow we have to move, then move it now.
|
||||||
EnCow_MoveForRandomizer(enCow, gPlayState);
|
EnCow_MoveForRandomizer(enCow, gPlayState);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_BUSINESS_SCRUB_DESPAWN: {
|
case VB_BUSINESS_SCRUB_DESPAWN: {
|
||||||
EnShopnuts* enShopnuts = static_cast<EnShopnuts*>(optionalArg);
|
EnShopnuts* enShopnuts = va_arg(args, EnShopnuts*);
|
||||||
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
|
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
|
||||||
ScrubIdentity scrubIdentity = OTRGlobals::Instance->gRandomizer->IdentifyScrub(gPlayState->sceneNum, enShopnuts->actor.params, respawnData);
|
ScrubIdentity scrubIdentity = OTRGlobals::Instance->gRandomizer->IdentifyScrub(gPlayState->sceneNum, enShopnuts->actor.params, respawnData);
|
||||||
|
|
||||||
@ -1052,7 +1054,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_BUSINESS_SCRUB: {
|
case VB_GIVE_ITEM_FROM_BUSINESS_SCRUB: {
|
||||||
EnDns* enDns = static_cast<EnDns*>(optionalArg);
|
EnDns* enDns = va_arg(args, EnDns*);
|
||||||
*should = !enDns->sohScrubIdentity.isShuffled;
|
*should = !enDns->sohScrubIdentity.isShuffled;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1089,7 +1091,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
}
|
}
|
||||||
case VB_USE_EYEDROP_DIALOGUE: {
|
case VB_USE_EYEDROP_DIALOGUE: {
|
||||||
// Skip eye drop text on rando if Link went in the water, so you can still receive the dive check
|
// Skip eye drop text on rando if Link went in the water, so you can still receive the dive check
|
||||||
EnMk* enMk = static_cast<EnMk*>(optionalArg);
|
EnMk* enMk = va_arg(args, EnMk*);
|
||||||
*should &= enMk->swimFlag == 0;
|
*should &= enMk->swimFlag == 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1117,7 +1119,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_SHOOTING_GALLERY: {
|
case VB_GIVE_ITEM_FROM_SHOOTING_GALLERY: {
|
||||||
EnSyatekiMan* enSyatekiMan = static_cast<EnSyatekiMan*>(optionalArg);
|
EnSyatekiMan* enSyatekiMan = va_arg(args, EnSyatekiMan*);
|
||||||
enSyatekiMan->getItemId = GI_RUPEE_PURPLE;
|
enSyatekiMan->getItemId = GI_RUPEE_PURPLE;
|
||||||
if (LINK_IS_ADULT) {
|
if (LINK_IS_ADULT) {
|
||||||
// Give purple rupee if we've already obtained the reward OR we don't have a bow
|
// Give purple rupee if we've already obtained the reward OR we don't have a bow
|
||||||
@ -1159,7 +1161,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
// in that array is GI_RUPEE_GOLD, and the reward is picked in EnSth_GivePlayerItem
|
// in that array is GI_RUPEE_GOLD, and the reward is picked in EnSth_GivePlayerItem
|
||||||
// via sGetItemIds[this->actor.params]. This means if actor.params == 0 we're looking
|
// via sGetItemIds[this->actor.params]. This means if actor.params == 0 we're looking
|
||||||
// at the 100 GS reward
|
// at the 100 GS reward
|
||||||
EnSth* enSth = static_cast<EnSth*>(optionalArg);
|
EnSth* enSth = va_arg(args, EnSth*);
|
||||||
if (enSth->actor.params == 0) {
|
if (enSth->actor.params == 0) {
|
||||||
// if nothing is shuffled onto 100 GS,
|
// if nothing is shuffled onto 100 GS,
|
||||||
// or we already got the 100 GS reward,
|
// or we already got the 100 GS reward,
|
||||||
@ -1182,14 +1184,14 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_OCARINA_MEMORY_GAME: {
|
case VB_GIVE_ITEM_FROM_OCARINA_MEMORY_GAME: {
|
||||||
EnSkj* enSkj = static_cast<EnSkj*>(optionalArg);
|
EnSkj* enSkj = va_arg(args, EnSkj*);
|
||||||
Flags_SetItemGetInf(ITEMGETINF_17);
|
Flags_SetItemGetInf(ITEMGETINF_17);
|
||||||
enSkj->actionFunc = (EnSkjActionFunc)EnSkj_CleanupOcarinaGame;
|
enSkj->actionFunc = (EnSkjActionFunc)EnSkj_CleanupOcarinaGame;
|
||||||
*should = false;
|
*should = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_LOST_DOG: {
|
case VB_GIVE_ITEM_FROM_LOST_DOG: {
|
||||||
EnHy* enHy = static_cast<EnHy*>(optionalArg);
|
EnHy* enHy = va_arg(args, EnHy*);
|
||||||
Flags_SetInfTable(INFTABLE_191);
|
Flags_SetInfTable(INFTABLE_191);
|
||||||
gSaveContext.dogParams = 0;
|
gSaveContext.dogParams = 0;
|
||||||
gSaveContext.dogIsLost = false;
|
gSaveContext.dogIsLost = false;
|
||||||
@ -1198,7 +1200,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_ITEM_FROM_BOMBCHU_BOWLING: {
|
case VB_GIVE_ITEM_FROM_BOMBCHU_BOWLING: {
|
||||||
EnBomBowlPit* enBomBowlPit = static_cast<EnBomBowlPit*>(optionalArg);
|
EnBomBowlPit* enBomBowlPit = va_arg(args, EnBomBowlPit*);
|
||||||
if (enBomBowlPit->prizeIndex == EXITEM_BOMB_BAG_BOWLING || enBomBowlPit->prizeIndex == EXITEM_HEART_PIECE_BOWLING) {
|
if (enBomBowlPit->prizeIndex == EXITEM_BOMB_BAG_BOWLING || enBomBowlPit->prizeIndex == EXITEM_HEART_PIECE_BOWLING) {
|
||||||
*should = false;
|
*should = false;
|
||||||
}
|
}
|
||||||
@ -1233,7 +1235,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_DRAW_AMMO_COUNT: {
|
case VB_DRAW_AMMO_COUNT: {
|
||||||
s16 item = *static_cast<s16*>(optionalArg);
|
s16 item = *va_arg(args, s16*);
|
||||||
// don't draw ammo count if you have the infinite upgrade
|
// don't draw ammo count if you have the infinite upgrade
|
||||||
if (
|
if (
|
||||||
(item == ITEM_NUT && Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_NUT_UPGRADE)) ||
|
(item == ITEM_NUT && Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_NUT_UPGRADE)) ||
|
||||||
@ -1283,7 +1285,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
case VB_SKIP_SCARECROWS_SONG: {
|
case VB_SKIP_SCARECROWS_SONG: {
|
||||||
int ocarinaButtonCount = 0;
|
int ocarinaButtonCount = 0;
|
||||||
for (int i = VB_HAVE_OCARINA_NOTE_D4; i <= VB_HAVE_OCARINA_NOTE_A4; i++) {
|
for (int i = VB_HAVE_OCARINA_NOTE_D4; i <= VB_HAVE_OCARINA_NOTE_A4; i++) {
|
||||||
if (GameInteractor_Should((GIVanillaBehavior)i, true, NULL)) {
|
if (GameInteractor_Should((GIVanillaBehavior)i, true)) {
|
||||||
ocarinaButtonCount++;
|
ocarinaButtonCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1324,12 +1326,12 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_SHOULD_CHECK_FOR_FISHING_RECORD: {
|
case VB_SHOULD_CHECK_FOR_FISHING_RECORD: {
|
||||||
f32 sFishOnHandLength = *static_cast<f32*>(optionalArg);
|
f32 sFishOnHandLength = *va_arg(args, f32*);
|
||||||
*should = *should || ShouldGiveFishingPrize(sFishOnHandLength);
|
*should = *should || ShouldGiveFishingPrize(sFishOnHandLength);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_SHOULD_SET_FISHING_RECORD: {
|
case VB_SHOULD_SET_FISHING_RECORD: {
|
||||||
VBFishingData* fishData = static_cast<VBFishingData*>(optionalArg);
|
VBFishingData* fishData = va_arg(args, VBFishingData*);
|
||||||
*should = (s16)fishData->sFishingRecordLength < (s16)fishData->fishWeight;
|
*should = (s16)fishData->sFishingRecordLength < (s16)fishData->fishWeight;
|
||||||
if (!*should){
|
if (!*should){
|
||||||
*fishData->sFishOnHandLength = 0.0f;
|
*fishData->sFishOnHandLength = 0.0f;
|
||||||
@ -1337,13 +1339,13 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_SHOULD_GIVE_VANILLA_FISHING_PRIZE: {
|
case VB_SHOULD_GIVE_VANILLA_FISHING_PRIZE: {
|
||||||
VBFishingData* fishData = static_cast<VBFishingData*>(optionalArg);
|
VBFishingData* fishData = va_arg(args, VBFishingData*);
|
||||||
*should = !IS_RANDO && ShouldGiveFishingPrize(fishData->fishWeight);
|
*should = !IS_RANDO && ShouldGiveFishingPrize(fishData->fishWeight);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_GIVE_RANDO_FISHING_PRIZE: {
|
case VB_GIVE_RANDO_FISHING_PRIZE: {
|
||||||
if (IS_RANDO){
|
if (IS_RANDO){
|
||||||
VBFishingData* fishData = static_cast<VBFishingData*>(optionalArg);
|
VBFishingData* fishData = va_arg(args, VBFishingData*);
|
||||||
if (*fishData->sFishOnHandIsLoach) {
|
if (*fishData->sFishOnHandIsLoach) {
|
||||||
if (!Flags_GetRandomizerInf(RAND_INF_CAUGHT_LOACH) &&
|
if (!Flags_GetRandomizerInf(RAND_INF_CAUGHT_LOACH) &&
|
||||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_FISHSANITY) == RO_FISHSANITY_HYRULE_LOACH){
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_FISHSANITY) == RO_FISHSANITY_HYRULE_LOACH){
|
||||||
@ -1402,6 +1404,8 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RandomizerOnSceneInitHandler(int16_t sceneNum) {
|
void RandomizerOnSceneInitHandler(int16_t sceneNum) {
|
||||||
@ -1459,7 +1463,7 @@ void RandomizerOnSceneInitHandler(int16_t sceneNum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We're always in rando here, and rando always overrides this should so we can just pass false
|
// We're always in rando here, and rando always overrides this should so we can just pass false
|
||||||
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_LIGHT_ARROWS, false, NULL)) {
|
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_LIGHT_ARROWS, false)) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,10 @@ void TimeSaverOnGameFrameUpdateHandler() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* opt) {
|
void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs) {
|
||||||
|
va_list args;
|
||||||
|
va_copy(args, originalArgs);
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case VB_PLAY_TRANSITION_CS: {
|
case VB_PLAY_TRANSITION_CS: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||||
@ -124,7 +127,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
|
||||||
// Normally happens in the cutscene
|
// Normally happens in the cutscene
|
||||||
gSaveContext.dayTime = gSaveContext.skyboxTime = 0xAC60;
|
gSaveContext.dayTime = gSaveContext.skyboxTime = 0xAC60;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true)) {
|
||||||
Item_Give(gPlayState, ITEM_SONG_REQUIEM);
|
Item_Give(gPlayState, ITEM_SONG_REQUIEM);
|
||||||
}
|
}
|
||||||
*should = false;
|
*should = false;
|
||||||
@ -137,11 +140,11 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP) &&
|
Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP) &&
|
||||||
Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP) &&
|
Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP) &&
|
||||||
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
||||||
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_NOCTURNE_OF_SHADOW, meetsBurningKakRequirements, NULL)) {
|
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_NOCTURNE_OF_SHADOW, meetsBurningKakRequirements)) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
||||||
// Normally happens in the cutscene
|
// Normally happens in the cutscene
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_NOCTURNE_OF_SHADOW, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_NOCTURNE_OF_SHADOW, true)) {
|
||||||
Item_Give(gPlayState, ITEM_SONG_NOCTURNE);
|
Item_Give(gPlayState, ITEM_SONG_NOCTURNE);
|
||||||
}
|
}
|
||||||
*should = false;
|
*should = false;
|
||||||
@ -156,9 +159,9 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) &&
|
CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) &&
|
||||||
CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
||||||
!Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
!Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
||||||
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_LIGHT_ARROWS, meetsLACSRequirements, NULL)) {
|
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_LIGHT_ARROWS, meetsLACSRequirements)) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_ARROW, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_ARROW, true)) {
|
||||||
Item_Give(gPlayState, ITEM_ARROW_LIGHT);
|
Item_Give(gPlayState, ITEM_ARROW_LIGHT);
|
||||||
}
|
}
|
||||||
*should = false;
|
*should = false;
|
||||||
@ -182,7 +185,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_PLAY_ENTRANCE_CS: {
|
case VB_PLAY_ENTRANCE_CS: {
|
||||||
s32* entranceFlag = static_cast<s32*>(opt);
|
s32* entranceFlag = va_arg(args, s32*);
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), IS_RANDO) && (*entranceFlag != EVENTCHKINF_EPONA_OBTAINED)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), IS_RANDO) && (*entranceFlag != EVENTCHKINF_EPONA_OBTAINED)) {
|
||||||
*should = false;
|
*should = false;
|
||||||
}
|
}
|
||||||
@ -190,7 +193,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
case VB_PLAY_ONEPOINT_CS: {
|
case VB_PLAY_ONEPOINT_CS: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
||||||
s16* csId = static_cast<s16*>(opt);
|
s16* csId = va_arg(args, s16*);
|
||||||
switch (*csId) {
|
switch (*csId) {
|
||||||
case 4180:
|
case 4180:
|
||||||
case 4100:
|
case 4100:
|
||||||
@ -206,7 +209,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
case VB_PLAY_ONEPOINT_ACTOR_CS: {
|
case VB_PLAY_ONEPOINT_ACTOR_CS: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
||||||
Actor* actor = static_cast<Actor*>(opt);
|
Actor* actor = va_arg(args, Actor*);
|
||||||
|
|
||||||
// there are a few checks throughout the game (such as chest spawns) that rely on this
|
// there are a few checks throughout the game (such as chest spawns) that rely on this
|
||||||
// the checks are for func_8005B198() == this->dyna.actor.category
|
// the checks are for func_8005B198() == this->dyna.actor.category
|
||||||
@ -217,7 +220,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
switch (actor->category) {
|
switch (actor->category) {
|
||||||
case ACTORCAT_BG:
|
case ACTORCAT_BG:
|
||||||
if (actor->id == ACTOR_BG_DDAN_KD) {
|
if (actor->id == ACTOR_BG_DDAN_KD) {
|
||||||
BgDdanKd* ddanKd = static_cast<BgDdanKd*>(opt);
|
BgDdanKd* ddanKd = (BgDdanKd*)actor;
|
||||||
Flags_SetSwitch(gPlayState, ddanKd->dyna.actor.params);
|
Flags_SetSwitch(gPlayState, ddanKd->dyna.actor.params);
|
||||||
}
|
}
|
||||||
if (actor->id == ACTOR_BG_MORI_HINERI) {
|
if (actor->id == ACTOR_BG_MORI_HINERI) {
|
||||||
@ -234,7 +237,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
switch (actor->id) {
|
switch (actor->id) {
|
||||||
case ACTOR_OBJ_SWITCH: {
|
case ACTOR_OBJ_SWITCH: {
|
||||||
ObjSwitch *switchActor = static_cast<ObjSwitch*>(opt);
|
ObjSwitch *switchActor = (ObjSwitch*)actor;
|
||||||
switchActor->cooldownTimer = 0;
|
switchActor->cooldownTimer = 0;
|
||||||
*should = false;
|
*should = false;
|
||||||
RateLimitedSuccessChime();
|
RateLimitedSuccessChime();
|
||||||
@ -247,7 +250,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
if (actor->params == 14848 && gPlayState->sceneNum == SCENE_JABU_JABU && !CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.GlitchAiding"), 0)){
|
if (actor->params == 14848 && gPlayState->sceneNum == SCENE_JABU_JABU && !CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.GlitchAiding"), 0)){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
BgBdanSwitch* switchActor = static_cast<BgBdanSwitch*>(opt);
|
BgBdanSwitch* switchActor = (BgBdanSwitch*)actor;
|
||||||
switchActor->unk_1D8 = 0;
|
switchActor->unk_1D8 = 0;
|
||||||
switchActor->unk_1DA = 0;
|
switchActor->unk_1DA = 0;
|
||||||
*should = false;
|
*should = false;
|
||||||
@ -255,7 +258,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ACTOR_BG_HIDAN_KOUSI: {
|
case ACTOR_BG_HIDAN_KOUSI: {
|
||||||
BgHidanKousi* switchActor = static_cast<BgHidanKousi*>(opt);
|
BgHidanKousi* switchActor = (BgHidanKousi*)actor;
|
||||||
BgHidanKousi_SetupAction(switchActor, func_80889C18);
|
BgHidanKousi_SetupAction(switchActor, func_80889C18);
|
||||||
*should = false;
|
*should = false;
|
||||||
RateLimitedSuccessChime();
|
RateLimitedSuccessChime();
|
||||||
@ -316,7 +319,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
case VB_NAVI_TALK: {
|
case VB_NAVI_TALK: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO)) {
|
||||||
ElfMsg* naviTalk = static_cast<ElfMsg*>(opt);
|
ElfMsg* naviTalk = va_arg(args, ElfMsg*);
|
||||||
if (((naviTalk->actor.params >> 8) & 0x3F) != 0x3F) {
|
if (((naviTalk->actor.params >> 8) & 0x3F) != 0x3F) {
|
||||||
Flags_SetSwitch(gPlayState, (naviTalk->actor.params >> 8) & 0x3F);
|
Flags_SetSwitch(gPlayState, (naviTalk->actor.params >> 8) & 0x3F);
|
||||||
Actor_Kill(&naviTalk->actor);
|
Actor_Kill(&naviTalk->actor);
|
||||||
@ -351,7 +354,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER);
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER);
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL);
|
Flags_SetEventChkInf(EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL);
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_TIME_TRAVELED_TO_ADULT);
|
Flags_SetEventChkInf(EVENTCHKINF_TIME_TRAVELED_TO_ADULT);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_MEDALLION, true)) {
|
||||||
Item_Give(gPlayState, ITEM_MEDALLION_LIGHT);
|
Item_Give(gPlayState, ITEM_MEDALLION_LIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,7 +363,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
case VB_OWL_INTERACTION: {
|
case VB_OWL_INTERACTION: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) && *should) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) && *should) {
|
||||||
EnOwl* enOwl = static_cast<EnOwl*>(opt);
|
EnOwl* enOwl = va_arg(args, EnOwl*);
|
||||||
s32 owlType = (enOwl->actor.params & 0xFC0) >> 6;
|
s32 owlType = (enOwl->actor.params & 0xFC0) >> 6;
|
||||||
|
|
||||||
if (((enOwl->actor.params & 0xFC0) >> 6) == 1) {
|
if (((enOwl->actor.params & 0xFC0) >> 6) == 1) {
|
||||||
@ -374,7 +377,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
case VB_OVERRIDE_LINK_THE_GORON_DIALOGUE: {
|
case VB_OVERRIDE_LINK_THE_GORON_DIALOGUE: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||||
u16* textId = static_cast<u16*>(opt);
|
u16* textId = va_arg(args, u16*);
|
||||||
// If the doors are not open yet, prioritize opening them
|
// If the doors are not open yet, prioritize opening them
|
||||||
if (!Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
if (!Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
||||||
*textId = 0x3036;
|
*textId = 0x3036;
|
||||||
@ -393,7 +396,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
case VB_PLAY_ZELDAS_LULLABY_CS: {
|
case VB_PLAY_ZELDAS_LULLABY_CS: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||||
DemoIm* demoIm = static_cast<DemoIm*>(opt);
|
DemoIm* demoIm = va_arg(args, DemoIm*);
|
||||||
Player* player = GET_PLAYER(gPlayState);
|
Player* player = GET_PLAYER(gPlayState);
|
||||||
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
|
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
|
||||||
player->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM;
|
player->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM;
|
||||||
@ -443,7 +446,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
case VB_PLAY_SARIAS_SONG_CS: {
|
case VB_PLAY_SARIAS_SONG_CS: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||||
EnSa* enSa = static_cast<EnSa*>(opt);
|
EnSa* enSa = va_arg(args, EnSa*);
|
||||||
enSa->actionFunc = func_80AF6B20;
|
enSa->actionFunc = func_80AF6B20;
|
||||||
*should = false;
|
*should = false;
|
||||||
}
|
}
|
||||||
@ -520,14 +523,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
case VB_BE_VALID_GRAVEDIGGING_SPOT:
|
case VB_BE_VALID_GRAVEDIGGING_SPOT:
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
||||||
EnTk *enTk = static_cast<EnTk*>(opt);
|
EnTk *enTk = va_arg(args, EnTk*);
|
||||||
enTk->validDigHere = true;
|
enTk->validDigHere = true;
|
||||||
*should = true;
|
*should = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VB_BE_DAMPE_GRAVEDIGGING_GRAND_PRIZE:
|
case VB_BE_DAMPE_GRAVEDIGGING_GRAND_PRIZE:
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
||||||
EnTk *enTk = static_cast<EnTk*>(opt);
|
EnTk *enTk = va_arg(args, EnTk*);
|
||||||
enTk->currentReward = 3;
|
enTk->currentReward = 3;
|
||||||
*should = true;
|
*should = true;
|
||||||
}
|
}
|
||||||
@ -546,7 +549,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
*should = Environment_GetBgsDayCount() >= CVarGetInteger(CVAR_ENHANCEMENT("ForgeTime"), 3);
|
*should = Environment_GetBgsDayCount() >= CVarGetInteger(CVAR_ENHANCEMENT("ForgeTime"), 3);
|
||||||
break;
|
break;
|
||||||
case VB_BE_ELIGIBLE_FOR_GREAT_FAIRY_REWARD: {
|
case VB_BE_ELIGIBLE_FOR_GREAT_FAIRY_REWARD: {
|
||||||
BgDyYoseizo* bgDyYoseizo = static_cast<BgDyYoseizo*>(opt);
|
BgDyYoseizo* bgDyYoseizo = va_arg(args, BgDyYoseizo*);
|
||||||
RandomizerInf flag = RAND_INF_MAX;
|
RandomizerInf flag = RAND_INF_MAX;
|
||||||
|
|
||||||
if (gPlayState->sceneNum == SCENE_GREAT_FAIRYS_FOUNTAIN_SPELLS) {
|
if (gPlayState->sceneNum == SCENE_GREAT_FAIRYS_FOUNTAIN_SPELLS) {
|
||||||
@ -596,7 +599,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
case VB_PHANTOM_GANON_DEATH_SCENE: {
|
case VB_PHANTOM_GANON_DEATH_SCENE: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO || IS_BOSS_RUSH)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO || IS_BOSS_RUSH)) {
|
||||||
*should = false;
|
*should = false;
|
||||||
BossGanondrof* pg = static_cast<BossGanondrof*>(opt);
|
BossGanondrof* pg = va_arg(args, BossGanondrof*);
|
||||||
Player* player = GET_PLAYER(gPlayState);
|
Player* player = GET_PLAYER(gPlayState);
|
||||||
if (pg != nullptr && pg->work[GND_ACTION_STATE] == DEATH_SPASM) {
|
if (pg != nullptr && pg->work[GND_ACTION_STATE] == DEATH_SPASM) {
|
||||||
// Skip to death scream animation and move ganondrof to middle
|
// Skip to death scream animation and move ganondrof to middle
|
||||||
@ -619,7 +622,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_NABOORU_KNUCKLE_DEATH_SCENE: {
|
case VB_NABOORU_KNUCKLE_DEATH_SCENE: {
|
||||||
EnIk* ik = static_cast<EnIk*>(opt);
|
EnIk* ik = va_arg(args, EnIk*);
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO)) {
|
||||||
// Because no CS in rando, we hide the death of the knuckle by spawning flames and kill the actor
|
// Because no CS in rando, we hide the death of the knuckle by spawning flames and kill the actor
|
||||||
if ((ik->actor.colChkInfo.health <= 10)) {
|
if ((ik->actor.colChkInfo.health <= 10)) {
|
||||||
@ -645,7 +648,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FastChests"), 0)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("FastChests"), 0)) {
|
||||||
*should = false;
|
*should = false;
|
||||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), CSMC_DISABLED) && *should) {
|
} else if (CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), CSMC_DISABLED) && *should) {
|
||||||
EnBox* enBox = static_cast<EnBox*>(opt);
|
EnBox* enBox = va_arg(args, EnBox*);
|
||||||
*should = enBox->dyna.actor.scale.x != 0.005f;
|
*should = enBox->dyna.actor.scale.x != 0.005f;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -657,6 +660,8 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t enMa1UpdateHook = 0;
|
static uint32_t enMa1UpdateHook = 0;
|
||||||
@ -795,7 +800,7 @@ void TimeSaverOnSceneInitHandler(int16_t sceneNum) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCENE_LON_LON_RANCH:
|
case SCENE_LON_LON_RANCH:
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) && GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE), NULL)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) && GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE))) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_RANCH);
|
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_RANCH);
|
||||||
Flags_SetInfTable(INFTABLE_CHILD_MALON_SAID_EPONA_WAS_AFRAID_OF_YOU);
|
Flags_SetInfTable(INFTABLE_CHILD_MALON_SAID_EPONA_WAS_AFRAID_OF_YOU);
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON);
|
Flags_SetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON);
|
||||||
|
@ -1628,23 +1628,23 @@ void func_800ED458(s32 arg0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Audio_OcaUpdateBtnMap(customControls, dpad, rStick);
|
Audio_OcaUpdateBtnMap(customControls, dpad, rStick);
|
||||||
if (D_8016BA18 & sOcarinaD4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D4, true, NULL)) {
|
if (D_8016BA18 & sOcarinaD4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D4, true)) {
|
||||||
osSyncPrintf("Presss NA_KEY_D4 %08x\n", sOcarinaD4BtnMap);
|
osSyncPrintf("Presss NA_KEY_D4 %08x\n", sOcarinaD4BtnMap);
|
||||||
sCurOcarinaBtnVal = 2;
|
sCurOcarinaBtnVal = 2;
|
||||||
sCurOcarinaBtnIdx = 0;
|
sCurOcarinaBtnIdx = 0;
|
||||||
} else if (D_8016BA18 & sOcarinaF4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_F4, true, NULL)) {
|
} else if (D_8016BA18 & sOcarinaF4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_F4, true)) {
|
||||||
osSyncPrintf("Presss NA_KEY_F4 %08x\n", sOcarinaF4BtnMap);
|
osSyncPrintf("Presss NA_KEY_F4 %08x\n", sOcarinaF4BtnMap);
|
||||||
sCurOcarinaBtnVal = 5;
|
sCurOcarinaBtnVal = 5;
|
||||||
sCurOcarinaBtnIdx = 1;
|
sCurOcarinaBtnIdx = 1;
|
||||||
} else if (D_8016BA18 & sOcarinaA4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true, NULL)) {
|
} else if (D_8016BA18 & sOcarinaA4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true)) {
|
||||||
osSyncPrintf("Presss NA_KEY_A4 %08x\n", sOcarinaA4BtnMap);
|
osSyncPrintf("Presss NA_KEY_A4 %08x\n", sOcarinaA4BtnMap);
|
||||||
sCurOcarinaBtnVal = 9;
|
sCurOcarinaBtnVal = 9;
|
||||||
sCurOcarinaBtnIdx = 2;
|
sCurOcarinaBtnIdx = 2;
|
||||||
} else if (D_8016BA18 & sOcarinaB4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true, NULL)) {
|
} else if (D_8016BA18 & sOcarinaB4BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true)) {
|
||||||
osSyncPrintf("Presss NA_KEY_B4 %08x\n", sOcarinaA4BtnMap);
|
osSyncPrintf("Presss NA_KEY_B4 %08x\n", sOcarinaA4BtnMap);
|
||||||
sCurOcarinaBtnVal = 0xB;
|
sCurOcarinaBtnVal = 0xB;
|
||||||
sCurOcarinaBtnIdx = 3;
|
sCurOcarinaBtnIdx = 3;
|
||||||
} else if (D_8016BA18 & sOcarinaD5BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true, NULL)) {
|
} else if (D_8016BA18 & sOcarinaD5BtnMap && GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true)) {
|
||||||
osSyncPrintf("Presss NA_KEY_D5 %08x\n", sOcarinaD5BtnMap);
|
osSyncPrintf("Presss NA_KEY_D5 %08x\n", sOcarinaD5BtnMap);
|
||||||
sCurOcarinaBtnVal = 0xE;
|
sCurOcarinaBtnVal = 0xE;
|
||||||
sCurOcarinaBtnIdx = 4;
|
sCurOcarinaBtnIdx = 4;
|
||||||
|
@ -497,11 +497,11 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
|
|
||||||
bool shouldSkipCommand = false;
|
bool shouldSkipCommand = false;
|
||||||
|
|
||||||
if (cmd->base == 8 && !GameInteractor_Should(VB_PLAY_PULL_MASTER_SWORD_CS, true, NULL)) {
|
if (cmd->base == 8 && !GameInteractor_Should(VB_PLAY_PULL_MASTER_SWORD_CS, true)) {
|
||||||
shouldSkipCommand = true;
|
shouldSkipCommand = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd->base == 24 && !GameInteractor_Should(VB_PLAY_DROP_FISH_FOR_JABU_CS, true, NULL)) {
|
if (cmd->base == 24 && !GameInteractor_Should(VB_PLAY_DROP_FISH_FOR_JABU_CS, true)) {
|
||||||
shouldSkipCommand = true;
|
shouldSkipCommand = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,7 +631,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
gSaveContext.fw.set = 0;
|
gSaveContext.fw.set = 0;
|
||||||
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
|
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_PLAY_PULL_MASTER_SWORD_CS, !Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL), NULL)) {
|
if (GameInteractor_Should(VB_PLAY_PULL_MASTER_SWORD_CS, !Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL);
|
Flags_SetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL);
|
||||||
play->nextEntranceIndex = ENTR_CUTSCENE_MAP_0;
|
play->nextEntranceIndex = ENTR_CUTSCENE_MAP_0;
|
||||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||||
@ -723,7 +723,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||||
break;
|
break;
|
||||||
case 22:
|
case 22:
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true)) {
|
||||||
Item_Give(play, ITEM_SONG_REQUIEM);
|
Item_Give(play, ITEM_SONG_REQUIEM);
|
||||||
}
|
}
|
||||||
play->nextEntranceIndex = ENTR_DESERT_COLOSSUS_0;
|
play->nextEntranceIndex = ENTR_DESERT_COLOSSUS_0;
|
||||||
@ -777,7 +777,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FIRE_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FIRE_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_FIRE);
|
Item_Give(play, ITEM_MEDALLION_FIRE);
|
||||||
}
|
}
|
||||||
gSaveContext.chamberCutsceneNum = 1;
|
gSaveContext.chamberCutsceneNum = 1;
|
||||||
@ -859,7 +859,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||||
break;
|
break;
|
||||||
case 47:
|
case 47:
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_NOCTURNE_OF_SHADOW, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_NOCTURNE_OF_SHADOW, true)) {
|
||||||
Item_Give(play, ITEM_SONG_NOCTURNE);
|
Item_Give(play, ITEM_SONG_NOCTURNE);
|
||||||
}
|
}
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW);
|
||||||
@ -2197,7 +2197,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
|||||||
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag));
|
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag));
|
||||||
LUSLOG_INFO("Cutscene_HandleConditionalTriggers - entranceIndex: %#x cutsceneIndex: %#x", gSaveContext.entranceIndex, gSaveContext.cutsceneIndex);
|
LUSLOG_INFO("Cutscene_HandleConditionalTriggers - entranceIndex: %#x cutsceneIndex: %#x", gSaveContext.entranceIndex, gSaveContext.cutsceneIndex);
|
||||||
|
|
||||||
if (!GameInteractor_Should(VB_PLAY_TRANSITION_CS, true, NULL)) {
|
if (!GameInteractor_Should(VB_PLAY_TRANSITION_CS, true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2213,12 +2213,12 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
|||||||
Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP) &&
|
Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP) &&
|
||||||
Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP) &&
|
Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP) &&
|
||||||
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)
|
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)
|
||||||
), NULL)) {
|
))) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
||||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||||
} else if ((gSaveContext.entranceIndex == ENTR_LOST_WOODS_9) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
} else if ((gSaveContext.entranceIndex == ENTR_LOST_WOODS_9) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
|
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FAIRY_OCARINA, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FAIRY_OCARINA, true)) {
|
||||||
Item_Give(play, ITEM_OCARINA_FAIRY);
|
Item_Give(play, ITEM_OCARINA_FAIRY);
|
||||||
}
|
}
|
||||||
gSaveContext.entranceIndex = ENTR_LOST_WOODS_0;
|
gSaveContext.entranceIndex = ENTR_LOST_WOODS_0;
|
||||||
@ -2229,7 +2229,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
|||||||
LINK_IS_ADULT &&
|
LINK_IS_ADULT &&
|
||||||
!Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
|
!Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
|
||||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME)
|
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME)
|
||||||
), NULL)) {
|
))) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
||||||
gSaveContext.entranceIndex = ENTR_TEMPLE_OF_TIME_0;
|
gSaveContext.entranceIndex = ENTR_TEMPLE_OF_TIME_0;
|
||||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||||
|
@ -77,9 +77,9 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
|||||||
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
|
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
|
||||||
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!IS_RANDO ||
|
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!IS_RANDO ||
|
||||||
(IS_RANDO && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
(IS_RANDO && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
||||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true, NULL) &&
|
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true) &&
|
||||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true, NULL) &&
|
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true) &&
|
||||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true, NULL) &&
|
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true) &&
|
||||||
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
|
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
|
||||||
// "Set by existence of horse %d %d %d"
|
// "Set by existence of horse %d %d %d"
|
||||||
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),
|
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),
|
||||||
|
@ -2610,18 +2610,18 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||||||
u8 songItemId = ITEM_SONG_MINUET + gOcarinaSongItemMap[msgCtx->ocarinaStaff->state];
|
u8 songItemId = ITEM_SONG_MINUET + gOcarinaSongItemMap[msgCtx->ocarinaStaff->state];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(songItemId == ITEM_SONG_MINUET && GameInteractor_Should(VB_GIVE_ITEM_MINUET_OF_FOREST, true, NULL)) ||
|
(songItemId == ITEM_SONG_MINUET && GameInteractor_Should(VB_GIVE_ITEM_MINUET_OF_FOREST, true)) ||
|
||||||
(songItemId == ITEM_SONG_BOLERO && GameInteractor_Should(VB_GIVE_ITEM_BOLERO_OF_FIRE, true, NULL)) ||
|
(songItemId == ITEM_SONG_BOLERO && GameInteractor_Should(VB_GIVE_ITEM_BOLERO_OF_FIRE, true)) ||
|
||||||
(songItemId == ITEM_SONG_SERENADE && GameInteractor_Should(VB_GIVE_ITEM_SERENADE_OF_WATER, true, NULL)) ||
|
(songItemId == ITEM_SONG_SERENADE && GameInteractor_Should(VB_GIVE_ITEM_SERENADE_OF_WATER, true)) ||
|
||||||
(songItemId == ITEM_SONG_REQUIEM && GameInteractor_Should(VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true, NULL)) ||
|
(songItemId == ITEM_SONG_REQUIEM && GameInteractor_Should(VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true)) ||
|
||||||
(songItemId == ITEM_SONG_NOCTURNE && GameInteractor_Should(VB_GIVE_ITEM_NOCTURNE_OF_SHADOW, true, NULL)) ||
|
(songItemId == ITEM_SONG_NOCTURNE && GameInteractor_Should(VB_GIVE_ITEM_NOCTURNE_OF_SHADOW, true)) ||
|
||||||
(songItemId == ITEM_SONG_PRELUDE && GameInteractor_Should(VB_GIVE_ITEM_PRELUDE_OF_LIGHT, true, NULL)) ||
|
(songItemId == ITEM_SONG_PRELUDE && GameInteractor_Should(VB_GIVE_ITEM_PRELUDE_OF_LIGHT, true)) ||
|
||||||
(songItemId == ITEM_SONG_LULLABY && GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LULLABY, true, NULL)) ||
|
(songItemId == ITEM_SONG_LULLABY && GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LULLABY, true)) ||
|
||||||
(songItemId == ITEM_SONG_EPONA && GameInteractor_Should(VB_GIVE_ITEM_EPONAS_SONG, true, NULL)) ||
|
(songItemId == ITEM_SONG_EPONA && GameInteractor_Should(VB_GIVE_ITEM_EPONAS_SONG, true)) ||
|
||||||
(songItemId == ITEM_SONG_SARIA && GameInteractor_Should(VB_GIVE_ITEM_SARIAS_SONG, true, NULL)) ||
|
(songItemId == ITEM_SONG_SARIA && GameInteractor_Should(VB_GIVE_ITEM_SARIAS_SONG, true)) ||
|
||||||
(songItemId == ITEM_SONG_SUN && GameInteractor_Should(VB_GIVE_ITEM_SUNS_SONG, true, NULL)) ||
|
(songItemId == ITEM_SONG_SUN && GameInteractor_Should(VB_GIVE_ITEM_SUNS_SONG, true)) ||
|
||||||
(songItemId == ITEM_SONG_TIME && GameInteractor_Should(VB_GIVE_ITEM_SONG_OF_TIME, true, NULL)) ||
|
(songItemId == ITEM_SONG_TIME && GameInteractor_Should(VB_GIVE_ITEM_SONG_OF_TIME, true)) ||
|
||||||
(songItemId == ITEM_SONG_STORMS && GameInteractor_Should(VB_GIVE_ITEM_SONG_OF_STORMS, true, NULL))
|
(songItemId == ITEM_SONG_STORMS && GameInteractor_Should(VB_GIVE_ITEM_SONG_OF_STORMS, true))
|
||||||
) {
|
) {
|
||||||
Item_Give(play, songItemId);
|
Item_Give(play, songItemId);
|
||||||
}
|
}
|
||||||
|
@ -5372,7 +5372,7 @@ void Interface_Draw(PlayState* play) {
|
|||||||
if (fullUi) {
|
if (fullUi) {
|
||||||
s16 PosX_RC;
|
s16 PosX_RC;
|
||||||
s16 PosY_RC;
|
s16 PosY_RC;
|
||||||
if (GameInteractor_Should(VB_RENDER_RUPEE_COUNTER, true, NULL)) {
|
if (GameInteractor_Should(VB_RENDER_RUPEE_COUNTER, true)) {
|
||||||
// Rupee Icon
|
// Rupee Icon
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DynamicWalletIcon"), 0)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("DynamicWalletIcon"), 0)) {
|
||||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||||
@ -5446,7 +5446,7 @@ void Interface_Draw(PlayState* play) {
|
|||||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, PosX_RC, PosY_RC, 16, 16, 1 << 10, 1 << 10);
|
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, PosX_RC, PosY_RC, 16, 16, 1 << 10, 1 << 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_RENDER_KEY_COUNTER, true, NULL)) {
|
if (GameInteractor_Should(VB_RENDER_KEY_COUNTER, true)) {
|
||||||
switch (play->sceneNum) {
|
switch (play->sceneNum) {
|
||||||
case SCENE_FOREST_TEMPLE:
|
case SCENE_FOREST_TEMPLE:
|
||||||
case SCENE_FIRE_TEMPLE:
|
case SCENE_FIRE_TEMPLE:
|
||||||
@ -5527,7 +5527,7 @@ void Interface_Draw(PlayState* play) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_RENDER_RUPEE_COUNTER, true, NULL)) {
|
if (GameInteractor_Should(VB_RENDER_RUPEE_COUNTER, true)) {
|
||||||
// Rupee Counter
|
// Rupee Counter
|
||||||
gDPPipeSync(OVERLAY_DISP++);
|
gDPPipeSync(OVERLAY_DISP++);
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ void Sram_OpenSave() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_REVERT_SPOILING_ITEMS, true, NULL)) {
|
if (GameInteractor_Should(VB_REVERT_SPOILING_ITEMS, true)) {
|
||||||
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
|
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
|
||||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[i]) {
|
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[i]) {
|
||||||
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
|
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
|
||||||
|
@ -276,7 +276,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_BG_BREAKWALL_BREAK, this->collider.base.acFlags & 2 || blueFireArrowHit, NULL)) {
|
if (GameInteractor_Should(VB_BG_BREAKWALL_BREAK, this->collider.base.acFlags & 2 || blueFireArrowHit)) {
|
||||||
Vec3f effectPos;
|
Vec3f effectPos;
|
||||||
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
|
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ void func_808787A4(BgGjyoBridge* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LaunchBridgeCutscene(BgGjyoBridge* this, PlayState* play) {
|
void LaunchBridgeCutscene(BgGjyoBridge* this, PlayState* play) {
|
||||||
if (GameInteractor_Should(VB_PLAY_RAINBOW_BRIDGE_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_RAINBOW_BRIDGE_CS, true)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gRainbowBridgeCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gRainbowBridgeCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play) {
|
|||||||
(INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) &&
|
(INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) &&
|
||||||
CheckPlayerPosition(player, play);
|
CheckPlayerPosition(player, play);
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_RAINBOW_BRIDGE, vanillaBridgeCondition, NULL)) {
|
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_RAINBOW_BRIDGE, vanillaBridgeCondition)) {
|
||||||
LaunchBridgeCutscene(this, play);
|
LaunchBridgeCutscene(this, play);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) {
|
|||||||
(play->csCtx.npcActions[2] != NULL) &&
|
(play->csCtx.npcActions[2] != NULL) &&
|
||||||
(play->csCtx.npcActions[2]->action == 2);
|
(play->csCtx.npcActions[2]->action == 2);
|
||||||
|
|
||||||
if (!GameInteractor_Should(VB_PLAY_RAINBOW_BRIDGE_CS, true, NULL) || vanillaBridgeCondition) {
|
if (!GameInteractor_Should(VB_PLAY_RAINBOW_BRIDGE_CS, true) || vanillaBridgeCondition) {
|
||||||
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
||||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT);
|
Flags_SetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT);
|
||||||
|
@ -61,7 +61,7 @@ void BgSpot12Saku_Init(Actor* thisx, PlayState* play) {
|
|||||||
|
|
||||||
func_808B3420(this, play, &gGerudoFortressGTGShutterCol, DPM_UNK);
|
func_808B3420(this, play, &gGerudoFortressGTGShutterCol, DPM_UNK);
|
||||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||||
if (GameInteractor_Should(VB_GTG_GATE_BE_OPEN, Flags_GetSwitch(play, this->dyna.actor.params & 0x3F), NULL)) {
|
if (GameInteractor_Should(VB_GTG_GATE_BE_OPEN, Flags_GetSwitch(play, this->dyna.actor.params & 0x3F))) {
|
||||||
func_808B3714(this);
|
func_808B3714(this);
|
||||||
} else {
|
} else {
|
||||||
func_808B3550(this);
|
func_808B3550(this);
|
||||||
@ -82,7 +82,7 @@ void func_808B3550(BgSpot12Saku* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_808B357C(BgSpot12Saku* this, PlayState* play) {
|
void func_808B357C(BgSpot12Saku* this, PlayState* play) {
|
||||||
if (GameInteractor_Should(VB_GTG_GATE_BE_OPEN, Flags_GetSwitch(play, this->dyna.actor.params & 0x3F), NULL)) {
|
if (GameInteractor_Should(VB_GTG_GATE_BE_OPEN, Flags_GetSwitch(play, this->dyna.actor.params & 0x3F))) {
|
||||||
func_808B35E4(this);
|
func_808B35E4(this);
|
||||||
this->timer = 20;
|
this->timer = 20;
|
||||||
OnePointCutscene_Init(play, 4170, -99, &this->dyna.actor, MAIN_CAM);
|
OnePointCutscene_Init(play, 4170, -99, &this->dyna.actor, MAIN_CAM);
|
||||||
|
@ -126,7 +126,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
|||||||
if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !IS_RANDO) || IS_RANDO) {
|
if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !IS_RANDO) || IS_RANDO) {
|
||||||
if (Actor_HasParent(&this->actor, play)) {
|
if (Actor_HasParent(&this->actor, play)) {
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_MASTER_SWORD, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_MASTER_SWORD, true)) {
|
||||||
Item_Give(play, ITEM_SWORD_MASTER);
|
Item_Give(play, ITEM_SWORD_MASTER);
|
||||||
}
|
}
|
||||||
play->csCtx.segment = D_808BB2F0;
|
play->csCtx.segment = D_808BB2F0;
|
||||||
|
@ -340,7 +340,7 @@ void BossDodongo_Init(Actor* thisx, PlayState* play) {
|
|||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f,
|
||||||
-3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD);
|
-3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD);
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_BG_BREAKWALL, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, 0x6000, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_BG_BREAKWALL, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, 0x6000, true);
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -690.0f, -1523.76f, -3304.0f, 0, 0, 0, 0, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -690.0f, -1523.76f, -3304.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1845,7 +1845,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
|
|||||||
|
|
||||||
if (this->unk_1DA == 820) {
|
if (this->unk_1DA == 820) {
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(
|
Actor_Spawn(
|
||||||
&play->actorCtx, play, ACTOR_ITEM_B_HEART,
|
&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,
|
Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x, this->actor.world.pos.y,
|
||||||
|
@ -229,7 +229,7 @@ void BossFd_Init(Actor* thisx, PlayState* play) {
|
|||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0,
|
||||||
WARP_DUNGEON_ADULT);
|
WARP_DUNGEON_ADULT);
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 0.0f, 100.0f, 200.0f, 0, 0, 0, 0, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 0.0f, 100.0f, 200.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -917,7 +917,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
|||||||
this->actionFunc = BossFd_Wait;
|
this->actionFunc = BossFd_Wait;
|
||||||
this->actor.world.pos.y -= 1000.0f;
|
this->actor.world.pos.y -= 1000.0f;
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, this->timers[0] == 7, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, this->timers[0] == 7)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
|
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);
|
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||||||
BossGanon_SetIntroCsCamera(this, 11);
|
BossGanon_SetIntroCsCamera(this, 11);
|
||||||
this->unk_198 = 2;
|
this->unk_198 = 2;
|
||||||
this->timers[2] = 110;
|
this->timers[2] = 110;
|
||||||
if (GameInteractor_Should(VB_GANON_HEAL_BEFORE_FIGHT, true, NULL)) {
|
if (GameInteractor_Should(VB_GANON_HEAL_BEFORE_FIGHT, true)) {
|
||||||
gSaveContext.healthAccumulator = 0x140;
|
gSaveContext.healthAccumulator = 0x140;
|
||||||
}
|
}
|
||||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||||
|
@ -237,7 +237,7 @@ void BossGanondrof_Init(Actor* thisx, PlayState* play) {
|
|||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
|
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
|
||||||
GND_BOSSROOM_CENTER_Z, 0, 0, 0, WARP_DUNGEON_ADULT, true);
|
GND_BOSSROOM_CENTER_Z, 0, 0, 0, WARP_DUNGEON_ADULT, true);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 200.0f + GND_BOSSROOM_CENTER_X,
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 200.0f + GND_BOSSROOM_CENTER_X,
|
||||||
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, 0, true);
|
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
@ -966,7 +966,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
|
|||||||
bodyDecayLevel = 1;
|
bodyDecayLevel = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_PHANTOM_GANON_DEATH_SCENE, true, NULL)) {
|
if (GameInteractor_Should(VB_PHANTOM_GANON_DEATH_SCENE, true)) {
|
||||||
Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8);
|
Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8);
|
||||||
Math_ApproachF(&this->cameraNextEye.z, this->targetPos.z + 60.0f, 0.02f, 0.5f);
|
Math_ApproachF(&this->cameraNextEye.z, this->targetPos.z + 60.0f, 0.02f, 0.5f);
|
||||||
Math_ApproachF(&this->actor.world.pos.y, GND_BOSSROOM_CENTER_Y + 133.0f, 0.05f, 100.0f);
|
Math_ApproachF(&this->actor.world.pos.y, GND_BOSSROOM_CENTER_Y + 133.0f, 0.05f, 100.0f);
|
||||||
@ -1081,7 +1081,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
|
|||||||
this->deathCamera = 0;
|
this->deathCamera = 0;
|
||||||
func_80064534(play, &play->csCtx);
|
func_80064534(play, &play->csCtx);
|
||||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
|
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);
|
GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ void BossGoma_Init(Actor* thisx, PlayState* play) {
|
|||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, -640.0f, 0.0f, 0, 0,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, -640.0f, 0.0f, 0, 0,
|
||||||
0, WARP_DUNGEON_CHILD);
|
0, WARP_DUNGEON_CHILD);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 141.0f, -640.0f, -84.0f, 0, 0, 0, 0, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 141.0f, -640.0f, -84.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1123,7 +1123,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
|
|||||||
this->timer = 70;
|
this->timer = 70;
|
||||||
this->decayingProgress = 0;
|
this->decayingProgress = 0;
|
||||||
this->subCameraFollowSpeed = 0.0f;
|
this->subCameraFollowSpeed = 0.0f;
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
|
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);
|
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
|
@ -375,7 +375,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
|
|||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, -280.0f, 0.0f, 0,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, -280.0f, 0.0f, 0,
|
||||||
0, 0, WARP_DUNGEON_ADULT);
|
0, 0, WARP_DUNGEON_ADULT);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -200.0f, -280.0f, 0.0f, 0, 0, 0, 0, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -200.0f, -280.0f, 0.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
play->roomCtx.unk_74[0] = 0xFF;
|
play->roomCtx.unk_74[0] = 0xFF;
|
||||||
@ -1127,7 +1127,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||||||
WARP_DUNGEON_ADULT);
|
WARP_DUNGEON_ADULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 200.0f,
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 200.0f,
|
||||||
-280.0f, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
-280.0f, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) {
|
|||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y,
|
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y,
|
||||||
ROOM_CENTER_Z + 400.0f, 0, 0, 0, WARP_DUNGEON_ADULT, true);
|
ROOM_CENTER_Z + 400.0f, 0, 0, 0, WARP_DUNGEON_ADULT, true);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, ROOM_CENTER_X, ROOM_CENTER_Y,
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, ROOM_CENTER_X, ROOM_CENTER_Y,
|
||||||
ROOM_CENTER_Z - 200.0f, 0, 0, 0, 0, true);
|
ROOM_CENTER_Z - 200.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
@ -1211,7 +1211,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) {
|
|||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y, ROOM_CENTER_Z, 0, 0, 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);
|
WARP_DUNGEON_ADULT, true);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART,
|
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_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);
|
Math_CosS(this->actor.shape.rot.y) * 200.0f + ROOM_CENTER_Z, 0, 0, 0, 0, true);
|
||||||
|
@ -541,7 +541,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
|
|||||||
0, 0, WARP_DUNGEON_ADULT);
|
0, 0, WARP_DUNGEON_ADULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.0f, 0.0f, 0, 0, 0, 0, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.0f, 0.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2806,7 +2806,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
|
|||||||
0, 0, WARP_DUNGEON_ADULT);
|
0, 0, WARP_DUNGEON_ADULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,7 +648,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
|
|||||||
0, true); //! params could be WARP_DUNGEON_CHILD however this can also spawn Ru1
|
0, true); //! params could be WARP_DUNGEON_CHILD however this can also spawn Ru1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 160.0f,
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 160.0f,
|
||||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
@ -1662,7 +1662,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
|
|||||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
||||||
sCsState++;
|
sCsState++;
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true, NULL)) {
|
if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
|
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);
|
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ void func_80969F38(DemoDu* this, PlayState* play) {
|
|||||||
|
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0,
|
||||||
DEMO_EFFECT_MEDAL_FIRE);
|
DEMO_EFFECT_MEDAL_FIRE);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FIRE_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FIRE_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_FIRE);
|
Item_Give(play, ITEM_MEDALLION_FIRE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ void DemoDu_CsFireMedallion_AdvanceTo01(DemoDu* this, PlayState* play) {
|
|||||||
this->updateIndex = CS_FIREMEDALLION_SUBSCENE(1);
|
this->updateIndex = CS_FIREMEDALLION_SUBSCENE(1);
|
||||||
play->csCtx.segment = D_8096C1A4;
|
play->csCtx.segment = D_8096C1A4;
|
||||||
gSaveContext.cutsceneTrigger = 2;
|
gSaveContext.cutsceneTrigger = 2;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FIRE_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FIRE_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_FIRE);
|
Item_Give(play, ITEM_MEDALLION_FIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1054,4 +1054,4 @@ const ActorInit Demo_Du_InitVars = {
|
|||||||
|
|
||||||
void DemoDu_Reset(void) {
|
void DemoDu_Reset(void) {
|
||||||
D_8096CE94 = 0;
|
D_8096CE94 = 0;
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ void func_809853B4(DemoIm* this, PlayState* play) {
|
|||||||
|
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, playerX, playerY, playerZ, 0,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, playerX, playerY, playerZ, 0,
|
||||||
0, 0, 0xD);
|
0, 0, 0xD);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_SHADOW_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_SHADOW_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_SHADOW);
|
Item_Give(play, ITEM_MEDALLION_SHADOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -337,7 +337,7 @@ void func_8098544C(DemoIm* this, PlayState* play) {
|
|||||||
this->action = 1;
|
this->action = 1;
|
||||||
play->csCtx.segment = D_8098786C;
|
play->csCtx.segment = D_8098786C;
|
||||||
gSaveContext.cutsceneTrigger = 2;
|
gSaveContext.cutsceneTrigger = 2;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_SHADOW_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_SHADOW_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_SHADOW);
|
Item_Give(play, ITEM_MEDALLION_SHADOW);
|
||||||
}
|
}
|
||||||
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
||||||
@ -916,7 +916,7 @@ void func_80986C30(DemoIm* this, PlayState* play) {
|
|||||||
func_80985F54(this);
|
func_80985F54(this);
|
||||||
}
|
}
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LULLABY, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LULLABY, true)) {
|
||||||
Item_Give(play, ITEM_SONG_LULLABY);
|
Item_Give(play, ITEM_SONG_LULLABY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ void func_8098E8C8(DemoSa* this, PlayState* play) {
|
|||||||
|
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0,
|
||||||
0xB);
|
0xB);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FOREST_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FOREST_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_FOREST);
|
Item_Give(play, ITEM_MEDALLION_FOREST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ void func_8098E960(DemoSa* this, PlayState* play) {
|
|||||||
this->action = 1;
|
this->action = 1;
|
||||||
play->csCtx.segment = D_8099010C;
|
play->csCtx.segment = D_8099010C;
|
||||||
gSaveContext.cutsceneTrigger = 2;
|
gSaveContext.cutsceneTrigger = 2;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FOREST_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FOREST_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_FOREST);
|
Item_Give(play, ITEM_MEDALLION_FOREST);
|
||||||
}
|
}
|
||||||
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
||||||
|
@ -120,7 +120,7 @@ void func_809B0524(EnAni* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_809B0558(EnAni* this, PlayState* play) {
|
void func_809B0558(EnAni* this, PlayState* play) {
|
||||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
|
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true)) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
EnAni_SetupAction(this, func_809B04F0);
|
EnAni_SetupAction(this, func_809B04F0);
|
||||||
@ -129,7 +129,7 @@ void func_809B0558(EnAni* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
Flags_SetItemGetInf(ITEMGETINF_15);
|
Flags_SetItemGetInf(ITEMGETINF_15);
|
||||||
} else {
|
} else {
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true)) {
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@ void func_809B05F0(EnAni* this, PlayState* play) {
|
|||||||
EnAni_SetupAction(this, func_809B0558);
|
EnAni_SetupAction(this, func_809B0558);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true)) {
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
|
|||||||
if (frameCount == 30.0f) {
|
if (frameCount == 30.0f) {
|
||||||
this->dialogState = TEXT_STATE_EVENT;
|
this->dialogState = TEXT_STATE_EVENT;
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_BE_ABLE_TO_PLAY_BOMBCHU_BOWLING, (Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) || BREG(2), NULL)) {
|
if (GameInteractor_Should(VB_BE_ABLE_TO_PLAY_BOMBCHU_BOWLING, (Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) || BREG(2))) {
|
||||||
this->actor.textId = 0xBF;
|
this->actor.textId = 0xBF;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x7058;
|
this->actor.textId = 0x7058;
|
||||||
|
@ -166,7 +166,7 @@ void EnDs_OfferOddPotion(EnDs* this, PlayState* play) {
|
|||||||
s32 EnDs_CheckRupeesAndBottle() {
|
s32 EnDs_CheckRupeesAndBottle() {
|
||||||
if (GameInteractor_Should(VB_GRANNY_SAY_INSUFFICIENT_RUPEES, gSaveContext.rupees < 100, NULL)) {
|
if (GameInteractor_Should(VB_GRANNY_SAY_INSUFFICIENT_RUPEES, gSaveContext.rupees < 100, NULL)) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (GameInteractor_Should(VB_NEED_BOTTLE_FOR_GRANNYS_ITEM, Inventory_HasEmptyBottle() == 0, NULL)) {
|
} else if (GameInteractor_Should(VB_NEED_BOTTLE_FOR_GRANNYS_ITEM, Inventory_HasEmptyBottle() == 0)) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 2;
|
return 2;
|
||||||
|
@ -377,7 +377,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
|
|||||||
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||||
EnDu_SetupAction(this, func_809FE3C0);
|
EnDu_SetupAction(this, func_809FE3C0);
|
||||||
} else if (play->msgCtx.ocarinaMode >= OCARINA_MODE_06) {
|
} else if (play->msgCtx.ocarinaMode >= OCARINA_MODE_06) {
|
||||||
if (GameInteractor_Should(VB_PLAY_DARUNIAS_JOY_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_DARUNIAS_JOY_CS, true)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
@ -386,7 +386,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
|
|||||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||||
if (GameInteractor_Should(VB_PLAY_DARUNIAS_JOY_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_DARUNIAS_JOY_CS, true)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
@ -554,7 +554,7 @@ void func_809FEB08(EnDu* this, PlayState* play) {
|
|||||||
EnDu_SetupAction(this, func_809FE3C0);
|
EnDu_SetupAction(this, func_809FE3C0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_DARUNIAS_JOY_REWARD, CUR_UPG_VALUE(UPG_STRENGTH) <= 0, NULL)) {
|
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_DARUNIAS_JOY_REWARD, CUR_UPG_VALUE(UPG_STRENGTH) <= 0)) {
|
||||||
Flags_SetRandomizerInf(RAND_INF_DARUNIAS_JOY);
|
Flags_SetRandomizerInf(RAND_INF_DARUNIAS_JOY);
|
||||||
this->actor.textId = 0x301C;
|
this->actor.textId = 0x301C;
|
||||||
EnDu_SetupAction(this, func_809FEC14);
|
EnDu_SetupAction(this, func_809FEC14);
|
||||||
@ -576,7 +576,7 @@ void func_809FEC14(EnDu* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_809FEC70(EnDu* this, PlayState* play) {
|
void func_809FEC70(EnDu* this, PlayState* play) {
|
||||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_STRENGTH_1, true, NULL)) {
|
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_STRENGTH_1, true)) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
EnDu_SetupAction(this, func_809FECE4);
|
EnDu_SetupAction(this, func_809FECE4);
|
||||||
} else {
|
} else {
|
||||||
|
@ -134,7 +134,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
|
|||||||
case GE1_TYPE_GATE_OPERATOR:
|
case GE1_TYPE_GATE_OPERATOR:
|
||||||
this->hairstyle = GE1_HAIR_STRAIGHT;
|
this->hairstyle = GE1_HAIR_STRAIGHT;
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed(), NULL)) {
|
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed())) {
|
||||||
this->actionFunc = EnGe1_CheckGate_GateOp;
|
this->actionFunc = EnGe1_CheckGate_GateOp;
|
||||||
} else {
|
} else {
|
||||||
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
|
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
|
||||||
@ -144,7 +144,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
|
|||||||
case GE1_TYPE_NORMAL:
|
case GE1_TYPE_NORMAL:
|
||||||
this->hairstyle = GE1_HAIR_STRAIGHT;
|
this->hairstyle = GE1_HAIR_STRAIGHT;
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed(), NULL)) {
|
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed())) {
|
||||||
this->actionFunc = EnGe1_SetNormalText;
|
this->actionFunc = EnGe1_SetNormalText;
|
||||||
} else {
|
} else {
|
||||||
this->actionFunc = EnGe1_WatchForAndSensePlayer;
|
this->actionFunc = EnGe1_WatchForAndSensePlayer;
|
||||||
@ -174,7 +174,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
|
|||||||
|
|
||||||
if (gSaveContext.eventInf[0] & 0x100) {
|
if (gSaveContext.eventInf[0] & 0x100) {
|
||||||
this->actionFunc = EnGe1_TalkAfterGame_Archery;
|
this->actionFunc = EnGe1_TalkAfterGame_Archery;
|
||||||
} else if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed(), NULL)) {
|
} else if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed())) {
|
||||||
this->actionFunc = EnGe1_Wait_Archery;
|
this->actionFunc = EnGe1_Wait_Archery;
|
||||||
} else {
|
} else {
|
||||||
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
|
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
|
||||||
@ -184,7 +184,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
|
|||||||
case GE1_TYPE_TRAINING_GROUNDS_GUARD:
|
case GE1_TYPE_TRAINING_GROUNDS_GUARD:
|
||||||
this->hairstyle = GE1_HAIR_STRAIGHT;
|
this->hairstyle = GE1_HAIR_STRAIGHT;
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed(), NULL)) {
|
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe1_CheckCarpentersFreed())) {
|
||||||
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
|
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
|
||||||
} else {
|
} else {
|
||||||
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
|
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
|
||||||
|
@ -140,14 +140,14 @@ void EnGe2_Init(Actor* thisx, PlayState* play) {
|
|||||||
switch (this->actor.params & 0xFF) {
|
switch (this->actor.params & 0xFF) {
|
||||||
case GE2_TYPE_PATROLLING:
|
case GE2_TYPE_PATROLLING:
|
||||||
EnGe2_ChangeAction(this, GE2_ACTION_WALK);
|
EnGe2_ChangeAction(this, GE2_ACTION_WALK);
|
||||||
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed(), NULL)) {
|
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed())) {
|
||||||
this->actor.update = EnGe2_UpdateFriendly;
|
this->actor.update = EnGe2_UpdateFriendly;
|
||||||
this->actor.targetMode = 6;
|
this->actor.targetMode = 6;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GE2_TYPE_STATIONARY:
|
case GE2_TYPE_STATIONARY:
|
||||||
EnGe2_ChangeAction(this, GE2_ACTION_STAND);
|
EnGe2_ChangeAction(this, GE2_ACTION_STAND);
|
||||||
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed(), NULL)) {
|
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed())) {
|
||||||
this->actor.update = EnGe2_UpdateFriendly;
|
this->actor.update = EnGe2_UpdateFriendly;
|
||||||
this->actor.targetMode = 6;
|
this->actor.targetMode = 6;
|
||||||
}
|
}
|
||||||
@ -460,7 +460,7 @@ void EnGe2_WaitLookAtPlayer(EnGe2* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) {
|
void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) {
|
||||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true, NULL)) {
|
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true)) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
this->actionFunc = EnGe2_SetActionAfterTalk;
|
this->actionFunc = EnGe2_SetActionAfterTalk;
|
||||||
} else {
|
} else {
|
||||||
@ -473,7 +473,7 @@ void EnGe2_GiveCard(EnGe2* this, PlayState* play) {
|
|||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
||||||
this->actionFunc = EnGe2_WaitTillCardGiven;
|
this->actionFunc = EnGe2_WaitTillCardGiven;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true)) {
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
Actor_OfferGetItem(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -605,7 +605,7 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
EnGe2_MoveAndBlink(this, play);
|
EnGe2_MoveAndBlink(this, play);
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed(), NULL) && !(this->stateFlags & GE2_STATE_KO)) {
|
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed()) && !(this->stateFlags & GE2_STATE_KO)) {
|
||||||
this->actor.update = EnGe2_UpdateFriendly;
|
this->actor.update = EnGe2_UpdateFriendly;
|
||||||
this->actor.targetMode = 6;
|
this->actor.targetMode = 6;
|
||||||
}
|
}
|
||||||
@ -630,7 +630,7 @@ void EnGe2_UpdateStunned(Actor* thisx, PlayState* play2) {
|
|||||||
}
|
}
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed(), NULL)) {
|
if (GameInteractor_Should(VB_GERUDOS_BE_FRIENDLY, EnGe2_CheckCarpentersFreed())) {
|
||||||
this->actor.update = EnGe2_UpdateFriendly;
|
this->actor.update = EnGe2_UpdateFriendly;
|
||||||
this->actor.targetMode = 6;
|
this->actor.targetMode = 6;
|
||||||
this->actor.colorFilterTimer = 0;
|
this->actor.colorFilterTimer = 0;
|
||||||
|
@ -141,7 +141,7 @@ void EnGe3_WaitLookAtPlayer(EnGe3* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) {
|
void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) {
|
||||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true, NULL)) {
|
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true)) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
this->actionFunc = EnGe3_Wait;
|
this->actionFunc = EnGe3_Wait;
|
||||||
} else {
|
} else {
|
||||||
@ -154,7 +154,7 @@ void EnGe3_GiveCard(EnGe3* this, PlayState* play) {
|
|||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
||||||
this->actionFunc = EnGe3_WaitTillCardGiven;
|
this->actionFunc = EnGe3_WaitTillCardGiven;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_GERUDO_MEMBERSHIP_CARD, true)) {
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
Actor_OfferGetItem(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ s32 func_80A3D7C8(void) {
|
|||||||
return 0;
|
return 0;
|
||||||
} else if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_GIANTS_KNIFE_PURCHASE, (
|
} else if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_GIANTS_KNIFE_PURCHASE, (
|
||||||
!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BIGGORON) // Don't have giant's knife
|
!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BIGGORON) // Don't have giant's knife
|
||||||
), NULL)) {
|
))) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) { // Have broken giant's knife
|
} else if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) { // Have broken giant's knife
|
||||||
return 2;
|
return 2;
|
||||||
|
@ -407,9 +407,9 @@ s16 EnGo2_UpdateTalkStateGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u16 EnGo2_GetTextIdGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
u16 EnGo2_GetTextIdGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
||||||
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) && LINK_IS_ADULT) {
|
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) && LINK_IS_ADULT) {
|
||||||
return 0x3043;
|
return 0x3043;
|
||||||
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY), NULL)) {
|
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY))) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE) ? 0x3021 : Flags_GetInfTable(INFTABLE_E0) ? 0x302A : 0x3008;
|
return Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE) ? 0x3021 : Flags_GetInfTable(INFTABLE_E0) ? 0x302A : 0x3008;
|
||||||
@ -428,9 +428,9 @@ s16 EnGo2_UpdateTalkStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u16 EnGo2_GetTextIdGoronCityEntrance(PlayState* play, EnGo2* this) {
|
u16 EnGo2_GetTextIdGoronCityEntrance(PlayState* play, EnGo2* this) {
|
||||||
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) && LINK_IS_ADULT) {
|
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) && LINK_IS_ADULT) {
|
||||||
return 0x3043;
|
return 0x3043;
|
||||||
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY), NULL)) {
|
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY))) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return Flags_GetInfTable(INFTABLE_F0) ? 0x3015 : 0x3014;
|
return Flags_GetInfTable(INFTABLE_F0) ? 0x3015 : 0x3014;
|
||||||
@ -449,9 +449,9 @@ s16 EnGo2_UpdateTalkStateGoronCityEntrance(PlayState* play, EnGo2* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u16 EnGo2_GetTextIdGoronCityIsland(PlayState* play, EnGo2* this) {
|
u16 EnGo2_GetTextIdGoronCityIsland(PlayState* play, EnGo2* this) {
|
||||||
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) && LINK_IS_ADULT) {
|
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) && LINK_IS_ADULT) {
|
||||||
return 0x3043;
|
return 0x3043;
|
||||||
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY), NULL)) {
|
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY))) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return Flags_GetInfTable(INFTABLE_F4) ? 0x3017 : 0x3016;
|
return Flags_GetInfTable(INFTABLE_F4) ? 0x3017 : 0x3016;
|
||||||
@ -470,9 +470,9 @@ s16 EnGo2_UpdateTalkStateGoronCityIsland(PlayState* play, EnGo2* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
||||||
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) && LINK_IS_ADULT) {
|
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) && LINK_IS_ADULT) {
|
||||||
return 0x3043;
|
return 0x3043;
|
||||||
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY), NULL)) {
|
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_DODONGOS_CAVERN_FINISHED, CHECK_QUEST_ITEM(QUEST_GORON_RUBY))) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
|
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
|
||||||
@ -500,9 +500,9 @@ u16 EnGo2_GetTextIdGoronCityLink(PlayState* play, EnGo2* this) {
|
|||||||
return overrideTextId;
|
return overrideTextId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL)) {
|
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE))) {
|
||||||
return Flags_GetInfTable(INFTABLE_10F) ? 0x3042 : 0x3041;
|
return Flags_GetInfTable(INFTABLE_10F) ? 0x3042 : 0x3041;
|
||||||
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON), NULL)) {
|
} else if (GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON))) {
|
||||||
return Flags_GetInfTable(INFTABLE_SPOKE_TO_GORON_LINK) ? 0x3038 : 0x3037;
|
return Flags_GetInfTable(INFTABLE_SPOKE_TO_GORON_LINK) ? 0x3038 : 0x3037;
|
||||||
} else if (Flags_GetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING)) {
|
} else if (Flags_GetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING)) {
|
||||||
this->unk_20C = 0;
|
this->unk_20C = 0;
|
||||||
@ -568,7 +568,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
|
|||||||
u16 EnGo2_GetTextIdGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
u16 EnGo2_GetTextIdGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_TRADE_COMPLETE, gSaveContext.bgsFlag, NULL)) {
|
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_TRADE_COMPLETE, gSaveContext.bgsFlag)) {
|
||||||
player->exchangeItemId = EXCH_ITEM_CLAIM_CHECK;
|
player->exchangeItemId = EXCH_ITEM_CLAIM_CHECK;
|
||||||
return 0x305E;
|
return 0x305E;
|
||||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
|
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
|
||||||
@ -590,7 +590,7 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
|||||||
switch (EnGo2_GetDialogState(this, play)) {
|
switch (EnGo2_GetDialogState(this, play)) {
|
||||||
case TEXT_STATE_DONE:
|
case TEXT_STATE_DONE:
|
||||||
if (this->actor.textId == 0x305E) {
|
if (this->actor.textId == 0x305E) {
|
||||||
if (!GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_COLLECTED, gSaveContext.bgsFlag, NULL)) {
|
if (!GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_COLLECTED, gSaveContext.bgsFlag)) {
|
||||||
Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_DMT_TRADE_CLAIM_CHECK);
|
Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_DMT_TRADE_CLAIM_CHECK);
|
||||||
EnGo2_GetItem(this, play, GI_SWORD_BGS);
|
EnGo2_GetItem(this, play, GI_SWORD_BGS);
|
||||||
this->actionFunc = EnGo2_SetupGetItem;
|
this->actionFunc = EnGo2_SetupGetItem;
|
||||||
@ -1022,7 +1022,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
|||||||
u16 textId;
|
u16 textId;
|
||||||
|
|
||||||
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
|
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
|
||||||
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_TRADE_COMPLETE, gSaveContext.bgsFlag, NULL)) {
|
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_TRADE_COMPLETE, gSaveContext.bgsFlag)) {
|
||||||
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||||
this->actor.textId = 0x3003;
|
this->actor.textId = 0x3003;
|
||||||
} else {
|
} else {
|
||||||
@ -1031,18 +1031,18 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
|||||||
player->actor.textId = this->actor.textId;
|
player->actor.textId = this->actor.textId;
|
||||||
|
|
||||||
} else if (
|
} else if (
|
||||||
!GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_COLLECTED, gSaveContext.bgsFlag, NULL) &&
|
!GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_COLLECTED, gSaveContext.bgsFlag) &&
|
||||||
(INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK)
|
(INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK)
|
||||||
) {
|
) {
|
||||||
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||||
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_FORGED, Environment_GetBgsDayCount() >= 3, NULL)) {
|
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_FORGED, Environment_GetBgsDayCount() >= 3)) {
|
||||||
textId = 0x305E;
|
textId = 0x305E;
|
||||||
} else {
|
} else {
|
||||||
textId = 0x305D;
|
textId = 0x305D;
|
||||||
}
|
}
|
||||||
this->actor.textId = textId;
|
this->actor.textId = textId;
|
||||||
} else {
|
} else {
|
||||||
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_FORGED, Environment_GetBgsDayCount() >= 3, NULL)) {
|
if (GameInteractor_Should(VB_BIGGORON_CONSIDER_SWORD_FORGED, Environment_GetBgsDayCount() >= 3)) {
|
||||||
textId = 0x3002;
|
textId = 0x3002;
|
||||||
} else {
|
} else {
|
||||||
textId = 0x305D;
|
textId = 0x305D;
|
||||||
@ -1171,8 +1171,8 @@ s32 EnGo2_IsCameraModified(EnGo2* this, PlayState* play) {
|
|||||||
(this->actor.params & 0x1F) == GORON_MARKET_BAZAAR) {
|
(this->actor.params & 0x1F) == GORON_MARKET_BAZAAR) {
|
||||||
return true;
|
return true;
|
||||||
} else if (
|
} else if (
|
||||||
!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) &&
|
!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) &&
|
||||||
GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON), NULL)
|
GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON))
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@ -1231,8 +1231,8 @@ void EnGo2_SelectGoronWakingUp(EnGo2* this) {
|
|||||||
break;
|
break;
|
||||||
case GORON_CITY_LINK:
|
case GORON_CITY_LINK:
|
||||||
if (
|
if (
|
||||||
!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) &&
|
!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) &&
|
||||||
GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON), NULL)
|
GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON))
|
||||||
) {
|
) {
|
||||||
EnGo2_WakingUp(this);
|
EnGo2_WakingUp(this);
|
||||||
break;
|
break;
|
||||||
@ -1561,7 +1561,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
|||||||
case GORON_CITY_LOWEST_FLOOR:
|
case GORON_CITY_LOWEST_FLOOR:
|
||||||
case GORON_CITY_STAIRWELL:
|
case GORON_CITY_STAIRWELL:
|
||||||
case GORON_CITY_LOST_WOODS:
|
case GORON_CITY_LOST_WOODS:
|
||||||
if (!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) && LINK_IS_ADULT) {
|
if (!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) && LINK_IS_ADULT) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
}
|
}
|
||||||
this->actionFunc = EnGo2_CurledUp;
|
this->actionFunc = EnGo2_CurledUp;
|
||||||
@ -1577,8 +1577,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
|||||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||||
this->actor.home.pos = this->actor.world.pos;
|
this->actor.home.pos = this->actor.world.pos;
|
||||||
if (
|
if (
|
||||||
!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE), NULL) &&
|
!GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) &&
|
||||||
GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON), NULL)
|
GameInteractor_Should(VB_GORONS_CONSIDER_TUNIC_COLLECTED, CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON))
|
||||||
) {
|
) {
|
||||||
EnGo2_GetItemAnimation(this, play);
|
EnGo2_GetItemAnimation(this, play);
|
||||||
} else {
|
} else {
|
||||||
@ -1795,7 +1795,7 @@ void EnGo2_ReverseRolling(EnGo2* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
|
void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
|
||||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_FROM_GORON, true, NULL)) {
|
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_FROM_GORON, true)) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
this->actionFunc = EnGo2_SetGetItem;
|
this->actionFunc = EnGo2_SetGetItem;
|
||||||
} else {
|
} else {
|
||||||
@ -1804,7 +1804,7 @@ void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
|
void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
|
||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || !GameInteractor_Should(VB_GIVE_ITEM_FROM_GORON, true, NULL)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || !GameInteractor_Should(VB_GIVE_ITEM_FROM_GORON, true)) {
|
||||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||||
switch (this->getItemId) {
|
switch (this->getItemId) {
|
||||||
case GI_CLAIM_CHECK:
|
case GI_CLAIM_CHECK:
|
||||||
@ -1816,7 +1816,7 @@ void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
|
|||||||
EnGo2_GetItemAnimation(this, play);
|
EnGo2_GetItemAnimation(this, play);
|
||||||
return;
|
return;
|
||||||
case GI_SWORD_BGS:
|
case GI_SWORD_BGS:
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_GORON, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_GORON, true)) {
|
||||||
gSaveContext.bgsFlag = true;
|
gSaveContext.bgsFlag = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1837,12 +1837,12 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
|
|||||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||||
this->actor.shape.rot.y += 0x5B0;
|
this->actor.shape.rot.y += 0x5B0;
|
||||||
this->trackingMode = NPC_TRACKING_NONE;
|
this->trackingMode = NPC_TRACKING_NONE;
|
||||||
this->animTimer = !GameInteractor_Should(VB_PLAY_EYEDROPS_CS, true, NULL) ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
|
this->animTimer = !GameInteractor_Should(VB_PLAY_EYEDROPS_CS, true) ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
|
||||||
this->eyeMouthTexState = 2;
|
this->eyeMouthTexState = 2;
|
||||||
this->unk_20C = 0;
|
this->unk_20C = 0;
|
||||||
this->goronState++;
|
this->goronState++;
|
||||||
func_800F483C(0x28, 5);
|
func_800F483C(0x28, 5);
|
||||||
if (GameInteractor_Should(VB_PLAY_EYEDROPS_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_EYEDROPS_CS, true)) {
|
||||||
OnePointCutscene_Init(play, 4190, -99, &this->actor, MAIN_CAM);
|
OnePointCutscene_Init(play, 4190, -99, &this->actor, MAIN_CAM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -130,7 +130,7 @@ void func_80A6E5EC(EnHs* this, PlayState* play) {
|
|||||||
|
|
||||||
void func_80A6E630(EnHs* this, PlayState* play) {
|
void func_80A6E630(EnHs* this, PlayState* play) {
|
||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||||
if (GameInteractor_Should(VB_TRADE_TIMER_ODD_MUSHROOM, true, NULL)) {
|
if (GameInteractor_Should(VB_TRADE_TIMER_ODD_MUSHROOM, true)) {
|
||||||
func_80088AA0(180);
|
func_80088AA0(180);
|
||||||
gSaveContext.eventInf[1] &= ~1;
|
gSaveContext.eventInf[1] &= ~1;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
|
|||||||
|
|
||||||
this->unk_194++;
|
this->unk_194++;
|
||||||
|
|
||||||
if ((BREG(1) != 0) || GameInteractor_Should(VB_SKIP_SCARECROWS_SONG, false, NULL) && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
|
if ((BREG(1) != 0) || GameInteractor_Should(VB_SKIP_SCARECROWS_SONG, false) && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
|
||||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y)) {
|
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y)) {
|
||||||
this->actor.draw = func_80A90948;
|
this->actor.draw = func_80A90948;
|
||||||
Collider_InitCylinder(play, &this->collider);
|
Collider_InitCylinder(play, &this->collider);
|
||||||
|
@ -524,7 +524,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
|
|||||||
|
|
||||||
void EnKz_StartTimer(EnKz* this, PlayState* play) {
|
void EnKz_StartTimer(EnKz* this, PlayState* play) {
|
||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG && GameInteractor_Should(VB_TRADE_TIMER_FROG, true, NULL)) {
|
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG && GameInteractor_Should(VB_TRADE_TIMER_FROG, true)) {
|
||||||
func_80088AA0(180); // start timer2 with 3 minutes
|
func_80088AA0(180); // start timer2 with 3 minutes
|
||||||
gSaveContext.eventInf[1] &= ~1;
|
gSaveContext.eventInf[1] &= ~1;
|
||||||
}
|
}
|
||||||
|
@ -91,8 +91,8 @@ static void* sEyeTextures[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
u16 EnMa1_GetText(PlayState* play, Actor* thisx) {
|
u16 EnMa1_GetText(PlayState* play, Actor* thisx) {
|
||||||
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE), NULL);
|
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE));
|
||||||
bool malonTaughtEponasSong = GameInteractor_Should(VB_MALON_ALREADY_TAUGHT_EPONAS_SONG, CHECK_QUEST_ITEM(QUEST_SONG_EPONA), NULL);
|
bool malonTaughtEponasSong = GameInteractor_Should(VB_MALON_ALREADY_TAUGHT_EPONAS_SONG, CHECK_QUEST_ITEM(QUEST_SONG_EPONA));
|
||||||
u16 faceReaction = Text_GetFaceReaction(play, 0x17);
|
u16 faceReaction = Text_GetFaceReaction(play, 0x17);
|
||||||
|
|
||||||
if (faceReaction != 0) {
|
if (faceReaction != 0) {
|
||||||
@ -185,7 +185,7 @@ s16 func_80AA0778(PlayState* play, Actor* thisx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 func_80AA08C4(EnMa1* this, PlayState* play) {
|
s32 func_80AA08C4(EnMa1* this, PlayState* play) {
|
||||||
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE), NULL);
|
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE));
|
||||||
|
|
||||||
if ((this->actor.shape.rot.z == 3) && (gSaveContext.sceneSetupIndex == 5)) {
|
if ((this->actor.shape.rot.z == 3) && (gSaveContext.sceneSetupIndex == 5)) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -269,8 +269,8 @@ void func_80AA0B74(EnMa1* this) {
|
|||||||
|
|
||||||
void EnMa1_Init(Actor* thisx, PlayState* play) {
|
void EnMa1_Init(Actor* thisx, PlayState* play) {
|
||||||
EnMa1* this = (EnMa1*)thisx;
|
EnMa1* this = (EnMa1*)thisx;
|
||||||
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE), NULL);
|
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE));
|
||||||
bool malonTaughtEponasSong = GameInteractor_Should(VB_MALON_ALREADY_TAUGHT_EPONAS_SONG, CHECK_QUEST_ITEM(QUEST_SONG_EPONA), NULL);
|
bool malonTaughtEponasSong = GameInteractor_Should(VB_MALON_ALREADY_TAUGHT_EPONAS_SONG, CHECK_QUEST_ITEM(QUEST_SONG_EPONA));
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f);
|
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f);
|
||||||
@ -306,8 +306,8 @@ void EnMa1_Destroy(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80AA0D88(EnMa1* this, PlayState* play) {
|
void func_80AA0D88(EnMa1* this, PlayState* play) {
|
||||||
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE), NULL);
|
bool malonReturnedFromCastle = GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE));
|
||||||
bool malonTaughtEponasSong = GameInteractor_Should(VB_MALON_ALREADY_TAUGHT_EPONAS_SONG, CHECK_QUEST_ITEM(QUEST_SONG_EPONA), NULL);
|
bool malonTaughtEponasSong = GameInteractor_Should(VB_MALON_ALREADY_TAUGHT_EPONAS_SONG, CHECK_QUEST_ITEM(QUEST_SONG_EPONA));
|
||||||
|
|
||||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||||
if (this->skelAnime.animation != &gMalonChildIdleAnim) {
|
if (this->skelAnime.animation != &gMalonChildIdleAnim) {
|
||||||
@ -331,7 +331,7 @@ void func_80AA0D88(EnMa1* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80AA0EA0(EnMa1* this, PlayState* play) {
|
void func_80AA0EA0(EnMa1* this, PlayState* play) {
|
||||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_WEIRD_EGG, true, NULL)) {
|
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_WEIRD_EGG, true)) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
this->actionFunc = func_80AA0EFC;
|
this->actionFunc = func_80AA0EFC;
|
||||||
} else {
|
} else {
|
||||||
@ -340,7 +340,7 @@ void func_80AA0EA0(EnMa1* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80AA0EFC(EnMa1* this, PlayState* play) {
|
void func_80AA0EFC(EnMa1* this, PlayState* play) {
|
||||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN || !GameInteractor_Should(VB_GIVE_ITEM_WEIRD_EGG, true, NULL)) {
|
if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN || !GameInteractor_Should(VB_GIVE_ITEM_WEIRD_EGG, true)) {
|
||||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||||
this->actionFunc = func_80AA0D88;
|
this->actionFunc = func_80AA0D88;
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_POCKET_EGG);
|
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_POCKET_EGG);
|
||||||
|
@ -97,7 +97,7 @@ void func_80AACA94(EnMk* this, PlayState* play) {
|
|||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
this->actionFunc = func_80AACA40;
|
this->actionFunc = func_80AACA40;
|
||||||
Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_LH_TRADE_FROG);
|
Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_LH_TRADE_FROG);
|
||||||
if (GameInteractor_Should(VB_TRADE_TIMER_EYEDROPS, true, NULL)) {
|
if (GameInteractor_Should(VB_TRADE_TIMER_EYEDROPS, true)) {
|
||||||
func_80088AA0(240);
|
func_80088AA0(240);
|
||||||
gSaveContext.eventInf[1] &= ~1;
|
gSaveContext.eventInf[1] &= ~1;
|
||||||
}
|
}
|
||||||
|
@ -327,7 +327,7 @@ void EnNb_GiveMedallion(EnNb* this, PlayState* play) {
|
|||||||
|
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0,
|
||||||
0xC);
|
0xC);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_SPIRIT_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_SPIRIT_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_SPIRIT);
|
Item_Give(play, ITEM_MEDALLION_SPIRIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -345,7 +345,7 @@ void EnNb_SetupChamberCsImpl(EnNb* this, PlayState* play) {
|
|||||||
this->action = NB_CHAMBER_UNDERGROUND;
|
this->action = NB_CHAMBER_UNDERGROUND;
|
||||||
play->csCtx.segment = &D_80AB431C;
|
play->csCtx.segment = &D_80AB431C;
|
||||||
gSaveContext.cutsceneTrigger = 2;
|
gSaveContext.cutsceneTrigger = 2;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_SPIRIT_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_SPIRIT_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_SPIRIT);
|
Item_Give(play, ITEM_MEDALLION_SPIRIT);
|
||||||
}
|
}
|
||||||
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
||||||
|
@ -127,7 +127,7 @@ void func_80AE7590(EnRl* this, PlayState* play) {
|
|||||||
pos.y = player->actor.world.pos.y + 80.0f;
|
pos.y = player->actor.world.pos.y + 80.0f;
|
||||||
pos.z = player->actor.world.pos.z;
|
pos.z = player->actor.world.pos.z;
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, pos.x, pos.y, pos.z, 0, 0, 0, 0xE, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, pos.x, pos.y, pos.z, 0, 0, 0, 0xE, true);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_LIGHT);
|
Item_Give(play, ITEM_MEDALLION_LIGHT);
|
||||||
}
|
}
|
||||||
this->lightMedallionGiven = 1;
|
this->lightMedallionGiven = 1;
|
||||||
|
@ -261,7 +261,7 @@ void func_80AF2A38(EnRu2* this, PlayState* play) {
|
|||||||
f32 posZ = player->actor.world.pos.z;
|
f32 posZ = player->actor.world.pos.z;
|
||||||
|
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, 10);
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, 10);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_WATER_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_WATER_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_WATER);
|
Item_Give(play, ITEM_MEDALLION_WATER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ void func_80AF2AB4(EnRu2* this, PlayState* play) {
|
|||||||
this->action = 1;
|
this->action = 1;
|
||||||
play->csCtx.segment = &D_80AF411C;
|
play->csCtx.segment = &D_80AF411C;
|
||||||
gSaveContext.cutsceneTrigger = 2;
|
gSaveContext.cutsceneTrigger = 2;
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_WATER_MEDALLION, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_WATER_MEDALLION, true)) {
|
||||||
Item_Give(play, ITEM_MEDALLION_WATER);
|
Item_Give(play, ITEM_MEDALLION_WATER);
|
||||||
}
|
}
|
||||||
temp = this->actor.world.rot.y + 0x8000;
|
temp = this->actor.world.rot.y + 0x8000;
|
||||||
|
@ -391,10 +391,10 @@ s32 func_80AF5DFC(EnSa* this, PlayState* play) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (play->sceneNum == SCENE_SACRED_FOREST_MEADOW && (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER))) {
|
if (play->sceneNum == SCENE_SACRED_FOREST_MEADOW && (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER))) {
|
||||||
return GameInteractor_Should(VB_BE_ELIGIBLE_FOR_SARIAS_SONG, !CHECK_QUEST_ITEM(QUEST_SONG_SARIA), NULL) ? 5 : 2;
|
return GameInteractor_Should(VB_BE_ELIGIBLE_FOR_SARIAS_SONG, !CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) ? 5 : 2;
|
||||||
}
|
}
|
||||||
if (play->sceneNum == SCENE_KOKIRI_FOREST && !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
if (play->sceneNum == SCENE_KOKIRI_FOREST && !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||||
if (GameInteractor_Should(VB_NOT_BE_GREETED_BY_SARIA, Flags_GetInfTable(INFTABLE_GREETED_BY_SARIA), NULL)) {
|
if (GameInteractor_Should(VB_NOT_BE_GREETED_BY_SARIA, Flags_GetInfTable(INFTABLE_GREETED_BY_SARIA))) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 4;
|
return 4;
|
||||||
@ -708,7 +708,7 @@ void func_80AF68E4(EnSa* this, PlayState* play) {
|
|||||||
|
|
||||||
void func_80AF6B20(EnSa* this, PlayState* play) {
|
void func_80AF6B20(EnSa* this, PlayState* play) {
|
||||||
if (play->sceneNum == SCENE_SACRED_FOREST_MEADOW) {
|
if (play->sceneNum == SCENE_SACRED_FOREST_MEADOW) {
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_SARIAS_SONG, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_SARIAS_SONG, true)) {
|
||||||
Item_Give(play, ITEM_SONG_SARIA);
|
Item_Give(play, ITEM_SONG_SARIA);
|
||||||
}
|
}
|
||||||
EnSa_ChangeAnim(this, ENSA_ANIM1_6);
|
EnSa_ChangeAnim(this, ENSA_ANIM1_6);
|
||||||
|
@ -291,7 +291,7 @@ void func_80B20768(EnToryo* this, PlayState* play) {
|
|||||||
s16 sp32;
|
s16 sp32;
|
||||||
s16 sp30;
|
s16 sp30;
|
||||||
|
|
||||||
if (this->unk_1E4 == 3 && !GameInteractor_Should(VB_FIX_SAW_SOFTLOCK, false, NULL)) {
|
if (this->unk_1E4 == 3 && !GameInteractor_Should(VB_FIX_SAW_SOFTLOCK, false)) {
|
||||||
Actor_ProcessTalkRequest(&this->actor, play);
|
Actor_ProcessTalkRequest(&this->actor, play);
|
||||||
Message_ContinueTextbox(play, this->actor.textId);
|
Message_ContinueTextbox(play, this->actor.textId);
|
||||||
this->unk_1E4 = 1;
|
this->unk_1E4 = 1;
|
||||||
|
@ -298,15 +298,15 @@ s32 EnXc_MinuetCS(EnXc* this, PlayState* play) {
|
|||||||
|
|
||||||
if (z < -2225.0f) {
|
if (z < -2225.0f) {
|
||||||
if (!Play_InCsMode(play)) {
|
if (!Play_InCsMode(play)) {
|
||||||
if (GameInteractor_Should(VB_PLAY_MINUET_OF_FOREST_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_MINUET_OF_FOREST_CS, true)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gMinuetCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gMinuetCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_MINUET_OF_FOREST);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_MINUET_OF_FOREST);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_MINUET_OF_FOREST, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_MINUET_OF_FOREST, true)) {
|
||||||
Item_Give(play, ITEM_SONG_MINUET);
|
Item_Give(play, ITEM_SONG_MINUET);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_PLAY_MINUET_OF_FOREST_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_MINUET_OF_FOREST_CS, true)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -335,15 +335,15 @@ s32 EnXc_BoleroCS(EnXc* this, PlayState* play) {
|
|||||||
if ((posRot->pos.x > -784.0f) && (posRot->pos.x < -584.0f) && (posRot->pos.y > 447.0f) &&
|
if ((posRot->pos.x > -784.0f) && (posRot->pos.x < -584.0f) && (posRot->pos.y > 447.0f) &&
|
||||||
(posRot->pos.y < 647.0f) && (posRot->pos.z > -446.0f) && (posRot->pos.z < -246.0f) &&
|
(posRot->pos.y < 647.0f) && (posRot->pos.z > -446.0f) && (posRot->pos.z < -246.0f) &&
|
||||||
!Play_InCsMode(play)) {
|
!Play_InCsMode(play)) {
|
||||||
if (GameInteractor_Should(VB_PLAY_BOLERO_OF_FIRE_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_BOLERO_OF_FIRE_CS, true)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gDeathMountainCraterBoleroCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gDeathMountainCraterBoleroCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_BOLERO_OF_FIRE);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_BOLERO_OF_FIRE);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_BOLERO_OF_FIRE, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_BOLERO_OF_FIRE, true)) {
|
||||||
Item_Give(play, ITEM_SONG_BOLERO);
|
Item_Give(play, ITEM_SONG_BOLERO);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_PLAY_BOLERO_OF_FIRE_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_BOLERO_OF_FIRE_CS, true)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -354,7 +354,7 @@ s32 EnXc_BoleroCS(EnXc* this, PlayState* play) {
|
|||||||
|
|
||||||
void EnXc_SetupSerenadeAction(EnXc* this, PlayState* play) {
|
void EnXc_SetupSerenadeAction(EnXc* this, PlayState* play) {
|
||||||
// Player is adult and does not have iron boots and has not learned Serenade
|
// Player is adult and does not have iron boots and has not learned Serenade
|
||||||
if (GameInteractor_Should(VB_SHIEK_PREPARE_TO_GIVE_SERENADE_OF_WATER, (!CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER)) && LINK_IS_ADULT, NULL)) {
|
if (GameInteractor_Should(VB_SHIEK_PREPARE_TO_GIVE_SERENADE_OF_WATER, (!CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER)) && LINK_IS_ADULT)) {
|
||||||
this->action = SHEIK_ACTION_SERENADE;
|
this->action = SHEIK_ACTION_SERENADE;
|
||||||
osSyncPrintf("水のセレナーデ シーク誕生!!!!!!!!!!!!!!!!!!\n");
|
osSyncPrintf("水のセレナーデ シーク誕生!!!!!!!!!!!!!!!!!!\n");
|
||||||
} else {
|
} else {
|
||||||
@ -367,18 +367,18 @@ s32 EnXc_SerenadeCS(EnXc* this, PlayState* play) {
|
|||||||
if (this->actor.params == SHEIK_TYPE_SERENADE) {
|
if (this->actor.params == SHEIK_TYPE_SERENADE) {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
s32 stateFlags = player->stateFlags1;
|
s32 stateFlags = player->stateFlags1;
|
||||||
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_SERENADE_OF_WATER, CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER), NULL) &&
|
if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_SERENADE_OF_WATER, CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER)) &&
|
||||||
!(stateFlags & PLAYER_STATE1_IN_CUTSCENE) && !Play_InCsMode(play)) {
|
!(stateFlags & PLAYER_STATE1_IN_CUTSCENE) && !Play_InCsMode(play)) {
|
||||||
if (GameInteractor_Should(VB_PLAY_SERENADE_OF_WATER_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_SERENADE_OF_WATER_CS, true)) {
|
||||||
Cutscene_SetSegment(play, &gIceCavernSerenadeCs);
|
Cutscene_SetSegment(play, &gIceCavernSerenadeCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER); // Learned Serenade of Water Flag
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER); // Learned Serenade of Water Flag
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_SERENADE_OF_WATER, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_SERENADE_OF_WATER, true)) {
|
||||||
Item_Give(play, ITEM_SONG_SERENADE);
|
Item_Give(play, ITEM_SONG_SERENADE);
|
||||||
}
|
}
|
||||||
osSyncPrintf("ブーツを取った!!!!!!!!!!!!!!!!!!\n");
|
osSyncPrintf("ブーツを取った!!!!!!!!!!!!!!!!!!\n");
|
||||||
if (GameInteractor_Should(VB_PLAY_SERENADE_OF_WATER_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_SERENADE_OF_WATER_CS, true)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2185,17 +2185,17 @@ void EnXc_InitTempleOfTime(EnXc* this, PlayState* play) {
|
|||||||
if (LINK_IS_ADULT) {
|
if (LINK_IS_ADULT) {
|
||||||
if (!Flags_GetEventChkInf(EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL)) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL);
|
Flags_SetEventChkInf(EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL);
|
||||||
if (GameInteractor_Should(VB_PLAY_SHIEK_BLOCK_MASTER_SWORD_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_SHIEK_BLOCK_MASTER_SWORD_CS, true)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTempleOfTimeFirstAdultCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTempleOfTimeFirstAdultCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
func_80B3EBF0(this, play);
|
func_80B3EBF0(this, play);
|
||||||
} else if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_PRELUDE_OF_LIGHT, !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP), NULL)) {
|
} else if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_PRELUDE_OF_LIGHT, !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP))) {
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_PRELUDE_OF_LIGHT, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_PRELUDE_OF_LIGHT, true)) {
|
||||||
Item_Give(play, ITEM_SONG_PRELUDE);
|
Item_Give(play, ITEM_SONG_PRELUDE);
|
||||||
}
|
}
|
||||||
if (GameInteractor_Should(VB_PLAY_PRELUDE_OF_LIGHT_CS, true, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_PRELUDE_OF_LIGHT_CS, true)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTempleOfTimePreludeCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTempleOfTimePreludeCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
|
@ -634,7 +634,7 @@ void EnZl2_GiveLightArrows(EnZl2* this, PlayState* play) {
|
|||||||
posY = player->actor.world.pos.y + 80.0f;
|
posY = player->actor.world.pos.y + 80.0f;
|
||||||
posZ = player->actor.world.pos.z;
|
posZ = player->actor.world.pos.z;
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, 0x17, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, 0x17, true);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_ARROW, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_ARROW, true)) {
|
||||||
Item_Give(play, ITEM_ARROW_LIGHT);
|
Item_Give(play, ITEM_ARROW_LIGHT);
|
||||||
}
|
}
|
||||||
this->unk_244 = 1;
|
this->unk_244 = 1;
|
||||||
|
@ -1108,7 +1108,7 @@ s32 EnZl4_CsMakePlan(EnZl4* this, PlayState* play) {
|
|||||||
Camera_ChangeSetting(GET_ACTIVE_CAM(play), 1);
|
Camera_ChangeSetting(GET_ACTIVE_CAM(play), 1);
|
||||||
this->talkState = 7;
|
this->talkState = 7;
|
||||||
play->talkWithPlayer(play, &this->actor);
|
play->talkWithPlayer(play, &this->actor);
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LETTER, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LETTER, true)) {
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_LETTER_ZELDA, fabsf(this->actor.xzDistToPlayer) + 1.0f,
|
Actor_OfferGetItem(&this->actor, play, GI_LETTER_ZELDA, fabsf(this->actor.xzDistToPlayer) + 1.0f,
|
||||||
fabsf(this->actor.yDistToPlayer) + 1.0f);
|
fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||||
}
|
}
|
||||||
@ -1117,7 +1117,7 @@ s32 EnZl4_CsMakePlan(EnZl4* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LETTER, true, NULL)) {
|
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_GIVE_ITEM_ZELDAS_LETTER, true)) {
|
||||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_0);
|
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_0);
|
||||||
this->talkState++;
|
this->talkState++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -179,7 +179,7 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, PlayState* play) {
|
|||||||
if (
|
if (
|
||||||
Actor_HasParent(&this->actor, play) ||
|
Actor_HasParent(&this->actor, play) ||
|
||||||
(
|
(
|
||||||
!GameInteractor_Should(VB_GIVE_ITEM_OCARINA_OF_TIME, true, NULL) &&
|
!GameInteractor_Should(VB_GIVE_ITEM_OCARINA_OF_TIME, true) &&
|
||||||
(this->actor.xzDistToPlayer < 20.0f) && (fabsf(this->actor.yDistToPlayer) < 10.0f) &&
|
(this->actor.xzDistToPlayer < 20.0f) && (fabsf(this->actor.yDistToPlayer) < 10.0f) &&
|
||||||
GET_PLAYER(play)->stateFlags2 & PLAYER_STATE2_DIVING
|
GET_PLAYER(play)->stateFlags2 & PLAYER_STATE2_DIVING
|
||||||
)
|
)
|
||||||
@ -189,7 +189,7 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, PlayState* play) {
|
|||||||
this->actionFunc = ItemOcarina_StartSoTCutscene;
|
this->actionFunc = ItemOcarina_StartSoTCutscene;
|
||||||
this->actor.draw = NULL;
|
this->actor.draw = NULL;
|
||||||
} else {
|
} else {
|
||||||
if (GameInteractor_Should(VB_GIVE_ITEM_OCARINA_OF_TIME, true, NULL)) {
|
if (GameInteractor_Should(VB_GIVE_ITEM_OCARINA_OF_TIME, true)) {
|
||||||
Actor_OfferGetItem(&this->actor, play, GI_OCARINA_OOT, 30.0f, 50.0f);
|
Actor_OfferGetItem(&this->actor, play, GI_OCARINA_OOT, 30.0f, 50.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4843,7 +4843,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
|
|||||||
if ((this->doorType != PLAYER_DOORTYPE_NONE) &&
|
if ((this->doorType != PLAYER_DOORTYPE_NONE) &&
|
||||||
(!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) ||
|
(!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) ||
|
||||||
((this->heldActor != NULL) && (this->heldActor->id == ACTOR_EN_RU1)))) {
|
((this->heldActor != NULL) && (this->heldActor->id == ACTOR_EN_RU1)))) {
|
||||||
if ((CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (Player_Action_8084F9A0 == this->actionFunc)) && GameInteractor_Should(VB_BE_ABLE_TO_OPEN_DOORS, true, NULL)) {
|
if ((CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (Player_Action_8084F9A0 == this->actionFunc)) && GameInteractor_Should(VB_BE_ABLE_TO_OPEN_DOORS, true)) {
|
||||||
doorActor = this->doorActor;
|
doorActor = this->doorActor;
|
||||||
|
|
||||||
if (this->doorType <= PLAYER_DOORTYPE_AJAR) {
|
if (this->doorType <= PLAYER_DOORTYPE_AJAR) {
|
||||||
@ -8515,7 +8515,7 @@ void func_80842A88(PlayState* play, Player* this) {
|
|||||||
s32 func_80842AC4(PlayState* play, Player* this) {
|
s32 func_80842AC4(PlayState* play, Player* this) {
|
||||||
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_85C > 0.5f)) {
|
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_85C > 0.5f)) {
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_DEKU_STICK_BREAK, AMMO(ITEM_STICK) != 0, NULL)) {
|
if (GameInteractor_Should(VB_DEKU_STICK_BREAK, AMMO(ITEM_STICK) != 0)) {
|
||||||
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND],
|
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND],
|
||||||
this->actor.shape.rot.y + 0x8000);
|
this->actor.shape.rot.y + 0x8000);
|
||||||
this->unk_85C = 0.5f;
|
this->unk_85C = 0.5f;
|
||||||
@ -10229,7 +10229,7 @@ void Player_Init(Actor* thisx, PlayState* play2) {
|
|||||||
|
|
||||||
if ((sp50 == 0) || (sp50 < -1)) {
|
if ((sp50 == 0) || (sp50 < -1)) {
|
||||||
titleFileSize = scene->titleFile.vromEnd - scene->titleFile.vromStart;
|
titleFileSize = scene->titleFile.vromEnd - scene->titleFile.vromStart;
|
||||||
if (GameInteractor_Should(VB_SHOW_TITLE_CARD, gSaveContext.showTitleCard, NULL)) {
|
if (GameInteractor_Should(VB_SHOW_TITLE_CARD, gSaveContext.showTitleCard)) {
|
||||||
if ((gSaveContext.sceneSetupIndex < 4) &&
|
if ((gSaveContext.sceneSetupIndex < 4) &&
|
||||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneSetupIndex)].field &
|
(gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneSetupIndex)].field &
|
||||||
ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG) &&
|
ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG) &&
|
||||||
@ -10935,21 +10935,21 @@ static Color_RGBA8 D_808547C0 = { 255, 50, 0, 0 };
|
|||||||
void Player_UpdateBurningDekuStick(PlayState* play, Player* this) {
|
void Player_UpdateBurningDekuStick(PlayState* play, Player* this) {
|
||||||
f32 temp;
|
f32 temp;
|
||||||
|
|
||||||
if (GameInteractor_Should(VB_DEKU_STICK_BURN_OUT, this->unk_85C == 0.0f, NULL)) {
|
if (GameInteractor_Should(VB_DEKU_STICK_BURN_OUT, this->unk_85C == 0.0f)) {
|
||||||
Player_UseItem(play, this, ITEM_NONE);
|
Player_UseItem(play, this, ITEM_NONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = 1.0f;
|
temp = 1.0f;
|
||||||
uint8_t vanillaShouldBurnOutCondition = DECR(this->unk_860) == 0;
|
uint8_t vanillaShouldBurnOutCondition = DECR(this->unk_860) == 0;
|
||||||
if (GameInteractor_Should(VB_DEKU_STICK_BURN_OUT, vanillaShouldBurnOutCondition, NULL)) {
|
if (GameInteractor_Should(VB_DEKU_STICK_BURN_OUT, vanillaShouldBurnOutCondition)) {
|
||||||
Inventory_ChangeAmmo(ITEM_STICK, -1);
|
Inventory_ChangeAmmo(ITEM_STICK, -1);
|
||||||
this->unk_860 = 1;
|
this->unk_860 = 1;
|
||||||
temp = 0.0f;
|
temp = 0.0f;
|
||||||
this->unk_85C = temp;
|
this->unk_85C = temp;
|
||||||
} else if (this->unk_860 > 200) {
|
} else if (this->unk_860 > 200) {
|
||||||
temp = (210 - this->unk_860) / 10.0f;
|
temp = (210 - this->unk_860) / 10.0f;
|
||||||
} else if (GameInteractor_Should(VB_DEKU_STICK_BURN_DOWN, this->unk_860 < 20, NULL)) {
|
} else if (GameInteractor_Should(VB_DEKU_STICK_BURN_DOWN, this->unk_860 < 20)) {
|
||||||
temp = this->unk_860 / 20.0f;
|
temp = this->unk_860 / 20.0f;
|
||||||
this->unk_85C = temp;
|
this->unk_85C = temp;
|
||||||
}
|
}
|
||||||
@ -11251,7 +11251,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
|||||||
func_80836BEC(this, play);
|
func_80836BEC(this, play);
|
||||||
|
|
||||||
if (this->heldItemAction == PLAYER_IA_DEKU_STICK &&
|
if (this->heldItemAction == PLAYER_IA_DEKU_STICK &&
|
||||||
GameInteractor_Should(VB_DEKU_STICK_BE_ON_FIRE, this->unk_860 != 0, NULL)) {
|
GameInteractor_Should(VB_DEKU_STICK_BE_ON_FIRE, this->unk_860 != 0)) {
|
||||||
Player_UpdateBurningDekuStick(play, this);
|
Player_UpdateBurningDekuStick(play, this);
|
||||||
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) {
|
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) {
|
||||||
this->unk_860++;
|
this->unk_860++;
|
||||||
@ -13533,7 +13533,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) {
|
|||||||
play->msgCtx.msgMode = MSGMODE_TEXT_DONE;
|
play->msgCtx.msgMode = MSGMODE_TEXT_DONE;
|
||||||
} else {
|
} else {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||||
if (GameInteractor_Should(VB_PLAY_NABOORU_CAPTURED_CS, this->getItemId == GI_GAUNTLETS_SILVER, NULL)) {
|
if (GameInteractor_Should(VB_PLAY_NABOORU_CAPTURED_CS, this->getItemId == GI_GAUNTLETS_SILVER)) {
|
||||||
play->nextEntranceIndex = ENTR_DESERT_COLOSSUS_0;
|
play->nextEntranceIndex = ENTR_DESERT_COLOSSUS_0;
|
||||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||||
|
@ -14,7 +14,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||||||
} else if (CVarGetInteger(CVAR_COSMETIC("DefaultColorScheme"), COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
} else if (CVarGetInteger(CVAR_COSMETIC("DefaultColorScheme"), COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||||
aButtonColor = (Color_RGB8){ 80, 255, 150 };
|
aButtonColor = (Color_RGB8){ 80, 255, 150 };
|
||||||
}
|
}
|
||||||
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D4, true, NULL)) {
|
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D4, true)) {
|
||||||
aButtonColor = (Color_RGB8){ 191, 191, 191 };
|
aButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CUpButton.Changed"), 0)) {
|
if (CVarGetInteger(CVAR_COSMETIC("HUD.CUpButton.Changed"), 0)) {
|
||||||
cUpButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CUpButton.Value"), cUpButtonColor);
|
cUpButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CUpButton.Value"), cUpButtonColor);
|
||||||
}
|
}
|
||||||
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true, NULL)) {
|
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true)) {
|
||||||
cUpButtonColor = (Color_RGB8){ 191, 191, 191 };
|
cUpButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.Changed"), 0)) {
|
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.Changed"), 0)) {
|
||||||
cDownButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CDownButton.Value"), cDownButtonColor);
|
cDownButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CDownButton.Value"), cDownButtonColor);
|
||||||
}
|
}
|
||||||
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_F4, true, NULL)) {
|
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_F4, true)) {
|
||||||
cDownButtonColor = (Color_RGB8){ 191, 191, 191 };
|
cDownButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.Changed"), 0)) {
|
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.Changed"), 0)) {
|
||||||
cLeftButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CLeftButton.Value"), cLeftButtonColor);
|
cLeftButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CLeftButton.Value"), cLeftButtonColor);
|
||||||
}
|
}
|
||||||
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true, NULL)) {
|
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true)) {
|
||||||
cLeftButtonColor = (Color_RGB8){ 191, 191, 191 };
|
cLeftButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.Changed"), 0)) {
|
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.Changed"), 0)) {
|
||||||
cRightButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CRightButton.Value"), cRightButtonColor);
|
cRightButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CRightButton.Value"), cRightButtonColor);
|
||||||
}
|
}
|
||||||
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true, NULL)) {
|
if (!GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true)) {
|
||||||
cRightButtonColor = (Color_RGB8){ 191, 191, 191 };
|
cRightButtonColor = (Color_RGB8){ 191, 191, 191 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3998,7 +3998,7 @@ void KaleidoScope_Update(PlayState* play)
|
|||||||
case 6:
|
case 6:
|
||||||
switch (pauseCtx->unk_1E4) {
|
switch (pauseCtx->unk_1E4) {
|
||||||
case 0:
|
case 0:
|
||||||
if (GameInteractor_Should(VB_CLOSE_PAUSE_MENU, CHECK_BTN_ALL(input->press.button, BTN_START), NULL)) {
|
if (GameInteractor_Should(VB_CLOSE_PAUSE_MENU, CHECK_BTN_ALL(input->press.button, BTN_START))) {
|
||||||
if (CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0) || CVarGetInteger(CVAR_CHEAT("EasyInputBuffer"), 0)) {
|
if (CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0) || CVarGetInteger(CVAR_CHEAT("EasyInputBuffer"), 0)) {
|
||||||
// Easy pause buffer is 13 frames, 12 for kaledio to end, and one more to advance a single frame
|
// Easy pause buffer is 13 frames, 12 for kaledio to end, and one more to advance a single frame
|
||||||
CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 13);
|
CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 13);
|
||||||
@ -4431,7 +4431,7 @@ void KaleidoScope_Update(PlayState* play)
|
|||||||
|
|
||||||
case 0x10:
|
case 0x10:
|
||||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||||
if (pauseCtx->promptChoice == 0 && GameInteractor_Should(VB_BE_ABLE_TO_SAVE, true, NULL)) {
|
if (pauseCtx->promptChoice == 0 && GameInteractor_Should(VB_BE_ABLE_TO_SAVE, true)) {
|
||||||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
&D_801333E8);
|
&D_801333E8);
|
||||||
Play_SaveSceneFlags(play);
|
Play_SaveSceneFlags(play);
|
||||||
@ -4504,7 +4504,7 @@ void KaleidoScope_Update(PlayState* play)
|
|||||||
R_PAUSE_MENU_MODE = 0;
|
R_PAUSE_MENU_MODE = 0;
|
||||||
func_800981B8(&play->objectCtx);
|
func_800981B8(&play->objectCtx);
|
||||||
func_800418D0(&play->colCtx, play);
|
func_800418D0(&play->colCtx, play);
|
||||||
if (pauseCtx->promptChoice == 0 && GameInteractor_Should(VB_BE_ABLE_TO_SAVE, true, NULL)) {
|
if (pauseCtx->promptChoice == 0 && GameInteractor_Should(VB_BE_ABLE_TO_SAVE, true)) {
|
||||||
Play_TriggerRespawn(play);
|
Play_TriggerRespawn(play);
|
||||||
gSaveContext.respawnFlag = -2;
|
gSaveContext.respawnFlag = -2;
|
||||||
// In ER, handle death warp to last entrance from grottos
|
// In ER, handle death warp to last entrance from grottos
|
||||||
|
Loading…
Reference in New Issue
Block a user