28 lines
706 B
C
28 lines
706 B
C
//---
|
|
// level: Static level model
|
|
//
|
|
// This module provides representations for read-only data structures
|
|
// describing levels, from which dynamic maps can be built. The only role of
|
|
// models is that we can import them into the game and then load them into
|
|
// maps. This is a convenience to abstract away the storage format of levels.
|
|
//---
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct {
|
|
/* Dimensions of the level (yeah no surprise right) */
|
|
uint16_t width, height;
|
|
/* Tile definitions; each tile is a dual-layer base/decoration */
|
|
struct {
|
|
uint8_t base;
|
|
uint8_t decor;
|
|
} tiles[];
|
|
|
|
} level_t;
|
|
|
|
/* List of levels */
|
|
extern level_t lv_demo;
|
|
extern level_t lv_1;
|