mirror of https://github.com/zeldaret/tmc.git
Match sub_08021274
This commit is contained in:
parent
6bb4086f60
commit
7c7fbef8f9
|
|
@ -1,36 +0,0 @@
|
|||
.syntax unified
|
||||
push {lr}
|
||||
adds r2, r0, #0
|
||||
movs r0, #7
|
||||
ands r0, r1
|
||||
subs r0, #3
|
||||
cmp r0, #2
|
||||
bhi _0802129A
|
||||
movs r3, #0x18
|
||||
adds r0, r1, #0
|
||||
ands r0, r3
|
||||
lsrs r0, r0, #3
|
||||
cmp r0, r2
|
||||
beq _080212AA
|
||||
adds r0, r1, #0
|
||||
adds r0, #8
|
||||
ands r0, r3
|
||||
lsrs r0, r0, #3
|
||||
cmp r0, r2
|
||||
beq _080212AA
|
||||
_0802129A:
|
||||
adds r0, r1, #4
|
||||
movs r1, #0x18
|
||||
ands r0, r1
|
||||
lsrs r1, r0, #3
|
||||
cmp r2, r1
|
||||
beq _080212AA
|
||||
adds r0, r1, #0
|
||||
b _080212AC
|
||||
_080212AA:
|
||||
movs r0, #0xff
|
||||
_080212AC:
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
|
||||
.syntax divided
|
||||
|
|
@ -392,7 +392,17 @@ void sub_0802124C(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/darkNut/sub_08021274.inc", u32 sub_08021274(u32 a, u32 b))
|
||||
u32 sub_08021274(u32 animationState, u32 dir) {
|
||||
if (((dir & 7) - 3 < 3) && (((dir & 0x18) >> 3 == animationState || (((dir + 8) & 0x18) >> 3 == animationState)))) {
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
dir = DirectionToAnimationState(DirectionRoundUp(dir));
|
||||
if (animationState == dir) {
|
||||
return 0xff;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
void sub_080212B0(Entity* this) {
|
||||
u8 tmp;
|
||||
|
|
|
|||
Loading…
Reference in New Issue