diff --git a/include/functions.h b/include/functions.h index 052acebb1c..2efde4a706 100644 --- a/include/functions.h +++ b/include/functions.h @@ -605,15 +605,15 @@ u16 SSNodeList_GetNextNodeIdx(SSNodeList* this); s32 DynaPoly_IsBgIdBgActor(s32 bgId); void DynaPoly_Init(PlayState* play, DynaCollisionContext* dyna); void DynaPoly_Alloc(PlayState* play, DynaCollisionContext* dyna); -void func_8003EBF8(PlayState* play, DynaCollisionContext* dyna, s32 bgId); -void func_8003EC50(PlayState* play, DynaCollisionContext* dyna, s32 bgId); -void func_8003ECA8(PlayState* play, DynaCollisionContext* dyna, s32 bgId); +void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); +void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); +void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader); DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId); void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgId); -void func_8003EE6C(PlayState* play, DynaCollisionContext* dyna); -void func_8003F8EC(PlayState* play, DynaCollisionContext* dyna, Actor* actor); -void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna); +void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna); +void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor); +void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna); void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyna); f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast); s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius, @@ -672,14 +672,14 @@ 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 DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor); +void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor); +void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId); +void DynaPoly_SetPlayerAbove(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 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor); s32 func_800435B4(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); diff --git a/include/z64actor.h b/include/z64actor.h index 88c6b2e159..572ab9054a 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -254,6 +254,11 @@ 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_3 (1 << 3) // Like the ACTOR_ON_TOP flag but only actors with ACTOR_FLAG_26 + typedef struct DynaPolyActor { /* 0x000 */ struct Actor actor; /* 0x14C */ s32 bgId; @@ -262,7 +267,7 @@ typedef struct DynaPolyActor { /* 0x158 */ s16 unk_158; // y rotation? /* 0x15A */ u16 unk_15A; /* 0x15C */ u32 unk_15C; - /* 0x160 */ u8 unk_160; + /* 0x160 */ u8 interactFlags; /* 0x162 */ s16 unk_162; } DynaPolyActor; // size = 0x164 diff --git a/include/z64bgcheck.h b/include/z64bgcheck.h index 2f6811ee21..892ab925d9 100644 --- a/include/z64bgcheck.h +++ b/include/z64bgcheck.h @@ -155,10 +155,15 @@ typedef struct { /* 0x60 */ f32 maxY; } BgActor; // size = 0x64 +#define BGACTOR_IN_USE (1 << 0) // The bgActor entry is in use +#define BGACTOR_1 (1 << 1) +#define BGACTOR_COLLISION_DISABLED (1 << 2) // The collision of the bgActor is disabled +#define BGACTOR_CEILING_COLLISION_DISABLED (1 << 3) // The ceilings in the collision of the bgActor are ignored + typedef struct { /* 0x0000 */ u8 bitFlag; /* 0x0004 */ BgActor bgActors[BG_ACTOR_MAX]; - /* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX]; // & 0x0008 = no dyna ceiling + /* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX]; /* 0x13F0 */ CollisionPoly* polyList; /* 0x13F4 */ Vec3s* vtxList; /* 0x13F8 */ DynaSSNodeList polyNodes; diff --git a/src/code/code_800430A0.c b/src/code/code_800430A0.c index 95c7c4fc5d..95f7455ba6 100644 --- a/src/code/code_800430A0.c +++ b/src/code/code_800430A0.c @@ -60,7 +60,7 @@ 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_26)) { func_80043538(dynaActor); @@ -81,7 +81,7 @@ s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor) { return false; } - if ((colCtx->dyna.bgActorFlags[bgId] & 2) || !(colCtx->dyna.bgActorFlags[bgId] & 1)) { + if ((colCtx->dyna.bgActorFlags[bgId] & BGACTOR_1) || !(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) { return false; } diff --git a/src/code/code_80043480.c b/src/code/code_80043480.c index 3ba733e267..bcf2e0dd99 100644 --- a/src/code/code_80043480.c +++ b/src/code/code_80043480.c @@ -3,65 +3,65 @@ void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) { dynaActor->bgId = -1; dynaActor->unk_15C = flags; - dynaActor->unk_160 = 0; + 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; + dynaActor->interactFlags |= DYNA_INTERACT_3; } -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; @@ -69,7 +69,7 @@ s32 func_80043590(DynaPolyActor* dynaActor) { } s32 func_800435B4(DynaPolyActor* dynaActor) { - if (dynaActor->unk_160 & 8) { + if (dynaActor->interactFlags & DYNA_INTERACT_3) { return true; } else { return false; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 8db84b82da..f51414eabe 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2111,7 +2111,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { actor->colorFilterTimer--; } actor->update(actor, play); - func_8003F8EC(play, &play->colCtx.dyna, actor); + DynaPoly_UnsetAllInteractFlags(play, &play->colCtx.dyna, actor); } CollisionCheck_ResetDamage(&actor->colChkInfo); @@ -2121,7 +2121,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { } if (i == ACTORCAT_BG) { - DynaPoly_Setup(play, &play->colCtx.dyna); + DynaPoly_UpdateContext(play, &play->colCtx.dyna); } } diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index 640066358f..55ee74b8aa 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -1623,7 +1623,7 @@ CollisionHeader* BgCheck_GetCollisionHeader(CollisionContext* colCtx, s32 bgId) if (bgId < 0 || bgId > BG_ACTOR_MAX) { return NULL; } - if (!(colCtx->dyna.bgActorFlags[bgId] & 1)) { + if (!(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) { osSyncPrintf(VT_COL(YELLOW, BLACK)); osSyncPrintf("T_BGCheck_getBGDataInfo():そのbg_actor_indexは使われておりません。index=%d\n"); osSyncPrintf(VT_RST); @@ -2626,8 +2626,8 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto s32 foundSlot = false; for (bgId = 0; bgId < BG_ACTOR_MAX; bgId++) { - if (!(dyna->bgActorFlags[bgId] & 1)) { - dyna->bgActorFlags[bgId] |= 1; + if (!(dyna->bgActorFlags[bgId] & BGACTOR_IN_USE)) { + dyna->bgActorFlags[bgId] |= BGACTOR_IN_USE; foundSlot = true; break; } @@ -2643,7 +2643,7 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto BgActor_SetActor(&dyna->bgActors[bgId], actor, colHeader); dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP; - dyna->bgActorFlags[bgId] &= ~2; + dyna->bgActorFlags[bgId] &= ~BGACTOR_1; osSyncPrintf(VT_FGCOL(GREEN)); osSyncPrintf("DynaPolyInfo_setActor():index %d\n", bgId); osSyncPrintf(VT_RST); @@ -2655,37 +2655,37 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto * possible orginal name: DynaPolyInfo_getActor */ DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId) { - if (!DynaPoly_IsBgIdBgActor(bgId) || !(colCtx->dyna.bgActorFlags[bgId] & 1) || - colCtx->dyna.bgActorFlags[bgId] & 2) { + if (!DynaPoly_IsBgIdBgActor(bgId) || !(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE) || + colCtx->dyna.bgActorFlags[bgId] & BGACTOR_1) { return NULL; } return (DynaPolyActor*)colCtx->dyna.bgActors[bgId].actor; } -void func_8003EBF8(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { +void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { if (DynaPoly_IsBgIdBgActor(bgId)) { - dyna->bgActorFlags[bgId] |= 4; + dyna->bgActorFlags[bgId] |= BGACTOR_COLLISION_DISABLED; dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP; } } -void func_8003EC50(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { +void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { if (DynaPoly_IsBgIdBgActor(bgId)) { - dyna->bgActorFlags[bgId] &= ~4; + dyna->bgActorFlags[bgId] &= ~BGACTOR_COLLISION_DISABLED; dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP; } } -void func_8003ECA8(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { +void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { if (DynaPoly_IsBgIdBgActor(bgId)) { - dyna->bgActorFlags[bgId] |= 8; + dyna->bgActorFlags[bgId] |= BGACTOR_CEILING_COLLISION_DISABLED; dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP; } } -void func_8003ED00(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { +void DynaPoly_EnableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { if (DynaPoly_IsBgIdBgActor(bgId)) { - dyna->bgActorFlags[bgId] &= ~8; + dyna->bgActorFlags[bgId] &= ~BGACTOR_CEILING_COLLISION_DISABLED; dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP; } } @@ -2723,19 +2723,19 @@ void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgI actor->bgId = BGACTOR_NEG_ONE; dyna->bgActors[bgId].actor = NULL; - dyna->bgActorFlags[bgId] |= 2; + dyna->bgActorFlags[bgId] |= BGACTOR_1; } } -void func_8003EE6C(PlayState* play, DynaCollisionContext* dyna) { +void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna) { dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP; } /** * original name: DynaPolyInfo_expandSRT */ -void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex, - s32* polyStartIndex) { +void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex, + s32* polyStartIndex) { MtxF mtx; Actor* actor; s32 pad; @@ -2765,7 +2765,7 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s ScaleRotPos_SetValue(&dyna->bgActors[bgId].curTransform, &actor->scale, &actor->shape.rot, &pos); - if (dyna->bgActorFlags[bgId] & 4) { + if (dyna->bgActorFlags[bgId] & BGACTOR_COLLISION_DISABLED) { return; } @@ -2799,7 +2799,7 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s s16 polyIndex = pi; DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.floor, &polyIndex); } else if (normalY < COLPOLY_SNORMAL(-0.8f)) { - if (!(dyna->bgActorFlags[bgId] & 8)) { + if (!(dyna->bgActorFlags[bgId] & BGACTOR_CEILING_COLLISION_DISABLED)) { s16 polyIndex = pi; DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.ceiling, &polyIndex); @@ -2915,15 +2915,15 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s } } -void func_8003F8EC(PlayState* play, DynaCollisionContext* dyna, Actor* actor) { +void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor) { DynaPolyActor* dynaActor; s32 i; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (dyna->bgActorFlags[i] & 1) { + if (dyna->bgActorFlags[i] & BGACTOR_IN_USE) { dynaActor = DynaPoly_GetActor(&play->colCtx, i); if (dynaActor != NULL && &dynaActor->actor == actor) { - func_800434A0((DynaPolyActor*)actor); + DynaPolyActor_UnsetAllInteractFlags((DynaPolyActor*)actor); return; } } @@ -2931,9 +2931,9 @@ void func_8003F8EC(PlayState* play, DynaCollisionContext* dyna, Actor* actor) { } /** - * DynaPolyInfo_setup + * Original name: "DynaPolyInfo_setup" */ -void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) { +void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) { DynaPolyActor* actor; s32 vtxStartIndex; s32 polyStartIndex; @@ -2946,7 +2946,7 @@ void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) { } for (i = 0; i < BG_ACTOR_MAX; i++) { - if (dyna->bgActorFlags[i] & 2) { + if (dyna->bgActorFlags[i] & BGACTOR_1) { // Initialize BgActor osSyncPrintf(VT_FGCOL(GREEN)); osSyncPrintf("DynaPolyInfo_setup():削除 index=%d\n", i); @@ -2975,8 +2975,8 @@ void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) { vtxStartIndex = 0; polyStartIndex = 0; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (dyna->bgActorFlags[i] & 1) { - DynaPoly_ExpandSRT(play, dyna, i, &vtxStartIndex, &polyStartIndex); + if (dyna->bgActorFlags[i] & BGACTOR_IN_USE) { + DynaPoly_AddBgActorToLookup(play, dyna, i, &vtxStartIndex, &polyStartIndex); } } dyna->bitFlag &= ~DYNAPOLY_INVALIDATE_LOOKUP; @@ -2989,7 +2989,7 @@ void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyn s32 i; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (dyna->bgActorFlags[i] & 1) { + if (dyna->bgActorFlags[i] & BGACTOR_IN_USE) { DynaPoly_SetBgActorPrevTransform(play, &dyna->bgActors[i]); } } @@ -3081,7 +3081,7 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) { *dynaRaycast->bgId = BGCHECK_SCENE; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (!(dynaRaycast->colCtx->dyna.bgActorFlags[i] & 1)) { + if (!(dynaRaycast->colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) { continue; } @@ -3134,7 +3134,7 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) { if (pauseState == 0) { pauseState = dynaRaycast->play->pauseCtx.debugState != 0; } - if (!pauseState && (dynaRaycast->colCtx->dyna.bgActorFlags[*dynaRaycast->bgId] & 2)) { + if (!pauseState && (dynaRaycast->colCtx->dyna.bgActorFlags[*dynaRaycast->bgId] & BGACTOR_1)) { curTransform = &dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].curTransform; polyMin = &dynaRaycast->dyna->polyList[dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].dynaLookup.polyStartIndex]; @@ -3387,7 +3387,7 @@ s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* resultPos = *pos; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (!(colCtx->dyna.bgActorFlags[i] & 1)) { + if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) { continue; } if ((colCtx->dyna.bgActors + i)->actor == actor) { @@ -3506,7 +3506,7 @@ s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, V resultY = tempY; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (!(colCtx->dyna.bgActorFlags[i] & 1)) { + if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) { continue; } if (actor == colCtx->dyna.bgActors[i].actor) { @@ -3641,7 +3641,7 @@ s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* p f32 by; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (colCtx->dyna.bgActorFlags[i] & 1) { + if (colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) { if (actor != colCtx->dyna.bgActors[i].actor) { ay = posA->y; by = posB->y; @@ -3745,7 +3745,7 @@ s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionP Sphere16 testSphere; for (i = 0; i < BG_ACTOR_MAX; i++) { - if (!(colCtx->dyna.bgActorFlags[i] & 1)) { + if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) { continue; } if (colCtx->dyna.bgActors[i].actor == actor) { @@ -3794,7 +3794,7 @@ void func_800418D0(CollisionContext* colCtx, PlayState* play) { for (i = 0; i < BG_ACTOR_MAX; i++) { flag = dyna->bgActorFlags[i]; - if ((flag & 1) && !(flag & 2)) { + if ((flag & BGACTOR_IN_USE) && !(flag & BGACTOR_1)) { Actor_SetObjectDependency(play, dyna->bgActors[i].actor); CollisionHeader_SegmentedToVirtual(dyna->bgActors[i].colHeader); } @@ -4453,7 +4453,7 @@ void BgCheck_DrawDynaCollision(PlayState* play, CollisionContext* colCtx) { for (bgId = 0; bgId < BG_ACTOR_MAX; bgId++) { - if (!(colCtx->dyna.bgActorFlags[bgId] & 1)) { + if (!(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) { continue; } BgCheck_DrawBgActor(play, colCtx, bgId); diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index 3b20cec82b..190619c12f 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -113,7 +113,7 @@ 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.interactFlags = 0; this->dyna.unk_15C = DPM_UNK; thisx->uncullZoneDownward = 1200.0f; thisx->uncullZoneScale = 200.0f; @@ -224,7 +224,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/src/code/z_en_item00.c b/src/code/z_en_item00.c index b5ef85d817..e4d09def76 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -560,7 +560,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { D_80157D90 = play->gameplayFrames; D_80157D94[0] = 0; for (i = 0; i < 50; i++) { - if (play->colCtx.dyna.bgActorFlags[i] & 1) { + if (play->colCtx.dyna.bgActorFlags[i] & BGACTOR_IN_USE) { dynaActor = play->colCtx.dyna.bgActors[i].actor; if ((dynaActor != NULL) && (dynaActor->update != NULL)) { if ((dynaActor->world.pos.x != dynaActor->prevPos.x) || diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index 271c012dc7..471cf5fbfe 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -325,7 +325,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, CAM_ID_MAIN); @@ -351,7 +351,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[CAM_ID_MAIN]->setting; Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2); func_8005AD1C(play->cameraPtrs[CAM_ID_MAIN], 4); @@ -359,7 +359,7 @@ void func_8086C874(BgBdanObjects* this, PlayState* play) { } } else { Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], 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/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index ca99d6376d..e5aed1b8fe 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -254,7 +254,7 @@ void func_8086D5E0(BgBdanSwitch* this, PlayState* play) { } break; case YELLOW: - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { func_8086D67C(this); func_8086D4B4(this, play); } @@ -322,7 +322,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); } } @@ -365,7 +365,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/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index 5418669f37..3bc57deb0b 100644 --- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -53,7 +53,7 @@ void BgGjyoBridge_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_808787A4; } else { this->dyna.actor.draw = NULL; - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->actionFunc = BgGjyoBridge_TriggerCutscene; } } @@ -84,7 +84,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) { if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) && (play->csCtx.npcActions[2]->action == 2)) { this->dyna.actor.draw = BgGjyoBridge_Draw; - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); SET_EVENTCHKINF(EVENTCHKINF_4D); } } diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index 977963a651..ee3c834fbb 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -36,11 +36,11 @@ const ActorInit Bg_Gnd_Darkmeiro_InitVars = { void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, PlayState* play) { if (this->actionFlags & 2) { if (this->timer1 == 0) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->actionFlags &= ~2; } } else if (this->timer1 != 0) { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->actionFlags |= 2; } } @@ -68,7 +68,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, PlayState* play2) { thisx->draw = BgGndDarkmeiro_DrawSwitchBlock; this->updateFunc = BgGndDarkmeiro_UpdateSwitchBlock; if (!Flags_GetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else { this->timer1 = 64; this->actionFlags |= 2; diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index b60f4958a4..b2530a3ec4 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/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)) { 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)) { if (thisx->world.pos.y < this->initPos.y) { this->actionFunc = BgGndFiremeiro_Sink; this->timer = 20; diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index c0d19f28bf..d390f5f3b2 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -242,7 +242,7 @@ void BgHakaGate_FloorClosed(BgHakaGate* this, PlayState* play) { } else { func_80078884(NA_SE_SY_ERROR); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GROUND_GATE_OPEN); - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->vTimer = 60; this->actionFunc = BgHakaGate_FloorOpen; } @@ -256,7 +256,7 @@ void BgHakaGate_FloorOpen(BgHakaGate* this, PlayState* play) { } if (this->vTimer == 0) { if (Math_ScaledStepToS(&this->vOpenAngle, 0, 0x800)) { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->actionFunc = BgHakaGate_FloorClosed; } } else { diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index e3230b5aed..d3154f7459 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -110,10 +110,10 @@ void func_8087DBF0(BgHakaMegane* this, PlayState* play) { if (play->actorCtx.lensActive) { thisx->flags |= ACTOR_FLAG_7; - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else { thisx->flags &= ~ACTOR_FLAG_7; - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } } diff --git a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c index 644be1d0b7..6df4947f3b 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c +++ b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c @@ -178,7 +178,8 @@ 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/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index c68fe952c1..c3ff87e241 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -89,7 +89,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; @@ -108,7 +108,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); @@ -125,12 +125,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[CAM_ID_MAIN], 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[CAM_ID_MAIN], CAM_SET_DUNGEON0); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c index 87952bba82..693362ca76 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c @@ -215,7 +215,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/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index 7ad3107691..d2d218a43d 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -209,7 +209,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; @@ -260,12 +260,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[CAM_ID_MAIN], 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[CAM_ID_MAIN], CAM_SET_DUNGEON0); } @@ -313,12 +313,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[CAM_ID_MAIN], 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[CAM_ID_MAIN], CAM_SET_DUNGEON0); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c index 82355a4e3b..023385e0b9 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c @@ -117,7 +117,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_13 | PLAYER_STATE1_14))) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) { 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) { @@ -149,7 +149,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/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c index 5f59183fd0..a8d48f1640 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c @@ -60,7 +60,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; } @@ -108,12 +108,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[CAM_ID_MAIN], 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[CAM_ID_MAIN], CAM_SET_DUNGEON0); } diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c index 0854e2dfc1..b21f0b0dd2 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c +++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c @@ -144,7 +144,7 @@ void BgIceTurara_Shiver(BgIceTurara* this, PlayState* play) { this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z; Collider_UpdateCylinder(&this->dyna.actor, &this->collider); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->actionFunc = BgIceTurara_Fall; } else { sp28 = Rand_ZeroOne(); @@ -166,7 +166,7 @@ void BgIceTurara_Fall(BgIceTurara* this, PlayState* play) { BgIceTurara_Break(this, play, 40.0f); if (this->dyna.actor.params == TURARA_STALACTITE_REGROW) { this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 120.0f; - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->actionFunc = BgIceTurara_Regrow; } else { Actor_Kill(&this->dyna.actor); diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index 5cf654a565..cae20779c5 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -186,7 +186,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[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM); diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index e6e1c2b038..73c46dcdd2 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -135,13 +135,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)) { Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DIRECTED_YAW); - } else if (((this->dyna.unk_160 & 4) == 0) && (this->unk_16B & 4) && + } else if (!(this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ABOVE) && + (this->unk_16B & DYNA_INTERACT_PLAYER_ABOVE) && (play->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_DIRECTED_YAW)) { Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], 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/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c index 9eac1418fb..eb4fe0f171 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c @@ -50,7 +50,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/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 27aa6da11e..75e9167b40 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -184,7 +184,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { switch ((u16)this->dyna.actor.params & 0xF) { case MIZUBWALL_FLOOR: if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dList = NULL; this->actionFunc = BgMizuBwall_DoNothing; } else { @@ -219,7 +219,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { break; case MIZUBWALL_RUTO_ROOM: if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dList = NULL; this->actionFunc = BgMizuBwall_DoNothing; } else { @@ -254,7 +254,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { break; case MIZUBWALL_UNUSED: if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dList = NULL; this->actionFunc = BgMizuBwall_DoNothing; } else { @@ -291,7 +291,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { break; case MIZUBWALL_STINGER_ROOM_1: if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dList = NULL; this->actionFunc = BgMizuBwall_DoNothing; } else { @@ -329,7 +329,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { break; case MIZUBWALL_STINGER_ROOM_2: if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dList = NULL; this->actionFunc = BgMizuBwall_DoNothing; } else { @@ -467,7 +467,7 @@ void BgMizuBwall_Idle(BgMizuBwall* this, PlayState* play) { this->collider.base.acFlags &= ~AC_HIT; Flags_SetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F); this->breakTimer = 1; - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dList = NULL; BgMizuBwall_SpawnDebris(this, play); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c index 92349ca1cc..ccfd9ed875 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c @@ -57,9 +57,9 @@ void func_8089F788(BgMizuUzu* this, PlayState* play) { Actor* thisx = &this->dyna.actor; if (GET_PLAYER(play)->currentBoots == PLAYER_BOOTS_IRON) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } Audio_PlayActorSound2(thisx, NA_SE_EV_WATER_CONVECTION - SFX_FLAG); thisx->shape.rot.y += 0x1C0; diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index e5d5e323c2..4873c2c9e1 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -231,7 +231,7 @@ void BgMoriBigst_Update(Actor* thisx, PlayState* play) { if (this->waitTimer > 0) { this->waitTimer--; } - if (func_80043590(&this->dyna)) { + if (DynaPolyActor_IsPlayerAbove(&this->dyna)) { Environment_ChangeLightSetting(play, 6); } if (this->actionFunc != NULL) { diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index eb45301314..206e7a89e6 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -124,7 +124,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)); } @@ -243,7 +244,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/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index 74377c1973..a2c1540694 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -81,7 +81,7 @@ void func_808ADEF0(BgSpot03Taki* this, PlayState* play) { if (this->openingAlpha > 0) { this->openingAlpha -= 5; if (this->openingAlpha <= 0.0f) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->timer = 400; this->state = WATERFALL_OPENED; this->openingAlpha = 0; @@ -96,7 +96,7 @@ void func_808ADEF0(BgSpot03Taki* this, PlayState* play) { if (this->openingAlpha < 255.0f) { this->openingAlpha += 5.0f; if (this->openingAlpha >= 255.0f) { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->state = WATERFALL_CLOSED; this->openingAlpha = 255.0f; Flags_UnsetSwitch(play, this->switchFlag); diff --git a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c index 10e28eff2b..79d46f9956 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c @@ -98,8 +98,8 @@ void BgSpot08Iceblock_SinkUnderPlayer(BgSpot08Iceblock* this) { break; } - // Sink under Player's weight if standing on it - target = (func_80043548(&this->dyna) ? -4.0f : 0.0f); + // Sink under an actor's weight if standing on it + target = (DynaPolyActor_IsActorOnTop(&this->dyna) ? -4.0f : 0.0f); Math_StepToF(&this->sinkOffset, target, step); } @@ -198,7 +198,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/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 1e81a2d013..ad0595cf5f 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -225,7 +225,7 @@ void func_808B7BCC(BgSpot18Basket* this, PlayState* play) { this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) { OnePointCutscene_Init(play, 4210, 240, &this->dyna.actor, CAM_ID_MAIN); func_808B7D38(this); - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } } } @@ -333,7 +333,7 @@ void func_808B7FC0(BgSpot18Basket* this, PlayState* play) { this->dyna.actor.shape.rot.y = arrayValue; func_808B818C(this); - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } } diff --git a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c index d62916c159..818051fdce 100644 --- a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c +++ b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c @@ -60,13 +60,13 @@ void BgSstFloor_Update(Actor* thisx, PlayState* play) { if (1) {} - 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[CAM_ID_MAIN], CAM_SET_BOSS_BONGO); } else { Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], 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); } @@ -80,7 +80,8 @@ void BgSstFloor_Update(Actor* thisx, PlayState* play) { this->dyna.actor.params = BONGOFLOOR_REST; this->drumPhase = 28; - if (func_8004356C(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && + !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) { distFromRim = 600.0f - this->dyna.actor.xzDistToPlayer; if (distFromRim > 0.0f) { if (distFromRim > 350.0f) { @@ -117,7 +118,7 @@ void BgSstFloor_Update(Actor* thisx, PlayState* play) { this->drumPhase--; } if (1) {} - func_8003EE6C(play, &play->colCtx.dyna); + DynaPoly_InvalidateLookup(play, &play->colCtx.dyna); } void BgSstFloor_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index e347f28802..97f95a1c07 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -250,7 +250,7 @@ void BgYdanSp_FloorWebBreaking(BgYdanSp* this, PlayState* play) { this->dyna.actor.world.pos.y = (sinf((f32)this->timer * (M_PI / 20)) * this->unk_16C) + this->dyna.actor.home.pos.y; if (this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 190.0f) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->timer = 40; func_80078884(NA_SE_SY_CORRECT_CHIME); Flags_SetSwitch(play, this->isDestroyedSwitchFlag); @@ -288,7 +288,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/src/overlays/actors/ovl_Door_Toki/z_door_toki.c b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c index 9e5bbf6306..1276e01866 100644 --- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c +++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c @@ -50,8 +50,8 @@ void DoorToki_Update(Actor* thisx, PlayState* play) { DoorToki* this = (DoorToki*)thisx; if (GET_EVENTCHKINF(EVENTCHKINF_4B)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } } diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index 3d584cf7d5..274bbf71da 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -106,7 +106,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { DynaPolyActor_Init(&this->dyna, DPM_UNK); CollisionHeader_GetVirtual(&gTreasureChestCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); - func_8003ECA8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCeilingCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->movementFlags = 0; this->type = thisx->params >> 12 & 0xF; @@ -126,7 +126,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { animFrameStart = endFrame; } else if ((this->type == ENBOX_TYPE_SWITCH_FLAG_FALL_BIG || this->type == ENBOX_TYPE_SWITCH_FLAG_FALL_SMALL) && !Flags_GetSwitch(play, this->switchFlag)) { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); if (Rand_ZeroOne() < 0.5f) { this->movementFlags |= ENBOX_MOVE_FALL_ANGLE_SIDE; } @@ -138,7 +138,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { } else if ((this->type == ENBOX_TYPE_ROOM_CLEAR_BIG || this->type == ENBOX_TYPE_ROOM_CLEAR_SMALL) && !Flags_GetClear(play, this->dyna.actor.room)) { EnBox_SetupAction(this, EnBox_AppearOnRoomClear); - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; @@ -146,14 +146,14 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { } else if (this->type == ENBOX_TYPE_9 || this->type == ENBOX_TYPE_10) { EnBox_SetupAction(this, func_809C9700); this->dyna.actor.flags |= ACTOR_FLAG_25; - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; this->dyna.actor.flags |= ACTOR_FLAG_4; } else if (this->type == ENBOX_TYPE_SWITCH_FLAG_BIG && !Flags_GetSwitch(play, this->switchFlag)) { EnBox_SetupAction(this, EnBox_AppearOnSwitchFlag); - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; @@ -273,7 +273,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, PlayState* play) { if (this->unk_1A8 >= 0) { EnBox_SetupAction(this, EnBox_Fall); this->subCamId = OnePointCutscene_Init(play, 4500, 9999, &this->dyna.actor, CAM_ID_MAIN); - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else if (this->unk_1A8 >= -11) { this->unk_1A8++; } else if (Flags_GetSwitch(play, this->switchFlag)) { @@ -367,7 +367,7 @@ void EnBox_AppearInit(EnBox* this, PlayState* play) { } void EnBox_AppearAnimation(EnBox* this, PlayState* play) { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); if (this->unk_1A8 < 0) { this->unk_1A8++; diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 6c257b3f9c..4ed8125175 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -104,7 +104,7 @@ void EnBrob_Destroy(Actor* thisx, PlayState* play) { } void func_809CADDC(EnBrob* this, PlayState* play) { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->timer = this->actionFunc == func_809CB2B8 ? 200 : 0; this->unk_1AE = 0; this->actionFunc = func_809CB054; @@ -112,7 +112,7 @@ void func_809CADDC(EnBrob* this, PlayState* play) { void func_809CAE44(EnBrob* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, &object_brob_Anim_001750); - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->unk_1AE = 1000; this->actionFunc = func_809CB114; } @@ -150,7 +150,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)) { 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/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/src/overlays/actors/ovl_En_Jj/z_en_jj.c index bc83cfc8c3..2773a6dc02 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c @@ -119,7 +119,7 @@ void EnJj_Init(Actor* thisx, PlayState* play2) { DynaPolyActor_Init(&this->dyna, 0); CollisionHeader_GetVirtual(&gJabuJabuBodyCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); - func_8003ECA8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCeilingCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dyna.actor.update = EnJj_UpdateStaticCollision; this->dyna.actor.draw = NULL; Actor_SetScale(&this->dyna.actor, 0.087f); @@ -182,7 +182,7 @@ void EnJj_OpenMouth(EnJj* this, PlayState* play) { this->mouthOpenAngle -= 102; if (this->mouthOpenAngle < -2600) { - func_8003EBF8(play, &play->colCtx.dyna, bodyCollisionActor->bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, bodyCollisionActor->bgId); } } } @@ -217,7 +217,7 @@ void EnJj_BeginCutscene(EnJj* this, PlayState* play) { EnJj_SetupAction(this, EnJj_RemoveDust); play->csCtx.segment = &D_80A88164; gSaveContext.cutsceneTrigger = 1; - func_8003EBF8(play, &play->colCtx.dyna, bodyCollisionActor->bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, bodyCollisionActor->bgId); func_8005B1A4(GET_ACTIVE_CAM(play)); SET_EVENTCHKINF(EVENTCHKINF_3A); func_80078884(NA_SE_SY_CORRECT_CHIME); diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index 77f807521a..e3624a384e 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -51,7 +51,7 @@ 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.interactFlags = 0; this->dyna.unk_15C = 0; thisx->targetMode = 0; thisx->gravity = -2.0f; diff --git a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c index 01a2dca178..bad8e26577 100644 --- a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c +++ b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c @@ -51,7 +51,7 @@ 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.interactFlags = 0; this->dyna.unk_15C = DPM_UNK; thisx->targetMode = 1; thisx->gravity = -2.0f; diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index aee324cfff..08f38d5d0d 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -127,7 +127,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/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 941763d556..72920d1020 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -750,7 +750,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)) { ObjBean_SetupFly(this); if (play->sceneNum == SCENE_SPOT10) { // Lost woods Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BEAN_LOST_WOODS); @@ -784,7 +784,7 @@ void ObjBean_Fly(ObjBean* this, PlayState* play) { Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0); } - } else if (func_8004356C(&this->dyna) != 0) { // Player is on top + } else if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG); @@ -810,7 +810,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); @@ -822,7 +822,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); @@ -856,9 +856,9 @@ void func_80B90A34(ObjBean* this, PlayState* play) { func_80B8EE24(this); if (trampled) { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } if ((this->timer <= 0) && (!trampled)) { func_80B8EBC8(this); @@ -894,7 +894,7 @@ void ObjBean_Update(Actor* thisx, PlayState* play) { osSyncPrintf("馬と豆の木リフト衝突!!!\n"); osSyncPrintf(VT_RST); ObjBean_Break(this, play); - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); func_80B908EC(this); } } else { @@ -902,7 +902,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/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c index 0e89e791cd..6cd7e51e05 100644 --- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c +++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c @@ -85,7 +85,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; @@ -117,7 +117,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/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index 9ab64070aa..336de8d2de 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -148,7 +148,7 @@ void ObjKibako2_Idle(ObjKibako2* this, PlayState* play) { ObjKibako2_Break(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK); this->dyna.actor.flags |= ACTOR_FLAG_4; - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); this->dyna.actor.draw = NULL; this->actionFunc = ObjKibako2_Kill; } else if (this->dyna.actor.xzDistToPlayer < 600.0f) { diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index 81907ea4dd..957eb1f51e 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -137,7 +137,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/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 296acb27c7..b21dc1ed46 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -491,7 +491,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) { } else { dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId); if (dynaPolyActor != NULL) { - func_800434A8(dynaPolyActor); + DynaPolyActor_SetActorOnTop(dynaPolyActor); func_80043538(dynaPolyActor); if ((this->timer <= 0) && (fabsf(this->dyna.unk_150) > 0.001f)) { @@ -520,7 +520,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) { dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId); if ((dynaPolyActor != NULL) && (dynaPolyActor->unk_15C & 1)) { - func_800434A8(dynaPolyActor); + DynaPolyActor_SetActorOnTop(dynaPolyActor); func_80043538(dynaPolyActor); this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight; } else { diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 72cbd9a800..cff2431b05 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -386,13 +386,14 @@ void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) { } else { switch (this->dyna.actor.params >> 4 & 7) { case OBJSWITCH_SUBTYPE_ONCE: - if (func_8004356C(&this->dyna)) { + if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { ObjSwitch_FloorPressInit(this); ObjSwitch_SetOn(this, play); } break; case OBJSWITCH_SUBTYPE_TOGGLE: - 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); } @@ -444,7 +445,8 @@ void ObjSwitch_FloorDown(ObjSwitch* this, PlayState* play) { } break; case OBJSWITCH_SUBTYPE_TOGGLE: - 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); } @@ -691,7 +693,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/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index 3436cd2158..96d4bc2c3a 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -147,7 +147,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; } @@ -324,9 +324,9 @@ void ObjTimeblock_Update(Actor* thisx, PlayState* play) { } if (this->isVisible) { - func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else { - func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); + DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } } diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c index 79a04433a9..f98a3a3fc1 100644 --- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -80,7 +80,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/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 4c590f083e..d95f299b69 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -9598,13 +9598,13 @@ s32 func_80847A78(Player* this) { if (!cond) { this->hoverBootsTimer = 19; } - return 0; + return false; } D_808535E4 = 0; this->unk_898 = this->unk_89A = D_80853610 = 0; - return 1; + return true; } static Vec3f D_80854798 = { 0.0f, 18.0f, 0.0f }; @@ -9694,7 +9694,7 @@ void func_80847BA0(PlayState* play, Player* this) { Environment_ChangeLightSetting( play, SurfaceType_GetLightSettingIndex(&play->colCtx, floorPoly, this->actor.floorBgId)); } else { - func_80043508(&play->colCtx, this->actor.floorBgId); + DynaPoly_SetPlayerAbove(&play->colCtx, this->actor.floorBgId); } } @@ -9843,7 +9843,7 @@ void func_80847BA0(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);