diff options
Diffstat (limited to 'doc/ASSET_SYSTEM.md')
| -rw-r--r-- | doc/ASSET_SYSTEM.md | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/ASSET_SYSTEM.md b/doc/ASSET_SYSTEM.md index 8f31a6a..f52e382 100644 --- a/doc/ASSET_SYSTEM.md +++ b/doc/ASSET_SYSTEM.md @@ -17,11 +17,11 @@ DropAsset(ASSET_SAMPLE_142, mysample); // For lazy decompression cleanup ## Asset Manifest Format -File: `assets/final/demo_assets.txt` +Files: `workspaces/main/assets.txt`, `workspaces/test/assets.txt` Format (CSV): ``` -ASSET_NAME, filename.ext, COMPRESSION, "Description" +ASSET_NAME, COMPRESSION, filename.ext, "Description" ``` Example: @@ -43,8 +43,8 @@ enum class AssetId : uint16_t { Tool: `tools/asset_packer.cc` -1. Parse `demo_assets.txt` -2. Read binary files from `assets/final/` +1. Parse workspace `assets.txt` +2. Read files from workspace `assets/` or `assets/common/` 3. Generate `assets.h` (enum definitions) 4. Generate `assets_data.cc` (embedded byte arrays) 5. Auto-triggered by CMake on manifest changes @@ -92,12 +92,12 @@ Runtime: First `GetAsset()` call invokes generator, caches result. ## Developer Workflow **Add new asset:** -1. Place file in `assets/final/` -2. Edit `assets/final/demo_assets.txt`: +1. Place file in workspace `assets/` (or `assets/common/` for shared) +2. Edit workspace `assets.txt`: ``` - MY_ASSET, myfile.ext, NONE, "Description" + MY_ASSET, NONE, assets/myfile.ext, "Description" ``` -3. Regenerate: `./scripts/gen_assets.sh` or rebuild (auto-triggered) +3. Rebuild: `cmake --build build -j4` (auto-triggered) 4. Use in code: `GetAsset(AssetId::MY_ASSET, &size)` **Modify existing asset:** |
