Asset
This commit is contained in:
36
src/asset/asset.h
Normal file
36
src/asset/asset.h
Normal 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);
|
Reference in New Issue
Block a user