mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
sub_80EB9E0
This commit is contained in:
parent
939d728405
commit
9a5320135b
@ -5,113 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
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}
|
||||
|
@ -2114,3 +2114,30 @@ void sub_80EB56C(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80EB9E0(void)
|
||||
{
|
||||
s16 x;
|
||||
s16 y;
|
||||
|
||||
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x291:
|
||||
case 0x294:
|
||||
case 0x297:
|
||||
case 0x2a1:
|
||||
case 0x2a5:
|
||||
case 0x2a9:
|
||||
case 0x2ad:
|
||||
case 0x2bb:
|
||||
case 0x2be:
|
||||
case 0x2c3:
|
||||
case 0x2c6:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user