npc_by_local_id_and_map_set_field_1_bit_x20
This commit is contained in:
parent
511474cc15
commit
67955bb51a
3 changed files with 12 additions and 43 deletions
|
@ -5,48 +5,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start npc_by_local_id_and_map_set_field_1_bit_x20
|
|
||||||
npc_by_local_id_and_map_set_field_1_bit_x20: @ 808E6F8
|
|
||||||
push {r4,lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r1, 24
|
|
||||||
lsls r2, 24
|
|
||||||
lsrs r2, 24
|
|
||||||
lsls r3, 24
|
|
||||||
lsrs r4, r3, 24
|
|
||||||
mov r3, sp
|
|
||||||
bl TryGetFieldObjectIdByLocalIdAndMap
|
|
||||||
lsls r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _0808E73A
|
|
||||||
ldr r2, =gMapObjects
|
|
||||||
mov r0, sp
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r1, r0, 3
|
|
||||||
adds r1, r0
|
|
||||||
lsls r1, 2
|
|
||||||
adds r1, r2
|
|
||||||
movs r0, 0x1
|
|
||||||
adds r2, r4, 0
|
|
||||||
ands r2, r0
|
|
||||||
lsls r2, 5
|
|
||||||
ldrb r3, [r1, 0x1]
|
|
||||||
movs r0, 0x21
|
|
||||||
negs r0, r0
|
|
||||||
ands r0, r3
|
|
||||||
orrs r0, r2
|
|
||||||
strb r0, [r1, 0x1]
|
|
||||||
_0808E73A:
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r4}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end npc_by_local_id_and_map_set_field_1_bit_x20
|
|
||||||
|
|
||||||
thumb_func_start FieldObjectGetLocalIdAndMap
|
thumb_func_start FieldObjectGetLocalIdAndMap
|
||||||
@ void FieldObjectGetLocalIdAndMap(struct npc_state *fieldObject, u8 *localId, u8 *mapId, u8 *mapGroupId)
|
@ void FieldObjectGetLocalIdAndMap(struct npc_state *fieldObject, u8 *localId, u8 *mapId, u8 *mapGroupId)
|
||||||
FieldObjectGetLocalIdAndMap: @ 808E748
|
FieldObjectGetLocalIdAndMap: @ 808E748
|
||||||
|
|
|
@ -37,6 +37,8 @@ void CameraObjectReset1(void);
|
||||||
void FieldObjectSetGraphicsId(struct MapObject *, u8);
|
void FieldObjectSetGraphicsId(struct MapObject *, u8);
|
||||||
void FieldObjectTurn(struct MapObject *, u8);
|
void FieldObjectTurn(struct MapObject *, u8);
|
||||||
void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8);
|
void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8);
|
||||||
|
const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8);
|
||||||
|
void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8);
|
||||||
|
|
||||||
// Exported data declarations
|
// Exported data declarations
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *);
|
||||||
static void FieldObjectHandleDynamicGraphicsId(struct MapObject *);
|
static void FieldObjectHandleDynamicGraphicsId(struct MapObject *);
|
||||||
static void RemoveFieldObjectInternal (struct MapObject *);
|
static void RemoveFieldObjectInternal (struct MapObject *);
|
||||||
/*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8);
|
/*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8);
|
||||||
/*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8);
|
|
||||||
void sub_8096518(struct MapObject *, struct Sprite *);
|
void sub_8096518(struct MapObject *, struct Sprite *);
|
||||||
static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **);
|
static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **);
|
||||||
/*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *);
|
/*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *);
|
||||||
|
@ -1035,3 +1034,13 @@ static void FieldObjectHandleDynamicGraphicsId(struct MapObject *mapObject)
|
||||||
mapObject->graphicsId = VarGetFieldObjectGraphicsId(mapObject->graphicsId - SPRITE_VAR);
|
mapObject->graphicsId = VarGetFieldObjectGraphicsId(mapObject->graphicsId - SPRITE_VAR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void npc_by_local_id_and_map_set_field_1_bit_x20(u8 localId, u8 mapNum, u8 mapGroup, u8 state)
|
||||||
|
{
|
||||||
|
u8 mapObjectId;
|
||||||
|
|
||||||
|
if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId))
|
||||||
|
{
|
||||||
|
gMapObjects[mapObjectId].mapobj_bit_13 = state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue