AssetManager with a hashing function, a linked list structure to store the hashes as well as a reference counter to support multiple users sharing the same asset.
23 lines
337 B
C
23 lines
337 B
C
#ifndef REUSABLE_IDS_H
|
|
#define REUSABLE_IDS_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif // !__cplusplus
|
|
|
|
#define INVALID_ID -1
|
|
|
|
typedef int32_t ObjectID;
|
|
typedef int32_t AssetID;
|
|
|
|
int32_t reuse_id(int32_t *ids, size_t count);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif // !__cplusplus
|
|
|
|
#endif // !REUSABLE_IDS_H
|