This commit is contained in:
2025-08-27 07:46:11 -05:00
parent a543bc7c00
commit 7a90d2d38f
3 changed files with 43 additions and 13 deletions

View File

@@ -14,6 +14,7 @@
#define ASSET_COUNT_MAX 128
#define ASSET_FILENAME_MAX 128
#define ASSET_HEADER_LENGTH 3
#if ASSET_TYPE == wad
#else
@@ -21,7 +22,7 @@
#endif
typedef struct {
char_t header[3];
char_t header[ASSET_HEADER_LENGTH];
union {
assetpalette_t palette;
assettileset_t tileset;
@@ -47,6 +48,11 @@ typedef struct {
assetdata_t data;
} asset_t;
typedef struct {
const char_t *header;
const char_t *extension;
} assetmap_t;
static const char_t ASSET_SEARCH_PATHS[][FILENAME_MAX] = {
"%s/%s",
"./%s",
@@ -56,6 +62,12 @@ static const char_t ASSET_SEARCH_PATHS[][FILENAME_MAX] = {
"../data/%s",
};
static const assetmap_t ASSET_MAP[] = {
{ "DPF", "test.palette.dpf" },
{ "DPT", "test.tileset.dpt" },
{ NULL, NULL }
};
#define ASSET_SEARCH_PATHS_COUNT (\
sizeof(ASSET_SEARCH_PATHS) / FILENAME_MAX\
)