diff options
| author | ilotterytea <iltsu@alright.party> | 2025-01-25 16:26:26 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-01-25 16:26:26 +0500 |
| commit | 8a27da4c34c2a233a5f793893ed778e395a5220d (patch) | |
| tree | 5a68e6d5f32c1c0ee3ee1567b0ef2a9727759fb3 /src | |
| parent | db25e6e7f258902850871af2d281ffbdce2fc76c (diff) | |
feat: tile data and image description in XdTexture
Diffstat (limited to 'src')
| -rw-r--r-- | src/xd.h | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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; |
