Roughly planning asset locking
This commit is contained in:
34
src/asset/asset.h
Normal file
34
src/asset/asset.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "assetpaletteimage.h"
|
||||
#include "util/reflist.h"
|
||||
|
||||
#define ASSET_HEADER_SIZE 3
|
||||
#define ASSET_REFERENCE_COUNT_MAX 8
|
||||
|
||||
typedef enum {
|
||||
ASSET_STATE_NOT_LOADED,
|
||||
ASSET_STATE_LOADING,
|
||||
ASSET_STATE_LOADED,
|
||||
ASSET_STATE_ERROR,
|
||||
} assetstate_t;
|
||||
|
||||
typedef enum {
|
||||
ASSET_TYPE_UNKNOWN,
|
||||
ASSET_TYPE_PALETTE_IMAGE,
|
||||
} assettype_t;
|
||||
|
||||
typedef struct {
|
||||
const char_t filename[FILENAME_MAX];
|
||||
ref_t refListArray[ASSET_REFERENCE_COUNT_MAX];
|
||||
reflist_t refList;
|
||||
assetstate_t state;
|
||||
assettype_t type;
|
||||
void *data;
|
||||
} asset_t;
|
||||
Reference in New Issue
Block a user