2017-09-16 21:13:06 +02:00
|
|
|
#ifndef GUARD_FIELD_MAP_OBJ_H
|
|
|
|
#define GUARD_FIELD_MAP_OBJ_H
|
2017-09-06 14:35:16 +02:00
|
|
|
|
2017-09-08 20:16:44 +02:00
|
|
|
#define NUM_OBJECT_GRAPHICS_INFO 239
|
|
|
|
#define SPRITE_VAR 240
|
|
|
|
|
2017-09-06 14:35:16 +02:00
|
|
|
// Exported struct declarations
|
|
|
|
|
2017-09-15 21:53:07 +02:00
|
|
|
enum SpinnerRunnerFollowPatterns {
|
|
|
|
RUNFOLLOW_ANY,
|
|
|
|
RUNFOLLOW_NORTH_SOUTH,
|
|
|
|
RUNFOLLOW_EAST_WEST,
|
|
|
|
RUNFOLLOW_NORTH_WEST,
|
|
|
|
RUNFOLLOW_NORTH_EAST,
|
|
|
|
RUNFOLLOW_SOUTH_WEST,
|
|
|
|
RUNFOLLOW_SOUTH_EAST,
|
|
|
|
RUNFOLLOW_NORTH_SOUTH_WEST,
|
|
|
|
RUNFOLLOW_NORTH_SOUTH_EAST,
|
|
|
|
RUNFOLLOW_NORTH_EAST_WEST,
|
|
|
|
RUNFOLLOW_SOUTH_EAST_WEST
|
|
|
|
};
|
|
|
|
|
2017-09-06 14:35:16 +02:00
|
|
|
// Exported RAM declarations
|
|
|
|
|
|
|
|
// Exported ROM declarations
|
|
|
|
|
2017-09-06 15:29:59 +02:00
|
|
|
void sub_808D438(void);
|
2018-02-14 00:58:22 +01:00
|
|
|
u8 get_go_image_anim_num(u8);
|
2017-09-06 15:49:51 +02:00
|
|
|
u8 GetFieldObjectIdByLocalIdAndMap(u8, u8, u8);
|
|
|
|
bool8 TryGetFieldObjectIdByLocalIdAndMap(u8, u8, u8, u8 *);
|
2017-09-06 15:52:31 +02:00
|
|
|
u8 GetFieldObjectIdByXY(s16, s16);
|
2017-09-06 20:25:17 +02:00
|
|
|
void FieldObjectSetDirection(struct MapObject *, u8);
|
2017-09-07 00:26:37 +02:00
|
|
|
u8 sub_808D4F4(void);
|
|
|
|
void RemoveFieldObjectByLocalIdAndMap(u8, u8, u8);
|
2017-09-07 02:28:36 +02:00
|
|
|
void npc_load_two_palettes__no_record(u16, u8);
|
|
|
|
void npc_load_two_palettes__and_record(u16, u8);
|
2017-10-12 09:06:19 +02:00
|
|
|
void sub_808EBA8(u8, u8, u8, s16, s16);
|
2017-09-08 03:04:32 +02:00
|
|
|
void pal_patch_for_npc(u16, u8);
|
2017-09-08 01:45:30 +02:00
|
|
|
void sub_808E16C(s16, s16);
|
2017-10-25 04:34:52 +02:00
|
|
|
void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
|
2017-09-07 02:28:36 +02:00
|
|
|
void sub_8092FF0(s16, s16, s16 *, s16 *);
|
|
|
|
u8 FieldObjectDirectionToImageAnimId(u8);
|
2017-09-17 04:19:23 +02:00
|
|
|
void sub_80930E0(s16 *, s16 *, s16, s16);
|
2017-09-08 01:45:30 +02:00
|
|
|
void FieldObjectClearAnim(struct MapObject *);
|
2017-09-17 14:05:33 +02:00
|
|
|
void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);
|
2017-09-08 01:45:30 +02:00
|
|
|
void SpawnFieldObjectsInView(s16, s16);
|
|
|
|
u8 sprite_new(u8, u8, s16, s16, u8, u8);
|
|
|
|
u8 AddPseudoFieldObject(u16, void (*)(struct Sprite *), s16, s16, u8);
|
|
|
|
u8 show_sprite(u8, u8, u8);
|
|
|
|
u8 SpawnSpecialFieldObjectParametrized(u8, u8, u8, s16, s16, u8);
|
|
|
|
u8 SpawnSpecialFieldObject(struct MapObjectTemplate *);
|
2017-09-08 03:04:32 +02:00
|
|
|
void sub_8093038(s16, s16, s16 *, s16 *);
|
|
|
|
void CameraObjectReset1(void);
|
2017-09-08 03:17:55 +02:00
|
|
|
void FieldObjectSetGraphicsId(struct MapObject *, u8);
|
2017-09-08 19:41:55 +02:00
|
|
|
void FieldObjectTurn(struct MapObject *, u8);
|
2017-09-08 19:46:21 +02:00
|
|
|
void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8);
|
2017-09-08 20:36:58 +02:00
|
|
|
const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8);
|
|
|
|
void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8);
|
2017-09-08 23:34:12 +02:00
|
|
|
void gpu_pal_allocator_reset__manage_upper_four(void);
|
|
|
|
void sub_808E82C(u8, u8, u8, s16, s16);
|
|
|
|
void sub_808E7E4(u8, u8, u8);
|
|
|
|
void sub_808E78C(u8, u8, u8, u8);
|
|
|
|
void sub_808E75C(s16, s16);
|
2017-12-18 23:26:44 +01:00
|
|
|
void FieldObjectGetLocalIdAndMap(struct MapObject *mapObject, void *localId, void *mapNum, void *mapGroup);
|
2017-09-09 03:27:02 +02:00
|
|
|
void npc_coords_shift(struct MapObject *, s16, s16);
|
2017-09-09 03:35:46 +02:00
|
|
|
void sub_808EB08(struct MapObject *, s16, s16);
|
2017-09-12 22:17:52 +02:00
|
|
|
void sub_808F254(u8, u8, u8);
|
2017-09-13 15:41:11 +02:00
|
|
|
void FieldObjectStep(struct MapObject *, struct Sprite *, bool8(struct MapObject *, struct Sprite *));
|
2017-10-12 09:06:19 +02:00
|
|
|
u8 FieldObjectFaceOppositeDirection(struct MapObject *, u8);
|
2017-09-16 03:26:56 +02:00
|
|
|
u8 GetOppositeDirection(u8);
|
2017-09-16 23:34:41 +02:00
|
|
|
u8 GetStepInPlaceDelay4AnimId(u32);
|
|
|
|
u8 GetStepInPlaceDelay8AnimId(u32);
|
|
|
|
u8 GetStepInPlaceDelay16AnimId(u32);
|
|
|
|
u8 GetStepInPlaceDelay32AnimId(u32);
|
2017-09-16 19:54:33 +02:00
|
|
|
u8 npc_block_way(struct MapObject *, s16, s16, u32);
|
2017-09-17 00:33:38 +02:00
|
|
|
void MoveCoords(u8, s16 *, s16 *);
|
2017-09-17 14:05:33 +02:00
|
|
|
bool8 FieldObjectIsSpecialAnimActive(struct MapObject *);
|
2017-10-12 09:06:19 +02:00
|
|
|
u8 FieldObjectClearAnimIfSpecialAnimFinished(struct MapObject *);
|
2017-10-23 00:55:07 +02:00
|
|
|
u8 GetFieldObjectIdByXYZ(u16 x, u16 y, u8 z);
|
2018-06-11 16:19:17 +02:00
|
|
|
void npc_set_running_behaviour_etc(struct MapObject *mapObject, u8 movementType);
|
2017-12-01 21:25:13 +01:00
|
|
|
u8 npc_running_behaviour_by_direction(u8 direction);
|
2017-12-18 19:35:50 +01:00
|
|
|
const u8 *GetFieldObjectScriptPointerByFieldObjectId(u8 mapObjectId);
|
2017-12-18 23:26:44 +01:00
|
|
|
u8 sub_8092C8C(struct MapObject *mapObject, s16 x, s16 y, u8 direction);
|
|
|
|
u8 GetFaceDirectionAnimId(u32);
|
|
|
|
u8 GetGoSpeed0AnimId(u32);
|
|
|
|
u8 sub_80934BC(u32);
|
|
|
|
bool8 FieldObjectSetSpecialAnim(struct MapObject *mapObject, u8 specialAnimId);
|
|
|
|
bool8 FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct MapObject *mapObject);
|
|
|
|
u8 FieldObjectCheckIfSpecialAnimFinishedOrInactive(struct MapObject *mapObject);
|
|
|
|
void sub_808F23C(const struct MapObject *mapObject, u8 movementType);
|
|
|
|
void sub_808F208(const struct MapObject *mapObject);
|
2018-02-14 00:58:22 +01:00
|
|
|
void npc_coords_shift_still(struct MapObject *pObject);
|
|
|
|
void FieldObjectMoveDestCoords(struct MapObject *pObject, u32 unk_19, s16 *pInt, s16 *pInt1);
|
2018-04-18 14:12:41 +02:00
|
|
|
u8 AddCameraObject(u8 linkedSpriteId);
|
|
|
|
void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y);
|
2018-05-11 01:36:57 +02:00
|
|
|
u8 GetSimpleGoAnimId(u32);
|
|
|
|
u8 sub_8093514(u32);
|
2017-09-06 15:29:59 +02:00
|
|
|
|
2017-09-06 15:38:38 +02:00
|
|
|
// Exported data declarations
|
|
|
|
|
|
|
|
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
|
|
|
|
|
2017-09-16 21:13:06 +02:00
|
|
|
#endif //GUARD_FIELD_MAP_OBJ_H
|