mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 15:01:17 +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
|
@ -80,7 +80,7 @@ static AnimationInfo sAnimationInfo[] = {
|
|||
s32 EnFw_DoBounce(EnFw* this, s32 totalBounces, f32 yVelocity) {
|
||||
s16 temp_v1;
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1) || (this->actor.velocity.y > 0.0f)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.velocity.y > 0.0f)) {
|
||||
// not on the ground or moving upwards.
|
||||
return false;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ void EnFw_Run(EnFw* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
if (!(this->actor.bgCheckFlags & 1) || this->actor.velocity.y > 0.0f) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || this->actor.velocity.y > 0.0f) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->damageTimer);
|
||||
return;
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ void EnFw_TurnToParentInitPos(EnFw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnFw_JumpToParentInitPos(EnFw* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.bgCheckFlags & 1 && this->actor.velocity.y <= 0.0f) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && this->actor.velocity.y <= 0.0f) {
|
||||
this->actor.parent->params |= 0x8000;
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue