21 lines
361 B
C
21 lines
361 B
C
|
#pragma once
|
||
|
#include <stdint.h>
|
||
|
|
||
|
struct LevelBin {
|
||
|
uint8_t format, chunk_size;
|
||
|
uint16_t width, height;
|
||
|
uint8_t data[];
|
||
|
} __attribute__((__packed__));
|
||
|
|
||
|
struct Level {
|
||
|
int width, height, size;
|
||
|
const struct LevelBin *bin;
|
||
|
uint8_t *data;
|
||
|
};
|
||
|
|
||
|
void level_init(void);
|
||
|
void level_deinit(void);
|
||
|
|
||
|
void level_load(const struct LevelBin *);
|
||
|
void level_reload(void);
|