diff --git a/soh/include/functions.h b/soh/include/functions.h index d4b47b60c..64d7026e1 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -717,15 +717,15 @@ void BgCheck_DrawStaticCollision(PlayState*, CollisionContext*); void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId); s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor); void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags); -void func_800434A0(DynaPolyActor* dynaActor); -void func_800434A8(DynaPolyActor* dynaActor); -void func_800434C8(CollisionContext* colCtx, s32 floorBgId); -void func_80043508(CollisionContext* colCtx, s32 floorBgId); -void func_80043538(DynaPolyActor* dynaActor); -s32 func_80043548(DynaPolyActor* dynaActor); -s32 func_8004356C(DynaPolyActor* dynaActor); -s32 func_80043590(DynaPolyActor* dynaActor); -s32 func_800435B4(DynaPolyActor* dynaActor); +void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor); +void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor); +void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId); +void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId); +void DynaPolyActor_SetSwitchPressed(DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsSwitchPressed(DynaPolyActor* dynaActor); s32 func_800435D8(PlayState* play, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4); void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState* play); void Camera_InitPlayerSettings(Camera* camera, Player* player); diff --git a/soh/include/z64actor.h b/soh/include/z64actor.h index 156f1d679..5d6bfc26b 100644 --- a/soh/include/z64actor.h +++ b/soh/include/z64actor.h @@ -214,6 +214,13 @@ if neither of the above are set : blue 0x2000 : translucent, else opaque */ +#define DYNA_INTERACT_ACTOR_ON_TOP (1 << 0) // There is an actor standing on the collision of the dynapoly actor +#define DYNA_INTERACT_PLAYER_ON_TOP (1 << 1) // The player actor is standing on the collision of the dynapoly actor +#define DYNA_INTERACT_PLAYER_ABOVE \ + (1 << 2) // The player is directly above the collision of the dynapoly actor (any distance above) +#define DYNA_INTERACT_ACTOR_SWITCH_PRESSED \ + (1 << 3) // An actor that is capable of pressing switches is on top of the dynapoly actor + typedef struct DynaPolyActor { /* 0x000 */ struct Actor actor; /* 0x14C */ s32 bgId; @@ -221,8 +228,8 @@ typedef struct DynaPolyActor { /* 0x154 */ f32 unk_154; /* 0x158 */ s16 unk_158; // y rotation? /* 0x15A */ u16 unk_15A; - /* 0x15C */ u32 unk_15C; - /* 0x160 */ u8 unk_160; + /* 0x15C */ u32 transformFlags; + /* 0x160 */ u8 interactFlags; /* 0x162 */ s16 unk_162; } DynaPolyActor; // size = 0x164 diff --git a/soh/src/code/code_800430A0.c b/soh/src/code/code_800430A0.c index 379f4a3e6..6047b2fc0 100644 --- a/soh/src/code/code_800430A0.c +++ b/soh/src/code/code_800430A0.c @@ -60,10 +60,10 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) { if (DynaPoly_IsBgIdBgActor(bgId)) { DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, bgId); if (dynaActor != NULL) { - func_800434A8(dynaActor); + DynaPolyActor_SetActorOnTop(dynaActor); if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_CAN_PRESS_SWITCH)) { - func_80043538(dynaActor); + DynaPolyActor_SetSwitchPressed(dynaActor); } } } @@ -91,12 +91,12 @@ s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor) { return false; } - if (dynaActor->unk_15C & 1) { + if (dynaActor->transformFlags & 1) { func_800430A0(colCtx, bgId, actor); result = true; } - if (dynaActor->unk_15C & 2) { + if (dynaActor->transformFlags & 2) { func_800432A0(colCtx, bgId, actor); result = true; } diff --git a/soh/src/code/code_80043480.c b/soh/src/code/z_bg_item.c similarity index 57% rename from soh/src/code/code_80043480.c rename to soh/src/code/z_bg_item.c index 3ba733e26..d36374b59 100644 --- a/soh/src/code/code_80043480.c +++ b/soh/src/code/z_bg_item.c @@ -2,74 +2,74 @@ void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) { dynaActor->bgId = -1; - dynaActor->unk_15C = flags; - dynaActor->unk_160 = 0; + dynaActor->transformFlags = flags; + dynaActor->interactFlags = 0; dynaActor->unk_150 = 0.0f; dynaActor->unk_154 = 0.0f; } -void func_800434A0(DynaPolyActor* dynaActor) { - dynaActor->unk_160 = 0; +void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor) { + dynaActor->interactFlags = 0; } -void func_800434A8(DynaPolyActor* dynaActor) { - dynaActor->unk_160 |= 1; +void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor) { + dynaActor->interactFlags |= DYNA_INTERACT_ACTOR_ON_TOP; } -void func_800434B8(DynaPolyActor* dynaActor) { - dynaActor->unk_160 |= 2; +void DynaPolyActor_SetPlayerOnTop(DynaPolyActor* dynaActor) { + dynaActor->interactFlags |= DYNA_INTERACT_PLAYER_ON_TOP; } -void func_800434C8(CollisionContext* colCtx, s32 floorBgId) { +void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId) { DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, floorBgId); if (dynaActor != NULL) { - func_800434B8(dynaActor); + DynaPolyActor_SetPlayerOnTop(dynaActor); } } -void func_800434F8(DynaPolyActor* dynaActor) { - dynaActor->unk_160 |= 4; +void DynaPolyActor_SetPlayerAbove(DynaPolyActor* dynaActor) { + dynaActor->interactFlags |= DYNA_INTERACT_PLAYER_ABOVE; } -void func_80043508(CollisionContext* colCtx, s32 floorBgId) { +void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId) { DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, floorBgId); if (dynaActor != NULL) { - func_800434F8(dynaActor); + DynaPolyActor_SetPlayerAbove(dynaActor); } } -void func_80043538(DynaPolyActor* dynaActor) { - dynaActor->unk_160 |= 8; +void DynaPolyActor_SetSwitchPressed(DynaPolyActor* dynaActor) { + dynaActor->interactFlags |= DYNA_INTERACT_ACTOR_SWITCH_PRESSED; } -s32 func_80043548(DynaPolyActor* dynaActor) { - if (dynaActor->unk_160 & 1) { +s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor) { + if (dynaActor->interactFlags & DYNA_INTERACT_ACTOR_ON_TOP) { return true; } else { return false; } } -s32 func_8004356C(DynaPolyActor* dynaActor) { - if (dynaActor->unk_160 & 2) { +s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor) { + if (dynaActor->interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) { return true; } else { return false; } } -s32 func_80043590(DynaPolyActor* dynaActor) { - if (dynaActor->unk_160 & 4) { +s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor) { + if (dynaActor->interactFlags & DYNA_INTERACT_PLAYER_ABOVE) { return true; } else { return false; } } -s32 func_800435B4(DynaPolyActor* dynaActor) { - if (dynaActor->unk_160 & 8) { +s32 DynaPolyActor_IsSwitchPressed(DynaPolyActor* dynaActor) { + if (dynaActor->interactFlags & DYNA_INTERACT_ACTOR_SWITCH_PRESSED) { return true; } else { return false; diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c index df7dd0600..20deee679 100644 --- a/soh/src/code/z_bgcheck.c +++ b/soh/src/code/z_bgcheck.c @@ -2954,7 +2954,7 @@ void func_8003F8EC(PlayState* play, DynaCollisionContext* dyna, Actor* actor) { if ((dyna->bgActorFlags[i] & 1)) { dynaActor = DynaPoly_GetActor(&play->colCtx, i); if (dynaActor != NULL && &dynaActor->actor == actor) { - func_800434A0((DynaPolyActor*)actor); + DynaPolyActor_UnsetAllInteractFlags((DynaPolyActor*)actor); return; } } diff --git a/soh/src/code/z_en_a_keep.c b/soh/src/code/z_en_a_keep.c index 307ecf048..9b29b666e 100644 --- a/soh/src/code/z_en_a_keep.c +++ b/soh/src/code/z_en_a_keep.c @@ -122,8 +122,8 @@ void EnAObj_Init(Actor* thisx, PlayState* play) { thisx->focus.pos = thisx->world.pos; this->dyna.bgId = BGACTOR_NEG_ONE; - this->dyna.unk_160 = 0; - this->dyna.unk_15C = DPM_UNK; + this->dyna.interactFlags = 0; + this->dyna.transformFlags = DPM_UNK; thisx->uncullZoneDownward = 1200.0f; thisx->uncullZoneScale = 200.0f; @@ -234,7 +234,7 @@ void EnAObj_SetupBlockRot(EnAObj* this, s16 type) { void EnAObj_BlockRot(EnAObj* this, PlayState* play) { if (this->rotateState == 0) { - if (this->dyna.unk_160 != 0) { + if (this->dyna.interactFlags != 0) { this->rotateState++; this->rotateForTimer = 20; diff --git a/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index 489a50cfa..e46758bd0 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -326,7 +326,7 @@ void func_8086C6EC(BgBdanObjects* this, PlayState* play) { } void func_8086C76C(BgBdanObjects* this, PlayState* play) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->dyna.actor.xzDistToPlayer < 120.0f) { this->actionFunc = func_8086C7D0; OnePointCutscene_Init(play, 3090, -99, &this->dyna.actor, MAIN_CAM); @@ -352,7 +352,7 @@ void func_8086C874(BgBdanObjects* this, PlayState* play) { this->timer--; } if (this->switchFlag == 0) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { this->cameraSetting = play->cameraPtrs[MAIN_CAM]->setting; Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2); func_8005AD1C(play->cameraPtrs[MAIN_CAM], 4); @@ -360,7 +360,7 @@ void func_8086C874(BgBdanObjects* this, PlayState* play) { } } else { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2); - if (!func_8004356C(&this->dyna)) { + if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->switchFlag != 0) { this->switchFlag--; } @@ -411,7 +411,7 @@ void func_8086CABC(BgBdanObjects* this, PlayState* play) { } void func_8086CB10(BgBdanObjects* this, PlayState* play) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { Flags_SetSwitch(play, this->switchFlag); this->timer = 50; this->actionFunc = func_8086CB8C; diff --git a/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index 7e0781067..13ecc51bb 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -254,13 +254,13 @@ void func_8086D5C4(BgBdanSwitch* this) { void func_8086D5E0(BgBdanSwitch* this, PlayState* play) { switch (this->dyna.actor.params & 0xFF) { case BLUE: - if (func_800435B4(&this->dyna)) { + if (DynaPolyActor_IsSwitchPressed(&this->dyna)) { func_8086D67C(this); func_8086D4B4(this, play); } break; case YELLOW: - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { func_8086D67C(this); func_8086D4B4(this, play); } @@ -293,7 +293,7 @@ void func_8086D730(BgBdanSwitch* this) { void func_8086D754(BgBdanSwitch* this, PlayState* play) { switch (this->dyna.actor.params & 0xFF) { case BLUE: - if (!func_800435B4(&this->dyna)) { + if (!DynaPolyActor_IsSwitchPressed(&this->dyna)) { if (this->unk_1D8 <= 0) { func_8086D7FC(this); func_8086D548(this, play); @@ -328,7 +328,7 @@ void func_8086D86C(BgBdanSwitch* this) { } void func_8086D888(BgBdanSwitch* this, PlayState* play) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { func_8086D8BC(this); } } @@ -371,7 +371,7 @@ void func_8086D9F8(BgBdanSwitch* this) { void func_8086DA1C(BgBdanSwitch* this, PlayState* play) { Actor* heldActor = GET_PLAYER(play)->heldActor; - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (heldActor != NULL && heldActor->id == ACTOR_EN_RU1) { if (this->unk_1D8 <= 0) { func_8086D944(this); diff --git a/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index fa66b29aa..e838191ae 100644 --- a/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c @@ -60,7 +60,7 @@ void BgGndFiremeiro_Destroy(Actor* thisx, PlayState* play2) { void BgGndFiremeiro_Sink(BgGndFiremeiro* this, PlayState* play) { f32 sunkHeight = this->initPos.y - 150.0f; - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { this->timer = 10; } @@ -85,7 +85,7 @@ void BgGndFiremeiro_Shake(BgGndFiremeiro* this, PlayState* play) { s32 pad; f32 randSign; - if (func_8004356C(&this->dyna)) { // Player standing on it + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { // Player standing on it if (this->timer > 0) { this->timer--; @@ -114,7 +114,7 @@ void BgGndFiremeiro_Rise(BgGndFiremeiro* this, PlayState* play) { Player* player = GET_PLAYER(play); Actor* thisx = &this->dyna.actor; - if ((player->currentBoots != PLAYER_BOOTS_HOVER) && func_8004356C(&this->dyna)) { // Player standing on it + if ((player->currentBoots != PLAYER_BOOTS_HOVER) && DynaPolyActor_IsPlayerOnTop(&this->dyna)) { // Player standing on it if (thisx->world.pos.y < this->initPos.y) { this->actionFunc = BgGndFiremeiro_Sink; this->timer = 20; diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c index cec9f68e4..b47a85590 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c @@ -179,7 +179,7 @@ void BgHakaShip_CrashFall(BgHakaShip* this, PlayState* play) { } } else { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG); - if ((this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 500.0f) && func_8004356C(&this->dyna)) { + if ((this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 500.0f) && DynaPolyActor_IsPlayerOnTop(&this->dyna)) { Play_TriggerVoidOut(play); } } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index e7151be7d..9ff062dd7 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -90,7 +90,7 @@ void func_80886FCC(BgHidanFslift* this, PlayState* play) { if ((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) < 0.5f) { heightBool = true; } - if (func_80043590(&this->dyna) && (heightBool)) { + if (DynaPolyActor_IsPlayerAbove(&this->dyna) && (heightBool)) { this->actionFunc = func_808870D8; } else if (!heightBool) { this->actionFunc = func_8088706C; @@ -109,7 +109,7 @@ void func_8088706C(BgHidanFslift* this, PlayState* play) { } void func_808870D8(BgHidanFslift* this, PlayState* play) { - if (func_80043590(&this->dyna)) { + if (DynaPolyActor_IsPlayerAbove(&this->dyna)) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 790.0f, 4.0f)) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); func_80886FB4(this); @@ -126,12 +126,12 @@ void BgHidanFslift_Update(Actor* thisx, PlayState* play) { BgHidanFslift* this = (BgHidanFslift*)thisx; this->actionFunc(this, play); - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_16A == 0) { this->unk_16A = 3; } Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM); - } else if (!func_8004356C(&this->dyna)) { + } else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_16A != 0) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0); } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c index ea49fbd4f..fecd9451a 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c @@ -216,7 +216,7 @@ void func_808896B8(BgHidanHrock* this, PlayState* play) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 5.0f, 1.0f); } else { Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index 15f8a6586..108378185 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -212,7 +212,7 @@ void func_8088B5F4(BgHidanRock* this, PlayState* play) { } void func_8088B634(BgHidanRock* this, PlayState* play) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { this->timer = 20; this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x4000; this->actionFunc = func_8088B69C; @@ -263,12 +263,12 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) { this->unk_16C = CLAMP_MIN(this->unk_16C, 0.0f); if (this->type == 0) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_169 == 0) { this->unk_169 = 3; } Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM); - } else if (!func_8004356C(&this->dyna)) { + } else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_169 != 0) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0); } @@ -316,12 +316,12 @@ void func_8088B990(BgHidanRock* this, PlayState* play) { this->unk_16C = (this->dyna.actor.world.pos.y + 50.0f - this->dyna.actor.home.pos.y + 40.0f) / 80.0f; if (this->type == 0) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_169 == 0) { this->unk_169 = 3; } Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM); - } else if (!func_8004356C(&this->dyna)) { + } else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_169 != 0) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0); } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c index 03615e480..2b9331ab8 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c @@ -118,7 +118,7 @@ void func_8088E518(BgHidanSima* this, PlayState* play) { Player* player = GET_PLAYER(play); Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.4f); - if (func_8004356C(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) { this->timer = 20; this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x4000; if (this->dyna.actor.home.pos.y <= this->dyna.actor.world.pos.y) { @@ -150,7 +150,7 @@ void func_8088E5D0(BgHidanSima* this, PlayState* play) { } void func_8088E6D0(BgHidanSima* this, PlayState* play) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { this->timer = 20; } else if (this->timer != 0) { this->timer--; diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c index 44c1cc5e5..ae8e5b530 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c @@ -61,7 +61,7 @@ void func_8088F47C(BgHidanSyoku* this) { } void func_8088F4B8(BgHidanSyoku* this, PlayState* play) { - if (Flags_GetClear(play, this->dyna.actor.room) && func_8004356C(&this->dyna)) { + if (Flags_GetClear(play, this->dyna.actor.room) && DynaPolyActor_IsPlayerOnTop(&this->dyna)) { this->timer = 140; this->actionFunc = func_8088F514; } @@ -109,12 +109,12 @@ void BgHidanSyoku_Update(Actor* thisx, PlayState* play) { BgHidanSyoku* this = (BgHidanSyoku*)thisx; this->actionFunc(this, play); - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_168 == 0) { this->unk_168 = 3; } Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM); - } else if (!func_8004356C(&this->dyna)) { + } else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->unk_168 != 0) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0); } diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index 35cbc3f49..270bcd9ff 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -187,7 +187,7 @@ void BgJya1flift_Update(Actor* thisx, PlayState* play2) { // Room 0 is the first room and 6 is the room that the lift starts on if (play->roomCtx.curRoom.num == 6 || play->roomCtx.curRoom.num == 0) { this->actionFunc(this, play); - tempIsRiding = func_8004356C(&this->dyna) ? true : false; + tempIsRiding = DynaPolyActor_IsPlayerOnTop(&this->dyna) ? true : false; if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) { if (tempIsRiding) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index f8dea0c01..bc7b756d8 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -146,13 +146,14 @@ void BgJyaLift_Update(Actor* thisx, PlayState* play2) { if (this->actionFunc != NULL) { this->actionFunc(this, play); } - if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) { + if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ABOVE) && + ((this->unk_16B & DYNA_INTERACT_PLAYER_ABOVE) == 0)) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DIRECTED_YAW); - } else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) && + } else if (((this->dyna.interactFlags) & 4) == 0 && ((this->unk_16B & 4)) && (play->cameraPtrs[MAIN_CAM]->setting == CAM_SET_DIRECTED_YAW)) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0); } - this->unk_16B = this->dyna.unk_160; + this->unk_16B = this->dyna.interactFlags; // Spirit Temple room 5 is the main room with the statue room 25 is directly above room 5 if ((play->roomCtx.curRoom.num != 5) && (play->roomCtx.curRoom.num != 25)) { diff --git a/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c b/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c index f209fa291..90a3cbee1 100644 --- a/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c +++ b/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c @@ -51,7 +51,7 @@ void BgMenkuriKaiten_Destroy(Actor* thisx, PlayState* play) { void BgMenkuriKaiten_Update(Actor* thisx, PlayState* play) { BgMenkuriKaiten* this = (BgMenkuriKaiten*)thisx; - if (!Flags_GetSwitch(play, this->dyna.actor.params) && func_80043590(&this->dyna)) { + if (!Flags_GetSwitch(play, this->dyna.actor.params) && DynaPolyActor_IsPlayerAbove(&this->dyna)) { func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); this->dyna.actor.shape.rot.y += 0x80; } 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 611a892cf..c95fe6fd8 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 @@ -241,7 +241,7 @@ void BgMoriBigst_Update(Actor* thisx, PlayState* play) { if (this->waitTimer > 0) { this->waitTimer--; } - if (func_80043590(&this->dyna)) { + if (DynaPolyActor_IsPlayerAbove(&this->dyna)) { func_80074CE8(play, 6); } if (this->actionFunc != NULL) { diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index e5e84af5a..f0ca8d96c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -125,7 +125,8 @@ void BgMoriElevator_Destroy(Actor* thisx, PlayState* play) { } s32 BgMoriElevator_IsPlayerRiding(BgMoriElevator* this, PlayState* play) { - return ((this->dyna.unk_160 & 2) && !(this->unk_170 & 2) && + return ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && + !(this->unk_170 & DYNA_INTERACT_PLAYER_ON_TOP) && ((GET_PLAYER(play)->actor.world.pos.y - this->dyna.actor.world.pos.y) < 80.0f)); } @@ -244,7 +245,7 @@ void BgMoriElevator_Update(Actor* thisx, PlayState* play) { BgMoriElevator* this = (BgMoriElevator*)thisx; this->actionFunc(this, play); - this->unk_170 = this->dyna.unk_160; + this->unk_170 = this->dyna.interactFlags; this->unk_16C = Flags_GetSwitch(play, (thisx->params & 0x3F)); } diff --git a/soh/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c b/soh/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c index d7b45c9b6..2eb0bef7e 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c @@ -101,7 +101,7 @@ void BgSpot08Iceblock_SinkUnderPlayer(BgSpot08Iceblock* this) { } // Sink under Player's weight if standing on it - target = (func_80043548(&this->dyna) ? -4.0f : 0.0f); + target = (DynaPolyActor_IsActorOnTop(&this->dyna) ? -4.0f : 0.0f); Math_StepToF(&this->sinkOffset, target, step); } @@ -200,7 +200,7 @@ void BgSpot08Iceblock_Roll(BgSpot08Iceblock* this, PlayState* play) { surfaceNormalHorizontal.z = this->surfaceNormal.z; // If player is standing on it or holding the edge - if (func_8004356C(&this->dyna) && (playerCentroidDist > 3.0f)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && (playerCentroidDist > 3.0f)) { Math_Vec3f_Diff(&playerCentroidDiff, &surfaceNormalHorizontal, &playerMoment); BgSpot08Iceblock_MultVectorScalar(&playerMoment, &playerMoment, (sInertias[rollDataIndex] * playerCentroidDist) / this->dyna.actor.scale.x); diff --git a/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c b/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c index af63fdcd2..bf4d7c934 100644 --- a/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c +++ b/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c @@ -62,13 +62,13 @@ void BgSstFloor_Update(BgSstFloor* thisx, PlayState* play) { colHeader->vtxList = SEGMENTED_TO_VIRTUAL(colHeader->vtxList); - if (func_80043590(&this->dyna) && (this->dyna.actor.yDistToPlayer < 1000.0f)) { + if (DynaPolyActor_IsPlayerAbove(&this->dyna) && (this->dyna.actor.yDistToPlayer < 1000.0f)) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_BOSS_BONGO); } else { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0); } - if (func_8004356C(&this->dyna) && (player->fallDistance > 1000.0f)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && (player->fallDistance > 1000.0f)) { this->dyna.actor.params = 1; Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH); } @@ -82,7 +82,7 @@ void BgSstFloor_Update(BgSstFloor* thisx, PlayState* play) { this->dyna.actor.params = BONGOFLOOR_REST; this->drumPhase = 28; - if (func_8004356C(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE))) { distFromRim = 600.0f - this->dyna.actor.xzDistToPlayer; if (distFromRim > 0.0f) { if (distFromRim > 350.0f) { diff --git a/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index 59402d658..1307971c7 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -292,7 +292,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, PlayState* play) { BgYdanSp_BurnWeb(this, play); return; } - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { sqrtFallDistance = sqrtf(CLAMP_MIN(player->fallDistance, 0.0f)); if (player->fallDistance > 750.0f) { if (this->dyna.actor.xzDistToPlayer < 80.0f) { diff --git a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 4d7243455..fbedc59bd 100644 --- a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -154,7 +154,7 @@ void func_809CB054(EnBrob* this, PlayState* play) { this->timer--; } if (this->timer == 0) { - if (func_8004356C(&this->dyna) != 0) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna) != 0) { func_8002F71C(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 1.0f); func_809CAE44(this, play); } else if (this->dyna.actor.xzDistToPlayer < 300.0f) { diff --git a/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index 61a411371..5f7aae79a 100644 --- a/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -52,8 +52,8 @@ void EnLightbox_Init(Actor* thisx, PlayState* play) { thisx->colChkInfo.cylRadius = 30; thisx->colChkInfo.cylHeight = 50; ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 6.0f); - this->dyna.unk_160 = 0; - this->dyna.unk_15C = 0; + this->dyna.interactFlags = 0; + this->dyna.transformFlags = 0; thisx->targetMode = 0; thisx->gravity = -2.0f; CollisionHeader_GetVirtual(&object_lightbox_Col_001F10, &colHeader); diff --git a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c index 140ebd478..536032a8d 100644 --- a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c +++ b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c @@ -52,8 +52,8 @@ void EnPubox_Init(Actor* thisx, PlayState* play) { thisx->uncullZoneDownward = 1200.0f; thisx->uncullZoneScale = 720.0f; ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 6.0f); - this->dyna.unk_160 = 0; - this->dyna.unk_15C = DPM_UNK; + this->dyna.interactFlags = 0; + this->dyna.transformFlags = DPM_UNK; thisx->targetMode = 1; thisx->gravity = -2.0f; CollisionHeader_GetVirtual(&gBlockMediumCol, &colHeader); diff --git a/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index e577a3d45..8e4596ff3 100644 --- a/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -128,7 +128,7 @@ void func_80AFBE8C(EnSiofuki* this, PlayState* play) { if ((dX > (this->dyna.actor.scale.x * -346.0f)) && (dX < (this->dyna.actor.scale.x * 346.0f)) && (dZ > (this->dyna.actor.scale.z * -400.0f)) && (dZ < (this->dyna.actor.scale.z * 400.0f)) && (dY < 0.0f)) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->splashTimer <= 0) { EffectSsGSplash_Spawn(play, &player->actor.world.pos, NULL, NULL, 1, 1); this->splashTimer = 10; diff --git a/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index e1dd79b39..20d7fa71a 100644 --- a/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -752,7 +752,7 @@ void ObjBean_SetupWaitForPlayer(ObjBean* this) { } void ObjBean_WaitForPlayer(ObjBean* this, PlayState* play) { - if (func_8004356C(&this->dyna)) { // Player is standing on + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { // Player is standing on ObjBean_SetupFly(this); if (play->sceneNum == SCENE_LOST_WOODS) { // Lost woods Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_BEAN_LOST_WOODS); @@ -786,7 +786,7 @@ void ObjBean_Fly(ObjBean* this, PlayState* play) { Camera_ChangeSetting(camera, CAM_SET_NORMAL0); } - } else if (func_8004356C(&this->dyna) != 0) { // Player is on top + } else if (DynaPolyActor_IsPlayerOnTop(&this->dyna) != 0) { // Player is on top func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG); @@ -812,7 +812,7 @@ void ObjBean_SetupWaitForStepOff(ObjBean* this) { } void ObjBean_WaitForStepOff(ObjBean* this, PlayState* play) { - if (!func_80043590(&this->dyna)) { + if (!DynaPolyActor_IsPlayerAbove(&this->dyna)) { ObjBean_SetupWaitForPlayer(this); } ObjBean_UpdatePosition(this); @@ -824,7 +824,7 @@ void func_80B908EC(ObjBean* this) { } void func_80B90918(ObjBean* this, PlayState* play) { - if (!func_8004356C(&this->dyna)) { + if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) { ObjBean_SetupPathCount(this, play); ObjBean_SetupPath(this, play); ObjBean_Move(this); @@ -904,7 +904,7 @@ void ObjBean_Update(Actor* thisx, PlayState* play) { } Actor_SetFocus(&this->dyna.actor, 6.0f); if (this->stateFlags & BEAN_STATE_DYNAPOLY_SET) { - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { this->stateFlags |= BEAN_STATE_PLAYER_ON_TOP; } else { this->stateFlags &= ~BEAN_STATE_PLAYER_ON_TOP; diff --git a/soh/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c b/soh/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c index 694644a80..f62956014 100644 --- a/soh/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c +++ b/soh/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c @@ -86,7 +86,7 @@ void func_80B92C80(ObjElevator* this, PlayState* play) { f32 sub; Actor* thisx = &this->dyna.actor; - if ((this->dyna.unk_160 & 2) && !(this->unk_170 & 2)) { + if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && !(this->unk_170 & DYNA_INTERACT_PLAYER_ON_TOP)) { sub = thisx->world.pos.y - thisx->home.pos.y; if (fabsf(sub) < 0.1f) { this->unk_168 = thisx->home.pos.y + ((thisx->params >> 0xC) & 0xF) * 80.0f; @@ -118,7 +118,7 @@ void ObjElevator_Update(Actor* thisx, PlayState* play) { if (this->actionFunc) { this->actionFunc(this, play); } - this->unk_170 = this->dyna.unk_160; + this->unk_170 = this->dyna.interactFlags; } void ObjElevator_Draw(Actor* thisx, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index f916bf0fe..166dd4c36 100644 --- a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -138,7 +138,7 @@ void func_80B96560(ObjLift* this, PlayState* play) { s32 pad; s32 quakeIndex; - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { if (this->timer <= 0) { if (((this->dyna.actor.params >> 8) & 7) == 7) { func_80B967C0(this); diff --git a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index b1b8cc166..c69417461 100644 --- a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -509,8 +509,8 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) { } else { dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId); if (dynaPolyActor != NULL) { - func_800434A8(dynaPolyActor); - func_80043538(dynaPolyActor); + DynaPolyActor_SetActorOnTop(dynaPolyActor); + DynaPolyActor_SetSwitchPressed(dynaPolyActor); if ((this->timer <= 0) && (fabsf(this->dyna.unk_150) > 0.001f)) { if (ObjOshihiki_StrongEnough(this) && ObjOshihiki_NoSwitchPress(this, dynaPolyActor, play) && @@ -537,9 +537,9 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) { } else { dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId); - if ((dynaPolyActor != NULL) && (dynaPolyActor->unk_15C & 1)) { - func_800434A8(dynaPolyActor); - func_80043538(dynaPolyActor); + if ((dynaPolyActor != NULL) && (dynaPolyActor->transformFlags & 1)) { + DynaPolyActor_SetActorOnTop(dynaPolyActor); + DynaPolyActor_SetSwitchPressed(dynaPolyActor); this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight; } else { ObjOshihiki_SetupFall(this, play); diff --git a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index e08291480..05e3577c0 100644 --- a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -390,25 +390,26 @@ void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) { } else { switch ((this->dyna.actor.params >> 4 & 7)) { case OBJSWITCH_SUBTYPE_FLOOR_0: - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { ObjSwitch_FloorPressInit(this); ObjSwitch_SetOn(this, play); } break; case OBJSWITCH_SUBTYPE_FLOOR_1: - if ((this->dyna.unk_160 & 2) && !(this->unk_17F & 2)) { + if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && + !(this->unk_17F & DYNA_INTERACT_PLAYER_ON_TOP)) { ObjSwitch_FloorPressInit(this); ObjSwitch_SetOn(this, play); } break; case OBJSWITCH_SUBTYPE_FLOOR_2: - if (func_800435B4(&this->dyna)) { + if (DynaPolyActor_IsSwitchPressed(&this->dyna)) { ObjSwitch_FloorPressInit(this); ObjSwitch_SetOn(this, play); } break; case OBJSWITCH_SUBTYPE_FLOOR_3: - if (func_800435B4(&this->dyna)) { + if (DynaPolyActor_IsSwitchPressed(&this->dyna)) { ObjSwitch_FloorPressInit(this); ObjSwitch_SetOff(this, play); } @@ -448,14 +449,15 @@ void ObjSwitch_FloorDown(ObjSwitch* this, PlayState* play) { } break; case OBJSWITCH_SUBTYPE_FLOOR_1: - if ((this->dyna.unk_160 & 2) && !(this->unk_17F & 2)) { + if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && + !(this->unk_17F & DYNA_INTERACT_PLAYER_ON_TOP)) { ObjSwitch_FloorReleaseInit(this); ObjSwitch_SetOff(this, play); } break; case OBJSWITCH_SUBTYPE_FLOOR_2: case OBJSWITCH_SUBTYPE_FLOOR_3: - if (!func_800435B4(&this->dyna) && !Player_InCsMode(play)) { + if (!DynaPolyActor_IsSwitchPressed(&this->dyna) && !Player_InCsMode(play)) { if (this->releaseTimer <= 0) { ObjSwitch_FloorReleaseInit(this); if ((this->dyna.actor.params >> 4 & 7) == OBJSWITCH_SUBTYPE_FLOOR_2) { @@ -695,7 +697,7 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) { switch ((this->dyna.actor.params & 7)) { case OBJSWITCH_TYPE_FLOOR: case OBJSWITCH_TYPE_FLOOR_RUSTY: - this->unk_17F = this->dyna.unk_160; + this->unk_17F = this->dyna.interactFlags; break; case OBJSWITCH_TYPE_EYE: this->unk_17F = this->tris.col.base.acFlags; 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 dfcf9605d..1701eb60d 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 @@ -148,7 +148,7 @@ void ObjTimeblock_Destroy(Actor* thisx, PlayState* play) { } u8 ObjTimeblock_PlayerIsInRange(ObjTimeblock* this, PlayState* play) { - if (this->isVisible && func_80043590(&this->dyna)) { + if (this->isVisible && DynaPolyActor_IsPlayerAbove(&this->dyna)) { return false; } 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 8315d42fc..f4c77c73f 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 @@ -82,7 +82,7 @@ s32 func_80BA1ECC(ObjWarp2block* this, PlayState* play) { Vec3f sp20; f32 temp_f2; - if (func_80043590(&this->dyna)) { + if (DynaPolyActor_IsPlayerAbove(&this->dyna)) { return 0; } 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 d51e33e8b..cda6356f5 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -11236,7 +11236,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) { func_80074CE8(play, SurfaceType_GetLightSettingIndex(&play->colCtx, floorPoly, this->actor.floorBgId)); } else { - func_80043508(&play->colCtx, this->actor.floorBgId); + DynaPoly_SetPlayerAbove(&play->colCtx, this->actor.floorBgId); } } @@ -11438,7 +11438,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) { s32 pad3; if (this->actor.floorBgId != BGCHECK_SCENE) { - func_800434C8(&play->colCtx, this->actor.floorBgId); + DynaPoly_SetPlayerOnTop(&play->colCtx, this->actor.floorBgId); } floorPolyNormalX = COLPOLY_GET_NORMAL(floorPoly->normal.x);