DEbug not working so moving pcs
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
#include "type/assettexture.h"
|
||||
#include "type/assetpalette.h"
|
||||
#include "type/assettileset.h"
|
||||
#include "type/assetlanguage.h"
|
||||
#include "type/assetscript.h"
|
||||
#include "type/assetmap.h"
|
||||
@@ -17,6 +19,8 @@ typedef enum {
|
||||
ASSET_TYPE_NULL,
|
||||
|
||||
ASSET_TYPE_TEXTURE,
|
||||
ASSET_TYPE_PALETTE,
|
||||
ASSET_TYPE_TILESET,
|
||||
ASSET_TYPE_LANGUAGE,
|
||||
ASSET_TYPE_SCRIPT,
|
||||
ASSET_TYPE_MAP,
|
||||
@@ -30,6 +34,11 @@ typedef enum {
|
||||
ASSET_LOAD_STRAT_CUSTOM
|
||||
} assetloadstrat_t;
|
||||
|
||||
typedef struct assetentire_s {
|
||||
void *data;
|
||||
void *output;
|
||||
} assetentire_t;
|
||||
|
||||
typedef struct assetcustom_s {
|
||||
zip_file_t *zipFile;
|
||||
void *output;
|
||||
@@ -40,7 +49,7 @@ typedef struct {
|
||||
const size_t dataSize;
|
||||
const assetloadstrat_t loadStrategy;
|
||||
union {
|
||||
errorret_t (*entire)(void *data, void *output);
|
||||
errorret_t (*entire)(assetentire_t entire);
|
||||
errorret_t (*custom)(assetcustom_t custom);
|
||||
};
|
||||
} assettypedef_t;
|
||||
@@ -57,6 +66,20 @@ static const assettypedef_t ASSET_TYPE_DEFINITIONS[ASSET_TYPE_COUNT] = {
|
||||
.entire = assetTextureLoad
|
||||
},
|
||||
|
||||
[ASSET_TYPE_PALETTE] = {
|
||||
.extension = "dpf",
|
||||
.loadStrategy = ASSET_LOAD_STRAT_ENTIRE,
|
||||
.dataSize = sizeof(palette_t),
|
||||
.entire = assetPaletteLoad
|
||||
},
|
||||
|
||||
[ASSET_TYPE_TILESET] = {
|
||||
.extension = "dtf",
|
||||
.loadStrategy = ASSET_LOAD_STRAT_ENTIRE,
|
||||
.dataSize = sizeof(assettileset_t),
|
||||
.entire = assetTilesetLoad
|
||||
},
|
||||
|
||||
[ASSET_TYPE_LANGUAGE] = {
|
||||
.extension = "DLF",
|
||||
.loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
|
||||
|
||||
Reference in New Issue
Block a user