mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
sub_808EBA8
This commit is contained in:
parent
ba6987b733
commit
1ed1fbab1c
@ -5,50 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_808EBA8
|
||||
sub_808EBA8: @ 808EBA8
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
ldr r4, [sp, 0x10]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
lsls r3, 16
|
||||
lsrs r5, r3, 16
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
mov r3, sp
|
||||
bl TryGetFieldObjectIdByLocalIdAndMap
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0808EBF0
|
||||
lsls r1, r5, 16
|
||||
lsls r2, r4, 16
|
||||
mov r0, sp
|
||||
ldrb r3, [r0]
|
||||
lsls r0, r3, 3
|
||||
adds r0, r3
|
||||
lsls r0, 2
|
||||
ldr r3, =gMapObjects
|
||||
adds r0, r3
|
||||
movs r3, 0xE0
|
||||
lsls r3, 11
|
||||
adds r1, r3
|
||||
asrs r1, 16
|
||||
adds r2, r3
|
||||
asrs r2, 16
|
||||
bl sub_808EB08
|
||||
_0808EBF0:
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_808EBA8
|
||||
|
||||
thumb_func_start npc_coords_shift_still
|
||||
@ void npc_coords_shift_still(struct npc_state *fieldObject)
|
||||
npc_coords_shift_still: @ 808EBFC
|
||||
|
@ -1262,3 +1262,15 @@ void sub_808EB08(struct MapObject *mapObject, s16 x, s16 y)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_808EBA8(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y)
|
||||
{
|
||||
u8 mapObjectId;
|
||||
|
||||
if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId))
|
||||
{
|
||||
x += 7;
|
||||
y += 7;
|
||||
sub_808EB08(&gMapObjects[mapObjectId], x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user