mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-27 07:07:09 +00:00
Some names and docs on dynapoly (#1287)
* Add `BG_DYNA_ACTOR_FLAG_` for `DynaCollisionContext.bgActorFlags` * Document 3/4 bgActor flags * `func_8003EE6C` -> `DynaPoly_InvalidateLookup` * `DynaPoly_ExpandSRT` -> `DynaPoly_AddBgActorToLookup` * Add `DYNAPOLYACTOR_UNK160_` for `DynaPolyActor.unk_160` * More dynapoly docs * One comment * Some `DynaPoly_` -> `DynaPolyActor_` * run formatter * . * `BG_DYNA_ACTOR_FLAG_IS_USED` -> `BG_DYNA_ACTOR_FLAG_IN_USE` * `BG_DYNA_ACTOR_FLAG_` -> `BGACTOR_` * `DYNAPOLYACTOR_INTERACT_FLAG_` -> `DYNA_INTERACT_` * `ResetInteractFlags` -> `ClearInteractFlags` * Remove Has/Is prefix on dyna interact flags getters * format * remove now useless comments * Remove `!= 0` on interact flags getter usage * ceilings collision -> ceiling collision * `ClearInteractFlags` -> `UnsetInteractFlags` (pepega) * `UnsetInteractFlags` -> `UnsetAllInteractFlags` (pepega x2) * Add back `Is` prefix (no `Has` this time) to dyna interact flags getters
This commit is contained in:
parent
397e481f9a
commit
ed0ab877c9
51 changed files with 206 additions and 190 deletions
|
@ -605,15 +605,15 @@ u16 SSNodeList_GetNextNodeIdx(SSNodeList* this);
|
|||
s32 DynaPoly_IsBgIdBgActor(s32 bgId);
|
||||
void DynaPoly_Init(PlayState* play, DynaCollisionContext* dyna);
|
||||
void DynaPoly_Alloc(PlayState* play, DynaCollisionContext* dyna);
|
||||
void func_8003EBF8(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
|
||||
void func_8003EC50(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
|
||||
void func_8003ECA8(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
|
||||
void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
|
||||
void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
|
||||
void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
|
||||
s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader);
|
||||
DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId);
|
||||
void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
|
||||
void func_8003EE6C(PlayState* play, DynaCollisionContext* dyna);
|
||||
void func_8003F8EC(PlayState* play, DynaCollisionContext* dyna, Actor* actor);
|
||||
void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna);
|
||||
void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna);
|
||||
void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor);
|
||||
void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna);
|
||||
void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyna);
|
||||
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast);
|
||||
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius,
|
||||
|
@ -672,14 +672,14 @@ void BgCheck_DrawStaticCollision(PlayState*, CollisionContext*);
|
|||
void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId);
|
||||
s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor);
|
||||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags);
|
||||
void func_800434A0(DynaPolyActor* dynaActor);
|
||||
void func_800434A8(DynaPolyActor* dynaActor);
|
||||
void func_800434C8(CollisionContext* colCtx, s32 floorBgId);
|
||||
void func_80043508(CollisionContext* colCtx, s32 floorBgId);
|
||||
void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor);
|
||||
void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor);
|
||||
void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId);
|
||||
void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId);
|
||||
void func_80043538(DynaPolyActor* dynaActor);
|
||||
s32 func_80043548(DynaPolyActor* dynaActor);
|
||||
s32 func_8004356C(DynaPolyActor* dynaActor);
|
||||
s32 func_80043590(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor);
|
||||
s32 func_800435B4(DynaPolyActor* dynaActor);
|
||||
s32 func_800435D8(PlayState* play, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
|
||||
void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState* play);
|
||||
|
|
|
@ -254,6 +254,11 @@ if neither of the above are set : blue
|
|||
0x2000 : translucent, else opaque
|
||||
*/
|
||||
|
||||
#define DYNA_INTERACT_ACTOR_ON_TOP (1 << 0) // There is an actor standing on the collision of the dynapoly actor
|
||||
#define DYNA_INTERACT_PLAYER_ON_TOP (1 << 1) // The player actor is standing on the collision of the dynapoly actor
|
||||
#define DYNA_INTERACT_PLAYER_ABOVE (1 << 2) // The player is directly above the collision of the dynapoly actor (any distance above)
|
||||
#define DYNA_INTERACT_3 (1 << 3) // Like the ACTOR_ON_TOP flag but only actors with ACTOR_FLAG_26
|
||||
|
||||
typedef struct DynaPolyActor {
|
||||
/* 0x000 */ struct Actor actor;
|
||||
/* 0x14C */ s32 bgId;
|
||||
|
@ -262,7 +267,7 @@ typedef struct DynaPolyActor {
|
|||
/* 0x158 */ s16 unk_158; // y rotation?
|
||||
/* 0x15A */ u16 unk_15A;
|
||||
/* 0x15C */ u32 unk_15C;
|
||||
/* 0x160 */ u8 unk_160;
|
||||
/* 0x160 */ u8 interactFlags;
|
||||
/* 0x162 */ s16 unk_162;
|
||||
} DynaPolyActor; // size = 0x164
|
||||
|
||||
|
|
|
@ -155,10 +155,15 @@ typedef struct {
|
|||
/* 0x60 */ f32 maxY;
|
||||
} BgActor; // size = 0x64
|
||||
|
||||
#define BGACTOR_IN_USE (1 << 0) // The bgActor entry is in use
|
||||
#define BGACTOR_1 (1 << 1)
|
||||
#define BGACTOR_COLLISION_DISABLED (1 << 2) // The collision of the bgActor is disabled
|
||||
#define BGACTOR_CEILING_COLLISION_DISABLED (1 << 3) // The ceilings in the collision of the bgActor are ignored
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ u8 bitFlag;
|
||||
/* 0x0004 */ BgActor bgActors[BG_ACTOR_MAX];
|
||||
/* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX]; // & 0x0008 = no dyna ceiling
|
||||
/* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX];
|
||||
/* 0x13F0 */ CollisionPoly* polyList;
|
||||
/* 0x13F4 */ Vec3s* vtxList;
|
||||
/* 0x13F8 */ DynaSSNodeList polyNodes;
|
||||
|
|
|
@ -60,7 +60,7 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) {
|
|||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, bgId);
|
||||
if (dynaActor != NULL) {
|
||||
func_800434A8(dynaActor);
|
||||
DynaPolyActor_SetActorOnTop(dynaActor);
|
||||
|
||||
if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_26)) {
|
||||
func_80043538(dynaActor);
|
||||
|
@ -81,7 +81,7 @@ s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((colCtx->dyna.bgActorFlags[bgId] & 2) || !(colCtx->dyna.bgActorFlags[bgId] & 1)) {
|
||||
if ((colCtx->dyna.bgActorFlags[bgId] & BGACTOR_1) || !(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,65 +3,65 @@
|
|||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) {
|
||||
dynaActor->bgId = -1;
|
||||
dynaActor->unk_15C = flags;
|
||||
dynaActor->unk_160 = 0;
|
||||
dynaActor->interactFlags = 0;
|
||||
dynaActor->unk_150 = 0.0f;
|
||||
dynaActor->unk_154 = 0.0f;
|
||||
}
|
||||
|
||||
void func_800434A0(DynaPolyActor* dynaActor) {
|
||||
dynaActor->unk_160 = 0;
|
||||
void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor) {
|
||||
dynaActor->interactFlags = 0;
|
||||
}
|
||||
|
||||
void func_800434A8(DynaPolyActor* dynaActor) {
|
||||
dynaActor->unk_160 |= 1;
|
||||
void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor) {
|
||||
dynaActor->interactFlags |= DYNA_INTERACT_ACTOR_ON_TOP;
|
||||
}
|
||||
|
||||
void func_800434B8(DynaPolyActor* dynaActor) {
|
||||
dynaActor->unk_160 |= 2;
|
||||
void DynaPolyActor_SetPlayerOnTop(DynaPolyActor* dynaActor) {
|
||||
dynaActor->interactFlags |= DYNA_INTERACT_PLAYER_ON_TOP;
|
||||
}
|
||||
|
||||
void func_800434C8(CollisionContext* colCtx, s32 floorBgId) {
|
||||
void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId) {
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, floorBgId);
|
||||
|
||||
if (dynaActor != NULL) {
|
||||
func_800434B8(dynaActor);
|
||||
DynaPolyActor_SetPlayerOnTop(dynaActor);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800434F8(DynaPolyActor* dynaActor) {
|
||||
dynaActor->unk_160 |= 4;
|
||||
void DynaPolyActor_SetPlayerAbove(DynaPolyActor* dynaActor) {
|
||||
dynaActor->interactFlags |= DYNA_INTERACT_PLAYER_ABOVE;
|
||||
}
|
||||
|
||||
void func_80043508(CollisionContext* colCtx, s32 floorBgId) {
|
||||
void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId) {
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, floorBgId);
|
||||
|
||||
if (dynaActor != NULL) {
|
||||
func_800434F8(dynaActor);
|
||||
DynaPolyActor_SetPlayerAbove(dynaActor);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80043538(DynaPolyActor* dynaActor) {
|
||||
dynaActor->unk_160 |= 8;
|
||||
dynaActor->interactFlags |= DYNA_INTERACT_3;
|
||||
}
|
||||
|
||||
s32 func_80043548(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 1) {
|
||||
s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->interactFlags & DYNA_INTERACT_ACTOR_ON_TOP) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_8004356C(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 2) {
|
||||
s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80043590(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 4) {
|
||||
s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->interactFlags & DYNA_INTERACT_PLAYER_ABOVE) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -69,7 +69,7 @@ s32 func_80043590(DynaPolyActor* dynaActor) {
|
|||
}
|
||||
|
||||
s32 func_800435B4(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 8) {
|
||||
if (dynaActor->interactFlags & DYNA_INTERACT_3) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -2111,7 +2111,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
actor->colorFilterTimer--;
|
||||
}
|
||||
actor->update(actor, play);
|
||||
func_8003F8EC(play, &play->colCtx.dyna, actor);
|
||||
DynaPoly_UnsetAllInteractFlags(play, &play->colCtx.dyna, actor);
|
||||
}
|
||||
|
||||
CollisionCheck_ResetDamage(&actor->colChkInfo);
|
||||
|
@ -2121,7 +2121,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
}
|
||||
|
||||
if (i == ACTORCAT_BG) {
|
||||
DynaPoly_Setup(play, &play->colCtx.dyna);
|
||||
DynaPoly_UpdateContext(play, &play->colCtx.dyna);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1623,7 +1623,7 @@ CollisionHeader* BgCheck_GetCollisionHeader(CollisionContext* colCtx, s32 bgId)
|
|||
if (bgId < 0 || bgId > BG_ACTOR_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
if (!(colCtx->dyna.bgActorFlags[bgId] & 1)) {
|
||||
if (!(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) {
|
||||
osSyncPrintf(VT_COL(YELLOW, BLACK));
|
||||
osSyncPrintf("T_BGCheck_getBGDataInfo():そのbg_actor_indexは使われておりません。index=%d\n");
|
||||
osSyncPrintf(VT_RST);
|
||||
|
@ -2626,8 +2626,8 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
|
|||
s32 foundSlot = false;
|
||||
|
||||
for (bgId = 0; bgId < BG_ACTOR_MAX; bgId++) {
|
||||
if (!(dyna->bgActorFlags[bgId] & 1)) {
|
||||
dyna->bgActorFlags[bgId] |= 1;
|
||||
if (!(dyna->bgActorFlags[bgId] & BGACTOR_IN_USE)) {
|
||||
dyna->bgActorFlags[bgId] |= BGACTOR_IN_USE;
|
||||
foundSlot = true;
|
||||
break;
|
||||
}
|
||||
|
@ -2643,7 +2643,7 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
|
|||
BgActor_SetActor(&dyna->bgActors[bgId], actor, colHeader);
|
||||
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
|
||||
|
||||
dyna->bgActorFlags[bgId] &= ~2;
|
||||
dyna->bgActorFlags[bgId] &= ~BGACTOR_1;
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("DynaPolyInfo_setActor():index %d\n", bgId);
|
||||
osSyncPrintf(VT_RST);
|
||||
|
@ -2655,37 +2655,37 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
|
|||
* possible orginal name: DynaPolyInfo_getActor
|
||||
*/
|
||||
DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId) {
|
||||
if (!DynaPoly_IsBgIdBgActor(bgId) || !(colCtx->dyna.bgActorFlags[bgId] & 1) ||
|
||||
colCtx->dyna.bgActorFlags[bgId] & 2) {
|
||||
if (!DynaPoly_IsBgIdBgActor(bgId) || !(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE) ||
|
||||
colCtx->dyna.bgActorFlags[bgId] & BGACTOR_1) {
|
||||
return NULL;
|
||||
}
|
||||
return (DynaPolyActor*)colCtx->dyna.bgActors[bgId].actor;
|
||||
}
|
||||
|
||||
void func_8003EBF8(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
dyna->bgActorFlags[bgId] |= 4;
|
||||
dyna->bgActorFlags[bgId] |= BGACTOR_COLLISION_DISABLED;
|
||||
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8003EC50(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
dyna->bgActorFlags[bgId] &= ~4;
|
||||
dyna->bgActorFlags[bgId] &= ~BGACTOR_COLLISION_DISABLED;
|
||||
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8003ECA8(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
dyna->bgActorFlags[bgId] |= 8;
|
||||
dyna->bgActorFlags[bgId] |= BGACTOR_CEILING_COLLISION_DISABLED;
|
||||
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8003ED00(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
void DynaPoly_EnableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
|
||||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
dyna->bgActorFlags[bgId] &= ~8;
|
||||
dyna->bgActorFlags[bgId] &= ~BGACTOR_CEILING_COLLISION_DISABLED;
|
||||
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
|
||||
}
|
||||
}
|
||||
|
@ -2723,19 +2723,19 @@ void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgI
|
|||
|
||||
actor->bgId = BGACTOR_NEG_ONE;
|
||||
dyna->bgActors[bgId].actor = NULL;
|
||||
dyna->bgActorFlags[bgId] |= 2;
|
||||
dyna->bgActorFlags[bgId] |= BGACTOR_1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8003EE6C(PlayState* play, DynaCollisionContext* dyna) {
|
||||
void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna) {
|
||||
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
|
||||
}
|
||||
|
||||
/**
|
||||
* original name: DynaPolyInfo_expandSRT
|
||||
*/
|
||||
void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex,
|
||||
s32* polyStartIndex) {
|
||||
void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex,
|
||||
s32* polyStartIndex) {
|
||||
MtxF mtx;
|
||||
Actor* actor;
|
||||
s32 pad;
|
||||
|
@ -2765,7 +2765,7 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s
|
|||
|
||||
ScaleRotPos_SetValue(&dyna->bgActors[bgId].curTransform, &actor->scale, &actor->shape.rot, &pos);
|
||||
|
||||
if (dyna->bgActorFlags[bgId] & 4) {
|
||||
if (dyna->bgActorFlags[bgId] & BGACTOR_COLLISION_DISABLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2799,7 +2799,7 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s
|
|||
s16 polyIndex = pi;
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.floor, &polyIndex);
|
||||
} else if (normalY < COLPOLY_SNORMAL(-0.8f)) {
|
||||
if (!(dyna->bgActorFlags[bgId] & 8)) {
|
||||
if (!(dyna->bgActorFlags[bgId] & BGACTOR_CEILING_COLLISION_DISABLED)) {
|
||||
s16 polyIndex = pi;
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.ceiling,
|
||||
&polyIndex);
|
||||
|
@ -2915,15 +2915,15 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s
|
|||
}
|
||||
}
|
||||
|
||||
void func_8003F8EC(PlayState* play, DynaCollisionContext* dyna, Actor* actor) {
|
||||
void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor) {
|
||||
DynaPolyActor* dynaActor;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (dyna->bgActorFlags[i] & 1) {
|
||||
if (dyna->bgActorFlags[i] & BGACTOR_IN_USE) {
|
||||
dynaActor = DynaPoly_GetActor(&play->colCtx, i);
|
||||
if (dynaActor != NULL && &dynaActor->actor == actor) {
|
||||
func_800434A0((DynaPolyActor*)actor);
|
||||
DynaPolyActor_UnsetAllInteractFlags((DynaPolyActor*)actor);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2931,9 +2931,9 @@ void func_8003F8EC(PlayState* play, DynaCollisionContext* dyna, Actor* actor) {
|
|||
}
|
||||
|
||||
/**
|
||||
* DynaPolyInfo_setup
|
||||
* Original name: "DynaPolyInfo_setup"
|
||||
*/
|
||||
void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) {
|
||||
void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) {
|
||||
DynaPolyActor* actor;
|
||||
s32 vtxStartIndex;
|
||||
s32 polyStartIndex;
|
||||
|
@ -2946,7 +2946,7 @@ void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) {
|
|||
}
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (dyna->bgActorFlags[i] & 2) {
|
||||
if (dyna->bgActorFlags[i] & BGACTOR_1) {
|
||||
// Initialize BgActor
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("DynaPolyInfo_setup():削除 index=%d\n", i);
|
||||
|
@ -2975,8 +2975,8 @@ void DynaPoly_Setup(PlayState* play, DynaCollisionContext* dyna) {
|
|||
vtxStartIndex = 0;
|
||||
polyStartIndex = 0;
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (dyna->bgActorFlags[i] & 1) {
|
||||
DynaPoly_ExpandSRT(play, dyna, i, &vtxStartIndex, &polyStartIndex);
|
||||
if (dyna->bgActorFlags[i] & BGACTOR_IN_USE) {
|
||||
DynaPoly_AddBgActorToLookup(play, dyna, i, &vtxStartIndex, &polyStartIndex);
|
||||
}
|
||||
}
|
||||
dyna->bitFlag &= ~DYNAPOLY_INVALIDATE_LOOKUP;
|
||||
|
@ -2989,7 +2989,7 @@ void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyn
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (dyna->bgActorFlags[i] & 1) {
|
||||
if (dyna->bgActorFlags[i] & BGACTOR_IN_USE) {
|
||||
DynaPoly_SetBgActorPrevTransform(play, &dyna->bgActors[i]);
|
||||
}
|
||||
}
|
||||
|
@ -3081,7 +3081,7 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) {
|
|||
*dynaRaycast->bgId = BGCHECK_SCENE;
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (!(dynaRaycast->colCtx->dyna.bgActorFlags[i] & 1)) {
|
||||
if (!(dynaRaycast->colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -3134,7 +3134,7 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) {
|
|||
if (pauseState == 0) {
|
||||
pauseState = dynaRaycast->play->pauseCtx.debugState != 0;
|
||||
}
|
||||
if (!pauseState && (dynaRaycast->colCtx->dyna.bgActorFlags[*dynaRaycast->bgId] & 2)) {
|
||||
if (!pauseState && (dynaRaycast->colCtx->dyna.bgActorFlags[*dynaRaycast->bgId] & BGACTOR_1)) {
|
||||
curTransform = &dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].curTransform;
|
||||
polyMin =
|
||||
&dynaRaycast->dyna->polyList[dynaRaycast->dyna->bgActors[*dynaRaycast->bgId].dynaLookup.polyStartIndex];
|
||||
|
@ -3387,7 +3387,7 @@ s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32*
|
|||
resultPos = *pos;
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (!(colCtx->dyna.bgActorFlags[i] & 1)) {
|
||||
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) {
|
||||
continue;
|
||||
}
|
||||
if ((colCtx->dyna.bgActors + i)->actor == actor) {
|
||||
|
@ -3506,7 +3506,7 @@ s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, V
|
|||
resultY = tempY;
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (!(colCtx->dyna.bgActorFlags[i] & 1)) {
|
||||
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) {
|
||||
continue;
|
||||
}
|
||||
if (actor == colCtx->dyna.bgActors[i].actor) {
|
||||
|
@ -3641,7 +3641,7 @@ s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* p
|
|||
f32 by;
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (colCtx->dyna.bgActorFlags[i] & 1) {
|
||||
if (colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE) {
|
||||
if (actor != colCtx->dyna.bgActors[i].actor) {
|
||||
ay = posA->y;
|
||||
by = posB->y;
|
||||
|
@ -3745,7 +3745,7 @@ s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionP
|
|||
Sphere16 testSphere;
|
||||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (!(colCtx->dyna.bgActorFlags[i] & 1)) {
|
||||
if (!(colCtx->dyna.bgActorFlags[i] & BGACTOR_IN_USE)) {
|
||||
continue;
|
||||
}
|
||||
if (colCtx->dyna.bgActors[i].actor == actor) {
|
||||
|
@ -3794,7 +3794,7 @@ void func_800418D0(CollisionContext* colCtx, PlayState* play) {
|
|||
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
flag = dyna->bgActorFlags[i];
|
||||
if ((flag & 1) && !(flag & 2)) {
|
||||
if ((flag & BGACTOR_IN_USE) && !(flag & BGACTOR_1)) {
|
||||
Actor_SetObjectDependency(play, dyna->bgActors[i].actor);
|
||||
CollisionHeader_SegmentedToVirtual(dyna->bgActors[i].colHeader);
|
||||
}
|
||||
|
@ -4453,7 +4453,7 @@ void BgCheck_DrawDynaCollision(PlayState* play, CollisionContext* colCtx) {
|
|||
|
||||
for (bgId = 0; bgId < BG_ACTOR_MAX; bgId++) {
|
||||
|
||||
if (!(colCtx->dyna.bgActorFlags[bgId] & 1)) {
|
||||
if (!(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) {
|
||||
continue;
|
||||
}
|
||||
BgCheck_DrawBgActor(play, colCtx, bgId);
|
||||
|
|
|
@ -113,7 +113,7 @@ void EnAObj_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
thisx->focus.pos = thisx->world.pos;
|
||||
this->dyna.bgId = BGACTOR_NEG_ONE;
|
||||
this->dyna.unk_160 = 0;
|
||||
this->dyna.interactFlags = 0;
|
||||
this->dyna.unk_15C = DPM_UNK;
|
||||
thisx->uncullZoneDownward = 1200.0f;
|
||||
thisx->uncullZoneScale = 200.0f;
|
||||
|
@ -224,7 +224,7 @@ void EnAObj_SetupBlockRot(EnAObj* this, s16 type) {
|
|||
|
||||
void EnAObj_BlockRot(EnAObj* this, PlayState* play) {
|
||||
if (this->rotateState == 0) {
|
||||
if (this->dyna.unk_160 != 0) {
|
||||
if (this->dyna.interactFlags != 0) {
|
||||
this->rotateState++;
|
||||
this->rotateForTimer = 20;
|
||||
|
||||
|
|
|
@ -560,7 +560,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
D_80157D90 = play->gameplayFrames;
|
||||
D_80157D94[0] = 0;
|
||||
for (i = 0; i < 50; i++) {
|
||||
if (play->colCtx.dyna.bgActorFlags[i] & 1) {
|
||||
if (play->colCtx.dyna.bgActorFlags[i] & BGACTOR_IN_USE) {
|
||||
dynaActor = play->colCtx.dyna.bgActors[i].actor;
|
||||
if ((dynaActor != NULL) && (dynaActor->update != NULL)) {
|
||||
if ((dynaActor->world.pos.x != dynaActor->prevPos.x) ||
|
||||
|
|
|
@ -325,7 +325,7 @@ void func_8086C6EC(BgBdanObjects* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8086C76C(BgBdanObjects* this, PlayState* play) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
this->actionFunc = func_8086C7D0;
|
||||
OnePointCutscene_Init(play, 3090, -99, &this->dyna.actor, CAM_ID_MAIN);
|
||||
|
@ -351,7 +351,7 @@ void func_8086C874(BgBdanObjects* this, PlayState* play) {
|
|||
this->timer--;
|
||||
}
|
||||
if (this->switchFlag == 0) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->cameraSetting = play->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
func_8005AD1C(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
|
@ -359,7 +359,7 @@ void func_8086C874(BgBdanObjects* this, PlayState* play) {
|
|||
}
|
||||
} else {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
if (!func_8004356C(&this->dyna)) {
|
||||
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->switchFlag != 0) {
|
||||
this->switchFlag--;
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ void func_8086CABC(BgBdanObjects* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8086CB10(BgBdanObjects* this, PlayState* play) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
this->timer = 50;
|
||||
this->actionFunc = func_8086CB8C;
|
||||
|
|
|
@ -254,7 +254,7 @@ void func_8086D5E0(BgBdanSwitch* this, PlayState* play) {
|
|||
}
|
||||
break;
|
||||
case YELLOW:
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
func_8086D67C(this);
|
||||
func_8086D4B4(this, play);
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ void func_8086D86C(BgBdanSwitch* this) {
|
|||
}
|
||||
|
||||
void func_8086D888(BgBdanSwitch* this, PlayState* play) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
func_8086D8BC(this);
|
||||
}
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ void func_8086D9F8(BgBdanSwitch* this) {
|
|||
void func_8086DA1C(BgBdanSwitch* this, PlayState* play) {
|
||||
Actor* heldActor = GET_PLAYER(play)->heldActor;
|
||||
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (heldActor != NULL && heldActor->id == ACTOR_EN_RU1) {
|
||||
if (this->unk_1D8 <= 0) {
|
||||
func_8086D944(this);
|
||||
|
|
|
@ -53,7 +53,7 @@ void BgGjyoBridge_Init(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc = func_808787A4;
|
||||
} else {
|
||||
this->dyna.actor.draw = NULL;
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgGjyoBridge_TriggerCutscene;
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) {
|
|||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) &&
|
||||
(play->csCtx.npcActions[2]->action == 2)) {
|
||||
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4D);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,11 +36,11 @@ const ActorInit Bg_Gnd_Darkmeiro_InitVars = {
|
|||
void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, PlayState* play) {
|
||||
if (this->actionFlags & 2) {
|
||||
if (this->timer1 == 0) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFlags &= ~2;
|
||||
}
|
||||
} else if (this->timer1 != 0) {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFlags |= 2;
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, PlayState* play2) {
|
|||
thisx->draw = BgGndDarkmeiro_DrawSwitchBlock;
|
||||
this->updateFunc = BgGndDarkmeiro_UpdateSwitchBlock;
|
||||
if (!Flags_GetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
this->timer1 = 64;
|
||||
this->actionFlags |= 2;
|
||||
|
|
|
@ -60,7 +60,7 @@ void BgGndFiremeiro_Destroy(Actor* thisx, PlayState* play2) {
|
|||
void BgGndFiremeiro_Sink(BgGndFiremeiro* this, PlayState* play) {
|
||||
f32 sunkHeight = this->initPos.y - 150.0f;
|
||||
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->timer = 10;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ void BgGndFiremeiro_Shake(BgGndFiremeiro* this, PlayState* play) {
|
|||
s32 pad;
|
||||
f32 randSign;
|
||||
|
||||
if (func_8004356C(&this->dyna)) { // Player standing on it
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->timer > 0) {
|
||||
this->timer--;
|
||||
|
||||
|
@ -114,7 +114,7 @@ void BgGndFiremeiro_Rise(BgGndFiremeiro* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if ((player->currentBoots != PLAYER_BOOTS_HOVER) && func_8004356C(&this->dyna)) { // Player standing on it
|
||||
if ((player->currentBoots != PLAYER_BOOTS_HOVER) && DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (thisx->world.pos.y < this->initPos.y) {
|
||||
this->actionFunc = BgGndFiremeiro_Sink;
|
||||
this->timer = 20;
|
||||
|
|
|
@ -242,7 +242,7 @@ void BgHakaGate_FloorClosed(BgHakaGate* this, PlayState* play) {
|
|||
} else {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GROUND_GATE_OPEN);
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->vTimer = 60;
|
||||
this->actionFunc = BgHakaGate_FloorOpen;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ void BgHakaGate_FloorOpen(BgHakaGate* this, PlayState* play) {
|
|||
}
|
||||
if (this->vTimer == 0) {
|
||||
if (Math_ScaledStepToS(&this->vOpenAngle, 0, 0x800)) {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgHakaGate_FloorClosed;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -110,10 +110,10 @@ void func_8087DBF0(BgHakaMegane* this, PlayState* play) {
|
|||
|
||||
if (play->actorCtx.lensActive) {
|
||||
thisx->flags |= ACTOR_FLAG_7;
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
thisx->flags &= ~ACTOR_FLAG_7;
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,8 @@ void BgHakaShip_CrashFall(BgHakaShip* this, PlayState* play) {
|
|||
}
|
||||
} else {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG);
|
||||
if ((this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 500.0f) && func_8004356C(&this->dyna)) {
|
||||
if ((this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 500.0f) &&
|
||||
DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
Play_TriggerVoidOut(play);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ void func_80886FCC(BgHidanFslift* this, PlayState* play) {
|
|||
if ((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) < 0.5f) {
|
||||
heightBool = true;
|
||||
}
|
||||
if (func_80043590(&this->dyna) && heightBool) {
|
||||
if (DynaPolyActor_IsPlayerAbove(&this->dyna) && heightBool) {
|
||||
this->actionFunc = func_808870D8;
|
||||
} else if (!heightBool) {
|
||||
this->actionFunc = func_8088706C;
|
||||
|
@ -108,7 +108,7 @@ void func_8088706C(BgHidanFslift* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_808870D8(BgHidanFslift* this, PlayState* play) {
|
||||
if (func_80043590(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerAbove(&this->dyna)) {
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 790.0f, 4.0f)) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
func_80886FB4(this);
|
||||
|
@ -125,12 +125,12 @@ void BgHidanFslift_Update(Actor* thisx, PlayState* play) {
|
|||
BgHidanFslift* this = (BgHidanFslift*)thisx;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_16A == 0) {
|
||||
this->unk_16A = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_16A != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ void func_808896B8(BgHidanHrock* this, PlayState* play) {
|
|||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 5.0f, 1.0f);
|
||||
} else {
|
||||
Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f);
|
||||
|
|
|
@ -209,7 +209,7 @@ void func_8088B5F4(BgHidanRock* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8088B634(BgHidanRock* this, PlayState* play) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->timer = 20;
|
||||
this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x4000;
|
||||
this->actionFunc = func_8088B69C;
|
||||
|
@ -260,12 +260,12 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) {
|
|||
this->unk_16C = CLAMP_MIN(this->unk_16C, 0.0f);
|
||||
|
||||
if (this->type == 0) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
@ -313,12 +313,12 @@ void func_8088B990(BgHidanRock* this, PlayState* play) {
|
|||
|
||||
this->unk_16C = (this->dyna.actor.world.pos.y + 50.0f - this->dyna.actor.home.pos.y + 40.0f) / 80.0f;
|
||||
if (this->type == 0) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ void func_8088E518(BgHidanSima* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.4f);
|
||||
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
this->timer = 20;
|
||||
this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x4000;
|
||||
if (this->dyna.actor.home.pos.y <= this->dyna.actor.world.pos.y) {
|
||||
|
@ -149,7 +149,7 @@ void func_8088E5D0(BgHidanSima* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8088E6D0(BgHidanSima* this, PlayState* play) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->timer = 20;
|
||||
} else if (this->timer != 0) {
|
||||
this->timer--;
|
||||
|
|
|
@ -60,7 +60,7 @@ void func_8088F47C(BgHidanSyoku* this) {
|
|||
}
|
||||
|
||||
void func_8088F4B8(BgHidanSyoku* this, PlayState* play) {
|
||||
if (Flags_GetClear(play, this->dyna.actor.room) && func_8004356C(&this->dyna)) {
|
||||
if (Flags_GetClear(play, this->dyna.actor.room) && DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->timer = 140;
|
||||
this->actionFunc = func_8088F514;
|
||||
}
|
||||
|
@ -108,12 +108,12 @@ void BgHidanSyoku_Update(Actor* thisx, PlayState* play) {
|
|||
BgHidanSyoku* this = (BgHidanSyoku*)thisx;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_168 == 0) {
|
||||
this->unk_168 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!func_8004356C(&this->dyna)) {
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_168 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ void BgIceTurara_Shiver(BgIceTurara* this, PlayState* play) {
|
|||
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z;
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgIceTurara_Fall;
|
||||
} else {
|
||||
sp28 = Rand_ZeroOne();
|
||||
|
@ -166,7 +166,7 @@ void BgIceTurara_Fall(BgIceTurara* this, PlayState* play) {
|
|||
BgIceTurara_Break(this, play, 40.0f);
|
||||
if (this->dyna.actor.params == TURARA_STALACTITE_REGROW) {
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + 120.0f;
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgIceTurara_Regrow;
|
||||
} else {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
|
|
@ -186,7 +186,7 @@ void BgJya1flift_Update(Actor* thisx, PlayState* play2) {
|
|||
// Room 0 is the first room and 6 is the room that the lift starts on
|
||||
if (play->roomCtx.curRoom.num == 6 || play->roomCtx.curRoom.num == 0) {
|
||||
this->actionFunc(this, play);
|
||||
tempIsRiding = func_8004356C(&this->dyna) ? true : false;
|
||||
tempIsRiding = DynaPolyActor_IsPlayerOnTop(&this->dyna) ? true : false;
|
||||
if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) {
|
||||
if (tempIsRiding) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
|
|
|
@ -135,13 +135,14 @@ void BgJyaLift_Update(Actor* thisx, PlayState* play2) {
|
|||
if (this->actionFunc != NULL) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) {
|
||||
if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ABOVE) && !(this->unk_16B & DYNA_INTERACT_PLAYER_ABOVE)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DIRECTED_YAW);
|
||||
} else if (((this->dyna.unk_160 & 4) == 0) && (this->unk_16B & 4) &&
|
||||
} else if (!(this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ABOVE) &&
|
||||
(this->unk_16B & DYNA_INTERACT_PLAYER_ABOVE) &&
|
||||
(play->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_DIRECTED_YAW)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16B = this->dyna.unk_160;
|
||||
this->unk_16B = this->dyna.interactFlags;
|
||||
|
||||
// Spirit Temple room 5 is the main room with the statue room 25 is directly above room 5
|
||||
if ((play->roomCtx.curRoom.num != 5) && (play->roomCtx.curRoom.num != 25)) {
|
||||
|
|
|
@ -50,7 +50,7 @@ void BgMenkuriKaiten_Destroy(Actor* thisx, PlayState* play) {
|
|||
void BgMenkuriKaiten_Update(Actor* thisx, PlayState* play) {
|
||||
BgMenkuriKaiten* this = (BgMenkuriKaiten*)thisx;
|
||||
|
||||
if (!Flags_GetSwitch(play, this->dyna.actor.params) && func_80043590(&this->dyna)) {
|
||||
if (!Flags_GetSwitch(play, this->dyna.actor.params) && DynaPolyActor_IsPlayerAbove(&this->dyna)) {
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
|
||||
this->dyna.actor.shape.rot.y += 0x80;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
|
|||
switch ((u16)this->dyna.actor.params & 0xF) {
|
||||
case MIZUBWALL_FLOOR:
|
||||
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -219,7 +219,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
case MIZUBWALL_RUTO_ROOM:
|
||||
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -254,7 +254,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
case MIZUBWALL_UNUSED:
|
||||
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -291,7 +291,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
case MIZUBWALL_STINGER_ROOM_1:
|
||||
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -329,7 +329,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
case MIZUBWALL_STINGER_ROOM_2:
|
||||
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -467,7 +467,7 @@ void BgMizuBwall_Idle(BgMizuBwall* this, PlayState* play) {
|
|||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Flags_SetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F);
|
||||
this->breakTimer = 1;
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
BgMizuBwall_SpawnDebris(this, play);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
|
||||
|
|
|
@ -57,9 +57,9 @@ void func_8089F788(BgMizuUzu* this, PlayState* play) {
|
|||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (GET_PLAYER(play)->currentBoots == PLAYER_BOOTS_IRON) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_WATER_CONVECTION - SFX_FLAG);
|
||||
thisx->shape.rot.y += 0x1C0;
|
||||
|
|
|
@ -231,7 +231,7 @@ void BgMoriBigst_Update(Actor* thisx, PlayState* play) {
|
|||
if (this->waitTimer > 0) {
|
||||
this->waitTimer--;
|
||||
}
|
||||
if (func_80043590(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerAbove(&this->dyna)) {
|
||||
Environment_ChangeLightSetting(play, 6);
|
||||
}
|
||||
if (this->actionFunc != NULL) {
|
||||
|
|
|
@ -124,7 +124,8 @@ void BgMoriElevator_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
s32 BgMoriElevator_IsPlayerRiding(BgMoriElevator* this, PlayState* play) {
|
||||
return ((this->dyna.unk_160 & 2) && !(this->unk_170 & 2) &&
|
||||
return ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) &&
|
||||
!(this->unk_170 & DYNA_INTERACT_PLAYER_ON_TOP) &&
|
||||
((GET_PLAYER(play)->actor.world.pos.y - this->dyna.actor.world.pos.y) < 80.0f));
|
||||
}
|
||||
|
||||
|
@ -243,7 +244,7 @@ void BgMoriElevator_Update(Actor* thisx, PlayState* play) {
|
|||
BgMoriElevator* this = (BgMoriElevator*)thisx;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
this->unk_170 = this->dyna.unk_160;
|
||||
this->unk_170 = this->dyna.interactFlags;
|
||||
this->unk_16C = Flags_GetSwitch(play, (thisx->params & 0x3F));
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ void func_808ADEF0(BgSpot03Taki* this, PlayState* play) {
|
|||
if (this->openingAlpha > 0) {
|
||||
this->openingAlpha -= 5;
|
||||
if (this->openingAlpha <= 0.0f) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->timer = 400;
|
||||
this->state = WATERFALL_OPENED;
|
||||
this->openingAlpha = 0;
|
||||
|
@ -96,7 +96,7 @@ void func_808ADEF0(BgSpot03Taki* this, PlayState* play) {
|
|||
if (this->openingAlpha < 255.0f) {
|
||||
this->openingAlpha += 5.0f;
|
||||
if (this->openingAlpha >= 255.0f) {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->state = WATERFALL_CLOSED;
|
||||
this->openingAlpha = 255.0f;
|
||||
Flags_UnsetSwitch(play, this->switchFlag);
|
||||
|
|
|
@ -98,8 +98,8 @@ void BgSpot08Iceblock_SinkUnderPlayer(BgSpot08Iceblock* this) {
|
|||
break;
|
||||
}
|
||||
|
||||
// Sink under Player's weight if standing on it
|
||||
target = (func_80043548(&this->dyna) ? -4.0f : 0.0f);
|
||||
// Sink under an actor's weight if standing on it
|
||||
target = (DynaPolyActor_IsActorOnTop(&this->dyna) ? -4.0f : 0.0f);
|
||||
|
||||
Math_StepToF(&this->sinkOffset, target, step);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ void BgSpot08Iceblock_Roll(BgSpot08Iceblock* this, PlayState* play) {
|
|||
surfaceNormalHorizontal.z = this->surfaceNormal.z;
|
||||
|
||||
// If player is standing on it or holding the edge
|
||||
if (func_8004356C(&this->dyna) && (playerCentroidDist > 3.0f)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && (playerCentroidDist > 3.0f)) {
|
||||
Math_Vec3f_Diff(&playerCentroidDiff, &surfaceNormalHorizontal, &playerMoment);
|
||||
BgSpot08Iceblock_MultVectorScalar(&playerMoment, &playerMoment,
|
||||
(sInertias[rollDataIndex] * playerCentroidDist) / this->dyna.actor.scale.x);
|
||||
|
|
|
@ -225,7 +225,7 @@ void func_808B7BCC(BgSpot18Basket* this, PlayState* play) {
|
|||
this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) {
|
||||
OnePointCutscene_Init(play, 4210, 240, &this->dyna.actor, CAM_ID_MAIN);
|
||||
func_808B7D38(this);
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void func_808B7FC0(BgSpot18Basket* this, PlayState* play) {
|
|||
this->dyna.actor.shape.rot.y = arrayValue;
|
||||
|
||||
func_808B818C(this);
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,13 +60,13 @@ void BgSstFloor_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (1) {}
|
||||
|
||||
if (func_80043590(&this->dyna) && (this->dyna.actor.yDistToPlayer < 1000.0f)) {
|
||||
if (DynaPolyActor_IsPlayerAbove(&this->dyna) && (this->dyna.actor.yDistToPlayer < 1000.0f)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BOSS_BONGO);
|
||||
} else {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
||||
if (func_8004356C(&this->dyna) && (player->fallDistance > 1000.0f)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && (player->fallDistance > 1000.0f)) {
|
||||
this->dyna.actor.params = 1;
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH);
|
||||
}
|
||||
|
@ -80,7 +80,8 @@ void BgSstFloor_Update(Actor* thisx, PlayState* play) {
|
|||
this->dyna.actor.params = BONGOFLOOR_REST;
|
||||
this->drumPhase = 28;
|
||||
|
||||
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna) &&
|
||||
!(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14))) {
|
||||
distFromRim = 600.0f - this->dyna.actor.xzDistToPlayer;
|
||||
if (distFromRim > 0.0f) {
|
||||
if (distFromRim > 350.0f) {
|
||||
|
@ -117,7 +118,7 @@ void BgSstFloor_Update(Actor* thisx, PlayState* play) {
|
|||
this->drumPhase--;
|
||||
}
|
||||
if (1) {}
|
||||
func_8003EE6C(play, &play->colCtx.dyna);
|
||||
DynaPoly_InvalidateLookup(play, &play->colCtx.dyna);
|
||||
}
|
||||
|
||||
void BgSstFloor_Draw(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -250,7 +250,7 @@ void BgYdanSp_FloorWebBreaking(BgYdanSp* this, PlayState* play) {
|
|||
|
||||
this->dyna.actor.world.pos.y = (sinf((f32)this->timer * (M_PI / 20)) * this->unk_16C) + this->dyna.actor.home.pos.y;
|
||||
if (this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 190.0f) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->timer = 40;
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
Flags_SetSwitch(play, this->isDestroyedSwitchFlag);
|
||||
|
@ -288,7 +288,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, PlayState* play) {
|
|||
BgYdanSp_BurnWeb(this, play);
|
||||
return;
|
||||
}
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
sqrtFallDistance = sqrtf(CLAMP_MIN(player->fallDistance, 0.0f));
|
||||
if (player->fallDistance > 750.0f) {
|
||||
if (this->dyna.actor.xzDistToPlayer < 80.0f) {
|
||||
|
|
|
@ -50,8 +50,8 @@ void DoorToki_Update(Actor* thisx, PlayState* play) {
|
|||
DoorToki* this = (DoorToki*)thisx;
|
||||
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
|
|||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&gTreasureChestCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
func_8003ECA8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCeilingCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
this->movementFlags = 0;
|
||||
this->type = thisx->params >> 12 & 0xF;
|
||||
|
@ -126,7 +126,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
|
|||
animFrameStart = endFrame;
|
||||
} else if ((this->type == ENBOX_TYPE_SWITCH_FLAG_FALL_BIG || this->type == ENBOX_TYPE_SWITCH_FLAG_FALL_SMALL) &&
|
||||
!Flags_GetSwitch(play, this->switchFlag)) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
this->movementFlags |= ENBOX_MOVE_FALL_ANGLE_SIDE;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
|
|||
} else if ((this->type == ENBOX_TYPE_ROOM_CLEAR_BIG || this->type == ENBOX_TYPE_ROOM_CLEAR_SMALL) &&
|
||||
!Flags_GetClear(play, this->dyna.actor.room)) {
|
||||
EnBox_SetupAction(this, EnBox_AppearOnRoomClear);
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
|
||||
this->alpha = 0;
|
||||
|
@ -146,14 +146,14 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
|
|||
} else if (this->type == ENBOX_TYPE_9 || this->type == ENBOX_TYPE_10) {
|
||||
EnBox_SetupAction(this, func_809C9700);
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_25;
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
|
||||
this->alpha = 0;
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_4;
|
||||
} else if (this->type == ENBOX_TYPE_SWITCH_FLAG_BIG && !Flags_GetSwitch(play, this->switchFlag)) {
|
||||
EnBox_SetupAction(this, EnBox_AppearOnSwitchFlag);
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
|
||||
this->alpha = 0;
|
||||
|
@ -273,7 +273,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, PlayState* play) {
|
|||
if (this->unk_1A8 >= 0) {
|
||||
EnBox_SetupAction(this, EnBox_Fall);
|
||||
this->subCamId = OnePointCutscene_Init(play, 4500, 9999, &this->dyna.actor, CAM_ID_MAIN);
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
} else if (this->unk_1A8 >= -11) {
|
||||
this->unk_1A8++;
|
||||
} else if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
|
@ -367,7 +367,7 @@ void EnBox_AppearInit(EnBox* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnBox_AppearAnimation(EnBox* this, PlayState* play) {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
if (this->unk_1A8 < 0) {
|
||||
this->unk_1A8++;
|
||||
|
|
|
@ -104,7 +104,7 @@ void EnBrob_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_809CADDC(EnBrob* this, PlayState* play) {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->timer = this->actionFunc == func_809CB2B8 ? 200 : 0;
|
||||
this->unk_1AE = 0;
|
||||
this->actionFunc = func_809CB054;
|
||||
|
@ -112,7 +112,7 @@ void func_809CADDC(EnBrob* this, PlayState* play) {
|
|||
|
||||
void func_809CAE44(EnBrob* this, PlayState* play) {
|
||||
Animation_PlayOnce(&this->skelAnime, &object_brob_Anim_001750);
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->unk_1AE = 1000;
|
||||
this->actionFunc = func_809CB114;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ void func_809CB054(EnBrob* this, PlayState* play) {
|
|||
this->timer--;
|
||||
}
|
||||
if (this->timer == 0) {
|
||||
if (func_8004356C(&this->dyna) != 0) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
func_8002F71C(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 1.0f);
|
||||
func_809CAE44(this, play);
|
||||
} else if (this->dyna.actor.xzDistToPlayer < 300.0f) {
|
||||
|
|
|
@ -119,7 +119,7 @@ void EnJj_Init(Actor* thisx, PlayState* play2) {
|
|||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
CollisionHeader_GetVirtual(&gJabuJabuBodyCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
func_8003ECA8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCeilingCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dyna.actor.update = EnJj_UpdateStaticCollision;
|
||||
this->dyna.actor.draw = NULL;
|
||||
Actor_SetScale(&this->dyna.actor, 0.087f);
|
||||
|
@ -182,7 +182,7 @@ void EnJj_OpenMouth(EnJj* this, PlayState* play) {
|
|||
this->mouthOpenAngle -= 102;
|
||||
|
||||
if (this->mouthOpenAngle < -2600) {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, bodyCollisionActor->bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, bodyCollisionActor->bgId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ void EnJj_BeginCutscene(EnJj* this, PlayState* play) {
|
|||
EnJj_SetupAction(this, EnJj_RemoveDust);
|
||||
play->csCtx.segment = &D_80A88164;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
func_8003EBF8(play, &play->colCtx.dyna, bodyCollisionActor->bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, bodyCollisionActor->bgId);
|
||||
func_8005B1A4(GET_ACTIVE_CAM(play));
|
||||
SET_EVENTCHKINF(EVENTCHKINF_3A);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
|
|
|
@ -51,7 +51,7 @@ void EnLightbox_Init(Actor* thisx, PlayState* play) {
|
|||
thisx->colChkInfo.cylRadius = 30;
|
||||
thisx->colChkInfo.cylHeight = 50;
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 6.0f);
|
||||
this->dyna.unk_160 = 0;
|
||||
this->dyna.interactFlags = 0;
|
||||
this->dyna.unk_15C = 0;
|
||||
thisx->targetMode = 0;
|
||||
thisx->gravity = -2.0f;
|
||||
|
|
|
@ -51,7 +51,7 @@ void EnPubox_Init(Actor* thisx, PlayState* play) {
|
|||
thisx->uncullZoneDownward = 1200.0f;
|
||||
thisx->uncullZoneScale = 720.0f;
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 6.0f);
|
||||
this->dyna.unk_160 = 0;
|
||||
this->dyna.interactFlags = 0;
|
||||
this->dyna.unk_15C = DPM_UNK;
|
||||
thisx->targetMode = 1;
|
||||
thisx->gravity = -2.0f;
|
||||
|
|
|
@ -127,7 +127,7 @@ void func_80AFBE8C(EnSiofuki* this, PlayState* play) {
|
|||
|
||||
if ((dX > (this->dyna.actor.scale.x * -346.0f)) && (dX < (this->dyna.actor.scale.x * 346.0f)) &&
|
||||
(dZ > (this->dyna.actor.scale.z * -400.0f)) && (dZ < (this->dyna.actor.scale.z * 400.0f)) && (dY < 0.0f)) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->splashTimer <= 0) {
|
||||
EffectSsGSplash_Spawn(play, &player->actor.world.pos, NULL, NULL, 1, 1);
|
||||
this->splashTimer = 10;
|
||||
|
|
|
@ -750,7 +750,7 @@ void ObjBean_SetupWaitForPlayer(ObjBean* this) {
|
|||
}
|
||||
|
||||
void ObjBean_WaitForPlayer(ObjBean* this, PlayState* play) {
|
||||
if (func_8004356C(&this->dyna)) { // Player is standing on
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
ObjBean_SetupFly(this);
|
||||
if (play->sceneNum == SCENE_SPOT10) { // Lost woods
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BEAN_LOST_WOODS);
|
||||
|
@ -784,7 +784,7 @@ void ObjBean_Fly(ObjBean* this, PlayState* play) {
|
|||
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
|
||||
}
|
||||
|
||||
} else if (func_8004356C(&this->dyna) != 0) { // Player is on top
|
||||
} else if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
|
||||
func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG);
|
||||
|
||||
|
@ -810,7 +810,7 @@ void ObjBean_SetupWaitForStepOff(ObjBean* this) {
|
|||
}
|
||||
|
||||
void ObjBean_WaitForStepOff(ObjBean* this, PlayState* play) {
|
||||
if (!func_80043590(&this->dyna)) {
|
||||
if (!DynaPolyActor_IsPlayerAbove(&this->dyna)) {
|
||||
ObjBean_SetupWaitForPlayer(this);
|
||||
}
|
||||
ObjBean_UpdatePosition(this);
|
||||
|
@ -822,7 +822,7 @@ void func_80B908EC(ObjBean* this) {
|
|||
}
|
||||
|
||||
void func_80B90918(ObjBean* this, PlayState* play) {
|
||||
if (!func_8004356C(&this->dyna)) {
|
||||
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
ObjBean_SetupPathCount(this, play);
|
||||
ObjBean_SetupPath(this, play);
|
||||
ObjBean_Move(this);
|
||||
|
@ -856,9 +856,9 @@ void func_80B90A34(ObjBean* this, PlayState* play) {
|
|||
|
||||
func_80B8EE24(this);
|
||||
if (trampled) {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
if ((this->timer <= 0) && (!trampled)) {
|
||||
func_80B8EBC8(this);
|
||||
|
@ -894,7 +894,7 @@ void ObjBean_Update(Actor* thisx, PlayState* play) {
|
|||
osSyncPrintf("馬と豆の木リフト衝突!!!\n");
|
||||
osSyncPrintf(VT_RST);
|
||||
ObjBean_Break(this, play);
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
func_80B908EC(this);
|
||||
}
|
||||
} else {
|
||||
|
@ -902,7 +902,7 @@ void ObjBean_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
Actor_SetFocus(&this->dyna.actor, 6.0f);
|
||||
if (this->stateFlags & BEAN_STATE_DYNAPOLY_SET) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->stateFlags |= BEAN_STATE_PLAYER_ON_TOP;
|
||||
} else {
|
||||
this->stateFlags &= ~BEAN_STATE_PLAYER_ON_TOP;
|
||||
|
|
|
@ -85,7 +85,7 @@ void func_80B92C80(ObjElevator* this, PlayState* play) {
|
|||
f32 sub;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if ((this->dyna.unk_160 & 2) && !(this->unk_170 & 2)) {
|
||||
if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && !(this->unk_170 & DYNA_INTERACT_PLAYER_ON_TOP)) {
|
||||
sub = thisx->world.pos.y - thisx->home.pos.y;
|
||||
if (fabsf(sub) < 0.1f) {
|
||||
this->unk_168 = thisx->home.pos.y + ((thisx->params >> 0xC) & 0xF) * 80.0f;
|
||||
|
@ -117,7 +117,7 @@ void ObjElevator_Update(Actor* thisx, PlayState* play) {
|
|||
if (this->actionFunc) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
this->unk_170 = this->dyna.unk_160;
|
||||
this->unk_170 = this->dyna.interactFlags;
|
||||
}
|
||||
|
||||
void ObjElevator_Draw(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -148,7 +148,7 @@ void ObjKibako2_Idle(ObjKibako2* this, PlayState* play) {
|
|||
ObjKibako2_Break(this, play);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_4;
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dyna.actor.draw = NULL;
|
||||
this->actionFunc = ObjKibako2_Kill;
|
||||
} else if (this->dyna.actor.xzDistToPlayer < 600.0f) {
|
||||
|
|
|
@ -137,7 +137,7 @@ void func_80B96560(ObjLift* this, PlayState* play) {
|
|||
s32 pad;
|
||||
s32 quakeIndex;
|
||||
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->timer <= 0) {
|
||||
if (((this->dyna.actor.params >> 8) & 7) == 7) {
|
||||
func_80B967C0(this);
|
||||
|
|
|
@ -491,7 +491,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
|
|||
} else {
|
||||
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId);
|
||||
if (dynaPolyActor != NULL) {
|
||||
func_800434A8(dynaPolyActor);
|
||||
DynaPolyActor_SetActorOnTop(dynaPolyActor);
|
||||
func_80043538(dynaPolyActor);
|
||||
|
||||
if ((this->timer <= 0) && (fabsf(this->dyna.unk_150) > 0.001f)) {
|
||||
|
@ -520,7 +520,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
|
|||
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId);
|
||||
|
||||
if ((dynaPolyActor != NULL) && (dynaPolyActor->unk_15C & 1)) {
|
||||
func_800434A8(dynaPolyActor);
|
||||
DynaPolyActor_SetActorOnTop(dynaPolyActor);
|
||||
func_80043538(dynaPolyActor);
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
|
||||
} else {
|
||||
|
|
|
@ -386,13 +386,14 @@ void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) {
|
|||
} else {
|
||||
switch (this->dyna.actor.params >> 4 & 7) {
|
||||
case OBJSWITCH_SUBTYPE_ONCE:
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
ObjSwitch_FloorPressInit(this);
|
||||
ObjSwitch_SetOn(this, play);
|
||||
}
|
||||
break;
|
||||
case OBJSWITCH_SUBTYPE_TOGGLE:
|
||||
if ((this->dyna.unk_160 & 2) && !(this->unk_17F & 2)) {
|
||||
if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) &&
|
||||
!(this->unk_17F & DYNA_INTERACT_PLAYER_ON_TOP)) {
|
||||
ObjSwitch_FloorPressInit(this);
|
||||
ObjSwitch_SetOn(this, play);
|
||||
}
|
||||
|
@ -444,7 +445,8 @@ void ObjSwitch_FloorDown(ObjSwitch* this, PlayState* play) {
|
|||
}
|
||||
break;
|
||||
case OBJSWITCH_SUBTYPE_TOGGLE:
|
||||
if ((this->dyna.unk_160 & 2) && !(this->unk_17F & 2)) {
|
||||
if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) &&
|
||||
!(this->unk_17F & DYNA_INTERACT_PLAYER_ON_TOP)) {
|
||||
ObjSwitch_FloorReleaseInit(this);
|
||||
ObjSwitch_SetOff(this, play);
|
||||
}
|
||||
|
@ -691,7 +693,7 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) {
|
|||
switch (this->dyna.actor.params & 7) {
|
||||
case OBJSWITCH_TYPE_FLOOR:
|
||||
case OBJSWITCH_TYPE_FLOOR_RUSTY:
|
||||
this->unk_17F = this->dyna.unk_160;
|
||||
this->unk_17F = this->dyna.interactFlags;
|
||||
break;
|
||||
case OBJSWITCH_TYPE_EYE:
|
||||
this->unk_17F = this->tris.col.base.acFlags;
|
||||
|
|
|
@ -147,7 +147,7 @@ void ObjTimeblock_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
u8 ObjTimeblock_PlayerIsInRange(ObjTimeblock* this, PlayState* play) {
|
||||
if (this->isVisible && func_80043590(&this->dyna)) {
|
||||
if (this->isVisible && DynaPolyActor_IsPlayerAbove(&this->dyna)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -324,9 +324,9 @@ void ObjTimeblock_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->isVisible) {
|
||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ s32 func_80BA1ECC(ObjWarp2block* this, PlayState* play) {
|
|||
Vec3f sp20;
|
||||
f32 temp_f2;
|
||||
|
||||
if (func_80043590(&this->dyna)) {
|
||||
if (DynaPolyActor_IsPlayerAbove(&this->dyna)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -9598,13 +9598,13 @@ s32 func_80847A78(Player* this) {
|
|||
if (!cond) {
|
||||
this->hoverBootsTimer = 19;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
D_808535E4 = 0;
|
||||
this->unk_898 = this->unk_89A = D_80853610 = 0;
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
static Vec3f D_80854798 = { 0.0f, 18.0f, 0.0f };
|
||||
|
@ -9694,7 +9694,7 @@ void func_80847BA0(PlayState* play, Player* this) {
|
|||
Environment_ChangeLightSetting(
|
||||
play, SurfaceType_GetLightSettingIndex(&play->colCtx, floorPoly, this->actor.floorBgId));
|
||||
} else {
|
||||
func_80043508(&play->colCtx, this->actor.floorBgId);
|
||||
DynaPoly_SetPlayerAbove(&play->colCtx, this->actor.floorBgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9843,7 +9843,7 @@ void func_80847BA0(PlayState* play, Player* this) {
|
|||
s32 pad3;
|
||||
|
||||
if (this->actor.floorBgId != BGCHECK_SCENE) {
|
||||
func_800434C8(&play->colCtx, this->actor.floorBgId);
|
||||
DynaPoly_SetPlayerOnTop(&play->colCtx, this->actor.floorBgId);
|
||||
}
|
||||
|
||||
floorPolyNormalX = COLPOLY_GET_NORMAL(floorPoly->normal.x);
|
||||
|
|
Loading…
Reference in a new issue