summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xd.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/xd.h b/src/xd.h
index 690fe76..163c680 100644
--- a/src/xd.h
+++ b/src/xd.h
@@ -6,14 +6,26 @@
#define XD_MAX_TEXTURES 256
typedef enum { PLAYER_START = 0, NEXT_FLOOR, PREVIOUS_FLOOR } XdEntityType;
+typedef enum { TILE_FLOOR = 0, TILE_WALL, TILE_CORNER } XdTileType;
typedef struct {
- int id;
char *type;
unsigned char *data;
+ int width, height, dataSize;
} XdTexture;
typedef struct {
+ XdTexture *texture;
+ int id;
+ XdTileType type;
+} XdTile;
+
+typedef struct {
+ int id;
+ XdTileType type;
+} XdTileData;
+
+typedef struct {
int x, y;
XdTexture *texture;
} XdMapTile;
@@ -48,7 +60,8 @@ typedef struct {
typedef struct {
char *name;
int version;
- XdTexture textures[XD_MAX_TEXTURES];
+ XdTexture *textures[XD_MAX_TEXTURES];
+ XdTile *tiles[XD_MAX_TEXTURES];
XdEntity *entities[XD_MAX_ENTITIES];
XdLevel *levels[];
} XdData;