diff --git a/soh/include/functions.h b/soh/include/functions.h index 5b9e0dc79..760b77f73 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -491,7 +491,7 @@ void func_80031A28(PlayState* play, ActorContext* actorCtx); void func_80031B14(PlayState* play, ActorContext* actorCtx); void func_80031C3C(ActorContext* actorCtx, PlayState* play); Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, - s16 rotX, s16 rotY, s16 rotZ, s16 params, s16 canRandomize); + s16 rotX, s16 rotY, s16 rotZ, s16 params); Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params); void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx); diff --git a/soh/soh/Enhancements/ExtraModes/ShadowTag.cpp b/soh/soh/Enhancements/ExtraModes/ShadowTag.cpp index 6dc93bfe1..75350a4fd 100644 --- a/soh/soh/Enhancements/ExtraModes/ShadowTag.cpp +++ b/soh/soh/Enhancements/ExtraModes/ShadowTag.cpp @@ -29,7 +29,7 @@ static void OnPlayerUpdateShadowTag() { } if (shouldSpawn && (delayTimer <= 0)) { - Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_WALLMAS, 0, 0, 0, 0, 0, 0, 3, false); + Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_WALLMAS, 0, 0, 0, 0, 0, 0, 3); shouldSpawn = false; } else { delayTimer--; diff --git a/soh/soh/Enhancements/QoL/DaytimeGS.cpp b/soh/soh/Enhancements/QoL/DaytimeGS.cpp index f1aa322ce..b6076ef40 100644 --- a/soh/soh/Enhancements/QoL/DaytimeGS.cpp +++ b/soh/soh/Enhancements/QoL/DaytimeGS.cpp @@ -55,8 +55,7 @@ static void OnSpawnNighttimeGoldSkulltula() { dayTimeGS.room == gPlayState->roomCtx.curRoom.num) { for (const auto& actorEntry : dayTimeGS.actorEntries) { Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorEntry.id, actorEntry.pos.x, actorEntry.pos.y, - actorEntry.pos.z, actorEntry.rot.x, actorEntry.rot.y, actorEntry.rot.z, actorEntry.params, - false); + actorEntry.pos.z, actorEntry.rot.x, actorEntry.rot.y, actorEntry.rot.z, actorEntry.params); } } } diff --git a/soh/soh/Enhancements/boss-rush/BossRush.cpp b/soh/soh/Enhancements/boss-rush/BossRush.cpp index c74f9dfa8..52daef0a7 100644 --- a/soh/soh/Enhancements/boss-rush/BossRush.cpp +++ b/soh/soh/Enhancements/boss-rush/BossRush.cpp @@ -369,40 +369,40 @@ void BossRush_SpawnBlueWarps(PlayState* play) { if (gSaveContext.linkAge == LINK_AGE_CHILD) { // Forest Medallion (Gohma) if (!Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -100, 6, -170, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -100, 6, -170, 0, 0, 0, -1); } // Fire Medallion (King Dodongo) if (!Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 100, 6, -170, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 100, 6, -170, 0, 0, 0, -1); } // Water Medallion (Barinade) if (!Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 199, 6, 0, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 199, 6, 0, 0, 0, 0, -1); } } else { // Light Medallion (Ganondorf) if (CheckDungeonCount() == 8) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -199, 6, 0, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -199, 6, 0, 0, 0, 0, -1); } // Forest Medallion (Phantom Ganondorf) if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -100, 6, -170, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -100, 6, -170, 0, 0, 0, -1); } // Fire Medallion (Volvagia) if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 100, 6, -170, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 100, 6, -170, 0, 0, 0, -1); } // Water Medallion (Morpha) if (!Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 199, 6, 0, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 199, 6, 0, 0, 0, 0, -1); } // Spirit Medallion (Twinrova) if (!Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 100, 6, 170, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, 100, 6, 170, 0, 0, 0, -1); } // Shadow Medallion (Bongo Bongo) if (!Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -100, 6, 170, 0, 0, 0, -1, false); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -100, 6, 170, 0, 0, 0, -1); } } } @@ -775,12 +775,12 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li } } Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, childPos.x, - bossGoma->actor.world.pos.y, childPos.z, 0, 0, 0, WARP_DUNGEON_ADULT, false); + bossGoma->actor.world.pos.y, childPos.z, 0, 0, 0, WARP_DUNGEON_ADULT); break; } case SCENE_DODONGOS_CAVERN_BOSS: { Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, - 0, WARP_DUNGEON_ADULT, false); + 0, WARP_DUNGEON_ADULT); break; } case SCENE_JABU_JABU_BOSS: { @@ -799,33 +799,33 @@ void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li } Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, sWarpPos[sp7C].x, sWarpPos[sp7C].y, - sWarpPos[sp7C].z, 0, 0, 0, WARP_DUNGEON_ADULT, false); + sWarpPos[sp7C].z, 0, 0, 0, WARP_DUNGEON_ADULT); break; } case SCENE_FOREST_TEMPLE_BOSS: { Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, 14.0f, -33.0f, -3315.0f, 0, 0, 0, - WARP_DUNGEON_ADULT, true); + WARP_DUNGEON_ADULT); break; } case SCENE_FIRE_TEMPLE_BOSS: { Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0, - WARP_DUNGEON_ADULT, true); + WARP_DUNGEON_ADULT); break; } case SCENE_WATER_TEMPLE_BOSS: { 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); + bossMo->actor.world.pos.z, 0, 0, 0, WARP_DUNGEON_ADULT); break; } case SCENE_SPIRIT_TEMPLE_BOSS: { Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0, 0, 0, - WARP_DUNGEON_ADULT, true); + WARP_DUNGEON_ADULT); break; } case SCENE_SHADOW_TEMPLE_BOSS: { Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_DOOR_WARP1, -50.0f, 0.0f, 400.0f, 0, 0, 0, - WARP_DUNGEON_ADULT, true); + WARP_DUNGEON_ADULT); break; } default: { diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index b09dd25f9..55cb106ac 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -101,7 +101,7 @@ static bool ActorSpawnHandler(std::shared_ptr Console, const std: } if (Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorId, spawnPoint.pos.x, spawnPoint.pos.y, spawnPoint.pos.z, - spawnPoint.rot.x, spawnPoint.rot.y, spawnPoint.rot.z, params, 0) == NULL) { + spawnPoint.rot.x, spawnPoint.rot.y, spawnPoint.rot.z, params) == NULL) { ERROR_MESSAGE("Failed to spawn actor. Actor_Spawn returned NULL"); return 1; } diff --git a/soh/soh/Enhancements/debugger/actorViewer.cpp b/soh/soh/Enhancements/debugger/actorViewer.cpp index 5792a4ec0..a47a404ad 100644 --- a/soh/soh/Enhancements/debugger/actorViewer.cpp +++ b/soh/soh/Enhancements/debugger/actorViewer.cpp @@ -1160,7 +1160,7 @@ void ActorViewerWindow::DrawElement() { if (Button("Spawn", ButtonOptions().Color(THEME_COLOR))) { if (ActorDB::Instance->RetrieveEntry(newActor.id).entry.valid) { Actor_Spawn(&gPlayState->actorCtx, gPlayState, newActor.id, newActor.pos.x, newActor.pos.y, - newActor.pos.z, newActor.rot.x, newActor.rot.y, newActor.rot.z, newActor.params, 0); + newActor.pos.z, newActor.rot.x, newActor.rot.y, newActor.rot.z, newActor.params); } else { Sfx_PlaySfxCentered(NA_SE_SY_ERROR); } diff --git a/soh/soh/Enhancements/enemyrandomizer.cpp b/soh/soh/Enhancements/enemyrandomizer.cpp index aedc47643..c9f343f6b 100644 --- a/soh/soh/Enhancements/enemyrandomizer.cpp +++ b/soh/soh/Enhancements/enemyrandomizer.cpp @@ -4,6 +4,7 @@ #include "soh/Enhancements/randomizer/3drando/random.hpp" #include "soh/Enhancements/randomizer/SeedContext.h" #include "soh/Enhancements/enhancementTypes.h" +#include "soh/ObjectExtension/ObjectExtension.h" #include "variables.h" #include "soh/OTRGlobals.h" #include "soh/cvar_prefixes.h" @@ -11,8 +12,15 @@ extern "C" { #include -#include "src/overlays/actors/ovl_En_Rr/z_en_rr.h" +#include "src/overlays/actors/ovl_Bg_Haka/z_bg_haka.h" +#include "src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.h" +#include "src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.h" +#include "src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.h" +#include "src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h" +#include "src/overlays/actors/ovl_En_Encount1/z_en_encount1.h" #include "src/overlays/actors/ovl_En_GeldB/z_en_geldb.h" +#include "src/overlays/actors/ovl_En_Rr/z_en_rr.h" +#include "src/overlays/actors/ovl_En_Vali/z_en_vali.h" extern PlayState* gPlayState; } @@ -20,6 +28,7 @@ extern PlayState* gPlayState; #define CVAR_ENEMY_RANDOMIZER_NAME CVAR_ENHANCEMENT("RandomizedEnemies") #define CVAR_ENEMY_RANDOMIZER_DEFAULT ENEMY_RANDOMIZER_OFF #define CVAR_ENEMY_RANDOMIZER_VALUE CVarGetInteger(CVAR_ENEMY_RANDOMIZER_NAME, CVAR_ENEMY_RANDOMIZER_DEFAULT) +#define ENEMY_RANDOMIZER_ENABLED CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT typedef struct EnemyEntry { int16_t id; @@ -30,7 +39,7 @@ bool IsEnemyFoundToRandomize(int16_t sceneNum, int8_t roomNum, int16_t actorId, bool IsEnemyAllowedToSpawn(int16_t sceneNum, int8_t roomNum, EnemyEntry enemy); EnemyEntry GetRandomizedEnemyEntry(uint32_t seed, PlayState* play); -const char* enemyCVarList[RANDOMIZED_ENEMY_SPAWN_TABLE_SIZE] = { +const char* enemyCVarList[] = { CVAR_ENHANCEMENT("RandomizedEnemyList.Anubis"), CVAR_ENHANCEMENT("RandomizedEnemyList.Armos"), CVAR_ENHANCEMENT("RandomizedEnemyList.Arwing"), @@ -94,7 +103,7 @@ const char* enemyCVarList[RANDOMIZED_ENEMY_SPAWN_TABLE_SIZE] = { CVAR_ENHANCEMENT("RandomizedEnemyList.WitheredBaba"), }; -const char* enemyNameList[RANDOMIZED_ENEMY_SPAWN_TABLE_SIZE] = { +const char* enemyNameList[] = { "Anubis", "Armos", "Arwing", @@ -158,7 +167,7 @@ const char* enemyNameList[RANDOMIZED_ENEMY_SPAWN_TABLE_SIZE] = { "Withered Deku Baba", }; -static EnemyEntry randomizedEnemySpawnTable[RANDOMIZED_ENEMY_SPAWN_TABLE_SIZE] = { +static EnemyEntry randomizedEnemySpawnTable[] = { { ACTOR_EN_ANUBICE_TAG, 1 }, // Anubis { ACTOR_EN_AM, -1 }, // Armos { ACTOR_EN_CLEAR_TAG, 1 }, // Arwing @@ -232,6 +241,11 @@ static EnemyEntry randomizedEnemySpawnTable[RANDOMIZED_ENEMY_SPAWN_TABLE_SIZE] = { ACTOR_EN_KAREBABA, 0 }, // Withered Deku Baba }; +// assert sizes without accidental 0 initialization +static_assert(ARRAY_COUNT(enemyCVarList) == ARRAY_COUNT(enemyNameList), ""); +static_assert(ARRAY_COUNT(enemyCVarList) == ARRAY_COUNT(randomizedEnemySpawnTable), ""); +static_assert(ARRAY_COUNT(enemyCVarList) == RANDOMIZED_ENEMY_SPAWN_TABLE_SIZE, ""); + static int enemiesToRandomize[] = { ACTOR_EN_ANUBICE_TAG, // Anubis ACTOR_EN_FIREFLY, // Keese (including fire/ice) @@ -280,8 +294,8 @@ static int enemiesToRandomize[] = { ACTOR_EN_SKJ, // Skull Kid }; -extern "C" uint8_t GetRandomizedEnemy(PlayState* play, int16_t* actorId, f32* posX, f32* posY, f32* posZ, int16_t* rotX, - int16_t* rotY, int16_t* rotZ, int16_t* params) { +uint8_t GetRandomizedEnemy(PlayState* play, int16_t* actorId, s16* posX, s16* posY, s16* posZ, int16_t* rotX, + int16_t* rotY, int16_t* rotZ, int16_t* params) { uint32_t isMQ = ResourceMgr_IsSceneMasterQuest(play->sceneNum); @@ -436,9 +450,7 @@ bool IsEnemyFoundToRandomize(int16_t sceneNum, int8_t roomNum, int16_t actorId, uint32_t isMQ = ResourceMgr_IsSceneMasterQuest(sceneNum); for (int i = 0; i < ARRAY_COUNT(enemiesToRandomize); i++) { - if (actorId == enemiesToRandomize[i]) { - switch (actorId) { // Only randomize the main component of Electric Tailparasans, not the tail segments they spawn. case ACTOR_EN_TP: @@ -631,11 +643,31 @@ static void OnGerudoFighterDefeat(void* refActor) { } } +struct CustomStalfosPairFightData { + BgMoriBigst* moriBigst = nullptr; + ActorFunc originalDestroy = nullptr; +}; + +static ObjectExtension::Register CustomStalfosPairFightDataRegister; + +void CustomStalfosPairFightDestroy(Actor* thisx, PlayState* play) { + assert(ObjectExtension::GetInstance().Has(thisx)); + + CustomStalfosPairFightData* customStalfosPairFightData = + ObjectExtension::GetInstance().Get(thisx); + + customStalfosPairFightData->moriBigst->dyna.actor.home.rot.z -= 1; + + customStalfosPairFightData->originalDestroy(thisx, play); + + ObjectExtension::GetInstance().Remove(thisx); +} + void RegisterEnemyRandomizer() { - COND_ID_HOOK(OnActorInit, ACTOR_EN_MB, CVAR_ENEMY_RANDOMIZER_VALUE, FixClubMoblinScale); + COND_ID_HOOK(OnActorInit, ACTOR_EN_MB, ENEMY_RANDOMIZER_ENABLED, FixClubMoblinScale); // prevent dark link from triggering a voidout - COND_VB_SHOULD(VB_TRIGGER_VOIDOUT, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_TRIGGER_VOIDOUT, ENEMY_RANDOMIZER_ENABLED, { Actor* actor = va_arg(args, Actor*); if (actor->category != ACTORCAT_PLAYER) { @@ -645,7 +677,7 @@ void RegisterEnemyRandomizer() { }); // prevent dark link dealing fall damage to the player - COND_VB_SHOULD(VB_RECIEVE_FALL_DAMAGE, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_RECIEVE_FALL_DAMAGE, ENEMY_RANDOMIZER_ENABLED, { Actor* actor = va_arg(args, Actor*); if (actor->category != ACTORCAT_PLAYER) { @@ -654,7 +686,7 @@ void RegisterEnemyRandomizer() { }); // prevent dark link from interfering with HESS/recoil/etc when at more than 100 away from him - COND_VB_SHOULD(VB_TORCH2_HANDLE_CLANKING, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_TORCH2_HANDLE_CLANKING, ENEMY_RANDOMIZER_ENABLED, { Actor* darkLink = va_arg(args, Actor*); if (darkLink->xzDistToPlayer > 100.0f) { @@ -663,7 +695,7 @@ void RegisterEnemyRandomizer() { }); // prevent dark link from interfering with ice floors - COND_VB_SHOULD(VB_SET_STATIC_PREV_FLOOR_TYPE, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_SET_STATIC_PREV_FLOOR_TYPE, ENEMY_RANDOMIZER_ENABLED, { Player* playerOrDarkLink = va_arg(args, Player*); if (playerOrDarkLink->actor.id != ACTOR_PLAYER) { @@ -672,7 +704,7 @@ void RegisterEnemyRandomizer() { }); // prevent dark link from interfering with ice floors - COND_VB_SHOULD(VB_SET_STATIC_FLOOR_TYPE, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_SET_STATIC_FLOOR_TYPE, ENEMY_RANDOMIZER_ENABLED, { Player* playerOrDarkLink = va_arg(args, Player*); if (playerOrDarkLink->actor.id != ACTOR_PLAYER) { @@ -681,7 +713,7 @@ void RegisterEnemyRandomizer() { }); // prevent dark link from being grabbed by like likes and therefore grabbing the player - COND_VB_SHOULD(VB_LIKE_LIKE_GRAB_PLAYER, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_LIKE_LIKE_GRAB_PLAYER, ENEMY_RANDOMIZER_ENABLED, { EnRr* likeLike = va_arg(args, EnRr*); if (!(likeLike->collider1.base.oc != NULL && likeLike->collider1.base.oc->category == ACTORCAT_PLAYER) && @@ -691,7 +723,7 @@ void RegisterEnemyRandomizer() { }); // Allow Random Gerudo Fighters (contain no keys) to spawn without any switch flags - COND_VB_SHOULD(VB_GERUDO_FIGHTER_CONTINUE_WAITING, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_GERUDO_FIGHTER_CONTINUE_WAITING, ENEMY_RANDOMIZER_ENABLED, { EnGeldB* enGeldB = va_arg(args, EnGeldB*); if (enGeldB->keyFlag == 0) { @@ -702,17 +734,16 @@ void RegisterEnemyRandomizer() { }); // Don't play Miniboss music for Random Gerudo Fighters - COND_VB_SHOULD(VB_GERUDO_FIGHTER_PLAY_MINIBOSS_MUSIC, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, - { - EnGeldB* enGeldB = va_arg(args, EnGeldB*); + COND_VB_SHOULD(VB_GERUDO_FIGHTER_PLAY_MINIBOSS_MUSIC, ENEMY_RANDOMIZER_ENABLED, { + EnGeldB* enGeldB = va_arg(args, EnGeldB*); - if (enGeldB->keyFlag == 0) { - *should = false; - } - }); + if (enGeldB->keyFlag == 0) { + *should = false; + } + }); // If Random Gerudo Fighters knock Link down, void him out like Wallmasters - COND_VB_SHOULD(VB_GERUDO_FIGHTER_THROW_LINK_TO_JAIL, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, { + COND_VB_SHOULD(VB_GERUDO_FIGHTER_THROW_LINK_TO_JAIL, ENEMY_RANDOMIZER_ENABLED, { EnGeldB* enGeldB = va_arg(args, EnGeldB*); if (enGeldB->keyFlag == 0) { @@ -723,8 +754,297 @@ void RegisterEnemyRandomizer() { }); // If Random Gerudo Fighters are defeated, drop some items - COND_ID_HOOK(OnEnemyDefeat, ACTOR_EN_GELDB, CVAR_ENEMY_RANDOMIZER_VALUE != CVAR_ENEMY_RANDOMIZER_DEFAULT, - OnGerudoFighterDefeat); + COND_ID_HOOK(OnEnemyDefeat, ACTOR_EN_GELDB, ENEMY_RANDOMIZER_ENABLED, OnGerudoFighterDefeat); + + COND_VB_SHOULD(VB_SPAWN_ACTOR_ENTRY, ENEMY_RANDOMIZER_ENABLED, { + ActorContext* actorCtx = va_arg(args, ActorContext*); + ActorEntry* actorEntry = va_arg(args, ActorEntry*); + PlayState* play = va_arg(args, PlayState*); + Actor* actor = va_arg(args, Actor*); + + if (!GetRandomizedEnemy(play, &actorEntry->id, &actorEntry->pos.x, &actorEntry->pos.y, &actorEntry->pos.z, + &actorEntry->rot.x, &actorEntry->rot.y, &actorEntry->rot.z, &actorEntry->params)) { + *should = false; + } + }); + + COND_VB_SHOULD(VB_ADULT_ZELDA_SPAWN_STALFOS_IN_COLLAPSE, ENEMY_RANDOMIZER_ENABLED, { + PlayState* play = va_arg(args, PlayState*); + Vec3f* playerPos = va_arg(args, Vec3f*); + double posX = va_arg(args, double); + double posY = va_arg(args, double); + double posZ = va_arg(args, double); + + s16 actorId = ACTOR_EN_TEST; + s16 posX2 = posX; + s16 posY2 = posY; + s16 posZ2 = posZ; + s16 rotX = 0; + s16 rotY = Math_FAtan2F(playerPos->x - posX, playerPos->z - posZ) * (0x8000 / M_PI); + s16 rotZ = 0; + s16 params = 5; + + if (!GetRandomizedEnemy(play, &actorId, &posX2, &posY2, &posZ2, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX2, posY2, posZ2, rotX, rotY, rotZ, params); + + *should = false; + }); + + COND_VB_SHOULD(VB_BLKOBJ_SPAWN_DARK_LINK, ENEMY_RANDOMIZER_ENABLED, { + if (!*should) { + return; + } + + EnBlkobj* blkobj = va_arg(args, EnBlkobj*); + PlayState* play = va_arg(args, PlayState*); + + s16 actorId = ACTOR_EN_TORCH2; + s16 posX = blkobj->dyna.actor.world.pos.x; + s16 posY = blkobj->dyna.actor.world.pos.y; + s16 posZ = blkobj->dyna.actor.world.pos.z; + s16 rotX = 0; + s16 rotY = blkobj->dyna.actor.yawTowardsPlayer; + s16 rotZ = 0; + s16 params = 0; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + EnBlkobj_SetupAction(blkobj, EnBlkobj_DarkLinkFight); + + *should = false; + }); + + COND_VB_SHOULD(VB_HAKA_TUBO_SPAWN_KEESE, ENEMY_RANDOMIZER_ENABLED, { + BgHakaTubo* hakaTubo = va_arg(args, BgHakaTubo*); + PlayState* play = va_arg(args, PlayState*); + + s16 actorId = ACTOR_EN_FIREFLY; + s16 posX = hakaTubo->dyna.actor.world.pos.x; + s16 posY = hakaTubo->dyna.actor.world.pos.y + 80.0f; + s16 posZ = hakaTubo->dyna.actor.world.pos.z; + s16 rotX = 0; + s16 rotY = hakaTubo->dyna.actor.shape.rot.y; + s16 rotZ = 0; + s16 params = 2; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + *should = false; + }); + + COND_VB_SHOULD(VB_HAKA_SPAWN_POE, ENEMY_RANDOMIZER_ENABLED, { + if (!*should) { + return; + } + + BgHaka* haka = va_arg(args, BgHaka*); + PlayState* play = va_arg(args, PlayState*); + + s16 actorId = ACTOR_EN_POH; + s16 posX = haka->dyna.actor.world.pos.x; + s16 posY = haka->dyna.actor.world.pos.y; + s16 posZ = haka->dyna.actor.world.pos.z; + s16 rotX = 0; + s16 rotY = haka->dyna.actor.shape.rot.y; + s16 rotZ = 0; + s16 params = 1; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + *should = false; + }); + + COND_VB_SHOULD(VB_BIRI_SPAWN_JELLYFISH_UPON_DEATH, ENEMY_RANDOMIZER_ENABLED, { + EnVali* vali = va_arg(args, EnVali*); + PlayState* play = va_arg(args, PlayState*); + + s16 actorId = ACTOR_EN_BILI; + s16 posX = vali->actor.world.pos.x; + s16 posY = vali->actor.world.pos.y; + s16 posZ = vali->actor.world.pos.z; + s16 rotX = 0; + s16 rotY = vali->actor.world.rot.y; + s16 rotZ = 0; + s16 params = 0; + + for (s32 i = 0; i < 3; i++) { + // Offset small jellyfish with Enemy Randomizer, otherwise it gets + // stuck in a loop spawning more big jellyfish with seeded spawns. + if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) { + rotY += rand() % 50; + } + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + rotY += 0x10000 / 3; + } + + *should = false; + }); + + COND_VB_SHOULD(VB_ENCOUNT1_SPAWN_STALCHILD_OR_WOLFOS, ENEMY_RANDOMIZER_ENABLED, { + EnEncount1* encount1 = va_arg(args, EnEncount1*); + PlayState* play = va_arg(args, PlayState*); + + // have to use int instead of s16 in the va_arg call due to integer promotion + s16 actorId = va_arg(args, int); + Vec3f spawnPos = va_arg(args, Vec3f); + s16 posX = spawnPos.x; + s16 posY = spawnPos.y; + s16 posZ = spawnPos.z; + s16 rotX = 0; + s16 rotY = 0; + s16 rotZ = 0; + // have to use int instead of s16 in the va_arg call due to integer promotion + s16 params = va_arg(args, int); + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + if (Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params)) { + encount1->curNumSpawn++; + if (encount1->curNumSpawn >= encount1->maxCurSpawns) { + encount1->fieldSpawnTimer = 100; + } + if (play->sceneNum != SCENE_HYRULE_FIELD) { + encount1->totalNumSpawn++; + } + } + + *should = false; + }); + + COND_VB_SHOULD(VB_MORI_BIGST_SUMMON_STALFOS_PAIR, ENEMY_RANDOMIZER_ENABLED, { + BgMoriBigst* moriBigst = va_arg(args, BgMoriBigst*); + PlayState* play = va_arg(args, PlayState*); + + s16 actorId = ACTOR_EN_TEST; + s16 posX = 70.0f; + s16 posY = 827.0f; + s16 posZ = -3383.0f; + s16 rotX = 0; + s16 rotY = 0; + s16 rotZ = 0; + s16 params = 5; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor* enemy1 = Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + actorId = ACTOR_EN_TEST; + posX = 170.0f; + posY = 827.0f; + posZ = -3260.0f; + rotX = 0; + rotY = 0; + rotZ = 0; + params = 5; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor* enemy2 = Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + moriBigst->dyna.actor.home.rot.z = 2; + + ObjectExtension::GetInstance().Set( + enemy1, CustomStalfosPairFightData{ .moriBigst = moriBigst, .originalDestroy = enemy1->destroy }); + ObjectExtension::GetInstance().Set( + enemy2, CustomStalfosPairFightData{ .moriBigst = moriBigst, .originalDestroy = enemy2->destroy }); + + enemy1->destroy = CustomStalfosPairFightDestroy; + enemy2->destroy = CustomStalfosPairFightDestroy; + + *should = false; + }); + + COND_VB_SHOULD(VB_HAKA_HUTA_SPAWN_KEESE, ENEMY_RANDOMIZER_ENABLED, { + BgHakaHuta* hakaHuta = va_arg(args, BgHakaHuta*); + PlayState* play = va_arg(args, PlayState*); + + s16 actorId = ACTOR_EN_FIREFLY; + s16 posX = hakaHuta->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(hakaHuta->dyna.actor.shape.rot.y) + + 40.0f * Math_SinS(hakaHuta->dyna.actor.shape.rot.y); + s16 posY = hakaHuta->dyna.actor.world.pos.y - 10.0f; + s16 posZ = hakaHuta->dyna.actor.world.pos.z - (-25.0f) * Math_SinS(hakaHuta->dyna.actor.shape.rot.y) + + 40.0f * Math_CosS(hakaHuta->dyna.actor.shape.rot.y); + s16 rotX = 0; + s16 rotY = hakaHuta->dyna.actor.shape.rot.y + 0x8000; + s16 rotZ = 0; + s16 params = 2; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + actorId = ACTOR_EN_FIREFLY; + posX = hakaHuta->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(hakaHuta->dyna.actor.shape.rot.y) + + 80.0f * Math_SinS(hakaHuta->dyna.actor.shape.rot.y); + posY = hakaHuta->dyna.actor.world.pos.y - 10.0f; + posZ = hakaHuta->dyna.actor.world.pos.z - (-25.0f) * Math_SinS(hakaHuta->dyna.actor.shape.rot.y) + + 80.0f * Math_CosS(hakaHuta->dyna.actor.shape.rot.y); + rotX = 0; + rotY = hakaHuta->dyna.actor.shape.rot.y; + rotZ = 0; + params = 2; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + *should = false; + }); + + COND_VB_SHOULD(VB_HAKA_HUTA_SPAWN_REDEAD, ENEMY_RANDOMIZER_ENABLED, { + BgHakaHuta* hakaHuta = va_arg(args, BgHakaHuta*); + PlayState* play = va_arg(args, PlayState*); + + s16 actorId = ACTOR_EN_RD; + s16 posX = hakaHuta->dyna.actor.home.pos.x + (-25.0f) * Math_CosS(hakaHuta->dyna.actor.shape.rot.y) + + 100.0f * Math_SinS(hakaHuta->dyna.actor.shape.rot.y); + s16 posY = hakaHuta->dyna.actor.home.pos.y - 40.0f; + s16 posZ = hakaHuta->dyna.actor.home.pos.z - (-25.0f) * Math_SinS(hakaHuta->dyna.actor.shape.rot.y) + + 100.0f * Math_CosS(hakaHuta->dyna.actor.shape.rot.y); + s16 rotX = 0; + s16 rotY = hakaHuta->dyna.actor.shape.rot.y; + s16 rotZ = 0; + s16 params = 0xFD; + + if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { + assert(false); + } + + Actor_Spawn(&play->actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + + *should = false; + }); } static RegisterShipInitFunc initFunc(RegisterEnemyRandomizer, { CVAR_ENEMY_RANDOMIZER_NAME }); diff --git a/soh/soh/Enhancements/enemyrandomizer.h b/soh/soh/Enhancements/enemyrandomizer.h index 729d255fc..6e1708fbc 100644 --- a/soh/soh/Enhancements/enemyrandomizer.h +++ b/soh/soh/Enhancements/enemyrandomizer.h @@ -8,10 +8,3 @@ extern const char* enemyCVarList[]; extern const char* enemyNameList[]; extern void GetSelectedEnemies(); - -#ifndef __cplusplus -struct PlayState; - -uint8_t GetRandomizedEnemy(struct PlayState* play, int16_t* actorId, f32* posX, f32* posY, f32* posZ, int16_t* rotX, - int16_t* rotY, int16_t* rotZ, int16_t* params); -#endif diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor.cpp index fb3db74df..f3ee57530 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor.cpp @@ -19,8 +19,6 @@ extern "C" { extern PlayState* gPlayState; } -#include "overlays/actors/ovl_En_Niw/z_en_niw.h" - // MARK: - Effects GameInteractionEffectQueryResult GameInteractor::CanApplyEffect(GameInteractionEffectBase* effect) { diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor.h b/soh/soh/Enhancements/game-interactor/GameInteractor.h index 8ac2d9dda..deccbdd56 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor.h @@ -5,8 +5,6 @@ #include "libultraship/libultraship.h" #include "vanilla-behavior/GIVanillaBehavior.h" -#include "GameInteractionEffect.h" -#include "soh/Enhancements/item-tables/ItemTableTypes.h" #include typedef enum { @@ -94,12 +92,11 @@ void GameInteractor_SetTriforceHuntCreditsWarpActive(uint8_t state); #ifdef __cplusplus #include -#include #include #include #include #include -#include +#include #include #ifdef __cpp_lib_source_location @@ -108,6 +105,8 @@ void GameInteractor_SetTriforceHuntCreditsWarpActive(uint8_t state); #pragma message("Compiling without support, the Hook Debugger will not be available") #endif +#include "GameInteractionEffect.h" + typedef uint32_t HOOK_ID; enum HookType { diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h b/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h index 93cee420e..5d3e99c79 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h @@ -50,7 +50,7 @@ DEFINE_HOOK(OnPlayerBottleUpdate, (int16_t contents)); DEFINE_HOOK(OnPlayerHoldUpShield, ()); DEFINE_HOOK(OnPlayerFirstPersonControl, (Player * player)); DEFINE_HOOK(OnPlayerProcessStick, ()); -DEFINE_HOOK(OnPlayerShieldControl, (float_t * sp50, float_t* sp54)); +DEFINE_HOOK(OnPlayerShieldControl, (float* sp50, float* sp54)); DEFINE_HOOK(OnPlayDestroy, ()); DEFINE_HOOK(OnPlayDrawBegin, ()); DEFINE_HOOK(OnPlayDrawEnd, ()); diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp index 480b981c4..3375d30c7 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp @@ -225,7 +225,7 @@ void GameInteractor_ExecuteOnPlayerFirstPersonControl(Player* player) { GameInteractor::Instance->ExecuteHooks(player); } -void GameInteractor_ExecuteOnPlayerShieldControl(float_t* sp50, float_t* sp54) { +void GameInteractor_ExecuteOnPlayerShieldControl(float* sp50, float* sp54) { GameInteractor::Instance->ExecuteHooks(sp50, sp54); } diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h index 6bcd0dc97..e998812f5 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h @@ -50,7 +50,7 @@ void GameInteractor_ExecuteOnPlayerHealthChange(int16_t amount); void GameInteractor_ExecuteOnPlayerBottleUpdate(int16_t contents); void GameInteractor_ExecuteOnPlayerHoldUpShield(); void GameInteractor_ExecuteOnPlayerFirstPersonControl(Player* player); -void GameInteractor_ExecuteOnPlayerShieldControl(float_t* sp50, float_t* sp54); +void GameInteractor_ExecuteOnPlayerShieldControl(float* sp50, float* sp54); void GameInteractor_ExecuteOnPlayerProcessStick(); void GameInteractor_ExecuteOnShopSlotChangeHooks(uint8_t cursorIndex, int16_t price); void GameInteractor_ExecuteOnDungeonKeyUsedHooks(uint16_t mapIndex); diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp index 0e82ac7c3..9ffdb2452 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp @@ -533,7 +533,7 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnEnemyWithOffset pos.y += 10; pos.z += 10; Actor* actor = - Actor_Spawn(&gPlayState->actorCtx, gPlayState, enemyId, pos.x, pos.y, pos.z, 0, 0, 0, enemyParams, 0); + Actor_Spawn(&gPlayState->actorCtx, gPlayState, enemyId, pos.x, pos.y, pos.z, 0, 0, 0, enemyParams); if (actor == NULL) { return GameInteractionEffectQueryResult::TemporarilyNotPossible; } @@ -547,7 +547,7 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnEnemyWithOffset return GameInteractionEffectQueryResult::Possible; } else { Actor* actor = - Actor_Spawn(&gPlayState->actorCtx, gPlayState, enemyId, pos.x, pos.y, pos.z, 0, 0, 0, enemyParams, 0); + Actor_Spawn(&gPlayState->actorCtx, gPlayState, enemyId, pos.x, pos.y, pos.z, 0, 0, 0, enemyParams); if (actor != NULL) { if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) { NameTag_RegisterForActor(actor, nameTag.c_str()); @@ -575,7 +575,7 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnActor(uint32_t // Spawn Cucco and make it angry EnNiw* cucco = (EnNiw*)Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorId, player->actor.world.pos.x, - player->actor.world.pos.y + 2200, player->actor.world.pos.z, 0, 0, 0, actorParams, 0); + player->actor.world.pos.y + 2200, player->actor.world.pos.z, 0, 0, 0, actorParams); if (cucco == NULL) { return GameInteractionEffectQueryResult::TemporarilyNotPossible; } @@ -589,7 +589,7 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnActor(uint32_t // Spawn a bomb, make it explode instantly when params is set to 1 to emulate spawning an explosion EnBom* bomb = (EnBom*)Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_BOM, player->actor.world.pos.x, - player->actor.world.pos.y + 30, player->actor.world.pos.z, 0, 0, 0, BOMB_BODY, true); + player->actor.world.pos.y + 30, player->actor.world.pos.z, 0, 0, 0, BOMB_BODY); if (bomb == NULL) { return GameInteractionEffectQueryResult::TemporarilyNotPossible; @@ -603,7 +603,7 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnActor(uint32_t } else { // Generic spawn an actor at Link's position Actor* actor = Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorId, player->actor.world.pos.x, - player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, actorParams, 0); + player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, actorParams); if (actor != NULL) { if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) { NameTag_RegisterForActor((Actor*)actor, nameTag.c_str()); diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h index 5b11ce543..2a4b67901 100644 --- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h +++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h @@ -2597,8 +2597,105 @@ typedef enum { // #### `args` // - `*Player` // - `double` (temp - promoted from `f32`) - VB_RUMBLE_FOR_SECRET + VB_RUMBLE_FOR_SECRET, + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*ActorContext` + // - `*ActorEntry` + // - `*PlayState` + // - `*Actor` + VB_SPAWN_ACTOR_ENTRY, + + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*PlayState` + // - `*Vec3f` + // - `double` (promoted from `f32`) + // - `double` (promoted from `f32`) + // - `double` (promoted from `f32`) + VB_ADULT_ZELDA_SPAWN_STALFOS_IN_COLLAPSE, + + // #### `result` + // ```c + // !(this->dyna.actor.flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME) + // ``` + // #### `args` + // - `*EnBlkobj` + // - `*PlayState` + VB_BLKOBJ_SPAWN_DARK_LINK, + + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*BgHakaTubo` + // - `*PlayState` + VB_HAKA_TUBO_SPAWN_KEESE, + + // #### `result` + // ```c + // !IS_DAY && play->sceneNum == SCENE_GRAVEYARD + // ``` + // #### `args` + // - `*BgHaka` + // - `*PlayState` + VB_HAKA_SPAWN_POE, + + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*EnVali` + // - `*PlayState` + VB_BIRI_SPAWN_JELLYFISH_UPON_DEATH, + + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*EnEncount1` + // - `*PlayState` + // - `s16` + // - `Vec3f` + // - `s16` + VB_ENCOUNT1_SPAWN_STALCHILD_OR_WOLFOS, + + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*BgMoriBigst` + // - `*PlayState` + VB_MORI_BIGST_SUMMON_STALFOS_PAIR, + + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*BgHakaHuta` + // - `*PlayState` + VB_HAKA_HUTA_SPAWN_KEESE, + + // #### `result` + // ```c + // true + // ``` + // #### `args` + // - `*BgHakaHuta` + // - `*PlayState` + VB_HAKA_HUTA_SPAWN_REDEAD, } GIVanillaBehavior; #endif diff --git a/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp b/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp index c10011454..37e1d07be 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp @@ -79,8 +79,8 @@ CheckIdentity ShuffleFairies_GetFairyIdentity(int32_t params) { static bool SpawnFairy(f32 posX, f32 posY, f32 posZ, int32_t params, FairyType fairyType) { CheckIdentity fairyIdentity = ShuffleFairies_GetFairyIdentity(params); if (!Flags_GetRandomizerInf(fairyIdentity.randomizerInf)) { - Actor* fairy = Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_ELF, posX, posY - 30.0f, posZ, 0, 0, 0, - fairyType, true); + Actor* fairy = + Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_ELF, posX, posY - 30.0f, posZ, 0, 0, 0, fairyType); ObjectExtension::GetInstance().Set(fairy, std::move(fairyIdentity)); fairy->draw = (ActorFunc)ShuffleFairies_DrawRandomizedItem; return true; diff --git a/soh/soh/Enhancements/randomizer/ShuffleTrees.cpp b/soh/soh/Enhancements/randomizer/ShuffleTrees.cpp index 237dcd6be..fb8f922a9 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleTrees.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleTrees.cpp @@ -179,7 +179,7 @@ void RegisterShuffleTrees() { treeActor->actor.home.rot.z &= 0x1FFF; treeActor->actor.home.rot.z |= 0xE000; Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_SW, dropsSpawnPt.x, dropsSpawnPt.y, - dropsSpawnPt.z, 0, treeActor->actor.world.rot.y, 0, treeActor->actor.home.rot.z, true); + dropsSpawnPt.z, 0, treeActor->actor.world.rot.y, 0, treeActor->actor.home.rot.z); treeActor->actor.home.rot.z = 0; } *should = false; diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index f2a31de87..c4fdc7dcf 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -2216,7 +2216,7 @@ void RandomizerOnActorInitHandler(void* actorRef) { } else if (ge1Type == GE1_TYPE_GATE_OPERATOR && enGe1->actor.world.pos.x != -1358.0f) { // When spawning the gate operator, also spawn an extra gate operator on the wasteland side Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_GE1, -1358.0f, 88.0f, -3018.0f, 0, 0x95B0, 0, - 0x0300 | GE1_TYPE_GATE_OPERATOR, true); + 0x0300 | GE1_TYPE_GATE_OPERATOR); } } @@ -2603,13 +2603,13 @@ void RandomizerOnSceneSpawnActorsHandler() { case SCENE_TEMPLE_OF_TIME: if (gPlayState->roomCtx.curRoom.num == 1) { Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_XC, -104, -40, 2382, 0, - static_cast(0x8000), 0, SHEIK_TYPE_RANDO, false); + static_cast(0x8000), 0, SHEIK_TYPE_RANDO); } break; case SCENE_INSIDE_GANONS_CASTLE: if (gPlayState->roomCtx.curRoom.num == 1) { Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_XC, 101, 150, 137, 0, 0, 0, - SHEIK_TYPE_RANDO, false); + SHEIK_TYPE_RANDO); } break; default: diff --git a/soh/soh/Network/Anchor/Anchor.cpp b/soh/soh/Network/Anchor/Anchor.cpp index ccaedb4c6..2bbbf9082 100644 --- a/soh/soh/Network/Anchor/Anchor.cpp +++ b/soh/soh/Network/Anchor/Anchor.cpp @@ -222,7 +222,7 @@ void Anchor::RefreshClientActors() { // clientId and store it on player->zTargetActiveTimer (unused s32 for the dummy) for convenience auto dummy = Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_PLAYER, client.posRot.pos.x, client.posRot.pos.y, - client.posRot.pos.z, client.posRot.rot.x, client.posRot.rot.y, client.posRot.rot.z, 0, false); + client.posRot.pos.z, client.posRot.rot.x, client.posRot.rot.y, client.posRot.rot.z, 0); client.player = (Player*)dummy; } spawningDummyPlayerForClientId = 0; diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 605662669..1fe489589 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -2607,7 +2607,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { refActor = &GET_PLAYER(play)->actor; KREG(0) = 0; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, refActor->world.pos.x, refActor->world.pos.y + 100.0f, - refActor->world.pos.z, 0, 0, 0, 1, true); + refActor->world.pos.z, 0, 0, 0, 1); } sp80 = &D_80116068[0]; @@ -3319,18 +3319,7 @@ void Actor_FreeOverlay(ActorDBEntry* dbEntry) { int gMapLoading = 0; Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, - s16 rotY, s16 rotZ, s16 params, s16 canRandomize) { - - uint8_t tryRandomizeEnemy = canRandomize && CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && - ((gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2) || - (gSaveContext.fileNum == 0xFF && gSaveContext.gameMode == GAMEMODE_NORMAL)); - - if (tryRandomizeEnemy) { - if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) { - return NULL; - } - } - + s16 rotY, s16 rotZ, s16 params) { Actor* actor; s32 objBankIndex; u32 temp; @@ -3425,7 +3414,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params) { - Actor* spawnedActor = Actor_Spawn(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params, true); + Actor* spawnedActor = Actor_Spawn(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); if (spawnedActor == NULL) { return NULL; @@ -3433,7 +3422,7 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play // The following enemies break when the parent actor isn't the same as what would happen in authentic gameplay. // As such, don't assign a parent to them at all when spawned with Enemy Randomizer. - // Gohma (z_boss_goma.c), the Stalchildren spawner (z_en_encount1.c) and the falling platform spawning Stalfos in + // Gohma (z_boss_goma.c) and the falling platform spawning Stalfos in // Forest Temple (z_bg_mori_bigst.c) that normally rely on this behaviour are changed when // Enemy Rando is on so they still work properly even without assigning a parent. if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && @@ -3469,7 +3458,7 @@ void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) { (transitionActor->sides[1].room == play->roomCtx.prevRoom.num)))) { Actor_Spawn(actorCtx, play, (s16)(transitionActor->id & 0x1FFF), transitionActor->pos.x, transitionActor->pos.y, transitionActor->pos.z, 0, transitionActor->rotY, 0, - (i << 0xA) + transitionActor->params, true); + (i << 0xA) + transitionActor->params); transitionActor->id = -transitionActor->id; numActors = play->transiActorCtx.numActors; @@ -3481,8 +3470,13 @@ void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) { Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayState* play) { gMapLoading = 1; - Actor* ret = Actor_Spawn(actorCtx, play, actorEntry->id, actorEntry->pos.x, actorEntry->pos.y, actorEntry->pos.z, - actorEntry->rot.x, actorEntry->rot.y, actorEntry->rot.z, actorEntry->params, true); + Actor* ret; + + if (GameInteractor_Should(VB_SPAWN_ACTOR_ENTRY, true, actorCtx, actorEntry, play, ret)) { + ret = Actor_Spawn(actorCtx, play, actorEntry->id, actorEntry->pos.x, actorEntry->pos.y, actorEntry->pos.z, + actorEntry->rot.x, actorEntry->rot.y, actorEntry->rot.z, actorEntry->params); + } + gMapLoading = 0; return ret; diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 7fc89ee83..e8e29a19d 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1589,7 +1589,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) { if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) { // TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf) spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, - spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED, true); + spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED); EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true, DEADSOUND_REPEAT_MODE_OFF, 40); } else { @@ -1599,7 +1599,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) { if (params != -1) { spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, spawnPos->x, spawnPos->y, - spawnPos->z, 0, 0, 0, params | param8000 | param3F00, true); + spawnPos->z, 0, 0, 0, params | param8000 | param3F00); if ((spawnedActor != NULL) && !param8000) { spawnedActor->actor.velocity.y = !param4000 ? 8.0f : -2.0f; spawnedActor->actor.speedXZ = 2.0f; @@ -1636,14 +1636,14 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) { if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) { // TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf) spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, - spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED, true); + spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED); EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true, DEADSOUND_REPEAT_MODE_OFF, 40); } else { params = func_8001F404(params & 0x00FF); if (params != -1) { spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, spawnPos->x, spawnPos->y, - spawnPos->z, 0, 0, 0, params | param8000 | param3F00, true); + spawnPos->z, 0, 0, 0, params | param8000 | param3F00); if ((spawnedActor != NULL) && !param8000) { spawnedActor->actor.velocity.y = 0.0f; spawnedActor->actor.speedXZ = 0.0f; @@ -1709,7 +1709,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP if (dropId == ITEM00_FLEXIBLE) { if (gSaveContext.health <= FULL_HEART_HEALTH) { // 1 heart or less Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, - FAIRY_HEAL_TIMED, true); + FAIRY_HEAL_TIMED); EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true, DEADSOUND_REPEAT_MODE_OFF, 40); return; @@ -1759,7 +1759,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP dropId = func_8001F404(dropId); if (dropId != 0xFF) { spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, spawnPos->x, - spawnPos->y, spawnPos->z, 0, 0, 0, dropId, true); + spawnPos->y, spawnPos->z, 0, 0, 0, dropId); if ((spawnedActor != NULL) && (dropId != 0xFF)) { spawnedActor->actor.velocity.y = 8.0f; spawnedActor->actor.speedXZ = 2.0f; diff --git a/soh/src/code/z_horse.c b/soh/src/code/z_horse.c index ef4b7ec50..68f9ba9d2 100644 --- a/soh/src/code/z_horse.c +++ b/soh/src/code/z_horse.c @@ -54,7 +54,7 @@ void func_8006D0EC(PlayState* play, Player* player) { if ((AREG(6) != 0) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0))) { player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, player->actor.world.pos.x, player->actor.world.pos.y, player->actor.world.pos.z, player->actor.shape.rot.x, - player->actor.shape.rot.y, player->actor.shape.rot.z, 9, true); + player->actor.shape.rot.y, player->actor.shape.rot.z, 9); assert(player->rideActor != NULL); @@ -68,13 +68,12 @@ void func_8006D0EC(PlayState* play, Player* player) { } else if ((play->sceneNum == SCENE_GERUDOS_FORTRESS) && (gSaveContext.minigameState == 3)) { Actor* horseActor; gSaveContext.minigameState = 0; - horseActor = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1, true); + horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1); horseActor->room = -1; } else if ((gSaveContext.entranceIndex == ENTR_LON_LON_RANCH_7) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) { Actor* horseActor = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1); assert(horseActor != NULL); } else if ((play->sceneNum == gSaveContext.horseData.scene) && (((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && @@ -91,7 +90,7 @@ void func_8006D0EC(PlayState* play, Player* player) { if (func_8006CFC0(gSaveContext.horseData.scene)) { Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, gSaveContext.horseData.pos.x, gSaveContext.horseData.pos.y, gSaveContext.horseData.pos.z, 0, - gSaveContext.horseData.angle, 0, 1, true); + gSaveContext.horseData.angle, 0, 1); assert(horseActor != NULL); if (play->sceneNum == SCENE_GERUDOS_FORTRESS) { horseActor->room = -1; @@ -105,7 +104,7 @@ void func_8006D0EC(PlayState* play, Player* player) { } } else if ((play->sceneNum == SCENE_LON_LON_RANCH) && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0)) { - Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1, true); + Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1); assert(horseActor != NULL); } else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) { for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) { @@ -113,7 +112,7 @@ void func_8006D0EC(PlayState* play, Player* player) { if (horseSpawn->scene == play->sceneNum) { Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawn->pos.x, horseSpawn->pos.y, - horseSpawn->pos.z, 0, horseSpawn->angle, 0, horseSpawn->type, true); + horseSpawn->pos.z, 0, horseSpawn->angle, 0, horseSpawn->type); assert(horseActor != NULL); if (play->sceneNum == SCENE_GERUDOS_FORTRESS) { horseActor->room = -1; @@ -124,7 +123,7 @@ void func_8006D0EC(PlayState* play, Player* player) { } } else if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) { if ((DREG(1) == 0) && (play->sceneNum == SCENE_LON_LON_BUILDINGS) && !IS_DAY) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1); } } } @@ -163,7 +162,7 @@ void func_8006D684(PlayState* play, Player* player) { } player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, spawnPos.x, spawnPos.y, spawnPos.z, 0, - player->actor.world.rot.y, 0, 7, true); + player->actor.world.rot.y, 0, 7); assert(player->rideActor != NULL); Actor_MountHorse(play, player, player->rideActor); @@ -172,7 +171,7 @@ void func_8006D684(PlayState* play, Player* player) { } else if ((play->sceneNum == SCENE_LON_LON_RANCH) && ((gSaveContext.eventInf[0] & 0xF) == 6) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) == 0) && (DREG(1) == 0)) { player->rideActor = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5); assert(player->rideActor != NULL); Actor_MountHorse(play, player, player->rideActor); @@ -206,7 +205,7 @@ void func_8006D684(PlayState* play, Player* player) { player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, - D_8011F9B8[i].pos.z, 0, player->actor.world.rot.y, 0, D_8011F9B8[i].type, true); + D_8011F9B8[i].pos.z, 0, player->actor.world.rot.y, 0, D_8011F9B8[i].type); assert(player->rideActor != NULL); Actor_MountHorse(play, player, player->rideActor); @@ -221,7 +220,7 @@ void func_8006D684(PlayState* play, Player* player) { player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, - D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type | temp, true); + D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type | temp); assert(player->rideActor != NULL); player->actor.world.pos.x = D_8011F9B8[i].pos.x; @@ -240,7 +239,7 @@ void func_8006D684(PlayState* play, Player* player) { Play_CameraSetAtEye(play, play->activeCamera, &player->actor.world.pos, &sp54); } else { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, - D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type, true); + D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type); } break; } diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index df7928eb5..dee2327ab 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -3653,10 +3653,10 @@ void Message_DrawMain(PlayState* play, Gfx** p) { Message_ResetOcarinaNoteState(); if (msgCtx->lastPlayedSong >= OCARINA_SONG_SARIAS && msgCtx->lastPlayedSong < OCARINA_SONG_MEMORY_GAME) { - Actor_Spawn( - &play->actorCtx, play, sOcarinaEffectActorIds[msgCtx->lastPlayedSong - OCARINA_SONG_SARIAS], - player->actor.world.pos.x, player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, - sOcarinaEffectActorParams[msgCtx->lastPlayedSong - OCARINA_SONG_SARIAS], true); + Actor_Spawn(&play->actorCtx, play, + sOcarinaEffectActorIds[msgCtx->lastPlayedSong - OCARINA_SONG_SARIAS], + player->actor.world.pos.x, player->actor.world.pos.y, player->actor.world.pos.z, 0, + 0, 0, sOcarinaEffectActorParams[msgCtx->lastPlayedSong - OCARINA_SONG_SARIAS]); } } break; diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index face9d64f..f73d076de 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -686,7 +686,7 @@ void Play_Init(GameState* thisx) { if (CVarGetInteger(CVAR_ENHANCEMENT("IvanCoopModeEnabled"), 0)) { Actor_Spawn(&play->actorCtx, play, gEnPartnerId, GET_PLAYER(play)->actor.world.pos.x, GET_PLAYER(play)->actor.world.pos.y + Player_GetHeight(GET_PLAYER(play)) + 5.0f, - GET_PLAYER(play)->actor.world.pos.z, 0, 0, 0, 1, true); + GET_PLAYER(play)->actor.world.pos.z, 0, 0, 0, 1); } // nextEntranceIndex was not initialized, so the previous value was carried over during soft resets. @@ -1700,7 +1700,7 @@ void Play_Main(GameState* thisx) { if (play->envCtx.unk_EE[2] == 0 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) { play->envCtx.unk_EE[3] = 64; - Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJECT_KANKYO, 0, 0, 0, 0, 0, 0, 3, 0); + Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJECT_KANKYO, 0, 0, 0, 0, 0, 0, 3); } D_8012D1F8 = &play->state.input[0]; diff --git a/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 3bb48ee51..3f9b424ab 100644 --- a/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -211,7 +211,7 @@ Actor* BgBreakwall_SpawnFragments(PlayState* play, BgBreakwall* this, Vec3f* pos Matrix_MultVec3f(&actorPosList[j][k], &actorPos); actor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_A_OBJ, Rand_CenteredFloat(20.0f) + actorPos.x, Rand_CenteredFloat(20.0f) + actorPos.y, Rand_CenteredFloat(20.0f) + actorPos.z, - actorRotList[k].x, actorRotList[k].y + angle1, actorRotList[k].z, 0x000B, true); + actorRotList[k].x, actorRotList[k].y + angle1, actorRotList[k].z, 0x000B); if ((j & 1) == 0) { func_80033480(play, &actorPos, velocity * 200.0f, 1, 650, 150, 1); diff --git a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 0c71cc622..d521ad680 100644 --- a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -709,7 +709,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) { } else if (!this->lightBallSpawned) { demoEffectParams = ((s16)(sDemoEffectLightColors[actionIndex] << 0xC) | DEMO_EFFECT_LIGHT); Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, (s32)demoEffectParams, true); + this->actor.world.pos.z, 0, 0, 0, (s32)demoEffectParams); this->lightBallSpawned = true; } } else { @@ -804,7 +804,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) { !this->warpEffectSpawned) { actionIndex = play->csCtx.npcActions[0]->action - 11; Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, player->actor.world.pos.x, player->actor.world.pos.y, - player->actor.world.pos.z, 0, 0, 0, actionIndex, true); + player->actor.world.pos.z, 0, 0, 0, actionIndex); this->warpEffectSpawned = true; } BgDyYoseizo_Bob(this, play); diff --git a/soh/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c b/soh/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c index f5a2b3248..43a321ea4 100644 --- a/soh/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c +++ b/soh/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c @@ -74,7 +74,7 @@ void BgGndSoulmeiro_Init(Actor* thisx, PlayState* play) { if (Flags_GetSwitch(play, (this->actor.params >> 8) & 0x3F)) { Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 9, true); + this->actor.world.pos.z, 0, 0, 0, 9); this->actor.draw = NULL; Actor_Kill(&this->actor); return; @@ -122,7 +122,7 @@ void func_8087AF38(BgGndSoulmeiro* this, PlayState* play) { Flags_SetSwitch(play, (thisx->params >> 8) & 0x3F); Actor_Kill(&this->actor); Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, 0, - 0, 0, 9, true); + 0, 0, 9); } else if ((this->unk_198 % 6) == 0) { s32 i; s16 temp_2 = Rand_ZeroOne() * (10922.0f); // This should be: 0x10000 / 6.0f diff --git a/soh/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/soh/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index c7e72790b..732755ed3 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -6,6 +6,7 @@ #include "z_bg_haka.h" #include "objects/object_haka/object_haka.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #define FLAGS 0 @@ -117,9 +118,9 @@ void func_8087B938(BgHaka* this, PlayState* play) { if (this->dyna.actor.params == 1) { Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); - } else if (!IS_DAY && play->sceneNum == SCENE_GRAVEYARD) { + } else if (GameInteractor_Should(VB_HAKA_SPAWN_POE, !IS_DAY && play->sceneNum == SCENE_GRAVEYARD, this, play)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.y, - this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0, 1, true); + this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0, 1); } // un tss un tss diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c b/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c index ae2fc37f0..d5b24136e 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c @@ -6,6 +6,7 @@ #include "z_bg_haka_huta.h" #include "objects/object_hakach_objects/object_hakach_objects.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED @@ -110,30 +111,33 @@ void BgHakaHuta_SpawnEnemies(BgHakaHuta* this, PlayState* play) { this->actionFunc = BgHakaHuta_Open; OnePointCutscene_Init(play, 6001, 999, &this->dyna.actor, MAIN_CAM); if (this->unk_16A == 2) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FIREFLY, - (this->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(this->dyna.actor.shape.rot.y) + - 40.0f * Math_SinS(this->dyna.actor.shape.rot.y)), - this->dyna.actor.world.pos.y - 10.0f, - (this->dyna.actor.world.pos.z - (-25.0f) * Math_SinS(this->dyna.actor.shape.rot.y) + - Math_CosS(this->dyna.actor.shape.rot.y) * 40.0f), - 0, this->dyna.actor.shape.rot.y + 0x8000, 0, 2, true); - - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FIREFLY, - (this->dyna.actor.world.pos.x + (-25.0f) * (Math_CosS(this->dyna.actor.shape.rot.y)) + - Math_SinS(this->dyna.actor.shape.rot.y) * 80.0f), - this->dyna.actor.world.pos.y - 10.0f, - (this->dyna.actor.world.pos.z - (-25.0f) * (Math_SinS(this->dyna.actor.shape.rot.y)) + - Math_CosS(this->dyna.actor.shape.rot.y) * 80.0f), - 0, this->dyna.actor.shape.rot.y, 0, 2, true); + if (GameInteractor_Should(VB_HAKA_HUTA_SPAWN_KEESE, true, this, play)) { + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FIREFLY, + (this->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(this->dyna.actor.shape.rot.y) + + 40.0f * Math_SinS(this->dyna.actor.shape.rot.y)), + this->dyna.actor.world.pos.y - 10.0f, + (this->dyna.actor.world.pos.z - (-25.0f) * Math_SinS(this->dyna.actor.shape.rot.y) + + Math_CosS(this->dyna.actor.shape.rot.y) * 40.0f), + 0, this->dyna.actor.shape.rot.y + 0x8000, 0, 2); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FIREFLY, + (this->dyna.actor.world.pos.x + (-25.0f) * (Math_CosS(this->dyna.actor.shape.rot.y)) + + Math_SinS(this->dyna.actor.shape.rot.y) * 80.0f), + this->dyna.actor.world.pos.y - 10.0f, + (this->dyna.actor.world.pos.z - (-25.0f) * (Math_SinS(this->dyna.actor.shape.rot.y)) + + Math_CosS(this->dyna.actor.shape.rot.y) * 80.0f), + 0, this->dyna.actor.shape.rot.y, 0, 2); + } } else if (this->unk_16A == 1) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RD, - (this->dyna.actor.home.pos.x + (-25.0f) * (Math_CosS(this->dyna.actor.shape.rot.y)) + - Math_SinS(this->dyna.actor.shape.rot.y) * 100.0f), - this->dyna.actor.home.pos.y - 40.0f, - (this->dyna.actor.home.pos.z - (-25.0f) * (Math_SinS(this->dyna.actor.shape.rot.y)) + - Math_CosS(this->dyna.actor.shape.rot.y) * 100.0f), - 0, this->dyna.actor.shape.rot.y, 0, 0xFD, true); + if (GameInteractor_Should(VB_HAKA_HUTA_SPAWN_REDEAD, true, this, play)) { + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RD, + (this->dyna.actor.home.pos.x + (-25.0f) * (Math_CosS(this->dyna.actor.shape.rot.y)) + + Math_SinS(this->dyna.actor.shape.rot.y) * 100.0f), + this->dyna.actor.home.pos.y - 40.0f, + (this->dyna.actor.home.pos.z - (-25.0f) * (Math_SinS(this->dyna.actor.shape.rot.y)) + + Math_CosS(this->dyna.actor.shape.rot.y) * 100.0f), + 0, this->dyna.actor.shape.rot.y, 0, 0xFD); + } } } } diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index 4e5a28922..43beaa506 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -7,6 +7,7 @@ #include "z_bg_haka_tubo.h" #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_haka_objects/object_haka_objects.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED @@ -174,9 +175,11 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) { } else if (rnd < 0.2f) { // Unlucky, no reward and spawn keese collectibleParams = -1; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FIREFLY, this->dyna.actor.world.pos.x, - this->dyna.actor.world.pos.y + 80.0f, this->dyna.actor.world.pos.z, 0, - this->dyna.actor.shape.rot.y, 0, 2, true); + if (GameInteractor_Should(VB_HAKA_TUBO_SPAWN_KEESE, true, this, play)) { + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FIREFLY, this->dyna.actor.world.pos.x, + this->dyna.actor.world.pos.y + 80.0f, this->dyna.actor.world.pos.z, 0, + this->dyna.actor.shape.rot.y, 0, 2); + } Sfx_PlaySfxCentered(NA_SE_SY_ERROR); } else { // Random rewards diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c b/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c index ac7f506da..c2b2c60d9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c @@ -239,7 +239,7 @@ void func_80882CC4(BgHakaZou* this, PlayState* play) { actorSpawnPos.y = this->dyna.actor.world.pos.y + (i - 1) * 55; Actor_Spawn(&play->actorCtx, play, ACTOR_BG_HAKA_ZOU, actorSpawnPos.x, actorSpawnPos.y, actorSpawnPos.z, 0, - this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 2, true); + this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 2); func_800286CC(play, &actorSpawnPos, &sZeroVec, &sZeroVec, 1000, 50); } } diff --git a/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index 9d950e24f..8156fdae9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -307,9 +307,9 @@ void BgHeavyBlock_SpawnPieces(BgHeavyBlock* this, PlayState* play) { pos.z = this->dyna.actor.world.pos.z + (spA4[i].x * -sinYaw) + (cosYaw * pos.z); Actor_Spawn(&play->actorCtx, play, ACTOR_BG_HEAVY_BLOCK, pos.x, pos.y, pos.z, this->dyna.actor.shape.rot.x, - this->dyna.actor.shape.rot.y, 0, 2, true); + this->dyna.actor.shape.rot.y, 0, 2); Actor_Spawn(&play->actorCtx, play, ACTOR_BG_HEAVY_BLOCK, pos.x, pos.y, pos.z, this->dyna.actor.shape.rot.x, - this->dyna.actor.shape.rot.y, 0, 3, true); + this->dyna.actor.shape.rot.y, 0, 3); BgHeavyBlock_SpawnDust(play, pos.x, pos.y, pos.z, 0.0f, 0.0f, 0.0f, 0); } diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c index e24783372..2d6107e61 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c @@ -153,9 +153,8 @@ void BgJyaBigmirror_HandleMirRay(Actor* thisx, PlayState* play) { for (i = 0; i < 3; i++) { if (lightBeamToggles[i]) { if ((this->lightBeams[i] == NULL) && Object_IsLoaded(&play->objectCtx, objBankIndex)) { - this->lightBeams[i] = - Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, sMirRayPoss[i].x, sMirRayPoss[i].y, - sMirRayPoss[i].z, 0, 0, 0, sMirRayParamss[i], true); + this->lightBeams[i] = Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, sMirRayPoss[i].x, + sMirRayPoss[i].y, sMirRayPoss[i].z, 0, 0, 0, sMirRayParamss[i]); if (this->lightBeams[i] == NULL) { // "Mir Ray generation failed" diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c index a154a12f6..836cdc5c6 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c @@ -181,7 +181,7 @@ void BgJyaBombchuiwa_SpawnLightRay(BgJyaBombchuiwa* this, PlayState* play) { this->lightRayIntensity = 153.0f; BgJyaBombchuiwa_SetDrawFlags(this, 4); if (Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 0, true) == NULL) { + this->actor.world.pos.z, 0, 0, 0, 0) == NULL) { // "Occurrence failure" osSyncPrintf("Error : Mir_Ray 発生失敗(%s %d)(arg_data 0x%04x)\n", __FILE__, __LINE__, this->actor.params); } diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/soh/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c index 27dcf484f..9314006de 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c @@ -118,16 +118,16 @@ void BgJyaIronobj_SpawnPillarParticles(BgJyaIronobj* this, PlayState* play, EnIk Actor* actor = Actor_Spawn(&play->actorCtx, play, ACTOR_BG_JYA_HAHENIRON, this->dyna.actor.world.pos.x, Rand_ZeroOne() * 80.0f + this->dyna.actor.world.pos.y + 20.0f, this->dyna.actor.world.pos.z, 0, - (s16)(Rand_ZeroOne() * 0x4000) + rotY - 0x2000, 0, 0, true); + (s16)(Rand_ZeroOne() * 0x4000) + rotY - 0x2000, 0, 0); if (actor != NULL) { actor->speedXZ = Rand_ZeroOne() * 8.0f + 9.0f; actor->velocity.y = Rand_ZeroOne() * 10.0f + 6.0f; } } Actor_Spawn(&play->actorCtx, play, ACTOR_BG_JYA_HAHENIRON, this->dyna.actor.world.pos.x, - this->dyna.actor.world.pos.y + 150.0f, this->dyna.actor.world.pos.z, 0, 0, 0, 1, true); + this->dyna.actor.world.pos.y + 150.0f, this->dyna.actor.world.pos.z, 0, 0, 0, 1); Actor_Spawn(&play->actorCtx, play, ACTOR_BG_JYA_HAHENIRON, this->dyna.actor.world.pos.x, - this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, 0, 0, 0, 2, true); + this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, 0, 0, 0, 2); sins = Math_SinS(rotY); coss = Math_CosS(rotY); for (j = 0; j < 32; j++) { @@ -180,7 +180,7 @@ void BgJyaIronobj_SpawnThoneParticles(BgJyaIronobj* this, PlayState* play, EnIk* Actor* actor = Actor_Spawn(&play->actorCtx, play, ACTOR_BG_JYA_HAHENIRON, this->dyna.actor.world.pos.x, (Rand_ZeroOne() * 80.0f) + this->dyna.actor.world.pos.y + 10.0f, this->dyna.actor.world.pos.z, - 0, ((s16)(s32)(Rand_ZeroOne() * 0x4000) + rotY) - 0x2000, 0, 0, true); + 0, ((s16)(s32)(Rand_ZeroOne() * 0x4000) + rotY) - 0x2000, 0, 0); if (actor != NULL) { actor->speedXZ = Rand_ZeroOne() * 8.0f + 9.0f; actor->velocity.y = Rand_ZeroOne() * 10.0f + 6.0f; diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 3085cb663..97227cfca 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -458,7 +458,7 @@ void BgMizuBwall_SpawnDebris(BgMizuBwall* this, PlayState* play) { rand1 = (s16)(Rand_ZeroOne() * 120.0f) + 20; rand2 = (s16)(Rand_ZeroOne() * 240.0f) + 20; func_80033480(play, &debrisPos, 50.0f, 2, rand1, rand2, 0); - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_A_OBJ, debrisPos.x, debrisPos.y, debrisPos.z, 0, 0, 0, 0xB, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_A_OBJ, debrisPos.x, debrisPos.y, debrisPos.z, 0, 0, 0, 0xB); } } diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index 24b2fb30d..e71b25139 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -198,34 +198,35 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, PlayState* play) { BgMoriBigst_SetupAction(this, BgMoriBigst_StalfosPairFight); Flags_UnsetClear(play, this->dyna.actor.room); - stalfos1 = Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_EN_TEST, 70.0f, 827.0f, -3383.0f, 0, - 0, 0, 5); - if (stalfos1 != NULL) { - this->dyna.actor.child = NULL; - this->dyna.actor.home.rot.z++; - } else { - // "Warning: 3-1 Stalfos failure" - osSyncPrintf("Warning : 第3-1スタルフォス発生失敗\n"); - } - stalfos2 = Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_EN_TEST, 170.0f, 827.0f, -3260.0f, 0, - 0, 0, 5); - if (stalfos2 != NULL) { - this->dyna.actor.child = NULL; - this->dyna.actor.home.rot.z++; - } else { - // "Warning: 3-2 Stalfos failure" - osSyncPrintf("Warning : 第3-2スタルフォス発生失敗\n"); + if (GameInteractor_Should(VB_MORI_BIGST_SUMMON_STALFOS_PAIR, true, this, play)) { + stalfos1 = Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_EN_TEST, 70.0f, 827.0f, -3383.0f, + 0, 0, 0, 5); + if (stalfos1 != NULL) { + this->dyna.actor.child = NULL; + this->dyna.actor.home.rot.z++; + } else { + // "Warning: 3-1 Stalfos failure" + osSyncPrintf("Warning : 第3-1スタルフォス発生失敗\n"); + } + stalfos2 = Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_EN_TEST, 170.0f, 827.0f, -3260.0f, + 0, 0, 0, 5); + if (stalfos2 != NULL) { + this->dyna.actor.child = NULL; + this->dyna.actor.home.rot.z++; + } else { + // "Warning: 3-2 Stalfos failure" + osSyncPrintf("Warning : 第3-2スタルフォス発生失敗\n"); + } } Flags_SetClear(play, this->dyna.actor.room); } void BgMoriBigst_StalfosPairFight(BgMoriBigst* this, PlayState* play) { - if ((this->dyna.actor.home.rot.z == 0 || - // Check if all enemies are defeated instead of the regular stalfos when enemy randomizer or crowd control is - // on. - (Flags_GetTempClear(play, this->dyna.actor.room) && - (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || - ((CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0)))))) && + if ( + // Check if all enemies are defeated instead of the regular stalfos when crowd control is on. TODO: move to the + // way that enemy randomizer does this + (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0) ? Flags_GetTempClear(play, this->dyna.actor.room) + : this->dyna.actor.home.rot.z == 0) && !Player_InCsMode(play)) { Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F); BgMoriBigst_SetupDone(this, play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index c5af8184d..5409dff8d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -167,12 +167,12 @@ void BgMoriHineri_DoNothing(BgMoriHineri* this, PlayState* play) { void BgMoriHineri_SpawnBossKeyChest(BgMoriHineri* this, PlayState* play) { if (this->dyna.actor.params == 0) { Object_Spawn(&play->objectCtx, OBJECT_BOX); - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOX, -1515.0f, 1440.0f, -3475.0f, -0x4000, 0x4000, 0, 0x27EE, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOX, -1515.0f, 1440.0f, -3475.0f, -0x4000, 0x4000, 0, 0x27EE); this->actionFunc = func_808A3C8C; } else { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOX, this->dyna.actor.world.pos.x + 147.0f, this->dyna.actor.world.pos.y + -245.0f, this->dyna.actor.world.pos.z + -453.0f, 0, 0x4000, 0, - 0x27EE, true); + 0x27EE); this->actionFunc = BgMoriHineri_DoNothing; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 5ea4843bc..cf07b4f44 100644 --- a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -340,7 +340,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if ((this->type == 0) && (this->index == 0)) { amy = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->dyna.actor.world.pos.x + 30.0f, this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0, - this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300, true); + this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300); if (amy != NULL) { OnePointCutscene_Init(play, 3170, 30, amy, MAIN_CAM); } @@ -538,7 +538,7 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play) { } else if (this->collider.base.acFlags & AC_HIT) { if (!BgPoEvent_NextPainting(this)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y - 40.0f, - thisx->world.pos.z, 0, thisx->shape.rot.y, 0, thisx->params + ((this->type - 1) << 8), true); + thisx->world.pos.z, 0, thisx->shape.rot.y, 0, thisx->params + ((this->type - 1) << 8)); OnePointCutscene_Init(play, 3160, 80, thisx, MAIN_CAM); Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); diff --git a/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index c9c9ec433..5e6bc62aa 100644 --- a/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -101,13 +101,13 @@ void BgPoSyokudai_Init(Actor* thisx, PlayState* play) { Flags_GetSwitch(play, POE_TORCH_FLAG + POE_FLAME_BLUE) && Flags_GetSwitch(play, POE_TORCH_FLAG + POE_FLAME_RED) && !Flags_GetSwitch(play, thisx->params)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, 119.0f, 225.0f, -1566.0f, 0, 0, 0, thisx->params, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, 119.0f, 225.0f, -1566.0f, 0, 0, 0, thisx->params); play->envCtx.unk_BF = 0x4; } else if (!Flags_GetSwitch(play, POE_TORCH_FLAG + POE_FLAME_PURPLE) && !Flags_GetSwitch(play, 0x1B)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y + 52.0f, - thisx->world.pos.z, 0, 0, 0, (this->flameColor << 8) + thisx->params + 0x1000, true); + thisx->world.pos.z, 0, 0, 0, (this->flameColor << 8) + thisx->params + 0x1000); } else if (!Flags_GetSwitch(play, thisx->params)) { if (play->envCtx.unk_BF == 0xFF) { diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 624a3578c..20425cdd0 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -471,16 +471,16 @@ void BgSpot06Objects_Update(Actor* thisx, PlayState* play) { } // Spawn a floor switch - lakeControlFloorSwitch = Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_SWITCH, -896.0f, -1243.0f, 6953.0f, 0, 0, - 0, switchParams, false); + lakeControlFloorSwitch = + Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_SWITCH, -896.0f, -1243.0f, 6953.0f, 0, 0, 0, switchParams); // Spawn a sign Actor_Spawn(&play->actorCtx, play, ACTOR_EN_KANBAN, -970.0f, -1242.0f, 6954.0f, 0, 0, 0, - 0x0000 | (TEXT_LAKE_HYLIA_WATER_SWITCH_SIGN & 0xFF), false); + 0x0000 | (TEXT_LAKE_HYLIA_WATER_SWITCH_SIGN & 0xFF)); // Spawn a Navi check spot when Water Temple isn't cleared if (!Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) { Actor_Spawn(&play->actorCtx, play, ACTOR_ELF_MSG2, -896.0f, -1243.0f, 6953.0f, 0, 0, 0, - 0x3D00 | (TEXT_LAKE_HYLIA_WATER_SWITCH_NAVI & 0xFF), false); + 0x3D00 | (TEXT_LAKE_HYLIA_WATER_SWITCH_NAVI & 0xFF)); } actionCounter++; diff --git a/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 702285ffd..7d286c1bb 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -109,7 +109,7 @@ void func_808B29F0(BgSpot11Oasis* this, PlayState* play) { if (Math_StepToF(&this->actor.world.pos.y, 0.0f, 0.7f)) { func_808B2AA8(this); Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.world.pos.x, this->actor.world.pos.y + 40.0f, - this->actor.world.pos.z, 0, 0, 0, FAIRY_SPAWNER, true); + this->actor.world.pos.z, 0, 0, 0, FAIRY_SPAWNER); Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); } func_808B27F0(play, this->actor.world.pos.y); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index 1d112492b..067fd9ae9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -322,7 +322,7 @@ void BgSpot16Bombstone_SpawnFragments(BgSpot16Bombstone* this, PlayState* play) if (this->actor.params == 0) { Actor_Spawn(&play->actorCtx, play, ACTOR_BG_SPOT16_BOMBSTONE, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 5, true); + this->actor.world.pos.z, 0, 0, 0, 5); index = 3; } else { index = 0; @@ -354,7 +354,7 @@ void func_808B561C(BgSpot16Bombstone* this, PlayState* play) { world = &this->actor.world; for (index = 0; index < ARRAY_COUNT(D_808B6088); index++) { if (Actor_Spawn(&play->actorCtx, play, ACTOR_BG_SPOT16_BOMBSTONE, world->pos.x, world->pos.y, world->pos.z, 0, - 0, 0, D_808B6088[index], true) == NULL) { + 0, 0, D_808B6088[index]) == NULL) { break; } } diff --git a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index acba457ab..16391b36f 100644 --- a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -346,9 +346,9 @@ void BossDodongo_Init(Actor* thisx, PlayState* play) { Actor_Kill(&this->actor); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -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); 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); } } @@ -1584,8 +1584,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { Animation_Change(&this->skelAnime, &object_kingdodongo_Anim_003CF8, 1.0f, 0.0f, Animation_GetLastFrame(&object_kingdodongo_Anim_003CF8), ANIMMODE_ONCE, -1.0f); this->csState = 6; - 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); } break; case 6: @@ -1850,10 +1849,10 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { if (this->unk_1DA == 820) { Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR); if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { - Actor_Spawn( - &play->actorCtx, play, ACTOR_ITEM_B_HEART, - Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x, this->actor.world.pos.y, - Math_CosS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.z, 0, 0, 0, 0, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, + Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x, + this->actor.world.pos.y, + Math_CosS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.z, 0, 0, 0, 0); } } if (this->unk_1DA == 600) { diff --git a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 2a87e0f78..4b050ab92 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -229,7 +229,7 @@ void BossFd_Init(Actor* thisx, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); 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); } } else { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_BOSS_FD2, this->actor.world.pos.x, @@ -923,7 +923,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { } 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, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 0, true); + this->actor.world.pos.z, 0, 0, 0, 0); } break; case BOSSFD_WAIT_INTRO: diff --git a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 8f74d05a8..984da2d91 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -238,11 +238,11 @@ void BossGanondrof_Init(Actor* thisx, PlayState* play) { Actor_Kill(&this->actor); if (GameInteractor_Should(VB_SPAWN_BLUE_WARP, true, this)) { 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); } if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { 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); } } else { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_FHG, this->actor.world.pos.x, @@ -1067,7 +1067,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR); if (GameInteractor_Should(VB_SPAWN_BLUE_WARP, true, this)) { 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); } } @@ -1086,7 +1086,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { Player_SetCsActionWithHaltedActors(play, &this->actor, 7); 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, - GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0, true); + GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0); } this->actor.child = &horse->actor; this->killActor = true; diff --git a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 503e41472..3920cca5e 100644 --- a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -348,7 +348,7 @@ void BossGoma_Init(Actor* thisx, PlayState* play) { WARP_DUNGEON_CHILD); } 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); } } @@ -1126,7 +1126,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { this->subCameraFollowSpeed = 0.0f; if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { 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); } } break; diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index a6c1620fd..a13eb1547 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -378,7 +378,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) { WARP_DUNGEON_ADULT); } 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); } play->roomCtx.unk_74[0] = 0xFF; MO_WATER_LEVEL(play) = -500; @@ -970,9 +970,9 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { } } if ((this == sMorphaTent1) && (sMorphaCore->hitCount >= 3) && (sMorphaTent2 == NULL)) { - sMorphaTent2 = (BossMo*)Actor_Spawn(&play->actorCtx, play, ACTOR_BOSS_MO, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - BOSSMO_TENTACLE, true); + sMorphaTent2 = + (BossMo*)Actor_Spawn(&play->actorCtx, play, ACTOR_BOSS_MO, this->actor.world.pos.x, + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, BOSSMO_TENTACLE); sMorphaTent2->tentSpawnPos = this->tentSpawnPos; if (sMorphaTent2->tentSpawnPos > 10) { @@ -1132,7 +1132,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { 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); } Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR); diff --git a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 7884a1768..aa68a5866 100644 --- a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -283,7 +283,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { Flags_SetSwitch(play, 0x14); if (this->actor.params == BONGO_HEAD) { sFloor = (BgSstFloor*)Actor_Spawn(&play->actorCtx, play, ACTOR_BG_SST_FLOOR, sRoomCenter.x, sRoomCenter.y, - sRoomCenter.z, 0, 0, 0, BONGOFLOOR_REST, true); + sRoomCenter.z, 0, 0, 0, BONGOFLOOR_REST); SkelAnime_InitFlex(play, &this->skelAnime, &gBongoHeadSkel, &gBongoHeadEyeOpenIdleAnim, this->jointTable, this->morphTable, 45); ActorShape_Init(&this->actor.shape, 70000.0f, ActorShadow_DrawCircle, 95.0f); @@ -298,20 +298,20 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { if (GameInteractor_Should(VB_SPAWN_BLUE_WARP, true, this)) { 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); } if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { 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); } Actor_Kill(&this->actor); } else { sHands[LEFT] = (BossSst*)Actor_Spawn( &play->actorCtx, play, ACTOR_BOSS_SST, this->actor.world.pos.x + 200.0f, this->actor.world.pos.y, - this->actor.world.pos.z + 400.0f, 0, this->actor.shape.rot.y, 0, BONGO_LEFT_HAND, true); + this->actor.world.pos.z + 400.0f, 0, this->actor.shape.rot.y, 0, BONGO_LEFT_HAND); sHands[RIGHT] = (BossSst*)Actor_Spawn( &play->actorCtx, play, ACTOR_BOSS_SST, this->actor.world.pos.x + (-200.0f), this->actor.world.pos.y, - this->actor.world.pos.z + 400.0f, 0, this->actor.shape.rot.y, 0, BONGO_RIGHT_HAND, true); + this->actor.world.pos.z + 400.0f, 0, this->actor.shape.rot.y, 0, BONGO_RIGHT_HAND); sHands[LEFT]->actor.child = &sHands[RIGHT]->actor; sHands[RIGHT]->actor.child = &sHands[LEFT]->actor; @@ -1211,12 +1211,12 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) { } else if (this->effects[0].alpha == 0) { if (GameInteractor_Should(VB_SPAWN_BLUE_WARP, true, this)) { 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); } if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, (Math_SinS(this->actor.shape.rot.y) * 200.0f) + ROOM_CENTER_X, ROOM_CENTER_Y, - Math_CosS(this->actor.shape.rot.y) * 200.0f + ROOM_CENTER_Z, 0, 0, 0, 0, true); + Math_CosS(this->actor.shape.rot.y) * 200.0f + ROOM_CENTER_Z, 0, 0, 0, 0); } BossSst_SetCameraTargets(1.0f, 7); this->effectMode = BONGO_NULL; diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index d03c6ea81..416715f39 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -543,7 +543,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) { } 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); } } else { sKotakePtr = @@ -2810,7 +2810,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { } 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); } this->actor.world.pos.y = -2000.0f; diff --git a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 91083a757..f30f96604 100644 --- a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -644,13 +644,13 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { } if (GameInteractor_Should(VB_SPAWN_BLUE_WARP, true, this)) { Actor_Spawn(&play->actorCtx, play, warpId, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 0, - true); //! params could be WARP_DUNGEON_CHILD however this can also spawn Ru1 + this->actor.world.pos.z, 0, 0, 0, + 0); //! params could be WARP_DUNGEON_CHILD however this can also spawn Ru1 } if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { 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); } sDoorState = 100; Actor_Kill(&this->actor); @@ -1663,7 +1663,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { if (GameInteractor_Should(VB_SPAWN_HEART_CONTAINER, true)) { 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); } for (i = 2, sp7C = 2; i > 0; i--) { @@ -1675,7 +1675,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { if (GameInteractor_Should(VB_SPAWN_BLUE_WARP, true, this)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RU1, sWarpPos[sp7C].x, sWarpPos[sp7C].y, - sWarpPos[sp7C].z, 0, 0, 0, 0, true); + sWarpPos[sp7C].z, 0, 0, 0, 0); } } case DEATH_FINISH: @@ -1785,7 +1785,7 @@ void BossVa_SetupSupportCut(BossVa* this, PlayState* play) { sBodyState++; sFightPhase++; Actor_Spawn(&play->actorCtx, play, ACTOR_BOSS_VA, this->armTip.x, this->armTip.y + 20.0f, this->armTip.z, 0, - this->actor.shape.rot.y, 0, stumpParams, true); + this->actor.shape.rot.y, 0, stumpParams); Camera_AddQuake(&play->mainCamera, 2, 11, 8); this->burst = false; this->timer2 = 0; diff --git a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index d91f3d43e..1be26e461 100644 --- a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -238,7 +238,7 @@ void func_80966E98(Demo6K* this, PlayState* play) { if (this->timer1 == 39) { Sfx_PlaySfxCentered2(NA_SE_EV_CONSENTRATION); Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_6K, this->actor.world.pos.x, this->actor.world.pos.y + 10.0f, - this->actor.world.pos.z, 0, 0, 0, 2, true); + this->actor.world.pos.z, 0, 0, 0, 2); } if (this->timer1 == 64) { @@ -543,7 +543,7 @@ void func_80967DBC(Demo6K* this, PlayState* play) { void func_80967F10(Demo6K* this, PlayState* play) { if (this->timer2 == 0) { Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_6K, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 13, true); + this->actor.world.pos.z, 0, 0, 0, 13); } this->timer2++; diff --git a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index e4377972d..a20f0c652 100644 --- a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -928,7 +928,7 @@ void DemoEffect_UpdateLightRingTriforce(DemoEffect* this, PlayState* play) { if (play->csCtx.npcActions[this->csActionId] != NULL && play->csCtx.npcActions[this->csActionId]->action == 2) { blueOrb = (DemoEffect*)Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - DEMO_EFFECT_BLUE_ORB, true); + DEMO_EFFECT_BLUE_ORB); if (blueOrb != NULL) { Actor_SetScale(&blueOrb->actor, 0.0f); @@ -957,23 +957,22 @@ void DemoEffect_UpdateCreationFireball(DemoEffect* this, PlayState* play) { return; } - effect = - (DemoEffect*)Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, DEMO_EFFECT_BLUE_ORB, true); + effect = (DemoEffect*)Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, DEMO_EFFECT_BLUE_ORB); if (effect != NULL) { Actor_SetScale(&effect->actor, 0.0f); } effect = (DemoEffect*)Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - DEMO_EFFECT_LIGHTRING_EXPANDING, true); + DEMO_EFFECT_LIGHTRING_EXPANDING); if (effect != NULL) { Actor_SetScale(&effect->actor, 0.1f); } effect = (DemoEffect*)Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - DEMO_EFFECT_LIGHTRING_SHRINKING, true); + DEMO_EFFECT_LIGHTRING_SHRINKING); if (effect != NULL) { Actor_SetScale(&effect->actor, 0.2f); } @@ -1205,7 +1204,7 @@ void DemoEffect_UpdateGodLgtNayru(DemoEffect* this, PlayState* play) { lightRing = (DemoEffect*)Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x + 0x4000, this->actor.world.rot.y, - this->actor.world.rot.z, DEMO_EFFECT_LIGHTRING_EXPANDING, true); + this->actor.world.rot.z, DEMO_EFFECT_LIGHTRING_EXPANDING); if (lightRing != NULL) { Actor_SetScale(&lightRing->actor, 1.0f); diff --git a/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c index 6fcb2e938..82c898e48 100644 --- a/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -72,7 +72,7 @@ void func_8097D7D8(PlayState* play, Vec3f* pos, Vec3f* velOffset, f32 scale, s32 } Actor* DemoGt_SpawnCloudRing(PlayState* play, Vec3f* pos, s16 params) { - return Actor_Spawn(&play->actorCtx, play, ACTOR_BG_SPOT16_DOUGHNUT, pos->x, pos->y, pos->z, 0, 0, 0, params, true); + return Actor_Spawn(&play->actorCtx, play, ACTOR_BG_SPOT16_DOUGHNUT, pos->x, pos->y, pos->z, 0, 0, 0, params); } void DemoGt_SpawnExplosionWithSound(PlayState* play, Vec3f* pos, f32 scale) { diff --git a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 18bf9155d..7b332bb9f 100644 --- a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -748,7 +748,7 @@ void func_809865F8(DemoIm* this, PlayState* play, s32 arg2) { f32 spawnPosZ = thisPos->z + (Math_CosS(shapeRotY) * 30.0f); Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ARROW, spawnPosX, spawnPosY, spawnPosZ, 0xFA0, - this->actor.shape.rot.y, 0, ARROW_CS_NUT, true); + this->actor.shape.rot.y, 0, ARROW_CS_NUT); this->unk_27C = 1; } } else { diff --git a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 15bf27f43..6f1e4fa71 100644 --- a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -213,16 +213,16 @@ void DoorKiller_Destroy(Actor* thisx, PlayState* play) { void DoorKiller_SpawnRubble(Actor* thisx, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_KILLER, thisx->world.pos.x, thisx->world.pos.y + 9.0f, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, thisx->shape.rot.z, - DOOR_KILLER_RUBBLE_PIECE_1, true); + DOOR_KILLER_RUBBLE_PIECE_1); Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_KILLER, thisx->world.pos.x + 7.88f, thisx->world.pos.y + 39.8f, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, thisx->shape.rot.z, - DOOR_KILLER_RUBBLE_PIECE_2, true); + DOOR_KILLER_RUBBLE_PIECE_2); Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_KILLER, thisx->world.pos.x - 15.86f, thisx->world.pos.y + 61.98f, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, thisx->shape.rot.z, - DOOR_KILLER_RUBBLE_PIECE_3, true); + DOOR_KILLER_RUBBLE_PIECE_3); Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_KILLER, thisx->world.pos.x + 3.72f, thisx->world.pos.y + 85.1f, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, thisx->shape.rot.z, - DOOR_KILLER_RUBBLE_PIECE_4, true); + DOOR_KILLER_RUBBLE_PIECE_4); } /** diff --git a/soh/src/overlays/actors/ovl_En_Am/z_en_am.c b/soh/src/overlays/actors/ovl_En_Am/z_en_am.c index 272d5df0c..e9ceea814 100644 --- a/soh/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/soh/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -875,9 +875,9 @@ void EnAm_Update(Actor* thisx, PlayState* play) { dustPosScale = play->gameplayFrames * 10; EnAm_SpawnEffects(this, play); - bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->dyna.actor.world.pos.x, - this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, 0, 0, 2, - BOMB_BODY, true); + bomb = + (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->dyna.actor.world.pos.x, + this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, 0, 0, 2, BOMB_BODY); if (bomb != NULL) { bomb->timer = 0; } diff --git a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c index c1948ee8d..8e00a8415 100644 --- a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -290,7 +290,7 @@ void EnAnubice_ShootFireball(EnAnubice* this, PlayState* play) { if (curFrame == 12.0f) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ANUBICE_FIRE, this->fireballPos.x, this->fireballPos.y + 15.0f, - this->fireballPos.z, this->fireballRot.x, this->fireballRot.y, 0, 0, true); + this->fireballPos.z, this->fireballRot.x, this->fireballRot.y, 0, 0); } if (this->animLastFrame <= curFrame) { diff --git a/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c b/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c index 641aa21de..d4bd858fc 100644 --- a/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c +++ b/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c @@ -46,7 +46,7 @@ void EnArowTrap_Update(Actor* thisx, PlayState* play) { if (this->attackTimer == 0) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ARROW, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, - this->actor.shape.rot.z, ARROW_NORMAL_SILENT, true); + this->actor.shape.rot.z, ARROW_NORMAL_SILENT); this->attackTimer = 80; } } diff --git a/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index e48ee2c4c..a0c210cb8 100644 --- a/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -327,7 +327,7 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) { if (this->actor.params == ARROW_NUT) { iREG(50) = -1; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_M_FIRE1, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 0, true); + this->actor.world.pos.z, 0, 0, 0, 0); sfxId = NA_SE_IT_DEKU; } else { sfxId = NA_SE_IT_SLING_REFLECT; diff --git a/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c index e287aecb9..1eae09bbc 100644 --- a/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -391,7 +391,7 @@ void func_809B75A0(EnBa* this, PlayState* play2) { for (i = 7; i < 14; i++) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BA, this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, 0, - 0, 0, EN_BA_DEAD_BLOB, true); + 0, 0, EN_BA_DEAD_BLOB); } unk_temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_158[0]) + 0x8000; Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk_31C, 0); diff --git a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c index c9c6ca953..5ae430518 100644 --- a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -272,7 +272,7 @@ void EnBb_SpawnFlameTrail(PlayState* play, EnBb* this, s16 startAtZero) { for (i = 0; i < 5; i++) { next = (EnBb*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BB, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 0, true); + this->actor.world.pos.z, 0, 0, 0, 0); if (next != NULL) { now->actor.child = &next->actor; next->actor.parent = &now->actor; diff --git a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index e492ce5bd..81ea10870 100644 --- a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -6,7 +6,7 @@ #include "z_en_blkobj.h" #include "objects/object_blkobj/object_blkobj.h" -#include "soh/Enhancements/game-interactor/GameInteractor.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) @@ -89,9 +89,10 @@ void EnBlkobj_Wait(EnBlkobj* this, PlayState* play) { } void EnBlkobj_SpawnDarkLink(EnBlkobj* this, PlayState* play) { - if (!(this->dyna.actor.flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME)) { + if (GameInteractor_Should(VB_BLKOBJ_SPAWN_DARK_LINK, !(this->dyna.actor.flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME), + this, play)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TORCH2, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, - this->dyna.actor.world.pos.z, 0, this->dyna.actor.yawTowardsPlayer, 0, 0, true); + this->dyna.actor.world.pos.z, 0, this->dyna.actor.yawTowardsPlayer, 0, 0); EnBlkobj_SetupAction(this, EnBlkobj_DarkLinkFight); } } diff --git a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h index 98e43cfb0..a318ac7f2 100644 --- a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h +++ b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h @@ -15,4 +15,7 @@ typedef struct EnBlkobj { /* 0x0168 */ EnBlkobjActionFunc actionFunc; } EnBlkobj; // size = 0x016C +void EnBlkobj_SetupAction(EnBlkobj* thisx, EnBlkobjActionFunc actionFunc); +void EnBlkobj_DarkLinkFight(EnBlkobj* thisx, PlayState* play); + #endif diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index ace520277..3bdf701d4 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -83,7 +83,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) { } cucco = (EnSyatekiNiw*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SYATEKI_NIW, cuccoSpawnPos[i].x, - cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0, 1, true); + cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0, 1); if (cucco != NULL) { cucco->unk_2F4 = cuccoScales[i]; diff --git a/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 409865907..bc1d9a58d 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -108,7 +108,7 @@ void EnBomChu_Explode(EnBomChu* this, PlayState* play) { s32 i; bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, BOMB_BODY, true); + this->actor.world.pos.z, 0, 0, 0, BOMB_BODY); if (bomb != NULL) { bomb->timer = 0; } diff --git a/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 0eaee1f3b..741fc5c34 100644 --- a/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -152,7 +152,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { if (this->flowerBombScale >= 1.0f) { if (Actor_HasParent(&this->actor, play)) { bombFlower = (EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, 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); if (bombFlower != NULL) { func_8002F5C4(&this->actor, &bombFlower->actor, play); this->timer = 180; @@ -171,7 +171,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { if (this->bombCollider.base.ac->category != ACTORCAT_BOSS) { bombFlower = (EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, 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); if (bombFlower != NULL) { bombFlower->isFuseEnabled = 1; bombFlower->timer = 0; @@ -183,7 +183,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { } else { if (Player_IsBurningStickInRange(play, &this->actor.world.pos, 30.0f, 50.0f)) { bombFlower = (EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, 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); if (bombFlower != NULL) { bombFlower->timer = 100; this->timer = 180; diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c index 6e5ad9b90..98e1ba601 100644 --- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -382,7 +382,7 @@ void EnBox_AppearInit(EnBox* this, PlayState* play) { EnBox_SetupAction(this, EnBox_AppearAnimation); this->unk_1A8 = 0; Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.y, - this->dyna.actor.home.pos.z, 0, 0, 0, 0x0011, true); + this->dyna.actor.home.pos.z, 0, 0, 0, 0x0011); Audio_PlaySoundGeneral(NA_SE_EV_TRE_BOX_APPEAR, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } diff --git a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c index b6a6bbb99..4421865d2 100644 --- a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -365,7 +365,7 @@ void EnButte_TransformIntoFairy(EnButte* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 60, NA_SE_EV_BUTTERFRY_TO_FAIRY); } else if (this->timer == 4) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.focus.pos.x, this->actor.focus.pos.y, - this->actor.focus.pos.z, 0, this->actor.shape.rot.y, 0, FAIRY_HEAL_TIMED, true); + this->actor.focus.pos.z, 0, this->actor.shape.rot.y, 0, FAIRY_HEAL_TIMED); this->drawSkelAnime = false; } else if (this->timer <= 0) { EnButte_SetupWaitToDie(this); diff --git a/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c b/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c index 5803633a1..5bbe60c0a 100644 --- a/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c +++ b/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c @@ -114,7 +114,7 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) { : (ITEM_ETC_HEART_PIECE_CHEST_GAME)) & 0xFF; Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 20.0f, 20.0f, -2500.0f, 0, 0, 0, - ((sTreasureFlags[5] & 0x1F) << 8) + rewardParams, true); + ((sTreasureFlags[5] & 0x1F) << 8) + rewardParams); // "Central treasure instance/occurrence (GREAT)" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 中央宝発生(GREAT) ☆☆☆☆☆ %x\n" VT_RST, rewardChestParams); this->actionFunc = EnChanger_SetHeartPieceFlag; @@ -168,7 +168,7 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) { } else { Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, sLeftChestPos[play->roomCtx.curRoom.num].x, sLeftChestPos[play->roomCtx.curRoom.num].y, sLeftChestPos[play->roomCtx.curRoom.num].z, 0, 0, 0, - ((this->leftChestNum & 0x1F) << 8) + (leftChestItem & 0xFF), true); + ((this->leftChestNum & 0x1F) << 8) + (leftChestItem & 0xFF)); } } @@ -196,7 +196,7 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) { Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, sRightChestPos[play->roomCtx.curRoom.num].x, sRightChestPos[play->roomCtx.curRoom.num].y, sRightChestPos[play->roomCtx.curRoom.num].z, 0, 0, 0, - ((this->rightChestNum & 0x1F) << 8) + (rightChestItem & 0xFF), true); + ((this->rightChestNum & 0x1F) << 8) + (rightChestItem & 0xFF)); } this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; @@ -239,13 +239,13 @@ void EnChanger_OpenChests(EnChanger* this, PlayState* play) { zPos = right->dyna.actor.world.pos.z; if (this->rightChestGetItemId == GI_DOOR_KEY) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, 0xF, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, 0xF); Flags_SetSwitch(play, 0x32); } else { temp_s0_2 = (s16)(this->rightChestGetItemId - GI_RUPEE_GREEN_LOSE) + EXITEM_CHEST; // "Open right treasure (chest)" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 右宝開く ☆☆☆☆☆ %d\n" VT_RST, temp_s0_2); - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, temp_s0_2, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, temp_s0_2); } break; case CHEST_RIGHT: @@ -254,13 +254,13 @@ void EnChanger_OpenChests(EnChanger* this, PlayState* play) { zPos = left->dyna.actor.world.pos.z; if (this->leftChestGetItemId == GI_DOOR_KEY) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, 0xF, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, 0xF); Flags_SetSwitch(play, 0x32); } else { temp_s0_2 = (s16)(this->leftChestGetItemId - 0x72) + 0xA; // "Open left treasure (chest)" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 左宝開く ☆☆☆☆☆ %d\n" VT_RST, temp_s0_2); - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, temp_s0_2, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, temp_s0_2); } break; } diff --git a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index 56c4e98bc..25369fdd9 100644 --- a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -510,7 +510,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) { this->shouldShootLaser = false; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x, - this->actor.world.rot.y, this->actor.world.rot.z, CLEAR_TAG_STATE_LASER, true); + this->actor.world.rot.y, this->actor.world.rot.z, CLEAR_TAG_STATE_LASER); } } case CLEAR_TAG_STATE_CRASHING: diff --git a/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index d04e2d47e..73133dcec 100644 --- a/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -513,9 +513,8 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) { if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) { Matrix_RotateY(this->initRot.y * (M_PI / 0x8000), MTXMODE_NEW); Matrix_MultVec3f(&D_809E4148, &vec); - gerudoGuard = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_GE3, this->initPos.x + vec.x, this->initPos.y + vec.y, - this->initPos.z + vec.z, 0, Math_FAtan2F(-vec.x, -vec.z) * (0x8000 / M_PI), 0, 2, true); + gerudoGuard = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_GE3, this->initPos.x + vec.x, this->initPos.y + vec.y, + this->initPos.z + vec.z, 0, Math_FAtan2F(-vec.x, -vec.z) * (0x8000 / M_PI), 0, 2); if (gerudoGuard == NULL) { Actor_Kill(&this->actor); diff --git a/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index ac2b5f7ee..0c7584c00 100644 --- a/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -314,7 +314,7 @@ void EnDekunuts_ThrowNut(EnDekunuts* this, PlayState* play) { spawnPos.y = this->actor.world.pos.y + 12.0f; spawnPos.z = this->actor.world.pos.z + (Math_CosS(this->actor.shape.rot.y) * 23.0f); if (Actor_Spawn(&play->actorCtx, play, ACTOR_EN_NUTSBALL, spawnPos.x, spawnPos.y, spawnPos.z, - this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 0, true) != NULL) { + this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 0) != NULL) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_THROW); } } else if ((this->animFlagAndTimer > 1) && Animation_OnFrame(&this->skelAnime, 12.0f)) { diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 9ef576c6e..4e66ac0bf 100644 --- a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -624,9 +624,8 @@ void EnDntNomal_StageHide(EnDntNomal* this, PlayState* play) { break; case DNT_ACTION_LOW_RUPEES: case DNT_ACTION_HIGH_RUPEES: - rupee = - (EnExRuppy*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_RUPPY, this->actor.world.pos.x, - this->actor.world.pos.y + 20.0f, this->actor.world.pos.z, 0, 0, 0, 3, true); + rupee = (EnExRuppy*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_RUPPY, this->actor.world.pos.x, + this->actor.world.pos.y + 20.0f, this->actor.world.pos.z, 0, 0, 0, 3); if (rupee != NULL) { rupeeColor = this->action - DNT_ACTION_LOW_RUPEES; rupee->colorIdx = rupeeColor; @@ -706,7 +705,7 @@ void EnDntNomal_StageAttack(EnDntNomal* this, PlayState* play) { spawnZ = this->mouthPos.z + spawnOffset.z; nut = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_NUTSBALL, spawnX, spawnY, spawnZ, this->actor.shape.rot.x, - this->actor.shape.rot.y, this->actor.shape.rot.z, 4, true); + this->actor.shape.rot.y, this->actor.shape.rot.z, 4); if (nut != NULL) { nut->velocity.y = spawnOffset.y * 0.5f; } diff --git a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c index ce70b3243..6235d8710 100644 --- a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -585,7 +585,7 @@ void func_809F7B3C(EnDodojr* this, PlayState* play) { } } else { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, BOMB_BODY, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, BOMB_BODY); if (bomb != NULL) { bomb->timer = 0; diff --git a/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index 07a244cd3..df30c191b 100644 --- a/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -685,7 +685,7 @@ void EnDodongo_Death(EnDodongo* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime) != 0) { if (this->timer == 0) { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 6, BOMB_BODY, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 6, BOMB_BODY); if (bomb != NULL) { bomb->timer = 0; this->timer = 8; diff --git a/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 96a9297b9..27586062b 100644 --- a/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -404,7 +404,7 @@ void EnElf_Init(Actor* thisx, PlayState* play) { if (GameInteractor_Should(VB_SPAWN_FOUNTAIN_FAIRIES, true, this)) { for (i = 0; i < 8; i++) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, thisx->world.pos.x, thisx->world.pos.y - 30.0f, - thisx->world.pos.z, 0, 0, 0, FAIRY_HEAL, true); + thisx->world.pos.z, 0, 0, 0, FAIRY_HEAL); } } break; diff --git a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index 651378aaf..ac3631564 100644 --- a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -1,6 +1,7 @@ #include "z_en_encount1.h" #include "vt.h" #include "overlays/actors/ovl_En_Tite/z_en_tite.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_LOCK_ON_DISABLED) @@ -305,6 +306,12 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) { } this->killCount++; } + + if (!GameInteractor_Should(VB_ENCOUNT1_SPAWN_STALCHILD_OR_WOLFOS, true, this, play, spawnId, spawnPos, + spawnParams)) { + continue; + } + if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, spawnId, spawnPos.x, spawnPos.y, spawnPos.z, 0, 0, 0, spawnParams) != NULL) { this->curNumSpawn++; diff --git a/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c index 81bd43f1a..ac984c9bb 100644 --- a/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c +++ b/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c @@ -244,7 +244,7 @@ void EnFireRock_SpawnMoreBrokenPieces(EnFireRock* this, PlayState* play) { spawnedFireRock = (EnFireRock*)Actor_Spawn( &play->actorCtx, play, ACTOR_EN_FIRE_ROCK, Rand_CenteredFloat(3.0f) + this->actor.world.pos.x, Rand_CenteredFloat(3.0f) + (this->actor.world.pos.y + 10.0f), - Rand_CenteredFloat(3.0f) + this->actor.world.pos.z, 0, 0, 0, nextRockType, true); + Rand_CenteredFloat(3.0f) + this->actor.world.pos.z, 0, 0, 0, nextRockType); if (spawnedFireRock != NULL) { spawnedFireRock->actor.world.rot.y = this->actor.world.rot.y; if (i == 0) { @@ -269,7 +269,7 @@ void FireRock_WaitSpawnRocksFromCeiling(EnFireRock* this, PlayState* play) { spawnedFireRock = (EnFireRock*)Actor_Spawn( &play->actorCtx, play, ACTOR_EN_FIRE_ROCK, Rand_CenteredFloat(3.0f) + this->actor.world.pos.x, this->actor.world.pos.y + 10.0f, Rand_CenteredFloat(3.0f) + this->actor.world.pos.z, 0, 0, 0, - FIRE_ROCK_SPAWNED_FALLING2, true); + FIRE_ROCK_SPAWNED_FALLING2); if (spawnedFireRock != NULL) { spawnedFireRock->timer = 10; } else { diff --git a/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index b76f1fd9f..caea85334 100644 --- a/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -153,7 +153,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) { // spawn first small floormaster this->actor.parent = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FLOORMAS, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, invisble + SPAWN_SMALL, true); + this->actor.world.pos.z, 0, 0, 0, invisble + SPAWN_SMALL); if (this->actor.parent == NULL) { Actor_Kill(&this->actor); return; @@ -161,7 +161,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) { // spawn 2nd small floormaster this->actor.child = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FLOORMAS, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, invisble + SPAWN_SMALL, true); + this->actor.world.pos.z, 0, 0, 0, invisble + SPAWN_SMALL); if (this->actor.child == NULL) { Actor_Kill(this->actor.parent); Actor_Kill(&this->actor); diff --git a/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c index 1cbe3bed2..6a293a65f 100644 --- a/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -262,7 +262,7 @@ void EnFw_Run(EnFw* this, PlayState* play) { if (this->explosionTimer == 0) { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->bompPos.x, this->bompPos.y, - this->bompPos.z, 0, 0, 0x600, 0, true); + this->bompPos.z, 0, 0, 0x600, 0); if (bomb != NULL) { bomb->timer = 0; } diff --git a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c index d186c04a2..949af2889 100644 --- a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -724,7 +724,7 @@ void EnGo_StopRolling(EnGo* this, PlayState* play) { this->actor.speedXZ = 3.0f; if ((EnGo_FollowPath(this, play) == true) && (this->unk_218 == 0)) { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, 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); if (bomb != NULL) { bomb->timer = 0; } diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c index ae9b072fc..ed409b115 100644 --- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -1376,7 +1376,7 @@ void EnGo2_StopRolling(EnGo2* this, PlayState* play) { if (((this->actor.params & 0x1F) != GORON_CITY_ROLLING_BIG) && ((this->actor.params & 0x1F) != GORON_CITY_LINK)) { if ((this->actor.params & 0x1F) == GORON_DMT_ROLLING_SMALL) { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, 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); if (bomb != NULL) { bomb->timer = 0; } diff --git a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 3f1ffb75d..50c9e201b 100644 --- a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -156,13 +156,11 @@ void func_80A4E470(EnGs* this, PlayState* play) { (play->msgCtx.unk_E3F2 == OCARINA_SONG_LULLABY) || (play->msgCtx.unk_E3F2 == OCARINA_SONG_SUNS) || (play->msgCtx.unk_E3F2 == OCARINA_SONG_TIME)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.world.pos.x, - this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, FAIRY_HEAL_TIMED, - true); + this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, FAIRY_HEAL_TIMED); Audio_PlayActorSound2(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY); } else if (play->msgCtx.unk_E3F2 == OCARINA_SONG_STORMS) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.world.pos.x, - this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, FAIRY_HEAL_BIG, - true); + this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, FAIRY_HEAL_BIG); Audio_PlayActorSound2(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY); } this->unk_19D = 0; diff --git a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index b3557cdd4..b6c1b866b 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -679,7 +679,7 @@ void func_80A5455C(EnHeishi2* this, PlayState* play) { pos.y = Rand_CenteredFloat(20.0f) + (this->unk_274.y - 40.0f); pos.z = Rand_CenteredFloat(20.0f) + (this->unk_274.z - 20.0f); rotY = Rand_CenteredFloat(7000.0f) + this->actor.yawTowardsPlayer; - bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, pos.x, pos.y, pos.z, 0, rotY, 0, 0, true); + bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, pos.x, pos.y, pos.z, 0, rotY, 0, 0); if (bomb != NULL) { bomb->actor.speedXZ = Rand_CenteredFloat(5.0f) + 10.0f; bomb->actor.velocity.y = Rand_CenteredFloat(5.0f) + 10.0f; diff --git a/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index 81d689ee8..938395ba4 100644 --- a/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -203,7 +203,7 @@ void EnHintnuts_SetupLeave(EnHintnuts* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED; Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DAMAGE); Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0x0, 0x0, 0x0, 0x3, true); // recovery heart + this->actor.world.pos.z, 0x0, 0x0, 0x0, 0x3); // recovery heart this->actionFunc = EnHintnuts_Leave; } @@ -292,7 +292,7 @@ void EnHintnuts_ThrowNut(EnHintnuts* this, PlayState* play) { nutPos.y = this->actor.world.pos.y + 12.0f; nutPos.z = this->actor.world.pos.z + (Math_CosS(this->actor.shape.rot.y) * 23.0f); if (Actor_Spawn(&play->actorCtx, play, ACTOR_EN_NUTSBALL, nutPos.x, nutPos.y, nutPos.z, this->actor.shape.rot.x, - this->actor.shape.rot.y, this->actor.shape.rot.z, 1, true) != NULL) { + this->actor.shape.rot.y, this->actor.shape.rot.z, 1) != NULL) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_THROW); } } diff --git a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c index c4d46035d..5ddb429e4 100644 --- a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -869,9 +869,8 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { EnHorse_InitInactive(this); } else if (this->actor.params == 3) { EnHorse_InitIngoHorse(this); - this->rider = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_IN, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, 1, 1, true); + this->rider = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_IN, this->actor.world.pos.x, this->actor.world.pos.y, + this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, 1, 1); if (this->rider == NULL) { assert(this->rider == NULL); } diff --git a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index d230a008b..fe3ec787a 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -88,8 +88,7 @@ s32 EnHorseGameCheck_InitIngoRace(EnHorseGameCheckBase* base, PlayState* play) { for (i = 0; i < 3; i++) { this->playerCheck[i] = 0; } - this->ingoHorse = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -250.0f, 1.0f, -1650.0f, 0, 0x4000, 0, 0x8003, true); + this->ingoHorse = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -250.0f, 1.0f, -1650.0f, 0, 0x4000, 0, 0x8003); if (this->ingoHorse == NULL) { LOG_HUNGUP_THREAD(); diff --git a/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index ce2c1540a..866819007 100644 --- a/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -242,7 +242,7 @@ void EnIceHono_DropFlame(EnIceHono* this, PlayState* play) { s32 i; for (i = 0; i < 8; i++) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ICE_HONO, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, ((s32)(Rand_ZeroOne() * 1000.0f) + i * 0x2000) - 0x1F4, 0, 1, true); + this->actor.world.pos.z, 0, ((s32)(Rand_ZeroOne() * 1000.0f) + i * 0x2000) - 0x1F4, 0, 1); } EnIceHono_SetupActionSpreadFlames(this); } @@ -292,7 +292,7 @@ void EnIceHono_SpreadFlames(EnIceHono* this, PlayState* play) { for (i = 0; i < 10; i++) { s32 rot = i * 0x1999; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ICE_HONO, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, ((s32)(Rand_ZeroOne() * 1000.0f) + rot) - 0x1F4, 0, 2, true); + this->actor.world.pos.z, 0, ((s32)(Rand_ZeroOne() * 1000.0f) + rot) - 0x1F4, 0, 2); } } diff --git a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 164ecc5df..820ce13c5 100644 --- a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -206,7 +206,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) { for (count = 0; count < 2; count++) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_INSECT, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, - this->actor.shape.rot.z, 3, true); + this->actor.shape.rot.z, 3); } } diff --git a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 37dc1fa9d..c88e69fdd 100644 --- a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -281,9 +281,8 @@ void EnIshi_SpawnBugs(EnIshi* this, PlayState* play) { s32 i; for (i = 0; i < 3; i++) { - Actor* bug = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_INSECT, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, Rand_ZeroOne() * 0xFFFF, 0, 1, true); + Actor* bug = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_INSECT, this->actor.world.pos.x, + this->actor.world.pos.y, this->actor.world.pos.z, 0, Rand_ZeroOne() * 0xFFFF, 0, 1); if (bug == NULL) { break; diff --git a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 23146f376..818c7b4b0 100644 --- a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -218,9 +218,8 @@ void EnKusa_SpawnBugs(EnKusa* this, PlayState* play) { s32 i; for (i = 0; i < 3; i++) { - Actor* bug = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_INSECT, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, Rand_ZeroOne() * 0xFFFF, 0, 1, true); + Actor* bug = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_INSECT, this->actor.world.pos.x, + this->actor.world.pos.y, this->actor.world.pos.z, 0, Rand_ZeroOne() * 0xFFFF, 0, 1); if (bug == NULL) { break; diff --git a/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c index 0525f6da9..afdfefedd 100644 --- a/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -739,7 +739,7 @@ void EnNb_PlayLookLeftSFX(EnNb* this) { void EnNb_InitDemo6KInConfrontation(EnNb* this, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_6K, this->actor.world.pos.x, - kREG(21) + 22.0f + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0xB, true); + kREG(21) + 22.0f + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0xB); } void func_80AB2688(EnNb* this, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index 80e3918f7..8f0c7302c 100644 --- a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -278,7 +278,7 @@ void EnOkuta_SpawnProjectile(EnOkuta* this, PlayState* play) { pos.y = this->actor.world.pos.y - 6.0f; pos.z = this->actor.world.pos.z + (25.0f * cos); if (Actor_Spawn(&play->actorCtx, play, ACTOR_EN_OKUTA, pos.x, pos.y, pos.z, this->actor.shape.rot.x, - this->actor.shape.rot.y, this->actor.shape.rot.z, 0x10, true) != NULL) { + this->actor.shape.rot.y, this->actor.shape.rot.z, 0x10) != NULL) { pos.x = this->actor.world.pos.x + (40.0f * sin); pos.z = this->actor.world.pos.z + (40.0f * cos); pos.y = this->actor.world.pos.y; diff --git a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 8eb5055c4..cbdfe2f00 100644 --- a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -451,7 +451,7 @@ void EnOssan_SpawnItemsOnShelves(EnOssan* this, PlayState* play, ShopItem* shopI &play->actorCtx, play, ACTOR_EN_GIRLA, shelves->actor.world.pos.x + shopItems->xOffset, shelves->actor.world.pos.y + shopItems->yOffset, shelves->actor.world.pos.z + shopItems->zOffset, shelves->actor.shape.rot.x, shelves->actor.shape.rot.y + sItemShelfRot[i], - shelves->actor.shape.rot.z, itemParams, true); + shelves->actor.shape.rot.z, itemParams); if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) { this->shelfSlots[i]->randoSlotIndex = i + 1; } @@ -477,8 +477,7 @@ void EnOssan_UpdateShopOfferings(EnOssan* this, PlayState* play) { &play->actorCtx, play, ACTOR_EN_GIRLA, this->shelves->actor.world.pos.x + shopItem->xOffset, this->shelves->actor.world.pos.y + shopItem->yOffset, this->shelves->actor.world.pos.z + shopItem->zOffset, this->shelves->actor.shape.rot.x, - this->shelves->actor.shape.rot.y + sItemShelfRot[i], this->shelves->actor.shape.rot.z, params, - true); + this->shelves->actor.shape.rot.y + sItemShelfRot[i], this->shelves->actor.shape.rot.z, params); } } } diff --git a/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c b/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c index 901b0d406..4b7e50e87 100644 --- a/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c +++ b/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c @@ -261,7 +261,7 @@ void UseBombs(Actor* thisx, PlayState* play, u8 started) { if (AMMO(ITEM_BOMB) > 0 && play->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].length < 3) { this->itemTimer = 10; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y + 7, - this->actor.world.pos.z, 0, 0, 0, 0, false); + this->actor.world.pos.z, 0, 0, 0, 0); Inventory_ChangeAmmo(ITEM_BOMB, -1); } else { Sfx_PlaySfxCentered(NA_SE_SY_ERROR); @@ -301,7 +301,7 @@ void UseBombchus(Actor* thisx, PlayState* play, u8 started) { if (AMMO(ITEM_BOMBCHU) > 0) { this->itemTimer = 10; EnBom* bomb = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, - this->actor.world.pos.y + 7, this->actor.world.pos.z, 0, 0, 0, 0, false); + this->actor.world.pos.y + 7, this->actor.world.pos.z, 0, 0, 0, 0); bomb->timer = 0; Inventory_ChangeAmmo(ITEM_BOMBCHU, -1); } else { @@ -358,7 +358,7 @@ void UseNuts(Actor* thisx, PlayState* play, u8 started) { if (AMMO(ITEM_NUT) > 0) { this->itemTimer = 10; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ARROW, this->actor.world.pos.x, this->actor.world.pos.y + 7, - this->actor.world.pos.z, 0x1000, this->actor.world.rot.y, 0, ARROW_NUT, false); + this->actor.world.pos.z, 0x1000, this->actor.world.rot.y, 0, ARROW_NUT); Inventory_ChangeAmmo(ITEM_NUT, -1); } else { Sfx_PlaySfxCentered(NA_SE_SY_ERROR); diff --git a/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index 33133be7b..095739888 100644 --- a/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -870,7 +870,7 @@ void EnPeehat_StateExplode(EnPeehat* this, PlayState* play) { if (this->animTimer == 5) { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x602, 0, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x602, 0); if (bomb != NULL) { bomb->timer = 0; } diff --git a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index d3aafb073..119f10de6 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -215,7 +215,7 @@ void EnPoRelay_Race(EnPoRelay* this, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HONOTRAP, Math_CosS(this->unk_19A) * speed + this->actor.world.pos.x, this->actor.world.pos.y, Math_SinS(this->unk_19A) * speed + this->actor.world.pos.z, 0, - (this->unk_19A + 0x8000) - (0x2000 * multiplier), 0, HONOTRAP_FLAME_DROP, true); + (this->unk_19A + 0x8000) - (0x2000 * multiplier), 0, HONOTRAP_FLAME_DROP); } } Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_19A, 2, 0x1000, 0x100); @@ -349,7 +349,7 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) { if (Flags_GetCollectible(play, this->actor.params) == 0 && gSaveContext.timerSeconds <= 60) { Item_DropCollectible2(play, &sp60, (this->actor.params << 8) + (0x4000 | ITEM00_HEART_PIECE)); } else { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, sp60.x, sp60.y, sp60.z, 0, 0, 0, 2, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, sp60.x, sp60.y, sp60.z, 0, 0, 0, 2); } } else { Flags_SetTempClear(play, 4); @@ -372,7 +372,7 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) { if (Flags_GetCollectible(play, this->actor.params) == 0 && gSaveContext.timerSeconds <= 60) { Item_DropCollectible2(play, &sp60, (this->actor.params << 8) + (0x4000 | ITEM00_HEART_PIECE)); } else if (Flags_GetCollectible(play, this->actor.params) != 0) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, sp60.x, sp60.y, sp60.z, 0, 0, 0, 2, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, sp60.x, sp60.y, sp60.z, 0, 0, 0, 2); } } Actor_Kill(&this->actor); diff --git a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 2f772ef03..a58041ef0 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -402,11 +402,11 @@ void func_80AD9A54(EnPoSisters* this, PlayState* play) { // Meg spawning fakes void func_80AD9AA8(EnPoSisters* this, PlayState* play) { Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x400, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x400); Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x800, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x800); Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0xC00, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0xC00); s32 pad; s32 pad1; diff --git a/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c index 34b35797a..ee98b0839 100644 --- a/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -126,7 +126,7 @@ void func_80AE7590(EnRl* this, PlayState* play) { pos.x = player->actor.world.pos.x; pos.y = player->actor.world.pos.y + 80.0f; 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); if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_MEDALLION, true)) { Item_Give(play, ITEM_MEDALLION_LIGHT); } diff --git a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c index a40cc2736..35918e7c2 100644 --- a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c +++ b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c @@ -208,7 +208,7 @@ void EnShopnuts_ThrowNut(EnShopnuts* this, PlayState* play) { spawnPos.y = this->actor.world.pos.y + 12.0f; spawnPos.z = this->actor.world.pos.z + (Math_CosS(this->actor.shape.rot.y) * 23.0f); if (Actor_Spawn(&play->actorCtx, play, ACTOR_EN_NUTSBALL, spawnPos.x, spawnPos.y, spawnPos.z, - this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 2, true) != NULL) { + this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 2) != NULL) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_THROW); } } @@ -229,7 +229,7 @@ void EnShopnuts_SpawnSalesman(EnShopnuts* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_DNS, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, - this->actor.params, true); + this->actor.params); Actor_Kill(&this->actor); } else { Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xE38); diff --git a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 79e0c7c8b..a00e7ee7e 100644 --- a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -515,9 +515,8 @@ s32 EnSkj_ShootNeedle(EnSkj* this, PlayState* play) { pos2.z += this->actor.world.pos.z; pos2.y = this->actor.world.pos.y + 27.0f; - needle = - (EnSkjneedle*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SKJNEEDLE, pos2.x, pos2.y, pos2.z, - this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 0, true); + needle = (EnSkjneedle*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SKJNEEDLE, pos2.x, pos2.y, pos2.z, + this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 0); if (needle != NULL) { needle->killTimer = 100; needle->actor.speedXZ = 24.0f; diff --git a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 0ad230b11..caddf8ad9 100644 --- a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -187,13 +187,13 @@ void EnTa_Init(Actor* thisx, PlayState* play2) { this->unk_2C4[0] = this->unk_2C4[1] = this->unk_2C4[2] = 7; this->superCuccos[0] = (EnNiw*)Actor_Spawn( &play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x + 5.0f, - this->actor.world.pos.y + 3.0f, this->actor.world.pos.z + 26.0f, 0, 0, 0, 0xD, true); + this->actor.world.pos.y + 3.0f, this->actor.world.pos.z + 26.0f, 0, 0, 0, 0xD); this->superCuccos[1] = (EnNiw*)Actor_Spawn( &play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x - 20.0f, - this->actor.world.pos.y + 40.0f, this->actor.world.pos.z - 30.0f, 0, 0, 0, 0xD, true); + this->actor.world.pos.y + 40.0f, this->actor.world.pos.z - 30.0f, 0, 0, 0, 0xD); this->superCuccos[2] = (EnNiw*)Actor_Spawn( &play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x + 20.0f, - this->actor.world.pos.y + 40.0f, this->actor.world.pos.z - 30.0f, 0, 0, 0, 0xD, true); + this->actor.world.pos.y + 40.0f, this->actor.world.pos.z - 30.0f, 0, 0, 0, 0xD); func_80B13AAC(this, play); if (gSaveContext.eventInf[0] & 0x400) { diff --git a/soh/src/overlays/actors/ovl_En_Torch/z_en_torch.c b/soh/src/overlays/actors/ovl_En_Torch/z_en_torch.c index 511e0f41c..ba4ae7083 100644 --- a/soh/src/overlays/actors/ovl_En_Torch/z_en_torch.c +++ b/soh/src/overlays/actors/ovl_En_Torch/z_en_torch.c @@ -35,7 +35,7 @@ void EnTorch_Init(Actor* thisx, PlayState* play) { Contents are passed to en_torch from grotto params via Save Context. */ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOX, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, - (sChestContents[(returnData >> 0x5) & 0x7] << 0x5) | 0x5000 | (returnData & 0x1F), true); + (sChestContents[(returnData >> 0x5) & 0x7] << 0x5) | 0x5000 | (returnData & 0x1F)); Actor_Kill(&this->actor); } diff --git a/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c index 7d9861dae..e1b795cea 100644 --- a/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -160,7 +160,7 @@ void EnTp_Init(Actor* thisx, PlayState* play2) { for (i = 0; i <= 6; i++) { next = (EnTp*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TP, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0 * i, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0 * i); if (0 * i) {} // Very fake, but needed to get the s registers right if (next != NULL) { @@ -322,9 +322,9 @@ void EnTp_Die(EnTp* this, PlayState* play) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x50); } else { for (i = 0; i < 1; i++) { - now = (EnTp*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TP, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - TAILPASARAN_FRAGMENT, true); + now = + (EnTp*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TP, this->actor.world.pos.x, + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, TAILPASARAN_FRAGMENT); if (now != NULL) { Actor_SetScale(&now->actor, this->actor.scale.z * 0.5f); diff --git a/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c index 0efccde60..dc7a307de 100644 --- a/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -244,18 +244,13 @@ void EnVali_SetupBurnt(EnVali* this) { void EnVali_SetupDivideAndDie(EnVali* this, PlayState* play) { s32 i; - for (i = 0; i < 3; i++) { + if (GameInteractor_Should(VB_BIRI_SPAWN_JELLYFISH_UPON_DEATH, true, this, play)) { + for (i = 0; i < 3; i++) { + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BILI, this->actor.world.pos.x, this->actor.world.pos.y, + this->actor.world.pos.z, 0, this->actor.world.rot.y, 0, 0); - // Offset small jellyfish with Enemy Randomizer, otherwise it gets - // stuck in a loop spawning more big jellyfish with seeded spawns. - if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) { - this->actor.world.rot.y += rand() % 50; + this->actor.world.rot.y += 0x10000 / 3; } - - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BILI, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, this->actor.world.rot.y, 0, 0, true); - - this->actor.world.rot.y += 0x10000 / 3; } Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x50); diff --git a/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c index a26e3eab9..fcf4bc631 100644 --- a/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -382,7 +382,7 @@ void EnVm_Die(EnVm* this, PlayState* play) { if (--this->timer == 0) { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x6FF, BOMB_BODY, true); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x6FF, BOMB_BODY); if (bomb != NULL) { bomb->timer = 0; @@ -410,9 +410,8 @@ void EnVm_CheckHealth(EnVm* this, PlayState* play) { Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); EnVm_SetupStun(this); } else { - bomb = - (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, - this->actor.world.pos.y + 20.0f, this->actor.world.pos.z, 0, 0, 0x601, BOMB_BODY, true); + bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, + this->actor.world.pos.y + 20.0f, this->actor.world.pos.z, 0, 0, 0x601, BOMB_BODY); if (bomb != NULL) { bomb->timer = 0; diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c b/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c index b6d864144..d7c0ddf70 100644 --- a/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c +++ b/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c @@ -308,7 +308,7 @@ void EnWonderItem_BombSoldier(EnWonderItem* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; if (Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HEISHI2, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, this->actor.yawTowardsPlayer, 0, 9, true) != NULL) { + this->actor.world.pos.z, 0, this->actor.yawTowardsPlayer, 0, 9) != NULL) { // "Careless soldier spawned" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ うっかり兵セット完了 ☆☆☆☆☆ \n" VT_RST); } diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c index b1878937b..d427b8aaa 100644 --- a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c +++ b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c @@ -215,7 +215,7 @@ void func_80B395F0(EnWonderTalk* this, PlayState* play) { Message_CloseTextbox(play); if (this->unk_164 == 0) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 2, true); + this->actor.world.pos.z, 0, 0, 0, 2); this->unk_164 = 1; } @@ -225,7 +225,7 @@ void func_80B395F0(EnWonderTalk* this, PlayState* play) { Message_CloseTextbox(play); if (this->unk_164 == 0) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 3, true); + this->actor.world.pos.z, 0, 0, 0, 3); this->unk_164 = 1; } this->actionFunc = func_80B391CC; diff --git a/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index b83bd3ddd..b67356b9b 100644 --- a/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -366,7 +366,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { this->actor.home.rot.z &= 0x1FFF; this->actor.home.rot.z |= 0xE000; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, dropsSpawnPt.x, dropsSpawnPt.y, dropsSpawnPt.z, 0, - this->actor.world.rot.y, 0, this->actor.home.rot.z, true); + this->actor.world.rot.y, 0, this->actor.home.rot.z); this->actor.home.rot.z = 0; } } @@ -383,7 +383,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { for (i = 3; i >= 0; i--) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_WOOD02, dropsSpawnPt.x, dropsSpawnPt.y, dropsSpawnPt.z, - 0, Rand_CenteredFloat(65535.0f), 0, leavesParams, true); + 0, Rand_CenteredFloat(65535.0f), 0, leavesParams); } } this->unk_14C = -0x15; diff --git a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c index 967ccc70c..ec6582ecd 100644 --- a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -111,7 +111,7 @@ void EnXc_SpawnNut(EnXc* this, PlayState* play) { f32 y = pos->y + 3.0f; f32 z = (Math_CosS(angle) * 30.0f) + pos->z; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ARROW, x, y, z, 0xFA0, this->actor.shape.rot.y, 0, ARROW_CS_NUT, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ARROW, x, y, z, 0xFA0, this->actor.shape.rot.y, 0, ARROW_CS_NUT); } void EnXc_BgCheck(EnXc* this, PlayState* play) { @@ -537,7 +537,7 @@ void EnXc_SpawnFlame(EnXc* this, PlayState* play) { f32 yPos = npcAction->startPos.y; f32 zPos = npcAction->startPos.z; - this->flameActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_LIGHT, xPos, yPos, zPos, 0, 0, 0, 5, true); + this->flameActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_LIGHT, xPos, yPos, zPos, 0, 0, 0, 5); sEnXcFlameSpawned = true; } } @@ -1438,8 +1438,7 @@ void func_80B3F534(PlayState* play) { u16 frameCount = csCtx->frames; if (frameCount == 310) { - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -1044.0f, -1243.0f, 7458.0f, 0, 0, 0, WARP_DESTINATION, - true); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -1044.0f, -1243.0f, 7458.0f, 0, 0, 0, WARP_DESTINATION); } } diff --git a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index 4dec946c1..0879e8b7b 100644 --- a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -631,7 +631,7 @@ void EnZl2_GiveLightArrows(EnZl2* this, PlayState* play) { posX = player->actor.world.pos.x; posY = player->actor.world.pos.y + 80.0f; 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); if (GameInteractor_Should(VB_GIVE_ITEM_LIGHT_ARROW, true)) { Item_Give(play, ITEM_ARROW_LIGHT); } @@ -649,7 +649,7 @@ void func_80B4FF84(EnZl2* this, PlayState* play) { posY = this->actor.world.pos.y; posZ = this->actor.world.pos.z; - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_YELLOW, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_YELLOW); this->unk_250 = 1; } } @@ -1184,7 +1184,7 @@ void func_80B513A8(EnZl2* this, PlayState* play) { posX = player->actor.world.pos.x; posY = player->actor.world.pos.y; posZ = player->actor.world.pos.z; - Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_UNK_7, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_UNK_7); this->unk_250 = 1; } } diff --git a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 80630e7d5..eb715658a 100644 --- a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -12,6 +12,7 @@ #include "objects/object_zl2/object_zl2.h" #include "objects/object_zl2_anime2/object_zl2_anime2.h" #include "soh/ResourceManagerHelpers.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED @@ -141,7 +142,7 @@ void func_80B5357C(EnZl3* this, PlayState* play) { } void func_80B53614(EnZl3* this, PlayState* play) { - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RIVER_SOUND, -442.0f, 4102.0f, -371.0f, 0, 0, 0, 0x12, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RIVER_SOUND, -442.0f, 4102.0f, -371.0f, 0, 0, 0, 0x12); } void func_80B5366C(EnZl3* this, PlayState* play) { @@ -772,7 +773,7 @@ void func_80B54EA4(EnZl3* this, PlayState* play) { f32 posY = this->actor.world.pos.y; f32 posZ = this->actor.world.pos.z; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EG, posX, posY, posZ, 0, 0, 0, 0, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EG, posX, posY, posZ, 0, 0, 0, 0); } void func_80B54EF4(EnZl3* this) { @@ -1812,7 +1813,7 @@ void func_80B5772C(EnZl3* this, PlayState* play) { void func_80B57754(EnZl3* this, PlayState* play) { if (gSaveContext.magicState == MAGIC_STATE_IDLE) { Actor_Spawn(&play->actorCtx, play, ACTOR_OCEFF_WIPE4, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 1, true); + this->actor.world.pos.z, 0, 0, 0, 1); func_80B56DA4(this); } } @@ -1825,8 +1826,10 @@ void func_80B577BC(PlayState* play, Vec3f* vec) { f32 posY = vec->y; f32 posZ = vec->z; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TEST, posX, posY, posZ, 0, - (Math_FAtan2F(playerPos->x - posX, playerPos->z - posZ) * (0x8000 / M_PI)), 0, 5, true); + if (GameInteractor_Should(VB_ADULT_ZELDA_SPAWN_STALFOS_IN_COLLAPSE, true, play, playerPos, posX, posY, posZ)) { + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TEST, posX, posY, posZ, 0, + (Math_FAtan2F(playerPos->x - posX, playerPos->z - posZ) * (0x8000 / M_PI)), 0, 5); + } } void func_80B57858(PlayState* play) { @@ -2541,7 +2544,7 @@ void func_80B59828(EnZl3* this, PlayState* play) { Magic_Fill(play); if (Flags_GetSwitch(play, 0x20)) { Flags_UnsetSwitch(play, 0x20); - Actor_Spawn(&play->actorCtx, play, ACTOR_BG_ZG, -144.0f, 3544.0f, -43.0f, 0, 0x2000, 0, 0x2000, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_BG_ZG, -144.0f, 3544.0f, -43.0f, 0, 0x2000, 0, 0x2000); } Flags_UnsetSwitch(play, 0x21); Flags_UnsetSwitch(play, 0x22); diff --git a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c index 6752ee982..77e16a147 100644 --- a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -983,7 +983,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) { Fishing_InitPondProps(this, play); Actor_SpawnAsChild(&play->actorCtx, thisx, play, ACTOR_EN_KANBAN, 53.0f, -17.0f, 982.0f, 0, 0, 0, ENKANBAN_FISHING); - Actor_Spawn(&play->actorCtx, play, ACTOR_FISHING, 0.0f, 0.0f, 0.0f, 0, 0, 0, 200, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_FISHING, 0.0f, 0.0f, 0.0f, 0, 0, 0, 200); // Loach(es) will spawn every fourth game, or if "Loaches Always Appear" is enabled if (getShouldSpawnLoaches()) { @@ -999,7 +999,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) { for (i = 0; i < fishCount; i++) { Actor_Spawn(&play->actorCtx, play, ACTOR_FISHING, sFishInits[i].pos.x, sFishInits[i].pos.y, - sFishInits[i].pos.z, 0, Rand_ZeroFloat(0x10000), 0, 100 + i, true); + sFishInits[i].pos.z, 0, Rand_ZeroFloat(0x10000), 0, 100 + i); } } else { if ((thisx->params < (EN_FISH_PARAM + 15) && !AllHyruleLoaches()) || (thisx->params == EN_FISH_AQUARIUM)) { diff --git a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index 7aad98f56..e5b422cf1 100644 --- a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -65,7 +65,7 @@ void ItemOcarina_Init(Actor* thisx, PlayState* play) { Actor_Kill(thisx); return; } - Actor_Spawn(&play->actorCtx, play, ACTOR_ELF_MSG2, 299.0f, -140.0f, 884.0f, 0, 4, 1, 0x3800, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_ELF_MSG2, 299.0f, -140.0f, 884.0f, 0, 4, 1, 0x3800); Actor_SetScale(thisx, 0.2f); break; default: diff --git a/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index 778d0de30..ebc574c51 100644 --- a/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -163,7 +163,7 @@ void ObjKibako2_Kill(ObjKibako2* this, PlayState* play) { if ((params & 0x8000) == 0) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, - this->dyna.actor.world.pos.z, 0, this->dyna.actor.shape.rot.y, 0, params | 0x8000, true); + this->dyna.actor.world.pos.z, 0, this->dyna.actor.shape.rot.y, 0, params | 0x8000); } ObjKibako2_SpawnCollectible(this, play); Actor_Kill(&this->dyna.actor); diff --git a/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index c193ede65..e7f72f7f6 100644 --- a/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -51,7 +51,7 @@ void func_80B98320(ObjMakekinsuta* this, PlayState* play) { if (this->unk_152 != 0) { if (GameInteractor_Should(VB_SPAWN_BEAN_SKULLTULA, this->timer >= 60) && !func_8002DEEC(GET_PLAYER(play))) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, (this->actor.params | 0x8000), true); + this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, (this->actor.params | 0x8000)); this->actionFunc = ObjMakekinsuta_DoNothing; } else { this->timer++; diff --git a/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index 9240d1b04..7a86c1e9b 100644 --- a/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -152,7 +152,7 @@ void ObjMure_SpawnActors0(ObjMure* this, PlayState* play) { ObjMure_GetSpawnPos(&pos, &this->actor.world.pos, this->ptn, i); this->children[i] = Actor_Spawn(ac, play, sSpawnActorIds[this->type], pos.x, pos.y, pos.z, this->actor.world.rot.x, - this->actor.world.rot.y, this->actor.world.rot.z, sSpawnParams[this->type], true); + this->actor.world.rot.y, this->actor.world.rot.z, sSpawnParams[this->type]); if (this->children[i] != NULL) { this->children[i]->flags |= ACTOR_FLAG_GRASS_DESTROYED; this->children[i]->room = this->actor.room; @@ -165,7 +165,7 @@ void ObjMure_SpawnActors0(ObjMure* this, PlayState* play) { ObjMure_GetSpawnPos(&pos, &this->actor.world.pos, this->ptn, i); this->children[i] = Actor_Spawn(ac, play, sSpawnActorIds[this->type], pos.x, pos.y, pos.z, this->actor.world.rot.x, - this->actor.world.rot.y, this->actor.world.rot.z, sSpawnParams[this->type], true); + this->actor.world.rot.y, this->actor.world.rot.z, sSpawnParams[this->type]); if (this->children[i] != NULL) { this->children[i]->room = this->actor.room; } else { @@ -191,7 +191,7 @@ void ObjMure_SpawnActors1(ObjMure* this, PlayState* play) { ObjMure_GetSpawnPos(&spawnPos, &actor->world.pos, this->ptn, i); this->children[i] = Actor_Spawn(ac, play, sSpawnActorIds[this->type], spawnPos.x, spawnPos.y, spawnPos.z, actor->world.rot.x, actor->world.rot.y, actor->world.rot.z, - (this->type == 4 && i == 0) ? 1 : sSpawnParams[this->type], true); + (this->type == 4 && i == 0) ? 1 : sSpawnParams[this->type]); if (this->children[i] != NULL && this->children[i]->update != NULL) { this->childrenStates[i] = OBJMURE_CHILD_STATE_0; this->children[i]->room = actor->room; diff --git a/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c index e0a7a4fc9..4823f99d8 100644 --- a/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -121,7 +121,7 @@ void ObjMure2_SpawnActors(ObjMure2* this, PlayState* play) { if (((this->currentActorNum >> i) & 1) == 0) { this->actorSpawnPtrList[i] = Actor_Spawn(&play->actorCtx, play, sActorSpawnIDs[actorNum], spawnPos[i].x, spawnPos[i].y, - spawnPos[i].z, this->actor.world.rot.x, 0, this->actor.world.rot.z, params, true); + spawnPos[i].z, this->actor.world.rot.x, 0, this->actor.world.rot.z, params); if (this->actorSpawnPtrList[i] != NULL) { this->actorSpawnPtrList[i]->room = this->actor.room; } diff --git a/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index 2d045b7d6..273ca1303 100644 --- a/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -88,7 +88,7 @@ u32 ObjTimeblock_CalculateIsVisible(ObjTimeblock* this) { void ObjTimeblock_SpawnDemoEffect(ObjTimeblock* this, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, 0, 0, 0, - sSizeOptions[(this->dyna.actor.params >> 8) & 1].demoEffectParams, true); + sSizeOptions[(this->dyna.actor.params >> 8) & 1].demoEffectParams); } void ObjTimeblock_ToggleSwitchFlag(PlayState* play, s32 flag) { diff --git a/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c index d8d342ee3..f85f1859b 100644 --- a/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -69,11 +69,11 @@ static Color_RGB8 sColors[] = { void ObjWarp2block_Spawn(ObjWarp2block* this, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, - this->dyna.actor.world.pos.z, 0, 0, 0, sSpawnData[(this->dyna.actor.params >> 8) & 1].params, true); + this->dyna.actor.world.pos.z, 0, 0, 0, sSpawnData[(this->dyna.actor.params >> 8) & 1].params); Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->dyna.actor.child->world.pos.x, this->dyna.actor.child->world.pos.y, this->dyna.actor.child->world.pos.z, 0, 0, 0, - sSpawnData[(this->dyna.actor.child->params >> 8) & 1].params, true); + sSpawnData[(this->dyna.actor.child->params >> 8) & 1].params); } s32 func_80BA1ECC(ObjWarp2block* this, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 0c4174b93..07dd6a3e6 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -54,7 +54,7 @@ void OceffStorm_Init(Actor* thisx, PlayState* play) { this->actor.draw = OceffStorm_Draw2; } else { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_OKARINA_EFFECT, this->actor.world.pos.x, - this->actor.world.pos.y - 30.0f, this->actor.world.pos.z, 0, 0, 0, 1, true); + this->actor.world.pos.y - 30.0f, this->actor.world.pos.z, 0, 0, 0, 1); } } diff --git a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index 03da64049..e5e720666 100644 --- a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -103,7 +103,7 @@ void ShotSun_SpawnFairy(ShotSun* this, PlayState* play) { //! @bug fairyType may be uninitialized if (GameInteractor_Should(VB_SPAWN_SONG_FAIRY, true, this)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.home.pos.x, this->actor.home.pos.y, - this->actor.home.pos.z, 0, 0, 0, fairyType, true); + this->actor.home.pos.z, 0, 0, 0, fairyType); } Actor_Kill(&this->actor); @@ -116,7 +116,7 @@ void ShotSun_TriggerFairy(ShotSun* this, PlayState* play) { this->timer = 50; Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, this->actor.home.pos.x, this->actor.home.pos.y, - this->actor.home.pos.z, 0, 0, 0, 0x11, true); + this->actor.home.pos.z, 0, 0, 0, 0x11); Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR); } @@ -166,7 +166,7 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); osSyncPrintf(VT_FGCOL(CYAN) "SHOT_SUN HIT!!!!!!!\n" VT_RST); if (GameInteractor_Should(VB_SPAWN_FIRE_ARROW, INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE)) { - Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, 7, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, 7); if (GameInteractor_Should(VB_PLAY_FIRE_ARROW_CS, true)) { play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gLakeHyliaFireArrowsCS); gSaveContext.cutsceneTrigger = 1; diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 2edc610be..3c707383c 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -355,7 +355,7 @@ s32 spawn_boomerang_ivan(EnPartner* this, PlayState* play) { f32 posZ = (Math_CosS(this->actor.shape.rot.y) * 1.0f) + this->actor.world.pos.z; s32 yaw = this->actor.shape.rot.y; EnBoom* boomerang = (EnBoom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOOM, posX, this->actor.world.pos.y + 7.0f, - posZ, this->actor.focus.rot.x, yaw, 0, 0, true); + posZ, this->actor.focus.rot.x, yaw, 0, 0); this->boomerangActor = &boomerang->actor; if (boomerang != NULL) { @@ -3265,7 +3265,7 @@ s32 func_808359FC(Player* this, PlayState* play) { s32 yaw = (this->focusActor != NULL) ? this->actor.shape.rot.y + 14000 : this->actor.shape.rot.y; EnBoom* boomerang = (EnBoom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOOM, posX, this->actor.world.pos.y + 30.0f, posZ, - this->actor.focus.rot.x, yaw, 0, 0, true); + this->actor.focus.rot.x, yaw, 0, 0); this->boomerangActor = &boomerang->actor; @@ -4271,7 +4271,7 @@ void func_80837530(PlayState* play, Player* this, s32 arg2) { if (this->actor.category == ACTORCAT_PLAYER) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_M_THUNDER, this->bodyPartsPos[PLAYER_BODYPART_WAIST].x, this->bodyPartsPos[PLAYER_BODYPART_WAIST].y, this->bodyPartsPos[PLAYER_BODYPART_WAIST].z, 0, 0, 0, - Player_GetMeleeWeaponHeld(this) | arg2, true); + Player_GetMeleeWeaponHeld(this) | arg2); } } @@ -4698,7 +4698,7 @@ int func_8083816C(s32 arg0) { void func_8083819C(Player* this, PlayState* play) { if (this->currentShield == PLAYER_SHIELD_DEKU && (CVarGetInteger(CVAR_CHEAT("FireproofDekuShield"), 0) == 0)) { Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_SHIELD, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 1, true); + this->actor.world.pos.z, 0, 0, 0, 1); Inventory_DeleteEquipment(play, EQUIP_TYPE_SHIELD); Message_StartTextbox(play, 0x305F, NULL); } @@ -5279,7 +5279,7 @@ Actor* Player_SpawnFairy(PlayState* play, Player* this, Vec3f* arg2, Vec3f* arg3 Player_GetRelativePosition(this, arg2, arg3, &pos); - return Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, pos.x, pos.y, pos.z, 0, 0, 0, type, true); + return Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, pos.x, pos.y, pos.z, 0, 0, 0, type); } f32 func_808396F4(PlayState* play, Player* this, Vec3f* arg2, Vec3f* arg3, CollisionPoly** arg4, s32* arg5) { @@ -10729,7 +10729,7 @@ Actor* Player_SpawnMagicSpell(PlayState* play, Player* this, s32 spell) { static s16 sMagicSpellActorIds[] = { ACTOR_MAGIC_WIND, ACTOR_MAGIC_DARK, ACTOR_MAGIC_FIRE }; return Actor_Spawn(&play->actorCtx, play, sMagicSpellActorIds[spell], 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); } void Player_StartMode_FaroresWind(PlayState* play, Player* this) { @@ -12280,7 +12280,7 @@ void Player_Update(Actor* thisx, PlayState* play) { dogParams = gSaveContext.dogParams; dog = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_DOG, sDogSpawnPos.x, sDogSpawnPos.y, sDogSpawnPos.z, - 0, this->actor.shape.rot.y, 0, dogParams | 0x8000, true); + 0, this->actor.shape.rot.y, 0, dogParams | 0x8000); if (dog != NULL) { // Room -1 allows actor to cross between rooms, similar to Navi dog->room = CVarGetInteger(CVAR_ENHANCEMENT("DogFollowsEverywhere"), 0) ? -1 : 0; @@ -14340,7 +14340,7 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) { this->stateFlags1 |= PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE; this->stateFlags2 |= PLAYER_STATE2_OCARINA_PLAYING; - if (Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0xF, true) == NULL) { + if (Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0xF) == NULL) { Environment_WarpSongLeave(play); } @@ -14356,7 +14356,7 @@ void Player_Action_8084E604(Player* this, PlayState* play) { Inventory_ChangeAmmo(ITEM_NUT, -1); Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ARROW, this->bodyPartsPos[PLAYER_BODYPART_R_HAND].x, this->bodyPartsPos[PLAYER_BODYPART_R_HAND].y, this->bodyPartsPos[PLAYER_BODYPART_R_HAND].z, 4000, - this->actor.shape.rot.y, 0, ARROW_NUT, true); + this->actor.shape.rot.y, 0, ARROW_NUT); Player_PlayVoiceSfx(this, NA_SE_VO_LI_SWORD_N); } @@ -14405,7 +14405,7 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) { if ((this->getItemId != GI_ICE_TRAP && !IS_RANDO) || (IS_RANDO && (this->getItemId != RG_ICE_TRAP || this->getItemEntry.getItemId != RG_ICE_TRAP))) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x, - this->actor.world.pos.y + 100.0f, this->actor.world.pos.z, 0, 0, 0, 0, true); + this->actor.world.pos.y + 100.0f, this->actor.world.pos.z, 0, 0, 0, 0); func_8083C0E8(this, play); } else if (IS_RANDO) { gSaveContext.ship.pendingIceTrapCount++; @@ -14685,7 +14685,7 @@ void Player_Action_8084EFC0(Player* this, PlayState* play) { Actor_Spawn(&play->actorCtx, play, dropInfo->actorId, (Math_SinS(this->actor.shape.rot.y) * 5.0f) + this->leftHandPos.x, this->leftHandPos.y, (Math_CosS(this->actor.shape.rot.y) * 5.0f) + this->leftHandPos.z, 0x4000, this->actor.shape.rot.y, - 0, dropInfo->actorParams, true); + 0, dropInfo->actorParams); Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_IA_BOTTLE); return; @@ -14843,7 +14843,7 @@ void Player_Action_8084F608(Player* this, PlayState* play) { void Player_Action_8084F698(Player* this, PlayState* play) { Player_SetupAction(play, this, Player_Action_8084F608, 0); this->av2.actionVar2 = 40; - Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0x10, true); + Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0x10); } void Player_Action_8084F710(Player* this, PlayState* play) {