mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Asset packer bugfixes and improvements
- Ignore hidden files - Fix .DS_Store - Check known extensions - Support precompiled anims - Fix FBT integration
This commit is contained in:
@@ -72,24 +72,30 @@ def _packs_emitter(target, source, env):
|
||||
target_dir = target[0]
|
||||
env.Replace(_PACKS_OUT_DIR=target_dir)
|
||||
env.Replace(_PACKS_SRC_DIR=source_dir)
|
||||
target = set();
|
||||
|
||||
target = [
|
||||
target_dir.File(source_dir.rel_path(node))
|
||||
target.update(
|
||||
source_dir.rel_path(node)
|
||||
for node in env.GlobRecursive("*/Anims/manifest.txt", source_dir.srcnode())
|
||||
]
|
||||
target.extend(
|
||||
target_dir.File(source_dir.rel_path(node).removesuffix(".png") + ".bm")
|
||||
)
|
||||
target.update(
|
||||
source_dir.rel_path(node)
|
||||
for node in env.GlobRecursive("*/Anims/**/*.bm", source_dir.srcnode())
|
||||
)
|
||||
target.update(
|
||||
source_dir.rel_path(node).removesuffix(".png") + ".bm"
|
||||
for node in env.GlobRecursive("*/Anims/**/*.png", source_dir.srcnode())
|
||||
)
|
||||
target.extend(
|
||||
target_dir.File(source_dir.rel_path(node).removesuffix(".png") + ".bmx")
|
||||
target.update(
|
||||
source_dir.rel_path(node).removesuffix(".png") + ".bmx"
|
||||
for node in env.GlobRecursive("*/Icons/**/*.png", source_dir.srcnode())
|
||||
)
|
||||
target.extend(
|
||||
target_dir.File(source_dir.rel_path(node).removesuffix(".c") + ".u8f")
|
||||
target.update(
|
||||
source_dir.rel_path(node).removesuffix(".c") + ".u8f"
|
||||
for node in env.GlobRecursive("*/Fonts/*.c", source_dir.srcnode())
|
||||
)
|
||||
|
||||
target = [target_dir.File(path) for path in target]
|
||||
return target, source
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user