2020-09-11 18:07:53 +02:00
|
|
|
#ifndef _DEF_LEVEL
|
|
|
|
#define _DEF_LEVEL
|
|
|
|
|
2020-09-17 14:14:21 +02:00
|
|
|
#include <gint/defs/types.h>
|
|
|
|
|
2020-12-21 12:18:55 +01:00
|
|
|
typedef struct Level {
|
2020-12-28 00:31:33 +01:00
|
|
|
uint width; /* in tiles */
|
|
|
|
uint height; /* in tiles */
|
2020-09-17 14:14:21 +02:00
|
|
|
const uint8_t **layers; /* points toward the level content */
|
2020-12-28 00:31:33 +01:00
|
|
|
uint8_t layers_count;
|
|
|
|
uint8_t solid_layer; /* id of the solid layer */
|
2020-09-11 18:07:53 +02:00
|
|
|
} Level;
|
|
|
|
|
2020-09-23 12:19:40 +02:00
|
|
|
#include "camera.h"
|
|
|
|
|
2020-09-21 11:04:53 +02:00
|
|
|
void level_step(const Level *level);
|
|
|
|
void level_draw(const Level *level, Camera *camera);
|
|
|
|
void layer_draw(const Level *level, Camera *camera, uint layer_id);
|
2020-09-11 18:07:53 +02:00
|
|
|
|
|
|
|
#endif /* _DEF_LEVEL */
|