summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2023-12-30 17:13:42 -0800
committertheo3 <arisstephenson2@gmail.com>2023-12-30 17:13:42 -0800
commitfb9f59fbbbd1ec2db3a3e757a3dab9a0e563520c (patch)
tree0c091f4a07d0e8b188db3336eb84ac25064f2618 /src/object
parent37723f560798698a2a17d0b29ee7baca1a8cb1c7 (diff)
label BounceUpdate asm
Diffstat (limited to 'src/object')
-rw-r--r--src/object/bird.c2
-rw-r--r--src/object/book.c2
-rw-r--r--src/object/crenelBeanSprout.c2
-rw-r--r--src/object/cutsceneMiscObject.c4
-rw-r--r--src/object/figurineDevice.c6
-rw-r--r--src/object/graveyardKey.c2
-rw-r--r--src/object/itemOnGround.c2
-rw-r--r--src/object/keyStealingTakkuri.c2
-rw-r--r--src/object/lilypadLarge.c4
-rw-r--r--src/object/mask.c2
-rw-r--r--src/object/minecart.c4
-rw-r--r--src/object/objectA2.c8
-rw-r--r--src/object/objectOnPillar.c2
-rw-r--r--src/object/playerClone.c2
-rw-r--r--src/object/pot.c20
-rw-r--r--src/object/rupee.c2
16 files changed, 33 insertions, 33 deletions
diff --git a/src/object/bird.c b/src/object/bird.c
index 485c0695..95761443 100644
--- a/src/object/bird.c
+++ b/src/object/bird.c
@@ -132,7 +132,7 @@ void Bird_Type1_Action1_Subaction0(BirdEntity* this) {
void Bird_Type1_Action1_Subaction1(BirdEntity* this) {
Entity* fx;
- if (sub_080044EC(super, 0x1800) < 2) {
+ if (BounceUpdate(super, Q_8_8(24.0)) < BOUNCE_AIRBORNE) {
super->type = 2;
super->action = 1;
super->z.WORD = 0;
diff --git a/src/object/book.c b/src/object/book.c
index 4ebd3f7d..5ab73149 100644
--- a/src/object/book.c
+++ b/src/object/book.c
@@ -139,7 +139,7 @@ void Book_Action2(BookEntity* this) {
void Book_Action3(BookEntity* this) {
Entity* fx;
- if (sub_080044EC(super, 0x2800) != 1) {
+ if (BounceUpdate(super, Q_8_8(40.0)) != BOUNCE_INIT_NEXT) {
return;
}
diff --git a/src/object/crenelBeanSprout.c b/src/object/crenelBeanSprout.c
index 7480ba07..31946da4 100644
--- a/src/object/crenelBeanSprout.c
+++ b/src/object/crenelBeanSprout.c
@@ -175,7 +175,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
gUnk_0200AF00.rActionPlayerState = R_ACTION_NONE;
}
PositionRelative(&gPlayerEntity, super, 0, 0x10000);
- if (GetTileUnderEntity(super) == 0x19) {
+ if (GetActTile(super) == 0x19) {
RestorePrevTileEntity(0xdc, super->collisionLayer);
sub_08096A78(this);
}
diff --git a/src/object/cutsceneMiscObject.c b/src/object/cutsceneMiscObject.c
index 44fc603f..0cc769f1 100644
--- a/src/object/cutsceneMiscObject.c
+++ b/src/object/cutsceneMiscObject.c
@@ -332,7 +332,7 @@ void CutsceneMiscObject_Type5(CutsceneMiscObjectEntity* this) {
super->zVelocity = 0;
SetEntityPriority(super, PRIO_PLAYER_EVENT);
InitializeAnimation(super, 0);
- if (GetTileUnderEntity(super) == 13) {
+ if (GetActTile(super) == 13) {
super->action = 3;
}
break;
@@ -551,7 +551,7 @@ void CutsceneMiscObject_Type11(CutsceneMiscObjectEntity* this) {
InitAnimationForceUpdate(super, 0);
}
if (super->subAction != 0) {
- if ((u32)sub_080044EC(super, 0x1800) <= 1) {
+ if ((u32)BounceUpdate(super, Q_8_8(24.0)) <= BOUNCE_INIT_NEXT) {
super->subAction = 0;
SetAffineInfo(super, 0x100, 0x100, 0xC000);
} else {
diff --git a/src/object/figurineDevice.c b/src/object/figurineDevice.c
index 86c09f1d..d0e918ac 100644
--- a/src/object/figurineDevice.c
+++ b/src/object/figurineDevice.c
@@ -260,9 +260,9 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
tmp = 1;
}
#ifdef JP
- switch (gInput.unk4) {
+ switch (gInput.menuScrollKeys) {
#else
- switch (gInput.unk4 & 0xfffffeff) {
+ switch (gInput.menuScrollKeys & ~R_BUTTON) {
#endif
case DPAD_UP:
FigurineDevice_ChangeShellAmount(this, tmp);
@@ -275,7 +275,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
sub_080882A8(this);
}
#else
- switch (gInput.unk4) {
+ switch (gInput.menuScrollKeys) {
case DPAD_UP:
FigurineDevice_ChangeShellAmount(this, 1);
break;
diff --git a/src/object/graveyardKey.c b/src/object/graveyardKey.c
index bef307ed..e9c217ba 100644
--- a/src/object/graveyardKey.c
+++ b/src/object/graveyardKey.c
@@ -125,7 +125,7 @@ void GraveyardKey_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
u8 type;
LinearMoveUpdate(this);
- if (sub_080044EC(this, param_2->unk14) < 2) {
+ if (BounceUpdate(this, param_2->unk14) < BOUNCE_AIRBORNE) {
if (this->timer) {
this->timer--;
this->zVelocity = param_2->unk14 << 3;
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index 5c46e2dd..2d2c1fe9 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -437,7 +437,7 @@ u32 sub_080814C0(ItemOnGroundEntity* this) {
void sub_08081500(ItemOnGroundEntity* this) {
if (this->unk_68 == 0) {
- u32 var0 = sub_080044EC(super, 0x2800);
+ u32 var0 = BounceUpdate(super, Q_8_8(40.0));
if (var0 == 0) {
this->unk_68 = 1;
} else {
diff --git a/src/object/keyStealingTakkuri.c b/src/object/keyStealingTakkuri.c
index 8a5a40b1..7a6e7653 100644
--- a/src/object/keyStealingTakkuri.c
+++ b/src/object/keyStealingTakkuri.c
@@ -164,7 +164,7 @@ void KeyStealingTakkuri_Type5_Init(KeyStealingTakkuriEntity* this) {
void KeyStealingTakkuri_Type5_Action1(KeyStealingTakkuriEntity* this) {
LinearMoveUpdate(super);
- if (sub_080044EC(super, 0x2000) < 2) {
+ if (BounceUpdate(super, Q_8_8(32.0)) < BOUNCE_AIRBORNE) {
if (super->timer != 0) {
super->timer--;
super->zVelocity = Q_16_16(1.0);
diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c
index 5571ca47..5d6a6fc5 100644
--- a/src/object/lilypadLarge.c
+++ b/src/object/lilypadLarge.c
@@ -387,7 +387,7 @@ void sub_08085B40(LilypadLargeEntity* this) {
}
} else {
ResetCollisionLayer(super);
- if (GetTileUnderEntity(super) == 0xd) {
+ if (GetActTile(super) == 0xd) {
ResetCollisionLayer(&gPlayerEntity);
LilypadLarge_Action4(this);
super->direction = GetFacingDirection(&gPlayerEntity, super);
@@ -409,7 +409,7 @@ void sub_08085B40(LilypadLargeEntity* this) {
super->timer |= 0x80;
this->unk_70 = 0;
this->unk_6c = 0;
- if (GetTileUnderEntity(super) == 0xd) {
+ if (GetActTile(super) == 0xd) {
super->action = 4;
}
}
diff --git a/src/object/mask.c b/src/object/mask.c
index e6934e5a..26539e87 100644
--- a/src/object/mask.c
+++ b/src/object/mask.c
@@ -130,7 +130,7 @@ void Mask_Action2(MaskEntity* this) {
CreateRandomItemDrop(super, 3);
} else {
- sub_080044EC(super, this->unk_78);
+ BounceUpdate(super, this->unk_78);
if (super->z.HALF.HI == 0) {
super->timer++;
diff --git a/src/object/minecart.c b/src/object/minecart.c
index 73cf2e51..fb53ac7d 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -200,7 +200,7 @@ void Minecart_Action3(MinecartEntity* this) {
case 0x6d:
case 0x6e:
case 0x6f:
- if (uVar3 == GetTileUnderEntity(super)) {
+ if (uVar3 == GetActTile(super)) {
Minecart_Action4(this);
gPlayerEntity.animationState = super->animationState << 1;
return;
@@ -222,7 +222,7 @@ void Minecart_Action3(MinecartEntity* this) {
void Minecart_Action4(MinecartEntity* this) {
sub_08004168(super);
CopyPosition(super, &gPlayerEntity);
- switch (GetTileUnderEntity(super)) {
+ switch (GetActTile(super)) {
case 0x67:
if (super->direction == DirectionWest) {
super->direction = DirectionNorth;
diff --git a/src/object/objectA2.c b/src/object/objectA2.c
index 4f9c55cb..08f90505 100644
--- a/src/object/objectA2.c
+++ b/src/object/objectA2.c
@@ -52,7 +52,7 @@ void ObjectA2_Action1(Entity* this) {
LinearMoveUpdate(this);
#ifndef EU
if (gSaveHeader->language < 2) {
- if (sub_080044EC(this, 0x2000) < 2) {
+ if (BounceUpdate(this, Q_8_8(32.0)) < BOUNCE_AIRBORNE) {
this->z.WORD = 0;
this->action = 2;
InitializeAnimation(this, 1);
@@ -62,15 +62,15 @@ void ObjectA2_Action1(Entity* this) {
}
} else {
#endif
- switch (sub_080044EC(this, 0x2000)) {
+ switch (BounceUpdate(this, Q_8_8(32.0))) {
default:
this->timer++;
break;
- case 0:
+ case BOUNCE_DONE_ALL:
this->action = 2;
InitializeAnimation(this, 1);
// fall through
- case 1:
+ case BOUNCE_INIT_NEXT:
this->timer = 0;
sub_0809F448(this);
SoundReq(SFX_186);
diff --git a/src/object/objectOnPillar.c b/src/object/objectOnPillar.c
index 6f3381dc..773ab378 100644
--- a/src/object/objectOnPillar.c
+++ b/src/object/objectOnPillar.c
@@ -209,7 +209,7 @@ void sub_080970F4(ObjectOnPillarEntity* this) {
bool32 sub_08097144(ObjectOnPillarEntity* this) {
LinearMoveUpdate(super);
sub_0800445C(super);
- if (GetTileUnderEntity(super) == 0x19) {
+ if (GetActTile(super) == 0x19) {
super->spriteOffsetY = 2;
}
if ((--this->unk_76 == 0) && sub_08097194(this) == FALSE) {
diff --git a/src/object/playerClone.c b/src/object/playerClone.c
index 56a3c8bf..21bb818b 100644
--- a/src/object/playerClone.c
+++ b/src/object/playerClone.c
@@ -110,7 +110,7 @@ void PlayerClone_Action2(PlayerCloneEntity* this) {
if (gPlayerEntity.iframes >= 1) {
gPlayerState.chargeState.action = 1;
} else {
- GetTileUnderEntity(super);
+ GetActTile(super);
sub_08084B1C(this);
super->x.HALF.HI = gPlayerEntity.x.HALF.HI + this->unk78;
super->y.HALF.HI = gPlayerEntity.y.HALF.HI + this->unk7a;
diff --git a/src/object/pot.c b/src/object/pot.c
index 93bc1995..255b3e36 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -26,7 +26,7 @@ typedef struct {
} PotEntity;
void Pot_Action5(PotEntity*);
-static void sub_08082850(PotEntity*, Entity*);
+static void BreakPot(PotEntity*, Entity*);
void sub_08082608(PotEntity* this);
void Pot_Init(PotEntity* this);
void Pot_Action1(PotEntity* this);
@@ -129,13 +129,13 @@ void Pot_Action1(PotEntity* this) {
DeleteThisEntity();
break;
default:
- if (GetTileUnderEntity(super) == 13) {
+ if (GetActTile(super) == 13) {
CreateFx(super, FX_FALL_DOWN, 0);
} else if (tileType == 0x4005) {
gPlayerState.lastSwordMove = SWORD_MOVE_BREAK_POT;
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
}
- sub_08082850(this, NULL);
+ BreakPot(this, NULL);
break;
}
} else {
@@ -182,7 +182,7 @@ void sub_0808259C(PotEntity* this) {
CreateFx(super, FX_LAVA_SPLASH, 0);
break;
default:
- sub_08082850(this, &gPlayerEntity);
+ BreakPot(this, &gPlayerEntity);
return;
}
@@ -228,7 +228,7 @@ void Pot_Action4(PotEntity* this) {
switch (tileType) {
case 0x71:
case 0x72:
- sub_08082850(this, NULL);
+ BreakPot(this, NULL);
break;
default:
SetTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
@@ -269,7 +269,7 @@ void sub_08082778(PotEntity* this) {
}
if ((gPlayerState.field_0x1c & 0xF) != 0x1 || (super->contactFlags & 0x7F) != 0x13) {
- sub_08082850(this, NULL);
+ BreakPot(this, NULL);
} else {
sub_0806F3E4(super);
}
@@ -277,7 +277,7 @@ void sub_08082778(PotEntity* this) {
void sub_080827F8(PotEntity* this) {
if (gPlayerState.field_0x1c == 0) {
- sub_08082850(this, NULL);
+ BreakPot(this, NULL);
}
}
@@ -285,7 +285,7 @@ void nullsub_512(PotEntity* this) {
}
void sub_08082818(PotEntity* this) {
- sub_08082850(this, NULL);
+ BreakPot(this, NULL);
}
void Pot_Action5(PotEntity* this) {
@@ -294,11 +294,11 @@ void Pot_Action5(PotEntity* this) {
}
if (GravityUpdate(super, Q_8_8(32.0)) == 0) {
- sub_08082850(this, NULL);
+ BreakPot(this, NULL);
}
}
-static void sub_08082850(PotEntity* this, Entity* parent) {
+static void BreakPot(PotEntity* this, Entity* parent) {
u32 parameter = sub_0808288C(super, super->type, this->unk_7d, super->type2);
Entity* fxEntity = CreateFx(super, FX_POT_SHATTER, parameter);
if (fxEntity) {
diff --git a/src/object/rupee.c b/src/object/rupee.c
index fe38b3ad..edf3799b 100644
--- a/src/object/rupee.c
+++ b/src/object/rupee.c
@@ -46,7 +46,7 @@ void Rupee_Action_1(Entity* this) {
if (this->child->next == NULL) {
this->action = 2;
} else {
- if (sub_080044EC(this, 10240) == 0) {
+ if (BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_DONE_ALL) {
this->action = 2;
}
ProcessMovement0(this);