mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
Update field_player_avatar.s
This commit is contained in:
parent
201fb6f818
commit
05c5469f61
@ -5,452 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start TryDoMetatileBehaviorForcedMovement
|
||||
@ bool8 TryDoMetatileBehaviorForcedMovement()
|
||||
TryDoMetatileBehaviorForcedMovement: @ 808AB14
|
||||
push {r4,lr}
|
||||
ldr r4, =gUnknown_08497444
|
||||
bl GetForcedMovementByMetatileBehavior
|
||||
lsls r0, 24
|
||||
lsrs r0, 22
|
||||
adds r0, r4
|
||||
ldr r0, [r0]
|
||||
bl _call_via_r0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end TryDoMetatileBehaviorForcedMovement
|
||||
|
||||
thumb_func_start GetForcedMovementByMetatileBehavior
|
||||
@ u8 GetForcedMovementByMetatileBehavior()
|
||||
GetForcedMovementByMetatileBehavior: @ 808AB38
|
||||
push {r4-r6,lr}
|
||||
ldr r3, =gPlayerAvatar
|
||||
ldrb r1, [r3]
|
||||
movs r0, 0x20
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0808AB8A
|
||||
ldr r2, =gEventObjects
|
||||
ldrb r1, [r3, 0x5]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrb r5, [r0, 0x1E]
|
||||
movs r4, 0
|
||||
ldr r6, =gUnknown_084973FC
|
||||
_0808AB58:
|
||||
lsls r0, r4, 2
|
||||
adds r0, r6
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0808AB80
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
b _0808AB8C
|
||||
.pool
|
||||
_0808AB80:
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x11
|
||||
bls _0808AB58
|
||||
_0808AB8A:
|
||||
movs r0, 0
|
||||
_0808AB8C:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end GetForcedMovementByMetatileBehavior
|
||||
|
||||
thumb_func_start ForcedMovement_None
|
||||
ForcedMovement_None: @ 808AB94
|
||||
push {r4,lr}
|
||||
ldr r4, =gPlayerAvatar
|
||||
ldrb r1, [r4]
|
||||
movs r0, 0x40
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0808ABCE
|
||||
ldrb r1, [r4, 0x5]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gEventObjects
|
||||
adds r0, r1
|
||||
ldrb r2, [r0, 0x1]
|
||||
movs r1, 0x3
|
||||
negs r1, r1
|
||||
ands r1, r2
|
||||
movs r2, 0x8
|
||||
orrs r1, r2
|
||||
strb r1, [r0, 0x1]
|
||||
ldrb r1, [r0, 0x18]
|
||||
lsls r1, 28
|
||||
lsrs r1, 28
|
||||
bl SetEventObjectDirection
|
||||
ldrb r1, [r4]
|
||||
movs r0, 0xBF
|
||||
ands r0, r1
|
||||
strb r0, [r4]
|
||||
_0808ABCE:
|
||||
movs r0, 0
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_None
|
||||
|
||||
thumb_func_start DoForcedMovement
|
||||
DoForcedMovement: @ 808ABE0
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
mov r9, r1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
ldr r6, =gPlayerAvatar
|
||||
adds r0, r5, 0
|
||||
bl CheckForPlayerAvatarCollision
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
adds r7, r4, 0
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x40
|
||||
mov r10, r1
|
||||
movs r1, 0
|
||||
mov r8, r1
|
||||
mov r1, r10
|
||||
orrs r0, r1
|
||||
strb r0, [r6]
|
||||
cmp r4, 0
|
||||
beq _0808AC3C
|
||||
bl ForcedMovement_None
|
||||
cmp r4, 0x4
|
||||
bhi _0808AC24
|
||||
movs r0, 0
|
||||
b _0808AC48
|
||||
.pool
|
||||
_0808AC24:
|
||||
cmp r7, 0x6
|
||||
bne _0808AC2E
|
||||
adds r0, r5, 0
|
||||
bl PlayerJumpLedge
|
||||
_0808AC2E:
|
||||
ldrb r0, [r6]
|
||||
mov r1, r10
|
||||
orrs r0, r1
|
||||
strb r0, [r6]
|
||||
movs r0, 0x2
|
||||
strb r0, [r6, 0x2]
|
||||
b _0808AC46
|
||||
_0808AC3C:
|
||||
movs r0, 0x2
|
||||
strb r0, [r6, 0x2]
|
||||
adds r0, r5, 0
|
||||
bl _call_via_r9
|
||||
_0808AC46:
|
||||
movs r0, 0x1
|
||||
_0808AC48:
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end DoForcedMovement
|
||||
|
||||
thumb_func_start DoForcedMovementInCurrentDirection
|
||||
DoForcedMovementInCurrentDirection: @ 808AC58
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
ldr r0, =gPlayerAvatar
|
||||
ldrb r2, [r0, 0x5]
|
||||
lsls r0, r2, 3
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
ldr r2, =gEventObjects
|
||||
adds r0, r2
|
||||
ldrb r2, [r0, 0x1]
|
||||
movs r3, 0x4
|
||||
orrs r2, r3
|
||||
strb r2, [r0, 0x1]
|
||||
ldrb r0, [r0, 0x18]
|
||||
lsrs r0, 4
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end DoForcedMovementInCurrentDirection
|
||||
|
||||
thumb_func_start ForcedMovement_Slip
|
||||
ForcedMovement_Slip: @ 808AC8C
|
||||
push {lr}
|
||||
ldr r0, =PlayerGoSpeed2
|
||||
bl DoForcedMovementInCurrentDirection
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_Slip
|
||||
|
||||
thumb_func_start ForcedMovement_WalkSouth
|
||||
ForcedMovement_WalkSouth: @ 808ACA0
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed1
|
||||
movs r0, 0x1
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_WalkSouth
|
||||
|
||||
thumb_func_start ForcedMovement_WalkNorth
|
||||
ForcedMovement_WalkNorth: @ 808ACB8
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed1
|
||||
movs r0, 0x2
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_WalkNorth
|
||||
|
||||
thumb_func_start ForcedMovement_WalkWest
|
||||
ForcedMovement_WalkWest: @ 808ACD0
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed1
|
||||
movs r0, 0x3
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_WalkWest
|
||||
|
||||
thumb_func_start ForcedMovement_WalkEast
|
||||
ForcedMovement_WalkEast: @ 808ACE8
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed1
|
||||
movs r0, 0x4
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_WalkEast
|
||||
|
||||
thumb_func_start ForcedMovement_PushedSouthByCurrent
|
||||
ForcedMovement_PushedSouthByCurrent: @ 808AD00
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed3
|
||||
movs r0, 0x1
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_PushedSouthByCurrent
|
||||
|
||||
thumb_func_start ForcedMovement_PushedNorthByCurrent
|
||||
ForcedMovement_PushedNorthByCurrent: @ 808AD18
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed3
|
||||
movs r0, 0x2
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_PushedNorthByCurrent
|
||||
|
||||
thumb_func_start ForcedMovement_PushedWestByCurrent
|
||||
ForcedMovement_PushedWestByCurrent: @ 808AD30
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed3
|
||||
movs r0, 0x3
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_PushedWestByCurrent
|
||||
|
||||
thumb_func_start ForcedMovement_PushedEastByCurrent
|
||||
ForcedMovement_PushedEastByCurrent: @ 808AD48
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed3
|
||||
movs r0, 0x4
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_PushedEastByCurrent
|
||||
|
||||
thumb_func_start ForcedMovement_Slide
|
||||
ForcedMovement_Slide: @ 808AD60
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, =gPlayerAvatar
|
||||
ldrb r3, [r2, 0x5]
|
||||
lsls r2, r3, 3
|
||||
adds r2, r3
|
||||
lsls r2, 2
|
||||
ldr r3, =gEventObjects
|
||||
adds r2, r3
|
||||
ldrb r3, [r2, 0x1]
|
||||
movs r4, 0x4
|
||||
orrs r3, r4
|
||||
movs r4, 0x2
|
||||
orrs r3, r4
|
||||
strb r3, [r2, 0x1]
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_Slide
|
||||
|
||||
thumb_func_start ForcedMovement_SlideSouth
|
||||
ForcedMovement_SlideSouth: @ 808AD98
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed2
|
||||
movs r0, 0x1
|
||||
bl ForcedMovement_Slide
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_SlideSouth
|
||||
|
||||
thumb_func_start ForcedMovement_SlideNorth
|
||||
ForcedMovement_SlideNorth: @ 808ADB0
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed2
|
||||
movs r0, 0x2
|
||||
bl ForcedMovement_Slide
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_SlideNorth
|
||||
|
||||
thumb_func_start ForcedMovement_SlideWest
|
||||
ForcedMovement_SlideWest: @ 808ADC8
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed2
|
||||
movs r0, 0x3
|
||||
bl ForcedMovement_Slide
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_SlideWest
|
||||
|
||||
thumb_func_start ForcedMovement_SlideEast
|
||||
ForcedMovement_SlideEast: @ 808ADE0
|
||||
push {lr}
|
||||
ldr r1, =PlayerGoSpeed2
|
||||
movs r0, 0x4
|
||||
bl ForcedMovement_Slide
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ForcedMovement_SlideEast
|
||||
|
||||
thumb_func_start ForcedMovement_0xBB
|
||||
ForcedMovement_0xBB: @ 808ADF8
|
||||
push {lr}
|
||||
bl sub_808C4D8
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end ForcedMovement_0xBB
|
||||
|
||||
thumb_func_start ForcedMovement_0xBC
|
||||
ForcedMovement_0xBC: @ 808AE04
|
||||
push {lr}
|
||||
bl sub_808C5B0
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end ForcedMovement_0xBC
|
||||
|
||||
thumb_func_start ForcedMovement_MuddySlope
|
||||
ForcedMovement_MuddySlope: @ 808AE10
|
||||
push {r4,lr}
|
||||
ldr r0, =gPlayerAvatar
|
||||
ldrb r1, [r0, 0x5]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gEventObjects
|
||||
adds r4, r0, r1
|
||||
ldrb r1, [r4, 0x18]
|
||||
movs r0, 0xF0
|
||||
ands r0, r1
|
||||
cmp r0, 0x20
|
||||
bne _0808AE36
|
||||
bl GetPlayerSpeed
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, 0x3
|
||||
bgt _0808AE60
|
||||
_0808AE36:
|
||||
movs r0, 0
|
||||
bl Bike_UpdateBikeCounterSpeed
|
||||
ldrb r0, [r4, 0x1]
|
||||
movs r1, 0x2
|
||||
orrs r0, r1
|
||||
strb r0, [r4, 0x1]
|
||||
ldr r1, =PlayerGoSpeed2
|
||||
movs r0, 0x1
|
||||
bl DoForcedMovement
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
b _0808AE62
|
||||
.pool
|
||||
_0808AE60:
|
||||
movs r0, 0
|
||||
_0808AE62:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end ForcedMovement_MuddySlope
|
||||
|
||||
thumb_func_start MovePlayerNotOnBike
|
||||
@ void MovePlayerNotOnBike(u8 direction, u8 heldKeys)
|
||||
MovePlayerNotOnBike: @ 808AE68
|
||||
|
Loading…
x
Reference in New Issue
Block a user