mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +00:00
Defines for Actor#bgCheckFlags
(#1126)
* First pass, tool assisted bgCheckFlags * Few manual bgCheckFlags * Run formatter * Remove fake bgCheckFlags 10-15 * Move existing documentation to the defines * Comment on `bgCheckFlags` and rephrase some doc * Name obvious flags, and some cleanup * Comment on flag 9 being wall-interaction-related (thanks engineer and fig) * Run formatter * `BGCHECKFLAG_7` -> `BGCHECKFLAG_GROUND_STRICT` * Touch up water-related bgcheckflags doc * `BGCHECKFLAG_9` -> `BGCHECKFLAG_PLAYER_WALL_INTERACT`
This commit is contained in:
parent
251d90301c
commit
67f294774b
121 changed files with 711 additions and 652 deletions
|
@ -235,11 +235,11 @@ void EnBombf_Move(EnBombf* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->flowerBombScale = 1.0f;
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.025f, 0.0f);
|
||||
} else {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f);
|
||||
if ((this->actor.bgCheckFlags & 2) && (this->actor.velocity.y < -6.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -6.0f)) {
|
||||
func_8002F850(globalCtx, &this->actor);
|
||||
this->actor.velocity.y *= -0.5f;
|
||||
} else if (this->timer >= 4) {
|
||||
|
@ -345,12 +345,12 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (thisx->params == BOMBFLOWER_BODY) {
|
||||
|
||||
if ((thisx->velocity.y > 0.0f) && (thisx->bgCheckFlags & 0x10)) {
|
||||
if ((thisx->velocity.y > 0.0f) && (thisx->bgCheckFlags & BGCHECKFLAG_CEILING)) {
|
||||
thisx->velocity.y = -thisx->velocity.y;
|
||||
}
|
||||
|
||||
// rebound bomb off the wall it hits
|
||||
if ((thisx->speedXZ != 0.0f) && (thisx->bgCheckFlags & 8)) {
|
||||
if ((thisx->speedXZ != 0.0f) && (thisx->bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
|
||||
if (ABS((s16)(thisx->wallYaw - thisx->world.rot.y)) > 0x4000) {
|
||||
if (1) {}
|
||||
|
@ -362,7 +362,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_UpdateBgCheckInfo(globalCtx, thisx, 5.0f, 10.0f, 0.0f, 0x1F);
|
||||
DREG(6) = 0;
|
||||
thisx->speedXZ *= 0.7f;
|
||||
thisx->bgCheckFlags &= ~8;
|
||||
thisx->bgCheckFlags &= ~BGCHECKFLAG_WALL;
|
||||
}
|
||||
|
||||
if ((this->bombCollider.base.acFlags & AC_HIT) || ((this->bombCollider.base.ocFlags1 & OC1_HIT) &&
|
||||
|
@ -457,8 +457,8 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
if (thisx->bgCheckFlags & 0x40) {
|
||||
thisx->bgCheckFlags &= ~0x40;
|
||||
if (thisx->bgCheckFlags & BGCHECKFLAG_WATER_TOUCH) {
|
||||
thisx->bgCheckFlags &= ~BGCHECKFLAG_WATER_TOUCH;
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_BOMB_DROP_WATER);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue