From 371e68c5284359daea0446dfc674473a1461614a Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 5 Feb 2026 16:41:14 +0100 Subject: 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. --- src/util/asset_manager.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/util/asset_manager.h') 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); -- cgit v1.2.3