summaryrefslogtreecommitdiff
path: root/asset.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'asset.hpp')
-rw-r--r--asset.hpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/asset.hpp b/asset.hpp
index db53414..c149e0a 100644
--- a/asset.hpp
+++ b/asset.hpp
@@ -7,7 +7,6 @@ struct Pack_File;
struct Pack;
struct Asset {
- Asset* next;
Asset_Loader* loader;
};
@@ -19,13 +18,19 @@ struct Asset_Loader {
struct Asset_Arena {
Pack* p;
Arena* a, * s;
- Asset* assets;
-
- void init(Arena* arena, const char* pack_name);
+ struct Bucket {
+ char* name;
+ Asset* asset;
+ };
+ Bucket* assets;
+ int max_assets;
+
+ void init(Arena* arena, const char* pack_name, int max);
void destroy();
Asset* load(const char* name);
- void claim(Asset* a);
+
+ int bucket(const char* name);
};
void register_asset_loader(