summaryrefslogtreecommitdiff
path: root/src/util/asset_manager.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-05 16:41:14 +0100
committerskal <pascal.massimino@gmail.com>2026-02-05 16:41:14 +0100
commit371e68c5284359daea0446dfc674473a1461614a (patch)
tree8e7acbfa96917bd060aeca5276c78d431755329a /src/util/asset_manager.h
parentf6f3c13fcd287774a458730722854baab8a17366 (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.h9
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);