diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2022-01-11 13:13:34 +0100 |
|---|---|---|
| committer | hatal175 <hatal175@users.noreply.github.com> | 2022-01-11 13:13:34 +0100 |
| commit | beaeb8406d1b2d83fc5b4366202914125067b375 (patch) | |
| tree | 1365902dc2a06f78e81b33c040d19d10495370d9 /src | |
| parent | 688508b1afb97606c605f1d91c2b9fc773573ca0 (diff) | |
Match sub_0806F998
Diffstat (limited to 'src')
| -rw-r--r-- | src/coord.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/coord.c b/src/coord.c index 5eb5c81d..1d1f346a 100644 --- a/src/coord.c +++ b/src/coord.c @@ -260,11 +260,10 @@ u32 sub_0806F948(Entity* ent) { return ent->animationState; } -NONMATCH("asm/non_matching/sub_0806F998.inc", u32 sub_0806F998(Entity* ent)) { +u32 sub_0806F998(Entity* ent) { u8 state = ent->animationState; if ((ent->direction & 0x80) == 0) { - u8 tmp = ((ent->direction & 0x1c) >> 2); - if ((tmp & 0x1) == 0 || ((tmp - state + 1) & 0x4)) { + if ((((ent->direction & 0x1c) >> 2) & 0x1) == 0 || ((((ent->direction & 0x1c) >> 2) - state + 1) & 0x4)) { u8 dir = ent->direction; state = ent->animationState = (dir >> 2) & 0x7e; if (ent->animationState <= 4) { @@ -276,7 +275,6 @@ NONMATCH("asm/non_matching/sub_0806F998.inc", u32 sub_0806F998(Entity* ent)) { } return state; } -END_NONMATCH s16 FixedMul(s16 r0, s16 r1) { s32 temp = r0 * r1; |
