From b385ee5094df02e55aea3a3057ce2463d8fd20c0 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 22 Aug 2023 21:11:52 -0400 Subject: AssetManager handles files gracefully We're bypassing memcpy for files because we haven't read the file yet, and we also don't want to copy the file's data around multiple times when it isn't necessary. --- src/asset-manager.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/asset-manager.hpp') diff --git a/src/asset-manager.hpp b/src/asset-manager.hpp index 2354cba..8a45d48 100644 --- a/src/asset-manager.hpp +++ b/src/asset-manager.hpp @@ -4,6 +4,7 @@ #include "macros.hpp" #include "memory.hpp" +#include #include #include #include @@ -18,7 +19,7 @@ struct Asset{ void AssetManagerInit(); AssetHandle RegisterAsset(const void *data, int64_t size, const char *key); -AssetHandle RegisterAsset(char *path); +AssetHandle RegisterAsset(const char *path); void DestroyAsset(AssetHandle assetHandle); const Asset *GetAsset(AssetHandle assetHandle); -- cgit v1.2.3