mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Update field_player_avatar.s
This commit is contained in:
parent
43fa9da52a
commit
62a4193f8f
@ -5,132 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start TryInterruptEventObjectSpecialAnim
|
||||
@ bool8 TryInterruptEventObjectSpecialAnim(struct npc_state *eventObject, u8 direction)
|
||||
TryInterruptEventObjectSpecialAnim: @ 808AA38
|
||||
push {r4-r6,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r5, r1, 24
|
||||
adds r6, r5, 0
|
||||
bl EventObjectIsMovementOverridden
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0808AA92
|
||||
adds r0, r4, 0
|
||||
bl EventObjectClearHeldMovementIfFinished
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0808AA92
|
||||
adds r0, r4, 0
|
||||
bl EventObjectGetHeldMovementActionId
|
||||
lsls r0, 24
|
||||
movs r1, 0xE7
|
||||
lsls r1, 24
|
||||
adds r0, r1
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x3
|
||||
bhi _0808AA70
|
||||
cmp r5, 0
|
||||
bne _0808AA74
|
||||
_0808AA70:
|
||||
movs r0, 0x1
|
||||
b _0808AA94
|
||||
_0808AA74:
|
||||
ldrb r0, [r4, 0x18]
|
||||
lsrs r0, 4
|
||||
cmp r0, r5
|
||||
beq _0808AA84
|
||||
_0808AA7C:
|
||||
adds r0, r4, 0
|
||||
bl EventObjectClearHeldMovement
|
||||
b _0808AA92
|
||||
_0808AA84:
|
||||
adds r0, r6, 0
|
||||
bl sub_808B028
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0808AA7C
|
||||
b _0808AA70
|
||||
_0808AA92:
|
||||
movs r0, 0
|
||||
_0808AA94:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end TryInterruptEventObjectSpecialAnim
|
||||
|
||||
thumb_func_start npc_clear_strange_bits
|
||||
@ void npc_clear_strange_bits(struct npc_state *eventObject)
|
||||
npc_clear_strange_bits: @ 808AA9C
|
||||
ldrb r2, [r0, 0x1]
|
||||
movs r1, 0x11
|
||||
negs r1, r1
|
||||
ands r1, r2
|
||||
movs r2, 0x5
|
||||
negs r2, r2
|
||||
ands r1, r2
|
||||
adds r2, 0x2
|
||||
ands r1, r2
|
||||
strb r1, [r0, 0x1]
|
||||
ldr r2, =gPlayerAvatar
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0x7F
|
||||
ands r0, r1
|
||||
strb r0, [r2]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end npc_clear_strange_bits
|
||||
|
||||
thumb_func_start MovePlayerAvatarUsingKeypadInput
|
||||
@ void MovePlayerAvatarUsingKeypadInput(int dpad_direction, int buttons_new, int buttons_held)
|
||||
MovePlayerAvatarUsingKeypadInput: @ 808AAC0
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
lsls r1, 16
|
||||
lsrs r4, r1, 16
|
||||
lsls r2, 16
|
||||
lsrs r2, 16
|
||||
ldr r0, =gPlayerAvatar
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x6
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0808AAE8
|
||||
adds r0, r3, 0
|
||||
adds r1, r4, 0
|
||||
bl MovePlayerOnBike
|
||||
b _0808AAF0
|
||||
.pool
|
||||
_0808AAE8:
|
||||
adds r0, r3, 0
|
||||
adds r1, r2, 0
|
||||
bl MovePlayerNotOnBike
|
||||
_0808AAF0:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end MovePlayerAvatarUsingKeypadInput
|
||||
|
||||
thumb_func_start PlayerAllowForcedMovementIfMovingSameDirection
|
||||
@ void PlayerAllowForcedMovementIfMovingSameDirection()
|
||||
PlayerAllowForcedMovementIfMovingSameDirection: @ 808AAF8
|
||||
push {lr}
|
||||
ldr r2, =gPlayerAvatar
|
||||
ldrb r0, [r2, 0x2]
|
||||
cmp r0, 0x2
|
||||
bne _0808AB0A
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0xDF
|
||||
ands r0, r1
|
||||
strb r0, [r2]
|
||||
_0808AB0A:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end PlayerAllowForcedMovementIfMovingSameDirection
|
||||
|
||||
thumb_func_start TryDoMetatileBehaviorForcedMovement
|
||||
@ bool8 TryDoMetatileBehaviorForcedMovement()
|
||||
TryDoMetatileBehaviorForcedMovement: @ 808AB14
|
||||
|
Loading…
Reference in New Issue
Block a user