1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-18 13:00:23 +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:
Dragorn421 2022-06-25 06:53:26 -07:00 committed by GitHub
parent 397e481f9a
commit ed0ab877c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 206 additions and 190 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}

View file

@ -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);

View file

@ -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);
}

View file

@ -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--;

View file

@ -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);
}

View file

@ -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);

View file

@ -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);

View file

@ -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)) {

View file

@ -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;
}

View file

@ -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);

View file

@ -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;

View file

@ -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) {

View file

@ -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));
}

View file

@ -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);

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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) {

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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++;

View file

@ -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) {

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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) {

View file

@ -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) {

View file

@ -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);

View file

@ -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 {

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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);