#pragma once #include "tile.h" #include "vec.h" struct LevelBin { unsigned char format; unsigned char chunk_size; unsigned short width; unsigned short height; unsigned char data[]; } __attribute__((__packed__)); struct Level { int width; int height; int size; char *data; struct LevelBin *source; }; void level_load(struct LevelBin *); void level_reload(void); void level_free(void); void level_draw(void); struct Vec level_find(enum Tile); enum Tile level_get(int x, int y); enum Tile level_get_px(int x, int y); void level_set(int x, int y, enum Tile v); void level_set_px(int x, int y, enum Tile v); int level_oob(int x, int y);