This commit is contained in:
HP
2026-06-07 18:31:58 +08:00
parent 8d8c9ed9d1
commit b26a6a78fa
5 changed files with 109312 additions and 129 deletions
+18 -4
View File
@@ -67,9 +67,9 @@ cmake --build build-win --config Release --target IMX6U-Game
cmake --build build-win --config Release --target IMX6U-Demo
```
如果 Tom 的 `.sprite` 资源缺失,先运行资源转换目标:
如果修改了 Tom 的原始 PNG 资源,先重新生成 atlas 头文件:
```bash
cmake --build build-win --config Release --target ConvertTomSprites
cmake --build build-win --config Release --target GenerateTomAtlasHeader
```
运行:
@@ -106,9 +106,9 @@ cmake --build build-linux --target IMX6U-Game
cmake --build build-linux --target IMX6U-Demo
```
如果 Tom 的 `.sprite` 资源缺失,先运行资源转换目标:
如果修改了 Tom 的原始 PNG 资源,先重新生成 atlas 头文件:
```bash
cmake --build build-linux --target ConvertTomSprites
cmake --build build-linux --target GenerateTomAtlasHeader
```
运行:
@@ -193,6 +193,20 @@ test_sprite_pixels
透明像素仍保留 alpha;当前 demo 通过 `RenderData::Image(..., 0x00000000)` 把全透明像素作为 color key 跳过。
Tom 游戏资源使用 `SpriteAssetTool --atlas-header` 从原始 PNG 一步生成 atlas 头文件:
```bash
cmake --build build-win --config Release --target GenerateTomAtlasHeader
```
生成结果位于:
```text
src/Apps/Game/generated/tom_atlas.h
```
该头文件包含 `tom_atlas_pixels` 和每张图的 `RenderData::SpriteRegion`,因此板端运行 Tom 游戏时不需要额外部署 `.sprite` 文件。
### Bitmap Font 转换
像素字体图集使用 `tools/gen_font_atlas.py` 生成: