DynaPoly Docs Pass (#1194)

* dyna docs

* init flags

* more docs

* cleanup

* partial PR review

* another bracket

* hold to press

* PR cleanup
This commit is contained in:
engineer124 2023-04-19 08:36:53 +10:00 committed by GitHub
parent 38d21bbe97
commit b8af819165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
101 changed files with 515 additions and 459 deletions

View File

@ -776,25 +776,25 @@ void* ActorOverlayTable_FaultAddrConv(void* address, void* param);
void ActorOverlayTable_Init(void);
void ActorOverlayTable_Cleanup(void);
void BgCheck2_UpdateActorPosition(CollisionContext* colCtx, s32 bgId, Actor* actor);
void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 bgId, Actor* actor);
void BgCheck2_AttachToMesh(CollisionContext* colCtx, Actor* actor, s32 bgId);
u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 bgId, Actor* actor);
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags);
void DynaPolyActor_UpdateCarriedActorPos(CollisionContext* colCtx, s32 bgId, Actor* carriedActor);
void DynaPolyActor_UpdateCarriedActorRotY(CollisionContext* colCtx, s32 bgId, Actor* carriedActor);
void DynaPolyActor_AttachCarriedActor(CollisionContext* colCtx, Actor* carriedActor, s32 bgId);
u32 DynaPolyActor_TransformCarriedActor(CollisionContext* colCtx, s32 bgId, Actor* carriedActor);
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 transformFlags);
void DynaPolyActor_LoadMesh(PlayState* play, DynaPolyActor* dynaActor, CollisionHeader* meshHeader);
void DynaPolyActor_ResetState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingFallingState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingMovingState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingMovingStateByIndex(CollisionContext* colCtx, s32 bgId);
void DynaPolyActor_SetRidingRotatingState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingRotatingStateByIndex(CollisionContext* colCtx, s32 bgId);
void DynaPolyActor_SetSwitchPressedState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetHeavySwitchPressedState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInRidingFallingState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInRidingMovingState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInRidingRotatingState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInSwitchPressedState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInHeavySwitchPressedState(DynaPolyActor* dynaActor);
void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor);
void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor);
void DynaPolyActor_SetPlayerOnTop(DynaPolyActor* dynaActor);
void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 bgId);
void DynaPolyActor_SetPlayerAbove(DynaPolyActor* dynaActor);
void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 bgId);
void DynaPolyActor_SetActorOnSwitch(DynaPolyActor* dynaActor);
void DynaPolyActor_SetActorOnHeavySwitch(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsSwitchPressed(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsHeavySwitchPressed(DynaPolyActor* dynaActor);
s32 DynaPolyActor_ValidateMove(PlayState* play, DynaPolyActor* dynaActor, s16 startRadius, s16 endRadius, s16 startHeight);
Camera* Camera_Alloc(View* view, CollisionContext* bg, PlayState* play);

View File

@ -229,15 +229,23 @@ typedef enum {
/* 1 */ FOOT_RIGHT
} ActorFootIndex;
#define DYNA_TRANSFORM_POS (1 << 0) // Position of the actors on top follows the dynapoly actor's movement.
#define DYNA_TRANSFORM_ROT_Y (1 << 1) // The Y rotation of the actors on top follows the dynapoly actor's Y rotation.
#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_ON_SWITCH (1 << 3) // Like the ACTOR_ON_TOP flag but only actors with ACTOR_FLAG_CAN_PRESS_SWITCH
#define DYNA_INTERACT_ACTOR_ON_HEAVY_SWITCH (1 << 4) // Like the ACTOR_ON_TOP flag but only actors with ACTOR_FLAG_CAN_PRESS_HEAVY_SWITCH
typedef struct {
/* 0x000 */ Actor actor;
/* 0x144 */ s32 bgId;
/* 0x148 */ f32 pushForce;
/* 0x14C */ f32 unk14C;
/* 0x150 */ s16 yRotation;
/* 0x154 */ u32 flags;
/* 0x158 */ u8 stateFlags;
/* 0x15A */ s16 pad15A;
/* 0x154 */ u32 transformFlags;
/* 0x158 */ u8 interactFlags;
} DynaPolyActor; // size = 0x15C
@ -528,8 +536,8 @@ typedef enum {
#define ACTOR_FLAG_8000 (1 << 15)
//
#define ACTOR_FLAG_10000 (1 << 16)
//
#define ACTOR_FLAG_20000 (1 << 17)
// actor can press and hold down heavy switches
#define ACTOR_FLAG_CAN_PRESS_HEAVY_SWITCH (1 << 17)
//
#define ACTOR_FLAG_40000 (1 << 18)
//
@ -546,8 +554,8 @@ typedef enum {
#define ACTOR_FLAG_1000000 (1 << 24)
//
#define ACTOR_FLAG_2000000 (1 << 25)
//
#define ACTOR_FLAG_4000000 (1 << 26)
// actor can press and hold down switches
#define ACTOR_FLAG_CAN_PRESS_SWITCH (1 << 26)
// Prevents locking on with Z targeting an actor even if Tatl is floating over it
#define ACTOR_FLAG_CANT_LOCK_ON (1 << 27)
//

View File

@ -314,10 +314,16 @@ 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 ceiling collision of the bgActor is ignored
#define BGACTOR_FLOOR_COLLISION_DISABLED (1 << 5) // The floor collision of the bgActor is ignored
typedef struct {
/* 0x0000 */ u8 bitFlag;
/* 0x0004 */ BgActor bgActors[BG_ACTOR_MAX];
/* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX]; // bit 0 - Is mesh active
/* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX];
/* 0x13F0 */ CollisionPoly* polyList;
/* 0x13F4 */ Vec3s* vtxList;
/* 0x13F8 */ DynaWaterBoxList waterBoxList;
@ -521,18 +527,18 @@ void DynaPoly_Init(struct PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_Alloc(struct PlayState* play, DynaCollisionContext* dyna);
s32 DynaPoly_SetBgActor(struct PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader);
DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId);
void func_800C62BC(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void func_800C6314(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void func_800C636C(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void func_800C63C4(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void func_800C641C(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void func_800C6474(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void func_800C6554(struct PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_DisableCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_EnableCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_DisableCeilingCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_EnableCeilingCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_DisableFloorCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_EnableFloorCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_InvalidateLookup(struct PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_DeleteBgActor(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
void BgCheck_CalcWaterboxDimensions(Vec3f* minPos, Vec3f* maxXPos, Vec3f* maxZPos, Vec3s* minPosOut, s16* xLength, s16* zLength);
void DynaPoly_ExpandSRT(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex, s32* polyStartIndex, s32* waterBoxStartIndex);
void BgCheck_ResetFlagsIfLoadedActor(struct PlayState* play, DynaCollisionContext* dyna, Actor* actor);
void DynaPoly_Setup(struct PlayState* play, DynaCollisionContext* dyna);
void DynaPoly_AddBgActorToLookup(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex, s32* polyStartIndex, s32* waterBoxStartIndex);
void DynaPoly_UnsetAllInteractFlags(struct PlayState* play, DynaCollisionContext* dyna, Actor* actor);
void DynaPoly_UpdateContext(struct PlayState* play, DynaCollisionContext* dyna);
void func_800C756C(DynaCollisionContext* dyna, s32* numPolygons, s32* numVertices, s32* numWaterBoxes);
void DynaPoly_UpdateBgActorTransforms(struct PlayState* play, DynaCollisionContext* dyna);
void CollisionHeader_SegmentedToVirtual(CollisionHeader* colHeader);

View File

@ -1559,7 +1559,7 @@ s32 func_800B7678(PlayState* play, Actor* actor, Vec3f* pos, s32 updBgCheckInfoF
}
actor->bgCheckFlags |= BGCHECKFLAG_GROUND;
BgCheck2_AttachToMesh(&play->colCtx, actor, (s32)actor->floorBgId);
DynaPolyActor_AttachCarriedActor(&play->colCtx, actor, actor->floorBgId);
}
} else {
return func_800B761C(actor, distToFloor, updBgCheckInfoFlags);
@ -1575,7 +1575,7 @@ void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight,
Vec3f pos;
if ((actor->floorBgId != BGCHECK_SCENE) && (actor->bgCheckFlags & BGCHECKFLAG_GROUND)) {
BgCheck2_UpdateActorAttachedToMesh(&play->colCtx, actor->floorBgId, actor);
DynaPolyActor_TransformCarriedActor(&play->colCtx, actor->floorBgId, actor);
}
if (updBgCheckInfoFlags & UPDBGCHECKINFO_FLAG_1) {
@ -2426,7 +2426,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
}
actor->update(actor, play);
BgCheck_ResetFlagsIfLoadedActor(play, &play->colCtx.dyna, actor);
DynaPoly_UnsetAllInteractFlags(play, &play->colCtx.dyna, actor);
}
CollisionCheck_ResetDamage(&actor->colChkInfo);
@ -2516,7 +2516,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
}
if (i == ACTORCAT_BG) {
DynaPoly_Setup(play, &play->colCtx.dyna);
DynaPoly_UpdateContext(play, &play->colCtx.dyna);
}
}
@ -3395,7 +3395,7 @@ void func_800BB604(GameState* gameState, ActorContext* actorCtx, Player* player,
if ((actor != targetedActor) || (actor->flags & ACTOR_FLAG_80000)) {
temp_f0_2 = func_800B82EC(actor, player, D_801ED8DC);
phi_s2_2 = (actor->flags & 1) != 0;
phi_s2_2 = (actor->flags & ACTOR_FLAG_1) != 0;
if (phi_s2_2) {
phi_s2_2 = temp_f0_2 < D_801ED8C8;
}

View File

@ -1,103 +1,116 @@
#include "global.h"
void BgCheck2_UpdateActorPosition(CollisionContext* colCtx, s32 bgId, Actor* actor) {
MtxF prevMatrix;
MtxF prevMatrixInv;
MtxF currMatrix;
Vec3f newPos;
Vec3f posWithInv;
/**
* Update the `carriedActor`'s position based on the dynapoly actor identified by `bgId`.
*/
void DynaPolyActor_UpdateCarriedActorPos(CollisionContext* colCtx, s32 bgId, Actor* carriedActor) {
MtxF prevTransform;
MtxF prevTransformInv;
MtxF curTransform;
Vec3f pos;
Vec3f tempPos;
if (!DynaPoly_IsBgIdBgActor(bgId)) {
return;
}
SkinMatrix_SetScaleRotateYRPTranslate(
&prevMatrix, colCtx->dyna.bgActors[bgId].prevTransform.scale.x,
&prevTransform, colCtx->dyna.bgActors[bgId].prevTransform.scale.x,
colCtx->dyna.bgActors[bgId].prevTransform.scale.y, colCtx->dyna.bgActors[bgId].prevTransform.scale.z,
colCtx->dyna.bgActors[bgId].prevTransform.rot.x, colCtx->dyna.bgActors[bgId].prevTransform.rot.y,
colCtx->dyna.bgActors[bgId].prevTransform.rot.z, colCtx->dyna.bgActors[bgId].prevTransform.pos.x,
colCtx->dyna.bgActors[bgId].prevTransform.pos.y, colCtx->dyna.bgActors[bgId].prevTransform.pos.z);
if (SkinMatrix_Invert(&prevMatrix, &prevMatrixInv) == 2) {
if (SkinMatrix_Invert(&prevTransform, &prevTransformInv) == 2) {
return;
}
SkinMatrix_SetScaleRotateYRPTranslate(
&currMatrix, colCtx->dyna.bgActors[bgId].curTransform.scale.x, colCtx->dyna.bgActors[bgId].curTransform.scale.y,
colCtx->dyna.bgActors[bgId].curTransform.scale.z, colCtx->dyna.bgActors[bgId].curTransform.rot.x,
colCtx->dyna.bgActors[bgId].curTransform.rot.y, colCtx->dyna.bgActors[bgId].curTransform.rot.z,
colCtx->dyna.bgActors[bgId].curTransform.pos.x, colCtx->dyna.bgActors[bgId].curTransform.pos.y,
colCtx->dyna.bgActors[bgId].curTransform.pos.z);
&curTransform, colCtx->dyna.bgActors[bgId].curTransform.scale.x,
colCtx->dyna.bgActors[bgId].curTransform.scale.y, colCtx->dyna.bgActors[bgId].curTransform.scale.z,
colCtx->dyna.bgActors[bgId].curTransform.rot.x, colCtx->dyna.bgActors[bgId].curTransform.rot.y,
colCtx->dyna.bgActors[bgId].curTransform.rot.z, colCtx->dyna.bgActors[bgId].curTransform.pos.x,
colCtx->dyna.bgActors[bgId].curTransform.pos.y, colCtx->dyna.bgActors[bgId].curTransform.pos.z);
SkinMatrix_Vec3fMtxFMultXYZ(&prevMatrixInv, &actor->world.pos, &posWithInv);
SkinMatrix_Vec3fMtxFMultXYZ(&currMatrix, &posWithInv, &newPos);
// Apply the movement of the dynapoly actor `bgId` over the last frame to the `carriedActor` position
// pos = curTransform * prevTransformInv * pos
// Note (curTransform * prevTransformInv) represents the transform relative to the previous frame
SkinMatrix_Vec3fMtxFMultXYZ(&prevTransformInv, &carriedActor->world.pos, &tempPos);
SkinMatrix_Vec3fMtxFMultXYZ(&curTransform, &tempPos, &pos);
actor->world.pos = newPos;
carriedActor->world.pos = pos;
}
void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 bgId, Actor* actor) {
s16 angleChange;
/**
* Update the `carriedActor`'s Y rotation based on the dynapoly actor identified by `bgId`.
*/
void DynaPolyActor_UpdateCarriedActorRotY(CollisionContext* colCtx, s32 bgId, Actor* carriedActor) {
s16 rotY;
if (!DynaPoly_IsBgIdBgActor(bgId)) {
return;
}
angleChange = colCtx->dyna.bgActors[bgId].curTransform.rot.y - colCtx->dyna.bgActors[bgId].prevTransform.rot.y;
rotY = colCtx->dyna.bgActors[bgId].curTransform.rot.y - colCtx->dyna.bgActors[bgId].prevTransform.rot.y;
if (actor->id == 0) {
((Player*)actor)->currentYaw += angleChange;
if (carriedActor->id == ACTOR_PLAYER) {
((Player*)carriedActor)->currentYaw += rotY;
}
actor->shape.rot.y += angleChange;
actor->world.rot.y += angleChange;
carriedActor->shape.rot.y += rotY;
carriedActor->world.rot.y += rotY;
}
void BgCheck2_AttachToMesh(CollisionContext* colCtx, Actor* actor, s32 bgId) {
DynaPolyActor* meshActor;
void DynaPolyActor_AttachCarriedActor(CollisionContext* colCtx, Actor* carriedActor, s32 bgId) {
DynaPolyActor* dynaActor;
if (!DynaPoly_IsBgIdBgActor(bgId)) {
return;
}
meshActor = DynaPoly_GetActor(colCtx, bgId);
if (meshActor != NULL) {
DynaPolyActor_SetRidingFallingState(meshActor);
dynaActor = DynaPoly_GetActor(colCtx, bgId);
if (dynaActor != NULL) {
DynaPolyActor_SetActorOnTop(dynaActor);
if ((actor->flags & 0x4000000) == 0x4000000) {
DynaPolyActor_SetSwitchPressedState(meshActor);
if (CHECK_FLAG_ALL(carriedActor->flags, ACTOR_FLAG_CAN_PRESS_SWITCH)) {
DynaPolyActor_SetActorOnSwitch(dynaActor);
}
if ((actor->flags & 0x20000) == 0x20000) {
DynaPolyActor_SetHeavySwitchPressedState(meshActor);
if (CHECK_FLAG_ALL(carriedActor->flags, ACTOR_FLAG_CAN_PRESS_HEAVY_SWITCH)) {
DynaPolyActor_SetActorOnHeavySwitch(dynaActor);
}
}
}
u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 bgId, Actor* actor) {
u32 wasUpdated = 0;
DynaPolyActor* meshActor;
/**
* Update the `carriedActor`'s position and Y rotation based on the dynapoly actor identified by `bgId`, according to
* the dynapoly actor's move flags (see `DYNA_TRANSFORM_POS` and `DYNA_TRANSFORM_ROT_Y`).
*/
u32 DynaPolyActor_TransformCarriedActor(CollisionContext* colCtx, s32 bgId, Actor* carriedActor) {
u32 wasUpdated = false;
DynaPolyActor* dynaActor;
if (!DynaPoly_IsBgIdBgActor(bgId)) {
return 0;
return false;
}
if (colCtx->dyna.bgActorFlags[bgId] & 2 || !(colCtx->dyna.bgActorFlags[bgId] & 1)) {
return 0;
if ((colCtx->dyna.bgActorFlags[bgId] & BGACTOR_1) || !(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) {
return false;
}
meshActor = DynaPoly_GetActor(colCtx, bgId);
dynaActor = DynaPoly_GetActor(colCtx, bgId);
if (meshActor == NULL) {
return 0;
if (dynaActor == NULL) {
return false;
}
if (meshActor->flags & 1) {
BgCheck2_UpdateActorPosition(colCtx, bgId, actor);
wasUpdated = 1;
if (dynaActor->transformFlags & DYNA_TRANSFORM_POS) {
DynaPolyActor_UpdateCarriedActorPos(colCtx, bgId, carriedActor);
wasUpdated = true;
}
if (meshActor->flags & 2) {
BgCheck2_UpdateActorYRotation(colCtx, bgId, actor);
wasUpdated = 1;
if (dynaActor->transformFlags & DYNA_TRANSFORM_ROT_Y) {
DynaPolyActor_UpdateCarriedActorRotY(colCtx, bgId, carriedActor);
wasUpdated = true;
}
return wasUpdated;

View File

@ -1,18 +1,15 @@
#include "global.h"
#define DYNAPOLY_STATE_NONE 0
#define DYNAPOLY_STATE_RIDING_FALLING (1 << 0)
#define DYNAPOLY_STATE_RIDING_MOVING (1 << 1)
#define DYNAPOLY_STATE_RIDING_ROTATING (1 << 2)
#define DYNAPOLY_STATE_SWITCH_PRESSED (1 << 3)
#define DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED (1 << 4)
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) {
/**
* @param transformFlags How other actors standing on the dynapoly actor's collision move when the dynapoly actor moves.
* See `DYNA_TRANSFORM_POS`, `DYNA_TRANSFORM_ROT_Y`.
*/
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 transformFlags) {
dynaActor->bgId = -1;
dynaActor->pushForce = 0.0f;
dynaActor->unk14C = 0.0f;
dynaActor->flags = flags;
dynaActor->stateFlags = DYNAPOLY_STATE_NONE;
dynaActor->transformFlags = transformFlags;
dynaActor->interactFlags = 0;
}
void DynaPolyActor_LoadMesh(PlayState* play, DynaPolyActor* dynaActor, CollisionHeader* meshHeader) {
@ -22,80 +19,80 @@ void DynaPolyActor_LoadMesh(PlayState* play, DynaPolyActor* dynaActor, Collision
dynaActor->bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &dynaActor->actor, header);
}
void DynaPolyActor_ResetState(DynaPolyActor* dynaActor) {
dynaActor->stateFlags = DYNAPOLY_STATE_NONE;
void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor) {
dynaActor->interactFlags = 0;
}
void DynaPolyActor_SetRidingFallingState(DynaPolyActor* dynaActor) {
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_FALLING;
void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor) {
dynaActor->interactFlags |= DYNA_INTERACT_ACTOR_ON_TOP;
}
void DynaPolyActor_SetRidingMovingState(DynaPolyActor* dynaActor) {
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_MOVING;
void DynaPolyActor_SetPlayerOnTop(DynaPolyActor* dynaActor) {
dynaActor->interactFlags |= DYNA_INTERACT_PLAYER_ON_TOP;
}
void DynaPolyActor_SetRidingMovingStateByIndex(CollisionContext* colCtx, s32 bgId) {
void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 bgId) {
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, bgId);
if (dynaActor != NULL) {
DynaPolyActor_SetRidingMovingState(dynaActor);
DynaPolyActor_SetPlayerOnTop(dynaActor);
}
}
void DynaPolyActor_SetRidingRotatingState(DynaPolyActor* dynaActor) {
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_ROTATING;
void DynaPolyActor_SetPlayerAbove(DynaPolyActor* dynaActor) {
dynaActor->interactFlags |= DYNA_INTERACT_PLAYER_ABOVE;
}
void DynaPolyActor_SetRidingRotatingStateByIndex(CollisionContext* colCtx, s32 bgId) {
void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 bgId) {
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, bgId);
if (dynaActor != NULL) {
DynaPolyActor_SetRidingRotatingState(dynaActor);
DynaPolyActor_SetPlayerAbove(dynaActor);
}
}
void DynaPolyActor_SetSwitchPressedState(DynaPolyActor* dynaActor) {
dynaActor->stateFlags |= DYNAPOLY_STATE_SWITCH_PRESSED;
void DynaPolyActor_SetActorOnSwitch(DynaPolyActor* dynaActor) {
dynaActor->interactFlags |= DYNA_INTERACT_ACTOR_ON_SWITCH;
}
void DynaPolyActor_SetHeavySwitchPressedState(DynaPolyActor* dynaActor) {
dynaActor->stateFlags |= DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED;
void DynaPolyActor_SetActorOnHeavySwitch(DynaPolyActor* dynaActor) {
dynaActor->interactFlags |= DYNA_INTERACT_ACTOR_ON_HEAVY_SWITCH;
}
s32 DynaPolyActor_IsInRidingFallingState(DynaPolyActor* dynaActor) {
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_FALLING) {
s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor) {
if (dynaActor->interactFlags & DYNA_INTERACT_ACTOR_ON_TOP) {
return true;
} else {
return false;
}
}
s32 DynaPolyActor_IsInRidingMovingState(DynaPolyActor* dynaActor) {
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_MOVING) {
s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor) {
if (dynaActor->interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) {
return true;
} else {
return false;
}
}
s32 DynaPolyActor_IsInRidingRotatingState(DynaPolyActor* dynaActor) {
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_ROTATING) {
s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor) {
if (dynaActor->interactFlags & DYNA_INTERACT_PLAYER_ABOVE) {
return true;
} else {
return false;
}
}
s32 DynaPolyActor_IsInSwitchPressedState(DynaPolyActor* dynaActor) {
if (dynaActor->stateFlags & DYNAPOLY_STATE_SWITCH_PRESSED) {
s32 DynaPolyActor_IsSwitchPressed(DynaPolyActor* dynaActor) {
if (dynaActor->interactFlags & DYNA_INTERACT_ACTOR_ON_SWITCH) {
return true;
} else {
return false;
}
}
s32 DynaPolyActor_IsInHeavySwitchPressedState(DynaPolyActor* dynaActor) {
if (dynaActor->stateFlags & DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED) {
s32 DynaPolyActor_IsHeavySwitchPressed(DynaPolyActor* dynaActor) {
if (dynaActor->interactFlags & DYNA_INTERACT_ACTOR_ON_HEAVY_SWITCH) {
return true;
} else {
return false;
@ -129,13 +126,16 @@ s32 DynaPolyActor_ValidateMove(PlayState* play, DynaPolyActor* dynaActor, s16 st
&bgId, &dynaActor->actor, 0.0f)) {
return false;
}
startPos.x = (dynaActor->actor.world.pos.x * 2.0f) - startPos.x;
startPos.z = (dynaActor->actor.world.pos.z * 2.0f) - startPos.z;
endPos.x = sign * adjustedEndRadius * sin + startPos.x;
endPos.z = sign * adjustedEndRadius * cos + startPos.z;
if (BgCheck_EntityLineTest3(&play->colCtx, &startPos, &endPos, &intersectionPos, &poly, true, false, false, true,
&bgId, &dynaActor->actor, 0.0f)) {
return false;
}
return true;
}

View File

@ -1665,7 +1665,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)) {
return NULL;
}
return colCtx->dyna.bgActors[bgId].colHeader;
@ -2719,8 +2719,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;
}
@ -2733,7 +2733,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;
return bgId;
}
@ -2741,51 +2741,51 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
* Gets the actor assigned to `bgId`
*/
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_800C62BC(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_800C6314(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_800C636C(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_800C63C4(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;
}
}
void func_800C641C(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
void DynaPoly_DisableFloorCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
if (DynaPoly_IsBgIdBgActor(bgId)) {
dyna->bgActorFlags[bgId] |= 0x20;
dyna->bgActorFlags[bgId] |= BGACTOR_FLOOR_COLLISION_DISABLED;
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
}
}
void func_800C6474(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
void DynaPoly_EnableFloorCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
if (DynaPoly_IsBgIdBgActor(bgId)) {
dyna->bgActorFlags[bgId] &= ~0x20;
dyna->bgActorFlags[bgId] &= ~BGACTOR_FLOOR_COLLISION_DISABLED;
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
}
}
@ -2804,11 +2804,11 @@ 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_800C6554(PlayState* play, DynaCollisionContext* dyna) {
void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna) {
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
}
@ -2865,8 +2865,8 @@ void BgCheck_CalcWaterboxDimensions(Vec3f* minPos, Vec3f* maxXPos, Vec3f* maxZPo
/**
* original name: DynaPolyInfo_expandSRT
*/
void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex, s32* polyStartIndex,
s32* waterBoxStartIndex) {
void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex,
s32* polyStartIndex, s32* waterBoxStartIndex) {
Actor* actor;
s32 i;
s32 j;
@ -2899,7 +2899,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;
}
@ -2929,13 +2929,13 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s
s16 normalY = poly->normal.y;
if (normalY > COLPOLY_SNORMAL(0.5f)) {
if (!(dyna->bgActorFlags[bgId] & 0x20)) {
if (!(dyna->bgActorFlags[bgId] & BGACTOR_FLOOR_COLLISION_DISABLED)) {
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,
@ -3091,16 +3091,16 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s
*waterBoxStartIndex += pbgdata->numWaterBoxes;
}
void BgCheck_ResetFlagsIfLoadedActor(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)) {
DynaPolyActor_ResetState((DynaPolyActor*)actor);
return;
DynaPolyActor_UnsetAllInteractFlags((DynaPolyActor*)actor);
break;
}
}
}
@ -3109,7 +3109,7 @@ void BgCheck_ResetFlagsIfLoadedActor(PlayState* play, DynaCollisionContext* dyna
/**
* original name: DynaPolyInfo_setup
*/
void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) {
void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) {
DynaPolyActor* actor;
s32 vtxStartIndex;
s32 polyStartIndex;
@ -3123,7 +3123,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
dyna->bgActorFlags[i] = 0;
BgActor_Init(play, &dyna->bgActors[i]);
@ -3146,8 +3146,8 @@ void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) {
polyStartIndex = 0;
waterBoxStartIndex = 0;
for (i = 0; i < BG_ACTOR_MAX; i++) {
if ((dyna->bgActorFlags[i] & 1) && !(dyna->bgActorFlags[i] & 2)) {
DynaPoly_ExpandSRT(play, dyna, i, &vtxStartIndex, &polyStartIndex, &waterBoxStartIndex);
if ((dyna->bgActorFlags[i] & BGACTOR_IN_USE) && !(dyna->bgActorFlags[i] & BGACTOR_1)) {
DynaPoly_AddBgActorToLookup(play, dyna, i, &vtxStartIndex, &polyStartIndex, &waterBoxStartIndex);
}
}
dyna->bitFlag &= ~DYNAPOLY_INVALIDATE_LOOKUP;
@ -3165,7 +3165,8 @@ void func_800C756C(DynaCollisionContext* dyna, s32* numPolygons, s32* numVertice
*numWaterBoxes = 0;
for (i = 0; i < BG_ACTOR_MAX; i++) {
if ((dyna->bgActorFlags[i] & 1) && !(dyna->bgActorFlags[i] & 2) && !(dyna->bgActorFlags[i] & 4)) {
if ((dyna->bgActorFlags[i] & BGACTOR_IN_USE) && !(dyna->bgActorFlags[i] & BGACTOR_1) &&
!(dyna->bgActorFlags[i] & BGACTOR_COLLISION_DISABLED)) {
colHeader = dyna->bgActors[i].colHeader;
*numPolygons += colHeader->numPolygons;
*numVertices += colHeader->numVertices;
@ -3181,7 +3182,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]);
}
}
@ -3275,7 +3276,8 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) {
*dynaRaycast->bgId = BGCHECK_SCENE;
for (i = 0; i < BG_ACTOR_MAX; i++) {
if (!(dynaRaycast->colCtx->dyna.bgActorFlags[i] & 1) || (dynaRaycast->colCtx->dyna.bgActorFlags[i] & 2)) {
if (!(dynaRaycast->colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) ||
(dynaRaycast->colCtx->dyna.bgActorFlags[i] & BGACTOR_1)) {
continue;
}
@ -3328,7 +3330,7 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) {
if (!pauseState) {
pauseState = dynaRaycast->play->pauseCtx.debugEditor != DEBUG_EDITOR_NONE;
}
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[(u16)dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].dynaLookup.polyStartIndex];
@ -3587,7 +3589,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) || (colCtx->dyna.bgActorFlags[i] & 2)) {
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) || (colCtx->dyna.bgActorFlags[i] & BGACTOR_1)) {
continue;
}
if ((colCtx->dyna.bgActors + i)->actor == actor) {
@ -3709,7 +3711,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) || (colCtx->dyna.bgActorFlags[i] & 2)) {
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) || (colCtx->dyna.bgActorFlags[i] & BGACTOR_1)) {
continue;
}
if (actor == colCtx->dyna.bgActors[i].actor) {
@ -3855,7 +3857,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) && !(colCtx->dyna.bgActorFlags[i] & 2)) {
if ((colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) && !(colCtx->dyna.bgActorFlags[i] & BGACTOR_1)) {
if (actor != colCtx->dyna.bgActors[i].actor) {
ay = posA->y;
by = posB->y;
@ -3964,7 +3966,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) || (colCtx->dyna.bgActorFlags[i] & 2)) {
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) || (colCtx->dyna.bgActorFlags[i] & BGACTOR_1)) {
continue;
}
if (colCtx->dyna.bgActors[i].actor == actor) {
@ -4019,7 +4021,7 @@ void BgCheck_InitCollisionHeaders(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);
}
@ -4399,7 +4401,8 @@ s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f3
}
for (i = 0; i < BG_ACTOR_MAX; i++) {
if (!(colCtx->dyna.bgActorFlags[i] & 1) || (colCtx->dyna.bgActorFlags[i] & 4)) {
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) ||
(colCtx->dyna.bgActorFlags[i] & BGACTOR_COLLISION_DISABLED)) {
continue;
}
bgActor = &colCtx->dyna.bgActors[i];
@ -4484,8 +4487,8 @@ s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos,
for (i = 0; i < BG_ACTOR_MAX; i++) {
if (!(colCtx->dyna.bgActorFlags[i] & 1) || (colCtx->dyna.bgActorFlags[i] & 4) ||
(colCtx->dyna.bgActorFlags[i] & 2)) {
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) ||
(colCtx->dyna.bgActorFlags[i] & BGACTOR_COLLISION_DISABLED) || (colCtx->dyna.bgActorFlags[i] & BGACTOR_1)) {
continue;
}
bgActor = &colCtx->dyna.bgActors[i];
@ -4618,7 +4621,7 @@ s32 func_800CA6F0(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32*
}
}
for (i = 0; i < BG_ACTOR_MAX; i++) {
if (!(colCtx->dyna.bgActorFlags[i] & 1) || (colCtx->dyna.bgActorFlags[i] & 2)) {
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) || (colCtx->dyna.bgActorFlags[i] & BGACTOR_1)) {
continue;
}
bgActor = &colCtx->dyna.bgActors[i];

View File

@ -3,7 +3,7 @@
#define FLAGS \
(ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000 | ACTOR_FLAG_2000000 | \
ACTOR_FLAG_4000000 | ACTOR_FLAG_80000000)
ACTOR_FLAG_CAN_PRESS_SWITCH | ACTOR_FLAG_80000000)
ActorFunc sPlayerCallInitFunc;
ActorFunc sPlayerCallDestroyFunc;

View File

@ -100,7 +100,7 @@ void BgAstrBombwall_Init(Actor* thisx, PlayState* play) {
BgAstrBombwall* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_astr_obj_Colheader_002498);
Collider_InitTris(play, &this->collider);
if (Flags_GetSwitch(play, BGASTRBOMBWALL_GET_SWITCHFLAG(thisx))) {
@ -181,7 +181,7 @@ void func_80C0A418(BgAstrBombwall* this, PlayState* play) {
}
void func_80C0A458(BgAstrBombwall* this, PlayState* play) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
func_80C0A120(this, play);
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);

View File

@ -75,7 +75,7 @@ void BgCraceMovebg_Init(Actor* thisx, PlayState* play) {
sHasInitializedIsLoaded = true;
}
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &gDekuShrineSlidingDoorCol);
this->index = BG_CRACE_MOVEBG_GET_INDEX(&this->dyna.actor);

View File

@ -127,12 +127,12 @@ void BgCtowerGear_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
}
if (type == BGCTOWERGEAR_WATER_WHEEL) {
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &gClockTowerWaterWheelCol);
} else if (type == BGCTOWERGEAR_ORGAN) {
DynaPolyActor_Init(&this->dyna, 0);
DynaPolyActor_LoadMesh(play, &this->dyna, &gClockTowerOrganCol);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
@ -167,15 +167,20 @@ void BgCtowerGear_UpdateOrgan(Actor* thisx, PlayState* play) {
switch (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 104)]->action) {
case 1:
this->dyna.actor.draw = NULL;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
break;
case 2:
this->dyna.actor.draw = BgCtowerGear_DrawOrgan;
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
break;
case 3:
Actor_Kill(&this->dyna.actor);
break;
default:
break;
}
}
}

View File

@ -46,7 +46,7 @@ void BgCtowerRot_Init(Actor* thisx, PlayState* play) {
Vec3f offset;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if (this->dyna.actor.params == BGCTOWERROT_CORRIDOR) {
DynaPolyActor_LoadMesh(play, &this->dyna, &gClockTowerCorridorCol);
this->actionFunc = BgCtowerRot_CorridorRotate;

View File

@ -317,7 +317,7 @@ void BgDblueBalance_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.update = sTypeInfo[sp2C].update;
this->dyna.actor.draw = sTypeInfo[sp2C].draw;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, sTypeInfo[sp2C].colHeader);
if (sp2C == 3) {
@ -412,17 +412,17 @@ void func_80B82DE0(BgDblueBalance* this, PlayState* play) {
phi_a1 = 1;
this->unk_17D = 20;
if (balance1 != NULL) {
if (balance1->unk_181 != 0) {
if (balance1->isHeavySwitchPressed) {
phi_a0 = 4;
} else if (balance1->unk_180 != 0) {
} else if (balance1->isSwitchPressed) {
phi_a0 = 2;
}
}
if (balance2 != NULL) {
if (balance2->unk_181 != 0) {
if (balance2->isHeavySwitchPressed) {
phi_a1 = 5;
} else if (balance2->unk_180 != 0) {
} else if (balance2->isSwitchPressed) {
phi_a1 = 3;
}
}
@ -546,8 +546,8 @@ void BgDblueBalance_Update(Actor* thisx, PlayState* play) {
void func_80B8330C(Actor* thisx, PlayState* play) {
BgDblueBalance* this = THIS;
this->unk_180 = DynaPolyActor_IsInSwitchPressedState(&this->dyna);
this->unk_181 = DynaPolyActor_IsInHeavySwitchPressedState(&this->dyna);
this->isSwitchPressed = DynaPolyActor_IsSwitchPressed(&this->dyna);
this->isHeavySwitchPressed = DynaPolyActor_IsHeavySwitchPressed(&this->dyna);
}
void func_80B83344(BgDblueBalance* this) {

View File

@ -33,8 +33,8 @@ typedef struct BgDblueBalance {
/* 0x17D */ s8 unk_17D;
/* 0x17E */ s8 unk_17E;
/* 0x17F */ s8 unk_17F;
/* 0x180 */ s8 unk_180;
/* 0x181 */ s8 unk_181;
/* 0x180 */ s8 isSwitchPressed;
/* 0x181 */ s8 isHeavySwitchPressed;
/* 0x182 */ s8 unk_182;
/* 0x183 */ u8 unk_183;
/* 0x184 */ s16 unk_184;

View File

@ -163,7 +163,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
this->unk_160 = BGDBLUEMOVEBG_GET_F(thisx);
this->unk_1BC = BGDBLUEMOVEBG_GET_F000(thisx);
this->unk_1C0 = BGDBLUEMOVEBG_GET_FF0(thisx);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if ((this->unk_160 == 9) || (this->unk_160 == 8)) {
if (D_80A2BBF4.unk_00 != 0) {

View File

@ -161,7 +161,7 @@ void BgDkjailIvy_BeginCutscene(BgDkjailIvy* this, PlayState* play) {
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
this->fadeOutTimer = 50;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
Flags_SetSwitch(play, BG_DKJAIL_GET_SWITCH(&this->dyna.actor));
BgDkjailIvy_IvyCutEffects(this, play);
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_GRASS_WALL_BROKEN);

View File

@ -228,7 +228,7 @@ void BgF40Block_Init(Actor* thisx, PlayState* play) {
BgF40Block* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_f40_obj_Colheader_004640);
if (BGF40BLOCK_GET_PATH(&this->dyna.actor) != 0x3F) {

View File

@ -41,7 +41,7 @@ void BgF40Flift_Init(Actor* thisx, PlayState* play) {
BgF40Flift* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_f40_obj_Colheader_004240);
this->dyna.actor.params = 1;
this->actionFunc = func_808D75F0;
@ -54,8 +54,8 @@ void BgF40Flift_Destroy(Actor* thisx, PlayState* play) {
}
void func_808D75F0(BgF40Flift* this, PlayState* play) {
if (((this->dyna.actor.params == 1) && (DynaPolyActor_IsInRidingMovingState(&this->dyna))) ||
((this->dyna.actor.params == -1) && (!DynaPolyActor_IsInRidingMovingState(&this->dyna)))) {
if (((this->dyna.actor.params == 1) && DynaPolyActor_IsPlayerOnTop(&this->dyna)) ||
((this->dyna.actor.params == -1) && !DynaPolyActor_IsPlayerOnTop(&this->dyna))) {
this->timer = 96;
this->actionFunc = func_808D7714;
} else {

View File

@ -56,7 +56,7 @@ void BgF40Switch_CheckAll(BgF40Switch* this, PlayState* play) {
if (actor->id == ACTOR_BG_F40_SWITCH && actor->room == this->dyna.actor.room && actor->update != NULL) {
actorAsSwitch = (BgF40Switch*)actor;
actorAsSwitch->wasPressed = actorAsSwitch->isPressed;
isPressed = DynaPolyActor_IsInSwitchPressedState(&actorAsSwitch->dyna);
isPressed = DynaPolyActor_IsSwitchPressed(&actorAsSwitch->dyna);
if (actorAsSwitch->isPressed && actorAsSwitch->actionFunc == BgF40Switch_IdlePressed) {
// Switch is fully pressed - if there's nothing keeping it pressed, wait a short time before
// reverting to unpressed state.
@ -112,7 +112,7 @@ void BgF40Switch_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.scale.y = 0.165f;
this->actionFunc = BgF40Switch_IdleUnpressed;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 1.0f;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_f40_switch_Colheader_000118);
if (!sBgF40SwitchGlobalsInitialized) {
sBgF40SwitchLastUpdateFrame = play->gameplayFrames;

View File

@ -34,7 +34,7 @@ void BgFuKaiten_Init(Actor* thisx, PlayState* play) {
CollisionHeader* header = NULL;
Actor_SetScale(thisx, 1.0);
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
CollisionHeader_GetVirtual(&object_fu_kaiten_Colheader_002D30, &header);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, header);

View File

@ -34,7 +34,7 @@ void BgFuMizu_Init(Actor* thisx, PlayState* play) {
CollisionHeader* colHeader = NULL;
Actor_SetScale(&this->dyna.actor, 1.0f);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
CollisionHeader_GetVirtual(&object_fu_kaiten_Colheader_0037F8, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
this->unk_160 = 0;

View File

@ -152,7 +152,7 @@ void BgGoronOyu_Init(Actor* thisx, PlayState* play) {
CollisionHeader* colHeader = NULL;
Actor_SetScale(&this->dyna.actor, 0.1f);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
CollisionHeader_GetVirtual(&object_oyu_Colheader_000988, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);

View File

@ -202,7 +202,7 @@ void BgHakaBombwall_PlayCutscene(BgHakaBombwall* this, PlayState* play) {
this->dyna.actor.draw = NULL;
Flags_SetSwitch(play, BGHAKABOMBWALL_GET_7F(&this->dyna.actor));
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 0x3C, NA_SE_EV_WALL_BROKEN);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
BgHakaBombwall_SetupEndCutscene(this);
} else {
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);

View File

@ -49,7 +49,7 @@ void BgHakaCurtain_Init(Actor* thisx, PlayState* play) {
BgHakaCurtain* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_haka_obj_Colheader_001588);
if (Flags_GetClear(play, this->dyna.actor.room)) {
func_80B6DE80(this);

View File

@ -45,7 +45,7 @@ void BgHakaTomb_Init(Actor* thisx, PlayState* play) {
BgHakaTomb* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_haka_obj_Colheader_000EE8);
SubS_FillCutscenesList(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
func_80BD6624(this);

View File

@ -369,7 +369,7 @@ s32 func_80ABCC00(BgHakuginBombwall* this, PlayState* play) {
return true;
}
}
} else if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
} else if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 50, NA_SE_EV_WALL_BROKEN);
return true;
}
@ -401,7 +401,7 @@ void func_80ABCD98(BgHakuginBombwall* this, PlayState* play) {
this->dyna.actor.draw = NULL;
this->unk_1AC = 20;
Flags_SetSwitch(play, BGHAKUGIN_BOMBWALL_SWITCHFLAG(&this->dyna.actor));
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = func_80ABCE60;
} else {
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);

View File

@ -703,7 +703,7 @@ void BgHakuginPost_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.world.rot.z = 0;
this->dyna.actor.shape.rot.x = 0;
this->dyna.actor.shape.rot.z = 0;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_hakugin_obj_Colheader_00D3B0);
func_80A9B3BC(this, play);
func_80A9CA94(this);

View File

@ -126,7 +126,7 @@ void BgHakuginSwitch_Init(Actor* thisx, PlayState* play) {
sp30 = false;
}
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_goronswitch_Colheader_0005C8);
Collider_InitCylinder(play, &this->collider);
@ -244,7 +244,7 @@ void func_80B15B74(BgHakuginSwitch* this, PlayState* play) {
if (sp34) {
this->collider.base.acFlags &= ~AC_HIT;
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
sp24 = true;
sp20 = sp28;
}
@ -306,7 +306,7 @@ void func_80B15E78(BgHakuginSwitch* this, PlayState* play) {
BgHakuginSwitchStruct* sp20 = &D_80B1688C[BGHAKUGINSWITCH_GET_7(&this->dyna.actor)];
if (Math_StepToF(&this->dyna.actor.world.pos.y, sp20->unk_4 + this->dyna.actor.home.pos.y, sp20->unk_C)) {
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10);
}
func_80B15F3C(this, play);
@ -413,7 +413,7 @@ void func_80B162AC(BgHakuginSwitch* this, PlayState* play) {
if (sp34) {
this->collider.base.acFlags &= ~AC_HIT;
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
sp24 = true;
sp28 = true;
}
@ -446,7 +446,7 @@ void func_80B163C4(BgHakuginSwitch* this, PlayState* play) {
void func_80B16400(BgHakuginSwitch* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y,
(this->dyna.actor.home.pos.y + 2.0f) - (1800.0f * this->dyna.actor.scale.y), 10.0f)) {
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10);
}
func_80B16494(this, play);
@ -510,8 +510,8 @@ void BgHakuginSwitch_Update(Actor* thisx, PlayState* play) {
if (this->unk_1C0 != 0) {
f32 phi_f0;
if (DynaPolyActor_IsInSwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsInHeavySwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
if (DynaPolyActor_IsHeavySwitchPressed(&this->dyna)) {
phi_f0 = (sp24 - -10.0f) * -0.21f;
} else {
phi_f0 = (sp24 - -3.0f) * -0.08f;

View File

@ -150,7 +150,7 @@ void BgIcicle_Shiver(BgIcicle* this, PlayState* play) {
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = BgIcicle_Fall;
} else {
rand = Rand_ZeroOne();
@ -175,7 +175,7 @@ void BgIcicle_Fall(BgIcicle* this, PlayState* play) {
if (this->dyna.actor.params == ICICLE_STALACTITE_REGROW) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 120.0f;
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = BgIcicle_Regrow;
} else {
Actor_Kill(&this->dyna.actor);
@ -216,7 +216,7 @@ void BgIcicle_UpdateAttacked(BgIcicle* this, PlayState* play) {
if (this->dyna.actor.params == ICICLE_STALACTITE_REGROW) {
BgIcicle_Break(this, play, 40.0f);
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 120.0f;
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = BgIcicle_Regrow;
return;
}

View File

@ -184,9 +184,9 @@ void BgIkanaBlock_Init(Actor* thisx, PlayState* play) {
BgIkanaBlock* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &gameplay_dangeon_keep_Colheader_007498);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->unk_15C = Lib_SegmentedToVirtual(gameplay_dangeon_keep_Matanimheader_01B370);
this->unk_174 = this->dyna.actor.shape.rot;
func_80B7ED54(this);
@ -211,7 +211,7 @@ void func_80B7F034(BgIkanaBlock* this, PlayState* play) {
}
if (func_80B7EEB4(this, play)) {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = func_80B7F564;
func_80B7F0A4(this);
}

View File

@ -335,7 +335,7 @@ void func_80BD503C(BgIkanaBombwall* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 60, NA_SE_EV_WALL_BROKEN);
Flags_SetSwitch(play, BGIKANABOMBWALL_GET_SWITCHFLAG(&this->dyna.actor));
if (!BGIKANABOMBWALL_GET_100(&this->dyna.actor)) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
func_80BD5118(this);
} else {

View File

@ -714,7 +714,7 @@ void BgIkanaRotaryroom_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.shape.rot.x = 0;
}
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, D_80B82218[sp34]);
Collider_InitJntSph(play, &this->collider);

View File

@ -62,11 +62,11 @@ s32 func_80C0A740(BgIkninSusceil* this, PlayState* play) {
}
void func_80C0A804(BgIkninSusceil* this, PlayState* play) {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
void func_80C0A838(BgIkninSusceil* this, PlayState* play) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
void func_80C0A86C(BgIkninSusceil* this, PlayState* play, s16 verticalMag, s16 countdown, s32 arg4) {
@ -115,7 +115,7 @@ void BgIkninSusceil_Init(Actor* thisx, PlayState* play) {
BgIkninSusceil* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_ikninside_obj_Colheader_00CBAC);
this->animatedTexture = Lib_SegmentedToVirtual(object_ikninside_obj_Matanimheader_00C670);
func_80C0AC74(this);

View File

@ -121,7 +121,7 @@ void func_80C072D0(BgIkninside* this, PlayState* play) {
Flags_SetSwitch(play, DMIKNINSIDE_GET_SWITCH(&this->dyna.actor));
this->actionFunc = func_80C07230;
this->dyna.actor.draw = NULL;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
this->timer = 20;
}

View File

@ -237,7 +237,7 @@ void func_809541B8(BgIngate* this, PlayState* play) {
this->actionFunc = func_809543D4;
}
}
} else if (!DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
this->unk160 |= 4;
}
}
@ -322,7 +322,7 @@ void BgIngate_Init(Actor* thisx, PlayState* play2) {
Vec3f sp20;
if (BgIngate_FindActor(this, play, ACTORCAT_BG, ACTOR_BG_INGATE) == NULL) {
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &gSichitaiBoatCol);
this->unk160 = 0;
this->unk160 |= 0x8;

View File

@ -39,7 +39,7 @@ void BgInibsMovebg_Init(Actor* thisx, PlayState* play) {
BgInibsMovebg* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
this->opaDList = sOpaDLists[BG_INIBS_MOVEBG_GET_MODE(thisx)];
this->xluDList = sXluDLists[BG_INIBS_MOVEBG_GET_MODE(thisx)];

View File

@ -187,7 +187,7 @@ void BgKin2Bombwall_PlayCutscene(BgKin2Bombwall* this, PlayState* play) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
Flags_SetSwitch(play, BG_KIN2_BOMBWALL_SWITCH_FLAG(&this->dyna.actor));
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 60, NA_SE_EV_WALL_BROKEN);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
BgKin2Bombwall_SpawnEffects(this, play);
BgKin2Bombwall_SetupEndCutscene(this);

View File

@ -162,7 +162,7 @@ void BgKin2Picture_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 0);
DynaPolyActor_LoadMesh(play, &this->dyna, &gOceanSpiderHouseSkullkidPaintingCol);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
Collider_InitTris(play, &this->colliderTris);
Collider_SetTris(play, &this->colliderTris, &this->dyna.actor, &sTrisInit, this->colliderElement);
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
@ -317,7 +317,7 @@ void BgKin2Picture_Fall(BgKin2Picture* this, PlayState* play) {
ActorCutscene_Stop(this->dyna.actor.cutscene);
}
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WOODPLATE_BROKEN);
BgKin2Picture_SetupDoNothing(this);
} else {

View File

@ -207,7 +207,7 @@ void BgKin2Shelf_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.flags |= ACTOR_FLAG_10000000;
}
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, D_80B70780[sp24]);
func_80B700A8(this);
}

View File

@ -75,7 +75,7 @@ void BgLadder_Init(Actor* thisx, PlayState* play) {
} else {
// Otherwise, the ladder doesn't draw; wait for the flag to be set
this->alpha = 5;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
this->action = BgLadder_Wait;
}
@ -113,7 +113,7 @@ void BgLadder_FadeIn(BgLadder* this, PlayState* play) {
if (this->alpha >= 255) {
this->alpha = 255;
ActorCutscene_Stop(this->dyna.actor.cutscene);
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.flags &= ~ACTOR_FLAG_10; // always update = off
this->action = BgLadder_DoNothing;
}

View File

@ -149,7 +149,7 @@ void BgLastBwall_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, D_80C18AC8);
this->type = BGLASTBWALL_GET_TYPE(&this->dyna.actor);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, D_80C18A48[this->type].colHeader);
Collider_InitTris(play, &this->colliderTris);
if (Flags_GetSwitch(play, BGLASTBWALL_GET_SWITCHFLAGS(&this->dyna.actor))) {
@ -245,7 +245,7 @@ void func_80C18884(BgLastBwall* this, PlayState* play) {
}
void func_80C188C4(BgLastBwall* this, PlayState* play) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
func_80C184EC(this, play);
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);

View File

@ -36,7 +36,7 @@ void BgLbfshot_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->dyna.actor.uncullZoneForward = 4000.0f;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_lbfshot_Colheader_0014D8);
}
void BgLbfshot_Destroy(Actor* thisx, PlayState* play) {

View File

@ -144,7 +144,7 @@ void BgNumaHana_Init(Actor* thisx, PlayState* play) {
type = BG_NUMA_HANA_GET_TYPE(&this->dyna.actor);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
if (type == BG_NUMA_HANA_TYPE_OPEN_FLOWER_COLLISION) {
DynaPolyActor_LoadMesh(play, &this->dyna, &gWoodenFlowerOpenedFlowerCol);
@ -162,7 +162,7 @@ void BgNumaHana_Init(Actor* thisx, PlayState* play) {
}
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_12_01)) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->petalZRotation = 0x2000;
this->innerPetalZRotation = 0x2000;
@ -180,7 +180,7 @@ void BgNumaHana_Init(Actor* thisx, PlayState* play) {
BgNumaHana_SetupOpenedIdle(this);
} else {
child = (DynaPolyActor*)this->dyna.actor.child;
func_800C62BC(play, &play->colCtx.dyna, child->bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, child->bgId);
Flags_UnsetSwitch(play, BG_NUMA_HANA_SWITCH_FLAG(&this->dyna.actor));
BgNumaHana_SetupClosedIdle(this);
}
@ -314,8 +314,8 @@ void BgNumaHana_RaiseFlower(BgNumaHana* this, PlayState* play) {
child = (DynaPolyActor*)this->dyna.actor.child;
// Swaps out the "closed" flower collision for the "opened" collision.
func_800C6314(play, &play->colCtx.dyna, child->bgId);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, child->bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->petalZRotation = 0x2000;
this->innerPetalZRotation = 0x2000;

View File

@ -92,7 +92,7 @@ void BgOpenShutter_Init(Actor* thisx, PlayState* play) {
BgOpenShutter* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_open_obj_Colheader_001640);
this->actionFunc = func_80ACAD88;
}

View File

@ -150,7 +150,7 @@ void BgSpdweb_Init(Actor* thisx, PlayState* play) {
this->unk_161 = 0;
this->switchFlag = BGSPDWEB_GET_SWITCHFLAG(&this->dyna.actor);
thisx->params &= 0xFF;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if (this->dyna.actor.params == BGSPDWEB_FF_0) {
Collider_InitAndSetTris(play, &this->collider, &this->dyna.actor, &sTrisInit1, this->colliderElements);
@ -297,7 +297,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
return;
}
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
sp3A = 300;
break;
}
@ -305,7 +305,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
}
}
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
temp_f12 = 2.0f * sqrtf(CLAMP_MIN(sp3A, 0));
if ((this->unk_164 < temp_f12) && (temp_f12 > 2.0f)) {
this->unk_164 = temp_f12;
@ -327,8 +327,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
Math_ApproachZeroF(&this->unk_164, 1.0f, 0.8f);
if (this->unk_162 == 4) {
if ((this->unk_161 != 0) ||
((DynaPolyActor_IsInRidingMovingState(&this->dyna) != 0) && (this->unk_164 > 2.0f))) {
if ((this->unk_161 != 0) || (DynaPolyActor_IsPlayerOnTop(&this->dyna) && (this->unk_164 > 2.0f))) {
player->actor.velocity.y = this->unk_164 * 0.7f;
player->fallStartHeight = (SQ(this->unk_164) * 0.15f) + this->dyna.actor.world.pos.y;
this->unk_161 = 0;

View File

@ -165,10 +165,10 @@ void BgUmajump_Update(Actor* thisx, PlayState* play) {
(gSaveContext.save.time <= CLOCK_TIME(6, 0)))))) {
DynaPolyActor_LoadMesh(play, &this->dyna, &object_umajump_Colheader_001558);
}
func_800C641C(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableFloorCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.update = func_8091A5A0;
} else if (this->dyna.actor.params == BG_UMAJUMP_TYPE_4) {
func_800C641C(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableFloorCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.update = Actor_Noop;
} else {
this->dyna.actor.update = Actor_Noop;

View File

@ -373,17 +373,17 @@ void DmChar01_Update(Actor* thisx, PlayState* play2) {
Player* player = GET_PLAYER(play);
if (player->actor.world.pos.y > 5.0f) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
if (DMCHAR01_GET(&this->dyna.actor) == DMCHAR01_2) {
if (this->dyna.actor.xzDistToPlayer > 600.0f) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
}

View File

@ -165,15 +165,15 @@ void DmChar08_Init(Actor* thisx, PlayState* play2) {
this->unk_1F0 = 0.0f;
if (play->sceneId == SCENE_31MISAKI) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_53_20)) {
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &gTurtleZoraCapeAwakeCol);
} else {
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &gTurtleZoraCapeAsleepCol);
}
this->dynapolyInitialized = true;
} else if (play->sceneId == SCENE_SEA) {
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &sTurtleGreatBayTempleCol);
this->dynapolyInitialized = true;
}
@ -296,7 +296,7 @@ void DmChar08_SetupAppearCs(DmChar08* this, PlayState* play) {
void func_80AAF884(DmChar08* this, PlayState* play) {
if (play->csCtx.state == CS_STATE_0) {
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &gTurtleZoraCapeAwakeCol);
this->dyna.actor.flags |= ACTOR_FLAG_1;
this->actionFunc = func_80AAF8F4;
@ -960,7 +960,7 @@ void DmChar08_UpdateCollision(DmChar08* this, PlayState* play) {
sTurtleGreatBayTempleColVertices[5].y = 0x4B0;
sTurtleGreatBayTempleColVertices[9].y = 0x6A4;
}
func_800C6554(play, &play->colCtx.dyna);
DynaPoly_InvalidateLookup(play, &play->colCtx.dyna);
}
void DmChar08_Update(Actor* thisx, PlayState* play) {
@ -988,9 +988,9 @@ void DmChar08_Update(Actor* thisx, PlayState* play) {
this->dyna.actor.world.pos.y = this->targetYPos;
if (play->sceneId == SCENE_31MISAKI) {
if (this->dyna.actor.xzDistToPlayer > 1300.0f) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
if (this->unk_1FF != 0) {

View File

@ -7,7 +7,7 @@
#include "z_dm_statue.h"
#include "objects/object_smtower/object_smtower.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_4000000)
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CAN_PRESS_SWITCH)
#define THIS ((DmStatue*)thisx)

View File

@ -512,7 +512,7 @@ void func_8088B630(EnArrow* this, PlayState* play) {
SkelAnime_Update(&this->arrow.skelAnime);
if (this->actor.wallBgId != BG_ACTOR_MAX) {
BgCheck2_UpdateActorAttachedToMesh(&play->colCtx, this->actor.wallBgId, &this->actor);
DynaPolyActor_TransformCarriedActor(&play->colCtx, this->actor.wallBgId, &this->actor);
}
if (DECR(this->unk_260) == 0) {

View File

@ -408,7 +408,7 @@ void EnBomChu_HandleNonSceneCollision(EnBomChu* this, PlayState* play) {
Math_Vec3f_Copy(&originalWorldPos, &this->actor.world.pos);
Math_Vec3f_Copy(&originalAxisUp, &this->axisUp);
yaw = this->actor.shape.rot.y;
BgCheck2_UpdateActorAttachedToMesh(&play->colCtx, this->actor.floorBgId, &this->actor);
DynaPolyActor_TransformCarriedActor(&play->colCtx, this->actor.floorBgId, &this->actor);
if (yaw != this->actor.shape.rot.y) {
yaw = this->actor.shape.rot.y - yaw;

View File

@ -213,7 +213,7 @@ void EnBox_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.world.rot.x = 0x7FFF;
this->collectableFlag = 0;
} else {
func_800C636C(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCeilingCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->collectableFlag = (this->dyna.actor.world.rot.x & 0x7F);
this->dyna.actor.world.rot.x = 0;
}
@ -228,7 +228,7 @@ void EnBox_Init(Actor* thisx, PlayState* play) {
animFrame = animFrameEnd;
} else if (((this->type == ENBOX_TYPE_BIG_SWITCH_FLAG_FALL) || (this->type == ENBOX_TYPE_SMALL_SWITCH_FLAG_FALL)) &&
!Flags_GetSwitch(play, this->switchFlag)) {
func_800C62BC(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;
}
@ -240,7 +240,7 @@ void EnBox_Init(Actor* thisx, PlayState* play) {
} else if (((this->type == ENBOX_TYPE_BIG_ROOM_CLEAR) || (this->type == ENBOX_TYPE_SMALL_ROOM_CLEAR)) &&
!Flags_GetClear(play, this->dyna.actor.room)) {
EnBox_SetupAction(this, EnBox_AppearOnRoomClear);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
if (this->movementFlags & ENBOX_MOVE_0x80) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 50.0f;
} else {
@ -254,7 +254,7 @@ void EnBox_Init(Actor* thisx, PlayState* play) {
} else if (((this->type == ENBOX_TYPE_BIG_SWITCH_FLAG) || (this->type == ENBOX_TYPE_SMALL_SWITCH_FLAG)) &&
!Flags_GetSwitch(play, this->switchFlag)) {
EnBox_SetupAction(this, EnBox_AppearSwitchFlag);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
if (this->movementFlags & ENBOX_MOVE_0x80) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 50.0f;
} else {
@ -377,7 +377,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, PlayState* play) {
Actor_SetClosestSecretDistance(&this->dyna.actor, play);
if (this->unk_1A0 >= 0) {
EnBox_SetupAction(this, EnBox_Fall);
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else if (this->unk_1A0 >= -11) {
this->unk_1A0++;
} else if (Flags_GetSwitch(play, this->switchFlag)) {
@ -422,7 +422,7 @@ void func_80868AFC(EnBox* this, PlayState* play) {
}
void func_80868B74(EnBox* this, PlayState* play) {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
if (this->unk_1A0 < 0) {
this->unk_1A0++;
} else if (this->unk_1A0 < 40) {

View File

@ -104,7 +104,7 @@ void EnDnb_Init(Actor* thisx, PlayState* play) {
s32 i;
s16* alloc;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_hanareyama_obj_Colheader_004D8C);
alloc = Lib_SegmentedToVirtual(object_hanareyama_obj_Vec_004710);

View File

@ -775,7 +775,7 @@ void func_80962F4C(EnFu* this, PlayState* play) {
Message_StartTextbox(play, 0x288B, &this->actor);
}
if ((!DynaPolyActor_IsInRidingRotatingState((DynaPolyActor*)this->actor.child) &&
if ((!DynaPolyActor_IsPlayerAbove((DynaPolyActor*)this->actor.child) &&
(player->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) ||
(gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] <= SECONDS_TO_TIMER(0)) || (this->unk_548 == this->unk_54C)) {
player->stateFlags3 &= ~PLAYER_STATE3_400000;

View File

@ -86,7 +86,7 @@ void EnFuKago_Init(Actor* thisx, PlayState* play) {
CollisionHeader* sp34 = NULL;
Actor* npc = play->actorCtx.actorLists[ACTORCAT_NPC].first;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
CollisionHeader_GetVirtual(&object_fu_mato_Colheader_0015C0, &sp34);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, sp34);
Actor_SetScale(&this->dyna.actor, 0.1f);
@ -228,7 +228,7 @@ void func_80ACFA78(EnFuKago* this, PlayState* play) {
this->unk_33A = 1;
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WOODBOX_BREAK);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = func_80AD0028;
}

View File

@ -75,7 +75,7 @@ void EnFuMato_Init(Actor* thisx, PlayState* play) {
Actor* actor = play->actorCtx.actorLists[ACTORCAT_NPC].first;
EnFu* fu;
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
CollisionHeader_GetVirtual(&object_fu_mato_Colheader_0023D4, &sp2C);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, sp2C);
Actor_SetScale(&this->dyna.actor, 0.1f);

View File

@ -1161,7 +1161,7 @@ void EnMushi2_Update(Actor* thisx, PlayState* play) {
if ((temp != BGCHECK_SCENE) &&
((this->actionFunc == func_80A6A5C0) || (this->actionFunc == func_80A6A824) ||
(this->actionFunc == func_80A6A9E4) || (this->actionFunc == func_80A6B0D8)) &&
BgCheck2_UpdateActorAttachedToMesh(&play->colCtx, temp, &this->actor)) {
DynaPolyActor_TransformCarriedActor(&play->colCtx, temp, &this->actor)) {
func_80A68F24(this);
}

View File

@ -310,7 +310,7 @@ void EnRaf_Idle(EnRaf* this, PlayState* play) {
if (this->timer == 0) {
if ((player->transformation != PLAYER_FORM_DEKU) &&
(this->dyna.actor.xzDistToPlayer < (BREG(48) + 80.0f) && (player->invincibilityTimer == 0) &&
DynaPolyActor_IsInRidingMovingState(&this->dyna) && !(player->stateFlags1 & PLAYER_STATE1_8000000) &&
DynaPolyActor_IsPlayerOnTop(&this->dyna) && !(player->stateFlags1 & PLAYER_STATE1_8000000) &&
play->grabPlayer(play, player))) {
player->actor.parent = &this->dyna.actor;
this->grabTarget = EN_RAF_GRAB_TARGET_PLAYER;
@ -710,7 +710,7 @@ void EnRaf_Update(Actor* thisx, PlayState* play) {
return;
}
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
if ((this->heightDiffFromPlayer > -0.1f) && !this->isCurrentlyInRidingMovingState) {
this->heightDiffFromPlayer = -20.0f;
this->isCurrentlyInRidingMovingState = true;

View File

@ -495,7 +495,7 @@ void EnRat_HandleNonSceneCollision(EnRat* this, PlayState* play) {
f32 cos;
f32 tempX;
BgCheck2_UpdateActorAttachedToMesh(&play->colCtx, this->actor.floorBgId, &this->actor);
DynaPolyActor_TransformCarriedActor(&play->colCtx, this->actor.floorBgId, &this->actor);
if (yaw != this->actor.shape.rot.y) {
yaw = this->actor.shape.rot.y - yaw;

View File

@ -10,7 +10,7 @@
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_mask_ki_tan/object_mask_ki_tan.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_4000000)
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CAN_PRESS_SWITCH)
#define THIS ((EnTest3*)thisx)

View File

@ -63,17 +63,14 @@ static Gfx* sShellDLists[] = {
void EnTorch2_Init(Actor* thisx, PlayState* play) {
EnTorch2* this = THIS;
s16 params;
Actor_ProcessInitChain(&this->actor, sInitChain);
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
// params: which form Link is in (e.g. human, deku, etc.)
params = this->actor.params;
if (params != TORCH2_PARAM_DEKU) {
this->actor.flags |= ACTOR_FLAG_4000000; // Can press switch
if (params == TORCH2_PARAM_GORON) {
this->actor.flags |= ACTOR_FLAG_20000; // Can press heavy switches
if (this->actor.params != TORCH2_PARAM_DEKU) {
this->actor.flags |= ACTOR_FLAG_CAN_PRESS_SWITCH;
if (this->actor.params == TORCH2_PARAM_GORON) {
this->actor.flags |= ACTOR_FLAG_CAN_PRESS_HEAVY_SWITCH;
}
}
this->framesUntilNextState = 20;

View File

@ -63,7 +63,7 @@ void EnTwig_Init(Actor* thisx, PlayState* play2) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->unk_160 = RACERING_GET_PARAM_F(&this->dyna.actor);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if (sColHeaders[this->unk_160] != NULL) {
DynaPolyActor_LoadMesh(play, &this->dyna, sColHeaders[this->unk_160]);
}
@ -72,6 +72,7 @@ void EnTwig_Init(Actor* thisx, PlayState* play2) {
case 0:
Actor_Kill(&this->dyna.actor);
break;
case 1:
if (!sRingsHaveSpawned) {
sRingCount = CHECK_WEEKEVENTREG(WEEKEVENTREG_24_04) ? 25 : 20;
@ -91,14 +92,18 @@ void EnTwig_Init(Actor* thisx, PlayState* play2) {
}
Actor_SetScale(&this->dyna.actor, 4.2f);
this->dyna.actor.uncullZoneScale = this->dyna.actor.uncullZoneDownward = this->dyna.actor.scale.x * 60.0f;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
func_80AC0A7C(this, play);
break;
case 2:
Actor_SetScale(&this->dyna.actor, 1.0f);
this->dyna.actor.uncullZoneScale = this->dyna.actor.uncullZoneDownward = this->dyna.actor.scale.x * 880.0f;
func_80AC0A54(this, play);
break;
default:
break;
}
}
@ -149,9 +154,9 @@ void func_80AC0AC8(EnTwig* this, PlayState* play) {
}
} else {
if (this->dyna.actor.xyzDistToPlayerSq <= SQ((this->dyna.actor.scale.x * 40.0f) + 40)) {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
if (this->dyna.actor.xyzDistToPlayerSq >= (this->dyna.actor.scale.x * 10.0f * 40.0f * 40.0f)) {
this->dyna.actor.shape.rot.y = this->dyna.actor.yawTowardsPlayer;
@ -165,7 +170,7 @@ void func_80AC0CC4(EnTwig* this, PlayState* play) {
this->unk_170 = 3458.0f;
this->unk_174 = 0.2f;
this->unk_16C |= 1;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = func_80AC0D2C;
}

View File

@ -7,7 +7,7 @@
#include "z_obj_armos.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_4000000)
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_CAN_PRESS_SWITCH)
#define THIS ((ObjArmos*)thisx)

View File

@ -365,7 +365,7 @@ void ObjBean_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->unk_1FE = 0;
this->unk_1B8 = 0.1f;
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
Collider_InitCylinder(play, &this->collider);
if ((sp2C == ENOBJBEAN_GET_C000_1) || (sp2C == ENOBJBEAN_GET_C000_2)) {
@ -414,7 +414,7 @@ void ObjBean_Init(Actor* thisx, PlayState* play) {
if (OBJBEAN_GET_80(&this->dyna.actor) || Flags_GetSwitch(play, OBJBEAN_GET_7F(&this->dyna.actor, 1))) {
func_80938804(this);
} else {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
func_80938704(this);
}
}
@ -765,7 +765,7 @@ void func_80938804(ObjBean* this) {
}
void func_80938834(ObjBean* this, PlayState* play) {
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
func_80938874(this);
}
func_80936F24(this);
@ -784,7 +784,7 @@ void func_809388A8(ObjBean* this, PlayState* play) {
func_80937268(this, play);
func_809372A8(this);
func_8093892C(this);
} else if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
} else if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
func_800B9010(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG);
}
func_80936F24(this);
@ -797,7 +797,7 @@ void func_8093892C(ObjBean* this) {
}
void func_80938958(ObjBean* this, PlayState* play) {
if (!DynaPolyActor_IsInRidingRotatingState(&this->dyna)) {
if (!DynaPolyActor_IsPlayerAbove(&this->dyna)) {
func_80938804(this);
}
func_80936F24(this);
@ -810,7 +810,7 @@ void func_80938998(ObjBean* this) {
}
void func_809389BC(ObjBean* this, PlayState* play) {
if (!DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
func_80937268(this, play);
func_809372A8(this);
func_80937238(this);
@ -851,9 +851,9 @@ void func_80938AD8(ObjBean* this, PlayState* play) {
}
if (sp30 != 0) {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
if (this->dyna.actor.xzDistToPlayer < 74.0f) {
@ -925,7 +925,7 @@ void ObjBean_Update(Actor* thisx, PlayState* play) {
this->dyna.actor.shape.shadowScale = this->dyna.actor.scale.x * 88.0f;
if (func_80937468(this, play)) {
func_809375F4(this, play);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
func_80938998(this);
}
} else {

View File

@ -61,7 +61,7 @@ void ObjBoat_Init(Actor* thisx, PlayState* play) {
Vec3f sp24;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_kaizoku_obj_Colheader_009A88);
if (thisx->params < 0) {
this->dyna.actor.update = ObjBoat_UpdateCutscene;
@ -95,14 +95,14 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) {
s32 pad;
ObjBoat* this = THIS;
Player* player = GET_PLAYER(play);
s32 temp = DynaPolyActor_IsInRidingMovingState(&this->dyna);
s32 isPlayerOnTop = DynaPolyActor_IsPlayerOnTop(&this->dyna);
f32 speedTarget = 0.0f;
s16 yawTarget = this->dyna.actor.shape.rot.y;
Vec3f nextPoint;
if (temp || ((DynaPolyActor_IsInRidingFallingState(&this->dyna)))) {
if (isPlayerOnTop || DynaPolyActor_IsActorOnTop(&this->dyna)) {
if ((this->timer == 0) &&
(OBJBOAT_GET_4000(thisx) || (temp && (this->curPointIndex == this->lastPointIndex)))) {
(OBJBOAT_GET_4000(thisx) || (isPlayerOnTop && (this->curPointIndex == this->lastPointIndex)))) {
this->direction = -this->direction;
if (this->direction > 0) {
this->lastPointIndex = this->maxPointIndex;

View File

@ -49,7 +49,7 @@ void func_809B1550(Actor* thisx, PlayState* play) {
thisx->world.pos.x = (Math_SinS(thisx->shape.rot.y) * sp18) + thisx->home.pos.x;
thisx->world.pos.z = (Math_CosS(thisx->shape.rot.y) * sp18) + thisx->home.pos.z;
} else {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}

View File

@ -54,7 +54,7 @@ void ObjDanpeilift_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.world.rot.x = 0;
this->dyna.actor.shape.rot.z = 0;
this->dyna.actor.world.rot.z = 0;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_obj_danpeilift_Colheader_000BA0);
if (this->dyna.bgId == BG_ACTOR_MAX) {
Actor_Kill(&this->dyna.actor);
@ -130,7 +130,7 @@ void ObjDanpeilift_Move(ObjDanpeilift* this, PlayState* play) {
if ((this->points[0].x != endPoint->x) || (this->points[0].y != endPoint->y) ||
(this->points[0].z != endPoint->z)) {
this->actionFunc = ObjDanpeilift_Teleport;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
isPosUpdated = false;
}
}
@ -143,9 +143,9 @@ void ObjDanpeilift_Move(ObjDanpeilift* this, PlayState* play) {
}
void ObjDanpeilift_Teleport(ObjDanpeilift* this, PlayState* play) {
if (!DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
ObjDanpeilift_UpdatePosition(this, this->curPoint);
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = ObjDanpeilift_Move;
}
}
@ -170,20 +170,20 @@ void ObjDanpeilift_Update(Actor* thisx, PlayState* play) {
ActorCutscene_Stop(this->dyna.actor.cutscene);
}
}
if (OBJDANPEILIFT_SHOULD_REACT_TO_WEIGHT(thisx)) {
if (OBJDANPEILIFT_REACT_TO_PLAYER_ON_TOP(thisx)) {
f32 target;
this->isWeightOnPrev = this->isWeightOn;
this->isWeightOn = DynaPolyActor_IsInRidingMovingState(&this->dyna) ? 1 : 0;
if ((this->isWeightOn != this->isWeightOnPrev) && (this->maxHeight < 1.0f)) {
this->isPlayerOnTopPrev = this->isPlayerOnTop;
this->isPlayerOnTop = DynaPolyActor_IsPlayerOnTop(&this->dyna) ? true : false;
if ((this->isPlayerOnTop != this->isPlayerOnTopPrev) && (this->maxHeight < 1.0f)) {
this->cycle = -0x8000;
this->maxHeight = 6.0f;
}
this->cycle += 0xCE4;
Math_StepToF(&this->maxHeight, 0.0f, 0.12f);
step = this->isWeightOn ? Math_CosS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f
: Math_SinS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f;
target = this->isWeightOn ? -8.0f : 0.0f;
step = this->isPlayerOnTop ? Math_CosS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f
: Math_SinS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f;
target = this->isPlayerOnTop ? -8.0f : 0.0f;
Math_StepToF(&this->cycleSpeed, target, step);
this->dyna.actor.shape.yOffset = ((Math_SinS(this->cycle) * this->maxHeight) + this->cycleSpeed) * 10.0f;
}

View File

@ -13,7 +13,7 @@ typedef void (*ObjDanpeiliftActionFunc)(struct ObjDanpeilift*, PlayState*);
#define OBJDANPEILIFT_GET_PATH(thisx) ((thisx)->params & 0x7F)
#define OBJDANPEILIFT_SHOULD_TELEPORT(thisx) (((thisx)->params >> 0xC) & 1)
#define OBJDANPEILIFT_GET_SPEED(thisx) ((thisx)->home.rot.z * 0.1f)
#define OBJDANPEILIFT_SHOULD_REACT_TO_WEIGHT(thisx) (((thisx)->params >> 0xE) & 1)
#define OBJDANPEILIFT_REACT_TO_PLAYER_ON_TOP(thisx) (((thisx)->params >> 0xE) & 1)
typedef struct ObjDanpeilift {
/* 0x000 */ DynaPolyActor dyna;
@ -23,8 +23,8 @@ typedef struct ObjDanpeilift {
/* 0x168 */ s32 curPoint;
/* 0x16C */ s32 direction;
/* 0x170 */ Vec3s* points;
/* 0x174 */ s32 isWeightOn;
/* 0x178 */ s32 isWeightOnPrev;
/* 0x174 */ s32 isPlayerOnTop;
/* 0x178 */ s32 isPlayerOnTopPrev;
/* 0x17C */ f32 cycleSpeed;
/* 0x180 */ f32 maxHeight;
/* 0x184 */ s16 cycle;

View File

@ -441,7 +441,7 @@ void func_80B13940(ObjDhouse* this, PlayState* play2) {
if (sp20) {
func_80B12A88(&this->dyna.actor);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = func_80B13C08;
this->dyna.actor.flags |= ACTOR_FLAG_20;
func_80B139D8(this);

View File

@ -389,7 +389,7 @@ void func_80A671E0(ObjDriftice* this, PlayState* play) {
if ((this->unk_16C[0].x != points->x) || (this->unk_16C[0].y != points->y) ||
(this->unk_16C[0].z != points->z)) {
func_80A6743C(this);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
sp30 = false;
}
}
@ -408,7 +408,7 @@ void func_80A6743C(ObjDriftice* this) {
void func_80A67450(ObjDriftice* this, PlayState* play) {
if (this->unk_248 < 0) {
func_80A66570(this, this->unk_164);
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
func_80A671CC(this);
}
}
@ -429,7 +429,7 @@ void func_80A674C4(ObjDriftice* this, PlayState* play) {
void ObjDriftice_Update(Actor* thisx, PlayState* play) {
ObjDriftice* this = THIS;
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
if (this->unk_248 < 0) {
this->unk_248 = 1;
} else {

View File

@ -154,7 +154,7 @@ void ObjEtcetera_Idle(ObjEtcetera* this, PlayState* play) {
this->oscillationTimer = minOscillationTimer;
}
} else {
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
if (!(this->burrowFlag & 1)) {
// Player is walking onto the Deku Flower, or falling on it from a height
this->oscillationTimer = 10;
@ -187,7 +187,7 @@ void ObjEtcetera_Idle(ObjEtcetera* this, PlayState* play) {
}
void ObjEtcetera_PlayRustleAnimation(ObjEtcetera* this, PlayState* play) {
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
this->burrowFlag |= 1;
} else {
this->burrowFlag &= ~1;
@ -209,11 +209,11 @@ void ObjEtcetera_PlayRustleAnimation(ObjEtcetera* this, PlayState* play) {
void ObjEtcetera_DoBounceOscillation(ObjEtcetera* this, PlayState* play) {
// In order to match, we are seemingly required to access scale.x at one point
// without using this. We can create a thisx or dyna pointer to achieve that, but
// it's more likely they used dyna given that DynaPolyActor_IsInRidingMovingState takes a DynaPolyActor.
// it's more likely they used dyna given that DynaPolyActor_IsPlayerOnTop takes a DynaPolyActor.
DynaPolyActor* dyna = &this->dyna;
f32 scaleTemp;
if (DynaPolyActor_IsInRidingMovingState(dyna)) {
if (DynaPolyActor_IsPlayerOnTop(dyna)) {
this->burrowFlag |= 1;
} else {
this->burrowFlag &= ~1;
@ -260,7 +260,7 @@ void ObjEtcetera_Setup(ObjEtcetera* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->objIndex)) {
this->dyna.actor.objBankIndex = this->objIndex;
Actor_SetObjectDependency(play, &this->dyna.actor);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
thisCollisionHeader = collisionHeaders[type];
if (thisCollisionHeader != NULL) {
CollisionHeader_GetVirtual(thisCollisionHeader, &colHeader);

View File

@ -154,7 +154,7 @@ void ObjGhaka_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, D_80B3C96C);
Actor_SetScale(&this->dyna.actor, 0.1f);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
CollisionHeader_GetVirtual(&object_ghaka_Colheader_003CD0, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_4);

View File

@ -106,7 +106,7 @@ void ObjHakaisi_Init(Actor* thisx, PlayState* play) {
return;
}
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
CollisionHeader_GetVirtual(&object_hakaisi_Colheader_002FC4, &sp7C);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, sp7C);
@ -201,7 +201,7 @@ void func_80B1456C(ObjHakaisi* this, PlayState* play) {
}
if (this->dyna.actor.colChkInfo.health < 30) {
func_80B145F4(this);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}

View File

@ -70,7 +70,7 @@ void ObjHgdoor_Init(Actor* thisx, PlayState* play) {
CollisionHeader* header = NULL;
Actor_SetScale(&this->dyna.actor, 0.1f);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if (OBJHGDOOR_IS_RIGHT_DOOR(&this->dyna.actor)) {
CollisionHeader_GetVirtual(&object_hgdoor_Colheader_001D10, &header);
} else {

View File

@ -45,7 +45,7 @@ void ObjHsStump_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->isHidden = OBJHSSTUMP_GET_ISHIDDEN(thisx);
this->switchFlag = OBJHSSTUMP_GET_SWITCHFLAG(thisx);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_hsstump_Colheader_0011B0);
switch (this->isHidden) {
case true:
@ -54,10 +54,15 @@ void ObjHsStump_Init(Actor* thisx, PlayState* play) {
} else {
this->dyna.actor.draw = NULL;
Actor_SetScale(&this->dyna.actor, 0.0f);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
// fallthrough
case false:
ObjHsStump_SetupIdle(this, play);
break;
default:
break;
}
}
@ -124,7 +129,7 @@ void ObjHsStump_Appear(ObjHsStump* this, PlayState* play) {
}
if (this->dyna.actor.scale.x == (18.0f * 0.01f)) {
this->isHidden = false;
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
ObjHsStump_SetupIdle(this, play);
}
this->framesAppeared++;

View File

@ -120,7 +120,7 @@ void func_80B9C5E8(ObjHunsui* this, PlayState* play) {
if ((this->dyna.actor.xzDistToPlayer < (45.0f * this->dyna.actor.scale.x * 10.0f)) &&
(this->dyna.actor.playerHeightRel < -21.0f)) {
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
this->unk_172 &= ~8;
this->unk_19C = 0.0f;
this->unk_1A0 = 0.0f;
@ -205,7 +205,7 @@ void ObjHunsui_Init(Actor* thisx, PlayState* play) {
this->unk_160 = OBJHUNSUI_GET_F000(thisx);
this->unk_164 = OBJHUNSUI_GET_F80(thisx);
this->unk_168 = OBJHUNSUI_GET_7F(thisx);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if ((this->unk_160 != OBJHUNSUI_F000_5) && (this->unk_160 != OBJHUNSUI_F000_6)) {
DynaPolyActor_LoadMesh(play, &this->dyna, &object_hunsui_Colheader_000C74);
@ -616,7 +616,7 @@ void func_80B9D714(ObjHunsui* this, PlayState* play) {
}
}
if (!DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
if (this->dyna.actor.xzDistToPlayer < 45.0f) {
if ((this->dyna.actor.playerHeightRel < -this->dyna.actor.velocity.y) &&
(this->dyna.actor.playerHeightRel >= -800.0f)) {

View File

@ -643,7 +643,7 @@ s32 func_80A24954(ObjIceblock* this, PlayState* play) {
void func_80A24A48(ObjIceblock* this, PlayState* play) {
if (!(this->unk_1B0 & 0x10) && !(this->collider.base.ocFlags1 & OC1_HIT)) {
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->unk_1B0 |= 0x10;
}
}
@ -921,9 +921,9 @@ void ObjIceblock_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y;
}
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &gIceBlockCol);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
@ -1427,7 +1427,7 @@ void ObjIceblock_Update(Actor* thisx, PlayState* play) {
}
}
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
if (this->unk_1B0 & 0x20) {
this->unk_1B0 &= ~0x40;
} else {

View File

@ -8,7 +8,7 @@
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "objects/object_kibako/object_kibako.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_4000000)
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_CAN_PRESS_SWITCH)
#define THIS ((ObjKibako*)thisx)
@ -349,7 +349,7 @@ void ObjKibako_Held(ObjKibako* this, PlayState* play) {
} else {
Actor_MoveWithGravity(&this->actor);
ObjKibako_SetupThrown(this);
this->actor.flags &= ~ACTOR_FLAG_4000000;
this->actor.flags &= ~ACTOR_FLAG_CAN_PRESS_SWITCH;
}
Actor_UpdateBgCheckInfo(play, &this->actor, 18.0f, 15.0f, 0.0f,
UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_40);

View File

@ -211,7 +211,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_10;
func_800C62BC(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) {

View File

@ -41,7 +41,7 @@ void ObjKzsaku_Init(Actor* thisx, PlayState* play) {
CollisionHeader* col = NULL;
Actor_SetScale(&this->dyna.actor, 1.0f);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
CollisionHeader_GetVirtual(&object_kzsaku_Colheader_001118, &col);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, col);

View File

@ -100,7 +100,7 @@ void ObjLift_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.shape.rot.z = 0;
this->unk_178 = this->dyna.actor.home.rot.z;
this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if ((this->unk_178 <= 0) && (Flags_GetSwitch(play, OBJLIFT_GET_7F(&this->dyna.actor)))) {
Actor_Kill(&this->dyna.actor);
return;
@ -129,7 +129,7 @@ void func_8093D7A0(ObjLift* this, PlayState* play) {
s32 pad;
s16 quakeIndex;
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
if (this->timer <= 0) {
if (OBJLIFT_GET_7(&this->dyna.actor) == 7) {
func_8093D9C0(this);
@ -194,7 +194,7 @@ void func_8093DA48(ObjLift* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 20, NA_SE_EV_BOX_BREAK);
if (this->unk_178 > 0) {
func_8093DB70(this);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
Flags_SetSwitch(play, OBJLIFT_GET_7F(&this->dyna.actor));
Actor_Kill(&this->dyna.actor);
@ -212,7 +212,7 @@ void func_8093DB90(ObjLift* this, PlayState* play) {
if (this->timer <= 0) {
Math_Vec3f_Copy(&this->dyna.actor.world.pos, &this->dyna.actor.home.pos);
this->dyna.actor.world.rot = this->dyna.actor.shape.rot = this->dyna.actor.home.rot;
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
func_8093D760(this);
}
}

View File

@ -178,7 +178,7 @@ void func_80AF3C34(ObjLightblock* this, PlayState* play) {
} else {
this->alpha = 0;
this->dyna.actor.draw = NULL;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
}

View File

@ -55,7 +55,7 @@ void ObjLupygamelift_Init(Actor* thisx, PlayState* play) {
this->timer = 0;
Actor_UpdateBgCheckInfo(play, thisx, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_4);
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawSquare, 0.0f);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_raillift_Colheader_0048D0);
this->targetSpeedXZ = thisx->home.rot.z * 0.1f;
if (this->targetSpeedXZ < 0.0f) {

View File

@ -62,7 +62,7 @@ void ObjOcarinalift_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.world.rot.x = 0;
this->dyna.actor.shape.rot.z = 0;
this->dyna.actor.world.rot.z = 0;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_raillift_Colheader_0048D0);
this->unk160 = thisx->home.rot.z * 0.1f;
if (this->unk160 < 0.01f) {
@ -153,7 +153,7 @@ void func_80AC96D0(ObjOcarinalift* this, PlayState* play) {
if (((this->unk170->x != temp_v1_2->x) || (this->unk170->y != temp_v1_2->y)) ||
(this->unk170->z != temp_v1_2->z)) {
func_80AC99C0(this);
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
sp34 = false;
} else if ((paramsC == OBJOCARINALIFT_PARAMSC_1) && (this->unk168 == OBJOCARINALIFT_GET_1F(thisx))) {
func_80AC9AB8(this);
@ -173,9 +173,9 @@ void func_80AC99C0(ObjOcarinalift* this) {
}
void func_80AC99D4(ObjOcarinalift* this, PlayState* play) {
if (!DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
func_80AC94C0(this, this->unk168);
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
if ((OBJOCARINALIFT_GET_C(&this->dyna.actor) == OBJOCARINALIFT_PARAMSC_1) &&
(this->unk168 == OBJOCARINALIFT_GET_1F(&this->dyna.actor))) {
func_80AC9AB8(this);
@ -205,7 +205,7 @@ void func_80AC9AE0(ObjOcarinalift* this, PlayState* play) {
if (func_800B8718(&this->dyna.actor, &play->state)) {
func_80152434(play, 1);
func_80AC9B48(this);
} else if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
} else if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
func_800B8804(&this->dyna.actor, play, 40.0f);
}
}

View File

@ -196,7 +196,7 @@ void ObjOshihiki_SetColor(ObjOshihiki* this, PlayState* play) {
void ObjOshihiki_Init(Actor* thisx, PlayState* play) {
ObjOshihiki* this = THIS;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if ((OBJOSHIHIKI_GET_FF00(&this->dyna.actor) >= OBJOSHIHIKI_FF00_0) &&
(OBJOSHIHIKI_GET_FF00(&this->dyna.actor) < OBJOSHIHIKI_FF00_80)) {
@ -439,8 +439,8 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
} else {
dyna = DynaPoly_GetActor(&play->colCtx, this->floorBgIds[this->highestFloor]);
if (dyna != NULL) {
DynaPolyActor_SetRidingFallingState(dyna);
DynaPolyActor_SetSwitchPressedState(dyna);
DynaPolyActor_SetActorOnTop(dyna);
DynaPolyActor_SetActorOnSwitch(dyna);
if ((this->timer <= 0) && (fabsf(this->dyna.pushForce) > 0.001f) &&
ObjOshihiki_StrongEnough(this, play) && ObjOshihiki_NoSwitchPress(this, dyna, play) &&
!ObjOshihiki_CheckWall(play, this->dyna.yRotation, this->dyna.pushForce, this)) {
@ -456,9 +456,9 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
ObjOshihiki_SetupFall(this, play);
} else {
dyna = DynaPoly_GetActor(&play->colCtx, this->floorBgIds[this->highestFloor]);
if ((dyna != NULL) && (dyna->flags & 1)) {
DynaPolyActor_SetRidingFallingState(dyna);
DynaPolyActor_SetSwitchPressedState(dyna);
if ((dyna != NULL) && (dyna->transformFlags & DYNA_TRANSFORM_POS)) {
DynaPolyActor_SetActorOnTop(dyna);
DynaPolyActor_SetActorOnSwitch(dyna);
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
} else {
ObjOshihiki_SetupFall(this, play);

View File

@ -8,7 +8,7 @@
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "objects/object_secom_obj/object_secom_obj.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_4000000)
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_CAN_PRESS_SWITCH)
#define THIS ((ObjPzlblock*)thisx)

View File

@ -66,7 +66,7 @@ void ObjRaillift_Init(Actor* thisx, PlayState* play) {
thisx->world.rot.x = 0;
thisx->shape.rot.z = 0;
thisx->world.rot.z = 0;
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, sColHeaders[type]);
this->speed = OBJRAILLIFT_GET_SPEED(thisx);
if (this->speed < 0.0f) {
@ -164,7 +164,7 @@ void ObjRaillift_Move(ObjRaillift* this, PlayState* play) {
if ((this->points[0].x != endPoint->x) || (this->points[0].y != endPoint->y) ||
(this->points[0].z != endPoint->z)) {
this->actionFunc = ObjRaillift_Teleport;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
isPosUpdated = false;
}
}
@ -180,9 +180,9 @@ void ObjRaillift_Move(ObjRaillift* this, PlayState* play) {
Will teleport to what ever curpoint is set to
*/
void ObjRaillift_Teleport(ObjRaillift* this, PlayState* play) {
if (!DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
ObjRaillift_UpdatePosition(this, this->curPoint);
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->actionFunc = ObjRaillift_Move;
}
}
@ -226,24 +226,20 @@ void ObjRaillift_Update(Actor* thisx, PlayState* play) {
ActorCutscene_Stop(this->dyna.actor.cutscene);
}
}
if (OBJRAILLIFT_SHOULD_REACT_TO_WEIGHT(thisx)) {
if (OBJRAILLIFT_REACT_TO_PLAYER_ON_TOP(thisx)) {
s32 requiredScopeTemp;
this->isWeightOnPrev = this->isWeightOn;
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
this->isWeightOn = true;
} else {
this->isWeightOn = false;
}
if ((this->isWeightOn != this->isWeightOnPrev) && (this->maxHeight < 1.0f)) {
this->isPlayerOnTopPrev = this->isPlayerOnTop;
this->isPlayerOnTop = DynaPolyActor_IsPlayerOnTop(&this->dyna) ? true : false;
if ((this->isPlayerOnTop != this->isPlayerOnTopPrev) && (this->maxHeight < 1.0f)) {
this->cycle = -0x8000;
this->maxHeight = 6.0f;
}
this->cycle += 0xCE4;
Math_StepToF(&this->maxHeight, 0.0f, 0.12f);
step = this->isWeightOn ? Math_CosS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f
: Math_SinS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f;
target = this->isWeightOn ? -8.0f : 0.0f;
step = this->isPlayerOnTop ? Math_CosS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f
: Math_SinS(fabsf(this->cycleSpeed) * 2048.0f) + 0.02f;
target = this->isPlayerOnTop ? -8.0f : 0.0f;
Math_StepToF(&this->cycleSpeed, target, step);
this->dyna.actor.shape.yOffset = ((Math_SinS(this->cycle) * this->maxHeight) + this->cycleSpeed) * 10.0f;
}

View File

@ -14,7 +14,7 @@ typedef void (*ObjRailliftActionFunc)(struct ObjRaillift*, PlayState*);
#define OBJRAILLIFT_GET_STARTING_POINT(thisx) (((thisx)->params >> 7) & 0x1F)
#define OBJRAILLIFT_GET_SPEED(thisx) ((thisx)->home.rot.z * 0.1f)
#define OBJRAILLIFT_SHOULD_TELEPORT(thisx) (((thisx)->params >> 0xC) & 1)
#define OBJRAILLIFT_SHOULD_REACT_TO_WEIGHT(thisx) (((thisx)->params >> 0xE) & 1)
#define OBJRAILLIFT_REACT_TO_PLAYER_ON_TOP(thisx) (((thisx)->params >> 0xE) & 1)
typedef enum {
/* 0 */ OOT_WATER_TEMPLE_WATERFALL_PLATFORM,
@ -29,8 +29,8 @@ typedef struct ObjRaillift {
/* 0x168 */ s32 curPoint;
/* 0x16C */ s32 direction; // +1 for forward, -1 for backward
/* 0x170 */ Vec3s* points;
/* 0x174 */ s32 isWeightOn;
/* 0x178 */ s32 isWeightOnPrev;
/* 0x174 */ s32 isPlayerOnTop;
/* 0x178 */ s32 isPlayerOnTopPrev;
/* 0x17C */ f32 cycleSpeed;
/* 0x180 */ f32 maxHeight;
/* 0x184 */ s16 cycle;

View File

@ -111,7 +111,7 @@ void ObjRotlift_Init(Actor* thisx, PlayState* play2) {
ObjRotlift_MoveDekuFlowers(this);
}
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
modelInfo = &sModelInfo[type];
DynaPolyActor_LoadMesh(play, &this->dyna, modelInfo->colHeader);

View File

@ -489,7 +489,7 @@ void ObjSkateblock_Init(Actor* thisx, PlayState* play) {
ObjSkateblock* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &gameplay_dangeon_keep_Colheader_007498);
if (D_80A22A18 == NULL) {
D_80A22A18 = Lib_SegmentedToVirtual(gameplay_dangeon_keep_Matanimheader_01B370);
@ -616,7 +616,7 @@ void func_80A2264C(ObjSkateblock* this, PlayState* play) {
if (sp20 || ((this->unk_160 - this->dyna.actor.world.pos.y) > 300.0f)) {
if (SurfaceType_GetFloorProperty(&play->colCtx, this->dyna.actor.floorPoly, this->dyna.actor.floorBgId) ==
FLOOR_PROPERTY_12) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
func_80A22728(this);
return;
@ -633,7 +633,7 @@ void func_80A22728(ObjSkateblock* this) {
}
void func_80A2273C(ObjSkateblock* this, PlayState* play) {
if (!DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x;
this->dyna.actor.world.pos.y = (this->dyna.actor.home.pos.y - (600.0f * this->dyna.actor.scale.y)) - 10.0f;
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z;
@ -657,14 +657,14 @@ void func_80A227C0(ObjSkateblock* this, PlayState* play) {
return;
}
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = ObjSkateblock_Draw;
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f)) {
func_80A22308(this);
}
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
D_80A22A10 |= 1 << this->unk_1C0;
}
}

View File

@ -755,7 +755,7 @@ void func_80B30AF8(ObjSpidertent* this, PlayState* play) {
this->unk_3C1--;
if (this->unk_3C1 == 40) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
if (this->unk_3C1 >= 32) {

View File

@ -284,7 +284,7 @@ void ObjSwitch_PlayDiamondSwitchSfx(ObjSwitch* this) {
}
void ObjSwitch_SetFloorSwitchSnapPlayerState(ObjSwitch* this, s32 state) {
if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
this->floorSwitchPlayerSnapState = state;
}
}
@ -344,7 +344,7 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) {
} else {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 1.0f;
}
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &gFloorSwitchCol);
}
if (type == OBJSWITCH_TYPE_FLOOR) {
@ -517,13 +517,13 @@ void ObjSwitch_FloorSwitchUp(ObjSwitch* this, PlayState* play) {
} else {
switch (OBJ_SWITCH_GET_SUBTYPE(&this->dyna.actor)) {
case OBJSWITCH_SUBTYPE_ONCE:
if (DynaPolyActor_IsInSwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
ObjSwitch_SetFloorSwitchSnapPlayerState(this, 1);
ObjSwitch_TryPlayCutsceneInit(this, play, ObjSwitch_FloorSwitchPushDownInit, true);
}
break;
case OBJSWITCH_SUBTYPE_SYNC:
if (DynaPolyActor_IsInSwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
ObjSwitch_SetFloorSwitchSnapPlayerState(this, 1);
ObjSwitch_TryPlayCutsceneInit(this, play, ObjSwitch_FloorSwitchPushDownInit, true);
} else if (Flags_GetSwitch(play, OBJ_SWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) {
@ -531,7 +531,7 @@ void ObjSwitch_FloorSwitchUp(ObjSwitch* this, PlayState* play) {
}
break;
case OBJSWITCH_SUBTYPE_TOGGLE:
if (DynaPolyActor_IsInSwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
s32 isSwitchFlagNotSet =
Flags_GetSwitch(play, OBJ_SWITCH_GET_SWITCH_FLAG(&this->dyna.actor)) ? false : true;
@ -540,13 +540,13 @@ void ObjSwitch_FloorSwitchUp(ObjSwitch* this, PlayState* play) {
}
break;
case OBJSWITCH_SUBTYPE_RESET:
if (DynaPolyActor_IsInSwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
ObjSwitch_SetFloorSwitchSnapPlayerState(this, 1);
ObjSwitch_TryPlayCutsceneInit(this, play, ObjSwitch_FloorSwitchPushDownInit, true);
}
break;
case OBJSWITCH_SUBTYPE_RESET_INVERTED:
if (DynaPolyActor_IsInSwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
ObjSwitch_SetFloorSwitchSnapPlayerState(this, 2);
ObjSwitch_SetSwitchFlagState(this, play, false);
ObjSwitch_FloorSwitchPushDownInit(this);
@ -584,7 +584,7 @@ void ObjSwitch_FloorSwitchDown(ObjSwitch* this, PlayState* play) {
case OBJSWITCH_SUBTYPE_ONCE:
case OBJSWITCH_SUBTYPE_SYNC:
if (!Flags_GetSwitch(play, OBJ_SWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) {
if ((play->sceneId == SCENE_SECOM) && DynaPolyActor_IsInSwitchPressedState(&this->dyna)) {
if ((play->sceneId == SCENE_SECOM) && DynaPolyActor_IsSwitchPressed(&this->dyna)) {
ObjSwitch_SetSwitchFlagState(this, play, true);
} else {
ObjSwitch_FloorSwitchRiseUpInit(this);
@ -594,7 +594,7 @@ void ObjSwitch_FloorSwitchDown(ObjSwitch* this, PlayState* play) {
case OBJSWITCH_SUBTYPE_TOGGLE:
case OBJSWITCH_SUBTYPE_RESET:
case OBJSWITCH_SUBTYPE_RESET_INVERTED:
if (!DynaPolyActor_IsInSwitchPressedState(&this->dyna) &&
if (!DynaPolyActor_IsSwitchPressed(&this->dyna) &&
(!Player_InCsMode(play) || (play->sceneId == SCENE_SECOM))) {
if (this->floorSwitchReleaseTimer <= 0) {
if (subType == OBJSWITCH_SUBTYPE_RESET) {
@ -841,16 +841,16 @@ void ObjSwitch_LargeFloorSwitchUp(ObjSwitch* this, PlayState* play) {
s32 subType = OBJ_SWITCH_GET_SUBTYPE(&this->dyna.actor);
if (subType == OBJSWITCH_SUBTYPE_ONCE) {
if (DynaPolyActor_IsInHeavySwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsHeavySwitchPressed(&this->dyna)) {
ObjSwitch_SetFloorSwitchSnapPlayerState(this, 1);
ObjSwitch_TryPlayCutsceneInit(this, play, ObjSwitch_LargeFloorSwitchPushDownInit, true);
}
} else if (subType == OBJSWITCH_SUBTYPE_RESET) {
if (DynaPolyActor_IsInHeavySwitchPressedState(&this->dyna)) {
if (DynaPolyActor_IsHeavySwitchPressed(&this->dyna)) {
ObjSwitch_SetFloorSwitchSnapPlayerState(this, 1);
ObjSwitch_TryPlayCutsceneInit(this, play, ObjSwitch_LargeFloorSwitchPushDownInit, true);
}
} else if (subType == OBJSWITCH_SUBTYPE_RESET_INVERTED && DynaPolyActor_IsInHeavySwitchPressedState(&this->dyna)) {
} else if (subType == OBJSWITCH_SUBTYPE_RESET_INVERTED && DynaPolyActor_IsHeavySwitchPressed(&this->dyna)) {
ObjSwitch_SetFloorSwitchSnapPlayerState(this, 2);
ObjSwitch_SetSwitchFlagState(this, play, false);
ObjSwitch_LargeFloorSwitchPushDownInit(this);
@ -885,7 +885,7 @@ void ObjSwitch_LargeFloorSwitchDown(ObjSwitch* this, PlayState* play) {
ObjSwitch_LargeFloorSwitchRiseUpInit(this);
}
} else if (subType == OBJSWITCH_SUBTYPE_RESET || subType == OBJSWITCH_SUBTYPE_RESET_INVERTED) {
if (!DynaPolyActor_IsInHeavySwitchPressedState(&this->dyna) && !Player_InCsMode(play)) {
if (!DynaPolyActor_IsHeavySwitchPressed(&this->dyna) && !Player_InCsMode(play)) {
if (this->floorSwitchReleaseTimer <= 0) {
if (OBJ_SWITCH_GET_SUBTYPE(&this->dyna.actor) == OBJSWITCH_SUBTYPE_RESET) {
ObjSwitch_SetSwitchFlagState(this, play, false);
@ -936,7 +936,7 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) {
case OBJSWITCH_TYPE_FLOOR:
case OBJSWITCH_TYPE_FLOOR_RUSTY:
case OBJSWITCH_TYPE_FLOOR_LARGE:
this->collisionFlags = this->dyna.stateFlags;
this->collisionFlags = this->dyna.interactFlags;
break;
case OBJSWITCH_TYPE_EYE:
this->collisionFlags = this->colliderTris.base.acFlags;

View File

@ -279,7 +279,7 @@ void func_80B9C07C(ObjTaru* this, PlayState* play) {
this->actionFunc = func_80B9C1A0;
} else {
this->dyna.actor.flags |= ACTOR_FLAG_10;
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
this->actionFunc = func_80B9C174;
}

View File

@ -247,7 +247,7 @@ void ObjTokeiStep_SetupOpen(ObjTokeiStep* this) {
void ObjTokeiStep_Open(ObjTokeiStep* this, PlayState* play) {
if (ObjTokeiStep_OpenProcess(this, play)) {
func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
ObjTokeiStep_SetupDoNothingOpen(this);
}
}

View File

@ -99,7 +99,7 @@ void ObjTree_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.uncullZoneForward = 4000.0f;
} else {
Actor_SetScale(&this->dyna.actor, 0.1f);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
CollisionHeader_GetVirtual(&object_tree_Colheader_001B2C, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
}

View File

@ -10,7 +10,7 @@
#include "objects/object_tsubo/object_tsubo.h"
#include "objects/object_racetsubo/object_racetsubo.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_800000 | ACTOR_FLAG_4000000)
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_800000 | ACTOR_FLAG_CAN_PRESS_SWITCH)
#define THIS ((ObjTsubo*)thisx)
@ -532,7 +532,7 @@ void func_80928D80(ObjTsubo* this, PlayState* play) {
if (Actor_HasNoParent(&this->actor, play)) {
this->actor.room = play->roomCtx.curRoom.num;
Actor_MoveWithGravity(&this->actor);
this->actor.flags &= ~ACTOR_FLAG_4000000;
this->actor.flags &= ~ACTOR_FLAG_CAN_PRESS_SWITCH;
Actor_UpdateBgCheckInfo(play, &this->actor, 15.0f, 15.0f, 0.0f,
UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_40 |
UPDBGCHECKINFO_FLAG_80);
@ -647,7 +647,7 @@ void func_8092926C(ObjTsubo* this, PlayState* play) {
} else {
scale = sPotTypeData[OBJ_TSUBO_GET_TYPE(&this->actor)].scale;
if (Math_StepToF(&this->actor.scale.x, scale, scale * 0.1f)) {
this->actor.flags |= ACTOR_FLAG_4000000;
this->actor.flags |= ACTOR_FLAG_CAN_PRESS_SWITCH;
func_809289B4(this);
}
this->actor.scale.z = this->actor.scale.y = this->actor.scale.x;

View File

@ -763,7 +763,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) {
DynaPolyActor_Init(&this->dyna, 0);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_um_Colheader_007E20);
} else {
DynaPolyActor_Init(&this->dyna, 3);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_um_Colheader_007F50);
}
@ -772,7 +772,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) {
return;
}
func_800C636C(play, &play->colCtx.dyna, this->dyna.bgId);
DynaPoly_DisableCeilingCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->donkey =
(EnHorse*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, this->dyna.actor.world.pos.x,

View File

@ -39,7 +39,7 @@ void ObjY2lift_Init(Actor* thisx, PlayState* play) {
ObjY2lift* this = THIS;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
DynaPolyActor_LoadMesh(play, &this->dyna, &gPirateLiftPlatformCol);
}
@ -53,13 +53,13 @@ void ObjY2lift_Update(Actor* thisx, PlayState* play) {
ObjY2lift* this = THIS;
f32 temp_fv0 = this->dyna.actor.world.pos.y;
f32 targetVelocityY = 0.0f;
s32 temp_v0 = DynaPolyActor_IsInRidingMovingState(&this->dyna);
s32 isPlayerOnTop = DynaPolyActor_IsPlayerOnTop(&this->dyna);
if (temp_v0 || DynaPolyActor_IsInRidingFallingState(&this->dyna)) {
if (isPlayerOnTop || DynaPolyActor_IsActorOnTop(&this->dyna)) {
if (!this->unk15D) {
this->unk15D = true;
this->unk15F = 12;
} else if (this->unk15F == 0 && temp_v0) {
} else if ((this->unk15F == 0) && isPlayerOnTop) {
this->unk15C = 16;
}
} else {
@ -68,7 +68,7 @@ void ObjY2lift_Update(Actor* thisx, PlayState* play) {
if (DECR(this->unk15C) != 0) {
temp_fv0 = this->dyna.actor.home.pos.y + 180.0f;
targetVelocityY = 2.0f;
} else if (!temp_v0 && this->dyna.actor.velocity.y <= 0.0f) {
} else if (!isPlayerOnTop && (this->dyna.actor.velocity.y <= 0.0f)) {
temp_fv0 = this->dyna.actor.home.pos.y;
targetVelocityY = -2.0f;
}

View File

@ -1016,18 +1016,18 @@
0x800C6098:("DynaPoly_Alloc",),
0x800C6188:("DynaPoly_SetBgActor",),
0x800C6248:("DynaPoly_GetActor",),
0x800C62BC:("func_800C62BC",),
0x800C6314:("func_800C6314",),
0x800C636C:("func_800C636C",),
0x800C63C4:("func_800C63C4",),
0x800C641C:("func_800C641C",),
0x800C6474:("func_800C6474",),
0x800C62BC:("DynaPoly_DisableCollision",),
0x800C6314:("DynaPoly_EnableCollision",),
0x800C636C:("DynaPoly_DisableCeilingCollision",),
0x800C63C4:("DynaPoly_EnableCeilingCollision",),
0x800C641C:("DynaPoly_DisableFloorCollision",),
0x800C6474:("DynaPoly_EnableFloorCollision",),
0x800C64CC:("DynaPoly_DeleteBgActor",),
0x800C6554:("func_800C6554",),
0x800C6554:("DynaPoly_InvalidateLookup",),
0x800C656C:("BgCheck_CalcWaterboxDimensions",),
0x800C6838:("DynaPoly_ExpandSRT",),
0x800C734C:("BgCheck_ResetFlagsIfLoadedActor",),
0x800C73E4:("DynaPoly_Setup",),
0x800C6838:("DynaPoly_AddBgActorToLookup",),
0x800C734C:("DynaPoly_UnsetAllInteractFlags",),
0x800C73E4:("DynaPoly_UpdateContext",),
0x800C756C:("func_800C756C",),
0x800C765C:("DynaPoly_UpdateBgActorTransforms",),
0x800C76EC:("BgCheck_RaycastFloorDynaList",),
@ -1092,25 +1092,25 @@
0x800CA6F0:("func_800CA6F0",),
0x800CA9D0:("func_800CA9D0",),
0x800CAA14:("func_800CAA14",),
0x800CAAD0:("BgCheck2_UpdateActorPosition",),
0x800CAC0C:("BgCheck2_UpdateActorYRotation",),
0x800CACA0:("BgCheck2_AttachToMesh",),
0x800CAD2C:("BgCheck2_UpdateActorAttachedToMesh",),
0x800CAAD0:("DynaPolyActor_UpdateCarriedActorPos",),
0x800CAC0C:("DynaPolyActor_UpdateCarriedActorRotY",),
0x800CACA0:("DynaPolyActor_AttachCarriedActor",),
0x800CAD2C:("DynaPolyActor_TransformCarriedActor",),
0x800CAE10:("DynaPolyActor_Init",),
0x800CAE34:("DynaPolyActor_LoadMesh",),
0x800CAE7C:("DynaPolyActor_ResetState",),
0x800CAE88:("DynaPolyActor_SetRidingFallingState",),
0x800CAE9C:("DynaPolyActor_SetRidingMovingState",),
0x800CAEB0:("DynaPolyActor_SetRidingMovingStateByIndex",),
0x800CAEE0:("DynaPolyActor_SetRidingRotatingState",),
0x800CAEF4:("DynaPolyActor_SetRidingRotatingStateByIndex",),
0x800CAF24:("DynaPolyActor_SetSwitchPressedState",),
0x800CAF38:("DynaPolyActor_SetHeavySwitchPressedState",),
0x800CAF4C:("DynaPolyActor_IsInRidingFallingState",),
0x800CAF70:("DynaPolyActor_IsInRidingMovingState",),
0x800CAF94:("DynaPolyActor_IsInRidingRotatingState",),
0x800CAFB8:("DynaPolyActor_IsInSwitchPressedState",),
0x800CAFDC:("DynaPolyActor_IsInHeavySwitchPressedState",),
0x800CAE7C:("DynaPolyActor_UnsetAllInteractFlags",),
0x800CAE88:("DynaPolyActor_SetActorOnTop",),
0x800CAE9C:("DynaPolyActor_SetPlayerOnTop",),
0x800CAEB0:("DynaPoly_SetPlayerOnTop",),
0x800CAEE0:("DynaPolyActor_SetPlayerAbove",),
0x800CAEF4:("DynaPoly_SetPlayerAbove",),
0x800CAF24:("DynaPolyActor_SetActorOnSwitch",),
0x800CAF38:("DynaPolyActor_SetActorOnHeavySwitch",),
0x800CAF4C:("DynaPolyActor_IsActorOnTop",),
0x800CAF70:("DynaPolyActor_IsPlayerOnTop",),
0x800CAF94:("DynaPolyActor_IsPlayerAbove",),
0x800CAFB8:("DynaPolyActor_IsSwitchPressed",),
0x800CAFDC:("DynaPolyActor_IsHeavySwitchPressed",),
0x800CB000:("DynaPolyActor_ValidateMove",),
0x800CB210:("Camera_fabsf",),
0x800CB240:("Camera_Vec3fMagnitude",),

View File

@ -450,13 +450,32 @@ wordReplace = {
"BgCheck_AddActorMesh": "DynaPoly_SetBgActor",
"BgCheck_GetActorOfMesh": "DynaPoly_GetActor",
"BgCheck_RemoveActorMesh": "DynaPoly_DeleteBgActor",
"BgCheck_AddActorMeshToLists": "DynaPoly_ExpandSRT",
"BgCheck_Update": "DynaPoly_Setup",
"BgCheck_AddActorMeshToLists": "DynaPoly_AddBgActorToLookup",
"BgCheck_Update": "DynaPoly_UpdateContext",
"BgCheck_UpdateAllActorMeshes": "DynaPoly_UpdateBgActorTransforms",
"BgCheck_RelocateMeshHeaderPointers": "CollisionHeader_SegmentedToVirtual",
"BgCheck_RelocateMeshHeader": "CollisionHeader_GetVirtual",
"BgCheck_RelocateAllMeshHeaders": "BgCheck_InitCollisionHeaders",
"BgCheck_GetPolygonAttributes": "SurfaceType_GetData",
"DynaPolyActor_ResetState": "DynaPolyActor_UnsetAllInteractFlags",
"DynaPolyActor_SetRidingFallingState": "DynaPolyActor_SetActorOnTop",
"DynaPolyActor_SetRidingMovingState": "DynaPolyActor_SetPlayerOnTop",
"DynaPolyActor_SetRidingMovingStateByIndex": "DynaPoly_SetPlayerOnTop",
"DynaPolyActor_SetRidingRotatingState": "DynaPolyActor_SetPlayerAbove",
"DynaPolyActor_SetRidingRotatingStateByIndex": "DynaPoly_SetPlayerAbove",
"DynaPolyActor_SetSwitchPressedState": "DynaPolyActor_SetActorOnSwitch",
"DynaPolyActor_SetHeavySwitchPressedState": "DynaPolyActor_SetActorOnHeavySwitch",
"DynaPolyActor_IsInRidingFallingState": "DynaPolyActor_IsActorOnTop",
"DynaPolyActor_IsInRidingMovingState": "DynaPolyActor_IsPlayerOnTop",
"DynaPolyActor_IsInRidingRotatingState": "DynaPolyActor_IsPlayerAbove",
"DynaPolyActor_IsInSwitchPressedState": "DynaPolyActor_IsSwitchPressed",
"DynaPolyActor_IsInHeavySwitchPressedState": "DynaPolyActor_IsHeavySwitchPressed",
"func_800C62BC": "DynaPoly_DisableCollision",
"func_800C6314": "DynaPoly_EnableCollision",
"func_800C636C": "DynaPoly_DisableCeilingCollision",
"func_800C63C4": "DynaPoly_EnableCeilingCollision",
"func_800C641C": "DynaPoly_DisableFloorCollision",
"func_800C6474": "DynaPoly_EnableFloorCollision",
"SurfaceType_GetConveyorType": "SurfaceType_IsFloorConveyor",
"func_800C9704": "SurfaceType_GetBgCamIndex",
"func_800C9924": "BgCheck_GetBgCamFuncData",

Some files were not shown because too many files have changed in this diff Show More