Use fixed point macros where possible

This commit is contained in:
Tal Hayon
2022-04-01 18:19:56 +03:00
parent 9233701a5d
commit d6d7916a46
90 changed files with 223 additions and 223 deletions
+2 -2
View File
@@ -177,7 +177,7 @@ void sub_0801917C(PlayerItemBowEntity* this) {
super->action = 3;
super->direction ^= 0x10;
super->speed = 0x100;
super->zVelocity = 0x8000;
super->zVelocity = Q_16_16(0.5);
super->flags &= 0x7f;
InitializeAnimation(super, 6);
} else {
@@ -235,7 +235,7 @@ void sub_08019410(Entity* this) {
void sub_08019444(Entity* this) {
GetNextFrame(this);
LinearMoveUpdate(this);
if (GravityUpdate(this, 0x2000) == 0) {
if (GravityUpdate(this, Q_8_8(32.0)) == 0) {
DeleteThisEntity();
}
}
+2 -2
View File
@@ -86,7 +86,7 @@ void sub_080AD040(PlayerItemHeldObjectEntity* this) {
ProcessMovement10(super);
}
}
if (GravityUpdate(super, 0x2000) == 0) {
if (GravityUpdate(super, Q_8_8(32.0)) == 0) {
(child->base).zVelocity = super->zVelocity;
(child->base).x = super->x;
(child->base).y = super->y;
@@ -145,7 +145,7 @@ void sub_080AD040(PlayerItemHeldObjectEntity* this) {
} else {
SoundReq(SFX_PLACE_OBJ);
super->timer++;
super->zVelocity = 0x10000;
super->zVelocity = Q_16_16(1.0);
super->speed /= 2;
return;
}
@@ -140,7 +140,7 @@ void sub_0807037C(Entity* this) {
void sub_08070398(Entity* this) {
GetNextFrame(this);
LinearMoveUpdate(this);
if (GravityUpdate(this, 0x2000) == 0) {
if (GravityUpdate(this, Q_8_8(32.0)) == 0) {
DeleteThisEntity();
}
}