Mostly nuking old system
Some checks failed
Build Dusk / build-linux (push) Failing after 1m24s
Build Dusk / run-tests (push) Failing after 1m17s
Build Dusk / build-psp (push) Failing after 1m34s
Build Dusk / build-dolphin (push) Failing after 2m5s

This commit is contained in:
2026-02-13 19:13:26 -06:00
parent b37e5f45ca
commit e5e8c49f6c
97 changed files with 1454 additions and 408 deletions

View File

@@ -6,8 +6,7 @@
*/
#pragma once
#include "type/assetpaletteimage.h"
#include "type/assetalphaimage.h"
#include "type/assettexture.h"
#include "type/assetlanguage.h"
#include "type/assetscript.h"
#include "type/assetmap.h"
@@ -17,8 +16,7 @@
typedef enum {
ASSET_TYPE_NULL,
ASSET_TYPE_PALETTE_IMAGE,
ASSET_TYPE_ALPHA_IMAGE,
ASSET_TYPE_TEXTURE,
ASSET_TYPE_LANGUAGE,
ASSET_TYPE_SCRIPT,
ASSET_TYPE_MAP,
@@ -38,7 +36,7 @@ typedef struct assetcustom_s {
} assetcustom_t;
typedef struct {
const char_t *header;
const char_t *extension;
const size_t dataSize;
const assetloadstrat_t loadStrategy;
union {
@@ -52,41 +50,34 @@ static const assettypedef_t ASSET_TYPE_DEFINITIONS[ASSET_TYPE_COUNT] = {
0
},
[ASSET_TYPE_PALETTE_IMAGE] = {
.header = "DPI",
[ASSET_TYPE_TEXTURE] = {
.extension = "dpt",
.loadStrategy = ASSET_LOAD_STRAT_ENTIRE,
.dataSize = sizeof(assetpaletteimage_t),
.entire = assetPaletteImageLoad
},
[ASSET_TYPE_ALPHA_IMAGE] = {
.header = "DAI",
.loadStrategy = ASSET_LOAD_STRAT_ENTIRE,
.dataSize = sizeof(assetalphaimage_t),
.entire = assetAlphaImageLoad
.dataSize = sizeof(assettexture_t),
.entire = assetTextureLoad
},
[ASSET_TYPE_LANGUAGE] = {
.header = "DLF",
.extension = "DLF",
.loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
.custom = assetLanguageHandler
},
[ASSET_TYPE_SCRIPT] = {
.header = "DSF",
.extension = "lua",
.loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
.custom = assetScriptHandler
},
[ASSET_TYPE_MAP] = {
.header = "DMF",
.loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
.custom = assetMapHandler
},
// [ASSET_TYPE_MAP] = {
// .extension = "DMF",
// .loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
// .custom = assetMapHandler
// },
[ASSET_TYPE_MAP_CHUNK] = {
.header = "DMC",
.loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
.custom = assetMapChunkHandler
},
// [ASSET_TYPE_MAP_CHUNK] = {
// .extension = "DMC",
// .loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
// .custom = assetMapChunkHandler
// },
};