crystal-tower/inc/level.h

24 lines
479 B
C
Raw Normal View History

2021-11-10 00:37:45 +01:00
#pragma once
2021-11-10 06:15:41 +01:00
#include "tile.h"
#include "vec.h"
2021-11-10 00:37:45 +01:00
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;
2021-11-10 06:15:41 +01:00
int size;
2021-11-10 00:37:45 +01:00
char *data;
};
struct Level level_load(struct LevelBin *restrict);
void level_free(struct Level *restrict);
void level_draw(struct Level *restrict);
2021-11-10 06:15:41 +01:00
struct Vec level_find(struct Level *restrict, enum Tile);