mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
sub_808F254
This commit is contained in:
parent
9306122359
commit
c6ef344262
31
asm/field_map_obj.s
Normal file → Executable file
31
asm/field_map_obj.s
Normal file → Executable file
@ -5,37 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_808F254
|
||||
@ void sub_808F254(u8 localId, u8 mapId, u8 mapGroupId)
|
||||
sub_808F254: @ 808F254
|
||||
push {lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
mov r3, sp
|
||||
bl TryGetFieldObjectIdByLocalIdAndMap
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0808F282
|
||||
mov r0, sp
|
||||
ldrb r1, [r0]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gMapObjects
|
||||
adds r0, r1
|
||||
bl sub_808F208
|
||||
_0808F282:
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_808F254
|
||||
|
||||
thumb_func_start sub_808F28C
|
||||
sub_808F28C: @ 808F28C
|
||||
push {r4,lr}
|
||||
|
1
include/field_map_obj.h
Normal file → Executable file
1
include/field_map_obj.h
Normal file → Executable file
@ -46,6 +46,7 @@ void sub_808E75C(s16, s16);
|
||||
void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *);
|
||||
void npc_coords_shift(struct MapObject *, s16, s16);
|
||||
void sub_808EB08(struct MapObject *, s16, s16);
|
||||
void sub_808F254(u8, u8, u8);
|
||||
|
||||
// Exported data declarations
|
||||
|
||||
|
10
src/field_map_obj.c
Normal file → Executable file
10
src/field_map_obj.c
Normal file → Executable file
@ -1629,3 +1629,13 @@ void sub_808F23C(const struct MapObject *mapObject, u8 movementType)
|
||||
mapObjectTemplate->movementType = movementType;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_808F254(u8 localId, u8 mapNum, u8 mapGroup)
|
||||
{
|
||||
u8 mapObjectId;
|
||||
|
||||
if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId))
|
||||
{
|
||||
sub_808F208(&gMapObjects[mapObjectId]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user