This also improves map_object parsing code. There are still unhandled issues in the parser output related to quirks in the input data.
61 lines
854 B
C++
61 lines
854 B
C++
struct position_t {
|
|
uint8_t x;
|
|
uint8_t y;
|
|
};
|
|
|
|
struct warp_event_t {
|
|
position_t position;
|
|
map_t::map destination_map;
|
|
uint8_t destination_warp_index;
|
|
};
|
|
|
|
struct object_event_t {
|
|
enum type {
|
|
generic,
|
|
item,
|
|
trainer,
|
|
pokemon,
|
|
};
|
|
|
|
enum movement {
|
|
stay,
|
|
walk,
|
|
};
|
|
|
|
enum range {
|
|
any_dir,
|
|
up_down,
|
|
left_right,
|
|
};
|
|
|
|
enum direction {
|
|
down,
|
|
up,
|
|
left,
|
|
right,
|
|
none,
|
|
};
|
|
|
|
position_t position;
|
|
uint8_t sprite_id; // fixme
|
|
enum movement movement;
|
|
union {
|
|
enum range range;
|
|
enum direction direction;
|
|
};
|
|
uint8_t text_id; // fixme
|
|
union {
|
|
struct {
|
|
uint8_t id;
|
|
} item;
|
|
struct {
|
|
uint8_t type; // trainer class
|
|
uint8_t id; // trainer number
|
|
} trainer;
|
|
struct {
|
|
uint8_t id; // pokemon id
|
|
uint8_t level;
|
|
} pokemon;
|
|
};
|
|
};
|