Asset custom ready.
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#pragma once
|
||||
#include "type/assetpaletteimage.h"
|
||||
#include "type/assetalphaimage.h"
|
||||
#include "type/assetlanguage.h"
|
||||
#include <zip.h>
|
||||
|
||||
typedef enum {
|
||||
ASSET_TYPE_NULL,
|
||||
@@ -19,18 +21,21 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
ASSET_LOAD_STRAT_ENTIRE,
|
||||
ASSET_LOAD_STRAT_TEST
|
||||
ASSET_LOAD_STRAT_CUSTOM
|
||||
} assetloadstrat_t;
|
||||
|
||||
typedef struct assetcustom_s {
|
||||
zip_file_t *zipFile;
|
||||
void *output;
|
||||
} assetcustom_t;
|
||||
|
||||
typedef struct {
|
||||
const char_t *header;
|
||||
const size_t dataSize;
|
||||
const assetloadstrat_t loadStrategy;
|
||||
union {
|
||||
errorret_t (*entire)(void *data, void *output);
|
||||
struct {
|
||||
void *test;
|
||||
} test;
|
||||
errorret_t (*custom)(assetcustom_t *custom);
|
||||
};
|
||||
} assettypedef_t;
|
||||
|
||||
@@ -55,10 +60,7 @@ static const assettypedef_t ASSET_TYPE_DEFINITIONS[ASSET_TYPE_COUNT] = {
|
||||
|
||||
[ASSET_TYPE_LANGUAGE] = {
|
||||
.header = "DLF",
|
||||
.loadStrategy = ASSET_LOAD_STRAT_TEST,
|
||||
.dataSize = 0, // Variable size
|
||||
.test = {
|
||||
.test = NULL
|
||||
}
|
||||
.loadStrategy = ASSET_LOAD_STRAT_CUSTOM,
|
||||
.custom = assetLanguageInit
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user