diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-01 12:06:37 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-01 12:06:37 +0100 |
| commit | a358fbc9f4ba3a7b01f600109fc86aeb2fcf96b8 (patch) | |
| tree | a08b085bc74b5d41382d9818377ff8c31802ad85 /src/util/asset_manager.h | |
| parent | f80e37bd61e447f1d66fbb5eb4c1ab7a8a77cf0f (diff) | |
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.
Diffstat (limited to 'src/util/asset_manager.h')
| -rw-r--r-- | src/util/asset_manager.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 <cstddef> #include <cstdint> -// 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 |
