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; }; };