summaryrefslogtreecommitdiff
path: root/src/object/button.c
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2021-11-12 01:34:34 -0800
committertheo3 <arisstephenson2@gmail.com>2021-11-12 01:34:34 -0800
commitecc8a1439ddeedd458af5427711e07e146ed4612 (patch)
treeefe4f755b15c985ecba9c4a0ad7e3759cd510e3d /src/object/button.c
parentf70c95f0373d659683840682d327da3db774659c (diff)
remove redundant unions
Diffstat (limited to 'src/object/button.c')
-rw-r--r--src/object/button.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/object/button.c b/src/object/button.c
index 0a1c7fbb..16b1896f 100644
--- a/src/object/button.c
+++ b/src/object/button.c
@@ -167,13 +167,13 @@ Entity* sub_08081D74(Entity* this) {
}
}
}
- this->attachedEntity = ent;
+ this->child = ent;
return ent;
}
u32 sub_08081E0C(Entity* this) {
Entity* tmp = &gPlayerEntity;
- if (tmp->height.HALF.HI != 0 || !sub_08079F8C()) {
+ if (tmp->z.HALF.HI != 0 || !sub_08079F8C()) {
return 0;
} else {
return sub_080041A0(this, tmp, 5, 6);
@@ -251,8 +251,8 @@ u32 sub_08081F7C(Entity* this, u32 r7) {
if (this->actionDelay == 0)
return 1;
if (--this->actionDelay > 6) {
- if (this->attachedEntity)
- this->attachedEntity->spriteOffsetY = 0xfc;
+ if (this->child)
+ this->child->spriteOffsetY = 0xfc;
} else {
if (this->actionDelay == 6) {
SetFlag(this->field_0x86.HWORD);
@@ -272,10 +272,10 @@ extern void sub_080044AE(Entity*, u32, u32);
void sub_08081FF8(Entity* this) {
u32 direction;
u32 i;
- if (this->attachedEntity != &gPlayerEntity)
+ if (this->child != &gPlayerEntity)
return;
- direction = GetFacingDirection(this->attachedEntity, this);
- sub_080044AE(this->attachedEntity, 0x200, direction);
+ direction = GetFacingDirection(this->child, this);
+ sub_080044AE(this->child, 0x200, direction);
for (i = 0; i < 3; i++) {
if (gUnk_03004040[i]) {
sub_080044AE(gUnk_03004040[i], 0x200, direction);