mirror of
https://github.com/zeldaret/tmc
synced 2026-06-23 17:25:27 -04:00
label BounceUpdate asm
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user