diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-05 16:41:14 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-05 16:41:14 +0100 |
| commit | 371e68c5284359daea0446dfc674473a1461614a (patch) | |
| tree | 8e7acbfa96917bd060aeca5276c78d431755329a /src/util/asset_manager.h | |
| parent | f6f3c13fcd287774a458730722854baab8a17366 (diff) | |
feat(assets): Add Texture Asset support (Task #18.0 prep)
- Integrated stb_image for image decompression in asset_packer.
- Added GetTextureAsset helper in asset_manager.
- Updated procedural asset generation to include dimensions header for consistency.
- Updated test_assets to verify new asset format.
Diffstat (limited to 'src/util/asset_manager.h')
| -rw-r--r-- | src/util/asset_manager.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/asset_manager.h b/src/util/asset_manager.h index 964b7af..7d332f2 100644 --- a/src/util/asset_manager.h +++ b/src/util/asset_manager.h @@ -32,3 +32,12 @@ struct AssetRecord { // - 'out_size' returns the original asset size (excluding the null terminator). const uint8_t* GetAsset(AssetId asset_id, size_t* out_size = nullptr); void DropAsset(AssetId asset_id, const uint8_t* asset); + +struct TextureAsset { + int width; + int height; + const uint8_t* pixels; +}; + +// Helper to retrieve and parse a simple texture asset (from packer's [w][h][pixels] format) +TextureAsset GetTextureAsset(AssetId asset_id); |
