From a358fbc9f4ba3a7b01f600109fc86aeb2fcf96b8 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 12:06:37 +0100 Subject: feat(asset_manager): Implement array-based caching - Refactored asset manager to use a static array for caching, improving performance and memory efficiency. - Updated asset_packer to correctly generate ASSET_LAST_ID for array sizing. - Modified asset_manager.h to use a forward declaration for AssetId. - Updated asset_manager.cc to use the conditional include for generated asset headers. - Added a test case in test_assets to verify the array-based cache and ASSET_LAST_ID logic. --- src/util/asset_manager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util/asset_manager.h') diff --git a/src/util/asset_manager.h b/src/util/asset_manager.h index 54d0144..6b09430 100644 --- a/src/util/asset_manager.h +++ b/src/util/asset_manager.h @@ -6,12 +6,12 @@ #include #include -// Forward declaration of the generated enum -enum class AssetId : uint16_t; +enum class AssetId : uint16_t; // Forward declaration struct AssetRecord { const uint8_t* data; size_t size; + bool is_procedural; // Flag to indicate if memory was allocated dynamically }; // Generic interface -- cgit v1.2.3