diff options
| author | theo3 <arisstephenson2@gmail.com> | 2023-12-30 17:13:42 -0800 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2023-12-30 17:13:42 -0800 |
| commit | fb9f59fbbbd1ec2db3a3e757a3dab9a0e563520c (patch) | |
| tree | 0c091f4a07d0e8b188db3336eb84ac25064f2618 /src/enemy | |
| parent | 37723f560798698a2a17d0b29ee7baca1a8cb1c7 (diff) | |
label BounceUpdate asm
Diffstat (limited to 'src/enemy')
| -rw-r--r-- | src/enemy/acroBandits.c | 2 | ||||
| -rw-r--r-- | src/enemy/beetle.c | 2 | ||||
| -rw-r--r-- | src/enemy/bobomb.c | 2 | ||||
| -rw-r--r-- | src/enemy/bombPeahat.c | 4 | ||||
| -rw-r--r-- | src/enemy/chuchu.c | 2 | ||||
| -rw-r--r-- | src/enemy/cloudPiranha.c | 2 | ||||
| -rw-r--r-- | src/enemy/cuccoAggr.c | 2 | ||||
| -rw-r--r-- | src/enemy/fallingBoulder.c | 2 | ||||
| -rw-r--r-- | src/enemy/helmasaur.c | 2 | ||||
| -rw-r--r-- | src/enemy/peahat.c | 2 | ||||
| -rw-r--r-- | src/enemy/rollobite.c | 6 | ||||
| -rw-r--r-- | src/enemy/rope.c | 2 | ||||
| -rw-r--r-- | src/enemy/spikedBeetle.c | 6 | ||||
| -rw-r--r-- | src/enemy/tektite.c | 4 | ||||
| -rw-r--r-- | src/enemy/tektiteGolden.c | 4 | ||||
| -rw-r--r-- | src/enemy/vaatiTransfigured.c | 4 |
16 files changed, 24 insertions, 24 deletions
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c index 58457d1d..e80b7eb3 100644 --- a/src/enemy/acroBandits.c +++ b/src/enemy/acroBandits.c @@ -509,7 +509,7 @@ void AcroBandit_Type1Action6(Entity* this) { void AcroBandit_Type1Action7(Entity* this) { ProcessMovement2(this); - if (sub_080044EC(this, 0x2000) == 0) + if (BounceUpdate(this, Q_8_8(32.0)) == BOUNCE_DONE_ALL) this->action = 8; } diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c index 451d9aea..3fd4457b 100644 --- a/src/enemy/beetle.c +++ b/src/enemy/beetle.c @@ -114,7 +114,7 @@ void sub_080218CC(Entity* this) { GetNextFrame(this); if (this->frame & 1) { ProcessMovement2(this); - if (sub_080044EC(this, 0x1c00) == 0) + if (BounceUpdate(this, Q_8_8(28.0)) == BOUNCE_DONE_ALL) this->frameDuration = 1; } diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c index ad7ceff0..234b032e 100644 --- a/src/enemy/bobomb.c +++ b/src/enemy/bobomb.c @@ -242,7 +242,7 @@ void sub_0802CAF8(Entity* this) { if (--this->timer == 0) { sub_0802CBC4(this); } else { - if (this->field_0x80.HALF.HI && sub_080044EC(this, 0x2800) == 1) { + if (this->field_0x80.HALF.HI && BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_INIT_NEXT) { EnqueueSFX(SFX_PLACE_OBJ); } sub_0802CC18(this); diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c index ab856221..79a83a7f 100644 --- a/src/enemy/bombPeahat.c +++ b/src/enemy/bombPeahat.c @@ -462,7 +462,7 @@ void sub_0802AEBC(Entity* this) { void sub_0802AED4(Entity* this) { GetNextFrame(this); if (this->field_0x80.HALF.HI < 2) { - if (sub_080044EC(this, 0x2800) == 1) { + if (BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_INIT_NEXT) { this->field_0x80.HALF.HI++; } } else { @@ -661,7 +661,7 @@ void sub_0802B1BC(Entity* this) { #endif void sub_0802B204(Entity* this) { - if (sub_080044EC(this, 0x2800) == 1) { + if (BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_INIT_NEXT) { Entity* ent = CreateEnemy(BOBOMB, 1); if (ent != NULL) { CopyPosition(this, ent); diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c index 82de5555..c2c62822 100644 --- a/src/enemy/chuchu.c +++ b/src/enemy/chuchu.c @@ -704,7 +704,7 @@ void sub_0801FB68(Entity* this) { } u32 sub_0801FBD0(Entity* this) { - if (GetTileUnderEntity(this) == 0x10) { + if (GetActTile(this) == 0x10) { return 1; } else { return 0; diff --git a/src/enemy/cloudPiranha.c b/src/enemy/cloudPiranha.c index d9ae589f..6e059ed7 100644 --- a/src/enemy/cloudPiranha.c +++ b/src/enemy/cloudPiranha.c @@ -178,7 +178,7 @@ void CloudPiranha_Action3(CloudPiranhaEntity* this) { void CloudPiranha_Action4(CloudPiranhaEntity* this) { Entity* effect; sub_080387F0(this); - if (sub_080044EC(super, 0x1800) == 1) { + if (BounceUpdate(super, Q_8_8(24.0)) == BOUNCE_INIT_NEXT) { super->action = 1; super->hitType = 0x72; super->timer = 1; diff --git a/src/enemy/cuccoAggr.c b/src/enemy/cuccoAggr.c index c14a4464..5bd8cae2 100644 --- a/src/enemy/cuccoAggr.c +++ b/src/enemy/cuccoAggr.c @@ -171,7 +171,7 @@ void sub_08038F44(CuccoAggrEntity* this) { super->direction = GetFacingDirection(&gPlayerEntity, super); sub_080390F8(this); ProcessMovement0(super); - sub_080044EC(super, 0x1800); + BounceUpdate(super, Q_8_8(24.0)); GetNextFrame(super); sub_08039298(this); if (--this->unk_78 == 0) { diff --git a/src/enemy/fallingBoulder.c b/src/enemy/fallingBoulder.c index 5f9f5ce2..40666e63 100644 --- a/src/enemy/fallingBoulder.c +++ b/src/enemy/fallingBoulder.c @@ -81,7 +81,7 @@ void sub_0802C334(Entity* this) { } GetNextFrame(this); this->field_0x7c.HALF.HI = COORD_TO_TILE(this); - if (sub_080044EC(this, *(u32*)&this->cutsceneBeh) == 1) { + if (BounceUpdate(this, *(u32*)&this->cutsceneBeh) == BOUNCE_INIT_NEXT) { EnqueueSFX(0x14c); COLLISION_ON(this); this->field_0x7a.HWORD = 0xc; diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c index 122ac212..01eb1fab 100644 --- a/src/enemy/helmasaur.c +++ b/src/enemy/helmasaur.c @@ -218,7 +218,7 @@ void sub_0802BEBC(Entity* this) { this->direction ^= DirectionSouth; ProcessMovement2(this); this->direction ^= DirectionSouth; - if (!sub_080044EC(this, Q_16_16(0.125))) { + if (BounceUpdate(this, Q_16_16(0.125)) == BOUNCE_DONE_ALL) { sub_0802C1C0(this); } } diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c index a6ba87da..18634e49 100644 --- a/src/enemy/peahat.c +++ b/src/enemy/peahat.c @@ -232,7 +232,7 @@ void Peahat_ChargeEnd(Entity* this) { void Peahat_Stunned(Entity* this) { switch (this->animationState) { default: - if (sub_080044EC(this, 0x1800) == 0) { + if (BounceUpdate(this, Q_8_8(24.0)) == BOUNCE_DONE_ALL) { this->action = 6; this->timer = 240; this->subtimer = 10; diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c index e064cfeb..c33b7aa4 100644 --- a/src/enemy/rollobite.c +++ b/src/enemy/rollobite.c @@ -181,16 +181,16 @@ void Rollobite_RolledUp(Entity* this) { if ((this->frame & ANIM_DONE) == 0) GetNextFrame(this); - unk = sub_080044EC(this, 0x2800); + unk = BounceUpdate(this, Q_8_8(40.0)); - if (unk == 0) { + if (unk == BOUNCE_DONE_ALL) { if (--this->timer == 0) { this->action = 5; InitializeAnimation(this, this->animationState + 12); } RegisterCarryEntity(this); } else { - if (unk == 1) + if (unk == BOUNCE_INIT_NEXT) EnqueueSFX(SFX_PLACE_OBJ); if (!(this->direction & DIR_NOT_MOVING_CHECK)) diff --git a/src/enemy/rope.c b/src/enemy/rope.c index 098d4b89..590e0f5f 100644 --- a/src/enemy/rope.c +++ b/src/enemy/rope.c @@ -196,7 +196,7 @@ void sub_08031600(Entity* this) { u32 sub_0803163C(Entity* this) { u32 h; - if (GetTileUnderEntity(this) == 0x13) { + if (GetActTile(this) == 0x13) { h = this->field_0x7a.HWORD / 2; } else { h = this->field_0x7a.HWORD; diff --git a/src/enemy/spikedBeetle.c b/src/enemy/spikedBeetle.c index 6cb42502..1508beab 100644 --- a/src/enemy/spikedBeetle.c +++ b/src/enemy/spikedBeetle.c @@ -153,12 +153,12 @@ void sub_0802B880(Entity* this) { void sub_0802B8B0(Entity* this) { ProcessMovement2(this); - switch (sub_080044EC(this, 0x1800)) { - case 0: + switch (BounceUpdate(this, Q_8_8(24.0))) { + case BOUNCE_DONE_ALL: this->action = 7; this->timer = 150; /* fallthrough */ - case 1: + case BOUNCE_INIT_NEXT: EnqueueSFX(SFX_12B); break; } diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c index 02a1c4ba..3d4d077c 100644 --- a/src/enemy/tektite.c +++ b/src/enemy/tektite.c @@ -141,7 +141,7 @@ void sub_0802F300(Entity* this) { temp = this->z.HALF.HI; rand = Random() & 0xf; - if (sub_080044EC(this, this->field_0x80.HWORD) == 1) { + if (BounceUpdate(this, this->field_0x80.HWORD) == BOUNCE_INIT_NEXT) { this->action = 3; this->subAction = 0; if (this->type != 0) { @@ -158,7 +158,7 @@ void sub_0802F300(Entity* this) { return; } else if (this->collisions != COL_NONE) { sub_0800417E(this, this->collisions); - } else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) { + } else if ((GetActTile(this) & 0xf0) == 0x50) { this->direction = (this->direction + 0x10) & (0x3 | DirectionNorthWest); } diff --git a/src/enemy/tektiteGolden.c b/src/enemy/tektiteGolden.c index fa967d18..86c9f155 100644 --- a/src/enemy/tektiteGolden.c +++ b/src/enemy/tektiteGolden.c @@ -127,7 +127,7 @@ void sub_08038048(Entity* this) { temp = this->z.HALF.HI; rand = Random() & 0xf; - if (sub_080044EC(this, 0x3000) == 1) { + if (BounceUpdate(this, Q_8_8(48.0)) == BOUNCE_INIT_NEXT) { this->action = 3; this->subAction = 0; this->timer = 20; @@ -135,7 +135,7 @@ void sub_08038048(Entity* this) { return; } else if (this->collisions != COL_NONE) { sub_0800417E(this, this->collisions); - } else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) { + } else if ((GetActTile(this) & 0xf0) == 0x50) { this->direction = (this->direction + 0x10) & (0x3 | DirectionNorthWest); } diff --git a/src/enemy/vaatiTransfigured.c b/src/enemy/vaatiTransfigured.c index 57b830d6..7e351588 100644 --- a/src/enemy/vaatiTransfigured.c +++ b/src/enemy/vaatiTransfigured.c @@ -265,8 +265,8 @@ void VaatiTransfiguredType0Action3(Entity* this) { switch (this->field_0x80.HALF.LO) { case 0: - uVar4 = sub_080044EC(this, 0x2800); - if (uVar4 != 1) + uVar4 = BounceUpdate(this, Q_8_8(40.0)); + if (uVar4 != BOUNCE_INIT_NEXT) break; this->field_0x80.HALF.LO = 1; this->timer = 192; |
