Started work on using tiled

This commit is contained in:
2024-10-21 20:50:16 -05:00
parent b2a3ca4411
commit ddbef64f43
16 changed files with 454 additions and 69 deletions

View File

@ -32,7 +32,7 @@ target_sources(${DAWN_TARGET_NAME}
)
# Assets
tool_copy(testmap testmap.json)
tool_map(testmap map/testmap.tmx)
tool_copy(en en.json)
add_dependencies(${DAWN_TARGET_NAME} dawnassets)

View File

@ -37,6 +37,7 @@ char_t symbolGetCharByEntity(const entity_t *ent) {
char_t symbolGetCharByTile(const tile_t tile) {
switch(tile) {
case TILE_NULL:
case TILE_WALKABLE_NULL:
return ' ';
case TILE_GRASS:
@ -85,6 +86,7 @@ uint8_t symbolGetColorByEntity(const entity_t *ent) {
uint8_t symbolGetColorByTile(const tile_t tile) {
switch(tile) {
case TILE_NULL:
case TILE_WALKABLE_NULL:
return COLOR_BLACK;
case TILE_GRASS:

View File

@ -9,7 +9,7 @@
#include "assert/assert.h"
const char_t * MAP_LIST_PATHS[] = {
"testmap.json"
"testmap.map"
};
const int32_t MAP_LIST_COUNT = sizeof(MAP_LIST_PATHS) / sizeof(char_t*);

View File

@ -14,7 +14,8 @@ typedef enum {
TILE_WATER = 2,
// TILE_DOOR = 3,
TILE_BUILDING_WALL = 4,
TILE_ROOF = 5
TILE_ROOF = 5,
TILE_WALKABLE_NULL = 6,
} tile_t;
/**