extern uint8_t cells_ground_type[256]; extern uint8_t cells_ground_links[256]; extern uint8_t cells_item_type[256]; extern uint8_t cells_item_color[256]; extern uint8_t cells_item_state[256]; struct level_items_count { uint8_t trucks; uint8_t houses; uint8_t cargos; uint8_t buttons; uint8_t droppoints; uint8_t whitetrucks; uint8_t hoverboards; }; struct level { uint16_t level_index; struct level_items_count count; }; struct truck { uint8_t position; uint8_t color; uint8_t directions_last_next; uint8_t cargos[3]; }; #define LEVEL_CELLS (11*11) extern struct level level; extern struct truck level_trucks[LEVEL_CELLS]; enum level_play_result { QUIT, DIED, DONE, PLAYING }; extern uint8_t level_cursor_x; extern uint8_t level_cursor_y; void level_trucks_init(void); uint8_t level_trucks_dir(void); void level_draw(void); enum level_play_result level_play(void);