diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-03-28 20:15:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-28 20:15:08 -0700 |
| commit | 6000b4f2d3bc4ef482496560e3a47b3ca2b7e2b8 (patch) | |
| tree | 78a3119e1cd63d4f3333a3cade6cc622cdcb6db1 /src/object/button.c | |
| parent | 52439a0fc8cf34aeb4612b43cb7a0894add0ae57 (diff) | |
| parent | 92240d43147dd36ed879ce1084f7ca6e35f1db96 (diff) | |
Merge pull request #477 from notyourav/mas
Name rest of entity fields
Diffstat (limited to 'src/object/button.c')
| -rw-r--r-- | src/object/button.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/object/button.c b/src/object/button.c index d4f602ba..20a34d21 100644 --- a/src/object/button.c +++ b/src/object/button.c @@ -44,7 +44,7 @@ void sub_08081FF8(Entity*); void sub_08081BAC(Entity* this) { if (sub_08081CB0(this)) { this->subAction = 0; - this->actionDelay = 0xA; + this->timer = 0xA; RequestPriorityDuration(this, 0xA); sub_08081FF8(this); if (this->type == 1) { @@ -64,11 +64,11 @@ void sub_08081BE0(Entity* this) { return; if (!sub_08081D28(this)) { this->action = 4; - this->field_0xf = 1; + this->subtimer = 1; if ((gPlayerState.heldObject == 2) || (!(gPlayerState.field_0x35 & 0x80))) { - this->actionDelay = 0x18; + this->timer = 0x18; } else { - this->actionDelay = 0x8; + this->timer = 0x8; } } else { sub_08081E6C(this); @@ -76,15 +76,15 @@ void sub_08081BE0(Entity* this) { } void sub_08081C30(Entity* this) { - if (this->actionDelay != 0) { - this->actionDelay--; - if (this->field_0xf != 0) { - this->field_0xf = 0; + if (this->timer != 0) { + this->timer--; + if (this->subtimer != 0) { + this->subtimer = 0; SetTile(0x4035, this->field_0x74.HWORD, this->collisionLayer); } if (sub_08081CB0(this)) { this->action = 3; - this->actionDelay = 0; + this->timer = 0; } } else { this->action = 2; @@ -239,13 +239,13 @@ void sub_08081F24(Entity* this) { u32 sub_08081F7C(Entity* this, u32 r7) { u16 tmp; - if (this->actionDelay == 0) + if (this->timer == 0) return 1; - if (--this->actionDelay > 6) { + if (--this->timer > 6) { if (this->child != NULL) this->child->spriteOffsetY = -4; } else { - if (this->actionDelay == 6) { + if (this->timer == 6) { SetFlag(this->field_0x86.HWORD); SetTileType(r7, this->field_0x74.HWORD, this->collisionLayer); sub_08081F24(this); |
