This commit is contained in:
2025-08-23 17:43:22 -05:00
parent c8a3ebfcec
commit 329925ea54
6 changed files with 168 additions and 0 deletions

36
src/asset/asset.h Normal file
View File

@@ -0,0 +1,36 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "assetraw.h"
typedef enum {
ASSET_TYPE_RAW,
ASSET_TYPE_TEXTURE,
ASSET_TYPE_JSON,
ASSET_TYPE_MODEL,
ASSET_TYPE_AUDIO,
ASSET_TYPE_COUNT
} assettype_t;
typedef struct {
void (*init)(asset_t *asset);
void (*loadAsync)(asset_t *asset);
void (*loadSync)(asset_t *asset);
void (*dispose)(asset_t *asset);
} assetcallbacks_t;
typedef struct asset_s {
void *arg;
} asset_t;
extern assetcallbacks_t ASSET_CALLBACKS[];
void assetInit(void);
void assetDispose(void);