mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-31 16:30:00 +01:00
745 lines
12 KiB
ArmAsm
745 lines
12 KiB
ArmAsm
.include "asm/macros.inc"
|
|
.include "constants/constants.inc"
|
|
|
|
.syntax unified
|
|
|
|
.text
|
|
|
|
thumb_func_start sub_80EB56C
|
|
sub_80EB56C: @ 80EB56C
|
|
push {r4,lr}
|
|
sub sp, 0x4
|
|
mov r4, sp
|
|
adds r4, 0x2
|
|
mov r0, sp
|
|
adds r1, r4, 0
|
|
bl GetXYCoordsOneStepInFrontOfPlayer
|
|
mov r0, sp
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
movs r2, 0
|
|
ldrsh r1, [r4, r2]
|
|
bl MapGridGetMetatileIdAt
|
|
ldr r1, =0xfffffdd4
|
|
adds r0, r1
|
|
cmp r0, 0xCF
|
|
bls _080EB594
|
|
b _080EB9D0
|
|
_080EB594:
|
|
lsls r0, 2
|
|
ldr r1, =_080EB5A8
|
|
adds r0, r1
|
|
ldr r0, [r0]
|
|
mov pc, r0
|
|
.pool
|
|
.align 2, 0
|
|
_080EB5A8:
|
|
.4byte _080EB930
|
|
.4byte _080EB97C
|
|
.4byte _080EB97C
|
|
.4byte _080EB97C
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB930
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9AC
|
|
.4byte _080EB954
|
|
.4byte _080EB954
|
|
.4byte _080EB8E8
|
|
.4byte _080EB8E8
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9AC
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB9D0
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
.4byte _080EB90C
|
|
_080EB8E8:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EB9D0
|
|
ldr r4, =0x000040ee
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x40
|
|
b _080EB994
|
|
.pool
|
|
_080EB90C:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EB9D0
|
|
ldr r4, =0x000040ee
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x8
|
|
b _080EB994
|
|
.pool
|
|
_080EB930:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EB9D0
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x40
|
|
b _080EB994
|
|
.pool
|
|
_080EB954:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EB9D0
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
adds r0, r2, 0
|
|
b _080EB994
|
|
.pool
|
|
_080EB97C:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EB9D0
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x10
|
|
_080EB994:
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
adds r0, r4, 0
|
|
bl VarSet
|
|
b _080EB9D0
|
|
.pool
|
|
_080EB9AC:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EB9D0
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x8
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
adds r0, r4, 0
|
|
bl VarSet
|
|
_080EB9D0:
|
|
add sp, 0x4
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80EB56C
|
|
|
|
thumb_func_start sub_80EB9E0
|
|
sub_80EB9E0: @ 80EB9E0
|
|
push {r4,lr}
|
|
sub sp, 0x4
|
|
mov r4, sp
|
|
adds r4, 0x2
|
|
mov r0, sp
|
|
adds r1, r4, 0
|
|
bl GetXYCoordsOneStepInFrontOfPlayer
|
|
mov r0, sp
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
movs r2, 0
|
|
ldrsh r1, [r4, r2]
|
|
bl MapGridGetMetatileIdAt
|
|
ldr r1, =0xfffffd6f
|
|
adds r0, r1
|
|
cmp r0, 0x35
|
|
bls _080EBA08
|
|
b _080EBB18
|
|
_080EBA08:
|
|
lsls r0, 2
|
|
ldr r1, =_080EBA1C
|
|
adds r0, r1
|
|
ldr r0, [r0]
|
|
mov pc, r0
|
|
.pool
|
|
.align 2, 0
|
|
_080EBA1C:
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
.4byte _080EBB18
|
|
.4byte _080EBB18
|
|
.4byte _080EBAF4
|
|
_080EBAF4:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EBB18
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x8
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
adds r0, r4, 0
|
|
bl VarSet
|
|
_080EBB18:
|
|
add sp, 0x4
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80EB9E0
|
|
|
|
thumb_func_start sub_80EBB28
|
|
sub_80EBB28: @ 80EBB28
|
|
push {r4,lr}
|
|
sub sp, 0x4
|
|
mov r4, sp
|
|
adds r4, 0x2
|
|
mov r0, sp
|
|
adds r1, r4, 0
|
|
bl GetXYCoordsOneStepInFrontOfPlayer
|
|
mov r0, sp
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
movs r2, 0
|
|
ldrsh r1, [r4, r2]
|
|
bl MapGridGetMetatileIdAt
|
|
ldr r1, =0xfffffddb
|
|
adds r0, r1
|
|
cmp r0, 0xA2
|
|
bls _080EBB50
|
|
b _080EBE6C
|
|
_080EBB50:
|
|
lsls r0, 2
|
|
ldr r1, =_080EBB64
|
|
adds r0, r1
|
|
ldr r0, [r0]
|
|
mov pc, r0
|
|
.pool
|
|
.align 2, 0
|
|
_080EBB64:
|
|
.4byte _080EBE48
|
|
.4byte _080EBE48
|
|
.4byte _080EBE48
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE14
|
|
.4byte _080EBE14
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
.4byte _080EBDF0
|
|
.4byte _080EBE6C
|
|
.4byte _080EBDF0
|
|
_080EBDF0:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EBE6C
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x8
|
|
b _080EBE30
|
|
.pool
|
|
_080EBE14:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EBE6C
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
adds r0, r2, 0
|
|
_080EBE30:
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
adds r0, r4, 0
|
|
bl VarSet
|
|
b _080EBE6C
|
|
.pool
|
|
_080EBE48:
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EBE6C
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x10
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
adds r0, r4, 0
|
|
bl VarSet
|
|
_080EBE6C:
|
|
add sp, 0x4
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80EBB28
|
|
|
|
thumb_func_start sub_80EBE7C
|
|
sub_80EBE7C: @ 80EBE7C
|
|
push {r4,lr}
|
|
sub sp, 0x4
|
|
mov r4, sp
|
|
adds r4, 0x2
|
|
mov r0, sp
|
|
adds r1, r4, 0
|
|
bl GetXYCoordsOneStepInFrontOfPlayer
|
|
mov r0, sp
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
movs r2, 0
|
|
ldrsh r1, [r4, r2]
|
|
bl MapGridGetMetatileIdAt
|
|
adds r1, r0, 0
|
|
ldr r0, =0x0000028e
|
|
cmp r1, r0
|
|
bgt _080EBECC
|
|
subs r0, 0x1
|
|
cmp r1, r0
|
|
blt _080EBECC
|
|
ldr r0, =0x00004054
|
|
bl VarGet
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
beq _080EBECC
|
|
ldr r4, =0x000040ef
|
|
adds r0, r4, 0
|
|
bl VarGet
|
|
adds r1, r0, 0
|
|
movs r0, 0x4
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
adds r0, r4, 0
|
|
bl VarSet
|
|
_080EBECC:
|
|
add sp, 0x4
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80EBE7C
|
|
|
|
.align 2, 0 @ Don't pad with nop.
|