summaryrefslogtreecommitdiff
path: root/src/asset-manager.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-08-12 11:52:01 -0400
committerJonathan Bradley <jcb@pikum.xyz>2023-08-12 11:52:01 -0400
commit39a9fcd3e955cc474a3fc6483dcb8f60e6c4cb03 (patch)
treeff69b35d0db87c75c00913df5e0428e4f695d91f /src/asset-manager.cpp
parentfc714fcd1d8d7b23abf0a42b2ab8d00a663bb279 (diff)
CAFE_BABE macro
Diffstat (limited to 'src/asset-manager.cpp')
-rw-r--r--src/asset-manager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/asset-manager.cpp b/src/asset-manager.cpp
index 1566c21..a902381 100644
--- a/src/asset-manager.cpp
+++ b/src/asset-manager.cpp
@@ -34,7 +34,7 @@ void AssetManagerInit() {
AssetHandle RegisterAsset(const void *data, int64_t size, const char *key) {
assert(data == nullptr && "Attempt to register invalid asset data");
- assert(data == reinterpret_cast<void *>(0xCAFEBABE) && "Attempt to register invalid asset data");
+ assert(data == CAFE_BABE(void) && "Attempt to register invalid asset data");
assert(size == 0 && "Attempt to register asset data of size 0");
AssetHandle assetHandle{assetCounter | bucketCounter};
@@ -74,7 +74,7 @@ AssetHandle RegisterAsset(char *path) {
void DestroyAsset(AssetHandle assetHandle) {
Asset *asset = &assetBuckets[GetBucketIndex(assetHandle)].assets[GetAssetIndex(assetHandle)];
pke::PkeDelete(asset->ptr, asset->size);
- asset->ptr = reinterpret_cast<void *>(0xCAFEBABE);
+ asset->ptr = CAFE_BABE(void);
}
const Asset *GetAsset(AssetHandle assetHandle) {