diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-05-30 14:41:54 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-05-30 14:41:54 -0400 |
| commit | 781410537a1c7ddac340efabeedd4c9309e5cf39 (patch) | |
| tree | 7253babcfc7fd8766095fdf89eca7a9fd3952912 /src/asset-manager.hpp | |
| parent | 6ff0a1f8f7775752db8219dc270a56c4e64b4c7e (diff) | |
pke: asset: BucketContainer>pk_bkt_arr_t & cleanup
Diffstat (limited to 'src/asset-manager.hpp')
| -rw-r--r-- | src/asset-manager.hpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/asset-manager.hpp b/src/asset-manager.hpp index 5106375..bf065f2 100644 --- a/src/asset-manager.hpp +++ b/src/asset-manager.hpp @@ -6,9 +6,9 @@ #include <cstdint> #include <future> -struct AssetHandle : public pk_handle { }; +struct AssetHandle : public pk_bkt_arr_handle { }; -constexpr AssetHandle AssetHandle_MAX = AssetHandle{ pk_handle_MAX_constexpr }; +constexpr AssetHandle AssetHandle_MAX = AssetHandle{ pk_bkt_arr_handle_MAX_constexpr }; TypeSafeInt_constexpr(AssetLoadingState, uint8_t, 0xFF); TypeSafeInt_constexpr(AssetType, uint8_t, 0xFF); @@ -50,15 +50,14 @@ struct Asset { }; void AM_Init(); -AssetHandle AM_Register(AssetKey key, AssetType type, const void *data, int64_t size, std::size_t alignment); +AssetHandle AM_Register(const AssetKey &key, AssetType type, const void *data, int64_t size, std::size_t alignment); AssetHandle AM_Register(const char *path, AssetType type); -AssetHandle AM_Register(AssetKey key, AssetType type, const char *path); -AssetHandle AM_Register_Static(AssetKey key, AssetType type, const void *data, int64_t size); +AssetHandle AM_Register(const AssetKey &key, AssetType type, const char *path); +AssetHandle AM_Register_Static(const AssetKey &key, AssetType type, const void *data, int64_t size); void AM_Release(AssetHandle assetHandle); const Asset *AM_Get(AssetHandle assetHandle); -const AssetHandle AM_GetHandle(AssetKey key); -pk_handle_bucket_index_T AM_GetBucketCount(); -Asset *AM_GetAssets(pk_handle_bucket_index_T bucketIndex, pk_handle_item_index_T &itemCount); +const AssetHandle AM_GetHandle(const AssetKey &key); +pk_bkt_arr *AM_GetAssets(); void AM_Teardown(); void AM_DebugPrint(); |
