mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
sub_80EBB28
This commit is contained in:
parent
9a5320135b
commit
f601525474
@ -5,256 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
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}
|
||||
|
@ -2141,3 +2141,56 @@ void sub_80EB9E0(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80EBB28(void)
|
||||
{
|
||||
s16 x;
|
||||
s16 y;
|
||||
|
||||
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x290:
|
||||
case 0x292:
|
||||
case 0x293:
|
||||
case 0x295:
|
||||
case 0x296:
|
||||
case 0x2a0:
|
||||
case 0x2a2:
|
||||
case 0x2a3:
|
||||
case 0x2a4:
|
||||
case 0x2a6:
|
||||
case 0x2a7:
|
||||
case 0x2a8:
|
||||
case 0x2aa:
|
||||
case 0x2ac:
|
||||
case 0x2ae:
|
||||
case 0x2af:
|
||||
case 0x2bc:
|
||||
case 0x2bd:
|
||||
case 0x2bf:
|
||||
case 0x2c4:
|
||||
case 0x2c5:
|
||||
case 0x2c7:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
|
||||
}
|
||||
break;
|
||||
case 0x280:
|
||||
case 0x281:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x100);
|
||||
}
|
||||
break;
|
||||
case 0x225:
|
||||
case 0x226:
|
||||
case 0x227:
|
||||
if (VarGet(VAR_0x4054) != 0)
|
||||
{
|
||||
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x10);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user