This commit is contained in:
2025-11-07 19:19:17 -06:00
parent 1ce1fdff8d
commit 12c1fb6000
11 changed files with 149 additions and 3 deletions

View File

@@ -16,9 +16,14 @@ typedef enum {
ASSET_TYPE_COUNT,
} assettype_t;
typedef enum {
ASSET_LOAD_STRAT_ENTIRE,
} assetloadstrat_t;
typedef struct {
const char_t *header;
const size_t dataSize;
const assetloadstrat_t loadStrategy;
errorret_t (*load)(void *data, void *output);
} assettypedef_t;
@@ -29,12 +34,14 @@ static const assettypedef_t ASSET_TYPE_DEFINITIONS[ASSET_TYPE_COUNT] = {
[ASSET_TYPE_PALETTE_IMAGE] = {
.header = "DPI",
.loadStrategy = ASSET_LOAD_STRAT_ENTIRE,
.dataSize = sizeof(assetpaletteimage_t),
.load = assetPaletteImageLoad
},
[ASSET_TYPE_ALPHA_IMAGE] = {
.header = "DAI",
.loadStrategy = ASSET_LOAD_STRAT_ENTIRE,
.dataSize = sizeof(assetalphaimage_t),
.load = assetAlphaImageLoad
},