mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
through sub_808F23C
This commit is contained in:
parent
2b9b75a824
commit
9306122359
@ -5,56 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_808F208
|
||||
@ void sub_808F208(struct npc_state *fieldObject)
|
||||
sub_808F208: @ 808F208
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_808F1B4
|
||||
adds r1, r0, 0
|
||||
cmp r1, 0
|
||||
beq _0808F222
|
||||
ldrh r0, [r4, 0x10]
|
||||
subs r0, 0x7
|
||||
strh r0, [r1, 0x4]
|
||||
ldrh r0, [r4, 0x12]
|
||||
subs r0, 0x7
|
||||
strh r0, [r1, 0x6]
|
||||
_0808F222:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_808F208
|
||||
|
||||
thumb_func_start sub_808F228
|
||||
sub_808F228: @ 808F228
|
||||
push {r4,lr}
|
||||
adds r4, r1, 0
|
||||
bl sub_808F1B4
|
||||
cmp r0, 0
|
||||
beq _0808F236
|
||||
str r4, [r0, 0x10]
|
||||
_0808F236:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_808F228
|
||||
|
||||
thumb_func_start sub_808F23C
|
||||
sub_808F23C: @ 808F23C
|
||||
push {r4,lr}
|
||||
lsls r1, 24
|
||||
lsrs r4, r1, 24
|
||||
bl sub_808F1B4
|
||||
cmp r0, 0
|
||||
beq _0808F24C
|
||||
strb r4, [r0, 0x9]
|
||||
_0808F24C:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_808F23C
|
||||
|
||||
thumb_func_start sub_808F254
|
||||
@ void sub_808F254(u8 localId, u8 mapId, u8 mapGroupId)
|
||||
sub_808F254: @ 808F254
|
||||
|
@ -86,7 +86,7 @@ struct MapObjectTemplate
|
||||
///*0x0B*/ u8 fillerB[1];
|
||||
/*0x0C*/ u16 unkC;
|
||||
/*0x0E*/ u16 unkE;
|
||||
/*0x10*/ u8 *script;
|
||||
/*0x10*/ const u8 *script;
|
||||
/*0x14*/ u16 flagId;
|
||||
/*0x16*/ u8 filler_16[2];
|
||||
}; /*size = 0x18*/
|
||||
|
@ -1578,7 +1578,7 @@ struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, st
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct MapObjectTemplate *sub_808F1B4(struct MapObject *mapObject)
|
||||
struct MapObjectTemplate *sub_808F1B4(const struct MapObject *mapObject)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1595,3 +1595,37 @@ struct MapObjectTemplate *sub_808F1B4(struct MapObject *mapObject)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void sub_808F208(const struct MapObject *mapObject)
|
||||
{
|
||||
struct MapObjectTemplate *mapObjectTemplate;
|
||||
|
||||
mapObjectTemplate = sub_808F1B4(mapObject);
|
||||
if (mapObjectTemplate != NULL)
|
||||
{
|
||||
mapObjectTemplate->x = mapObject->coords2.x - 7;
|
||||
mapObjectTemplate->y = mapObject->coords2.y - 7;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_808F228(const struct MapObject *mapObject, const u8 *script)
|
||||
{
|
||||
struct MapObjectTemplate *mapObjectTemplate;
|
||||
|
||||
mapObjectTemplate = sub_808F1B4(mapObject);
|
||||
if (mapObjectTemplate != NULL)
|
||||
{
|
||||
mapObjectTemplate->script = script;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_808F23C(const struct MapObject *mapObject, u8 movementType)
|
||||
{
|
||||
struct MapObjectTemplate *mapObjectTemplate;
|
||||
|
||||
mapObjectTemplate = sub_808F1B4(mapObject);
|
||||
if (mapObjectTemplate != NULL)
|
||||
{
|
||||
mapObjectTemplate->movementType = movementType;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user