mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
feat(editor): add --touch-tree CI integrity check
Recursively walks a directory, identifies every recognized .w* file by 4-byte magic, and parses the standard catalog header (magic + version + length-prefixed name + entryCount) to confirm the file isn't truncated, corrupted, or otherwise malformed at the header level. Reports per-file PASS/FAIL + extension-mismatch warnings (when a file's actual extension doesn't match what its magic says it should be). Exits 1 on any FAIL — designed as a CI gate that runs after content build to catch truncations / write-failures / disk-full mid-emit. World/asset formats (WOM/WOB/WHM/WOT/WOW) are recognized by magic but the catalog-header probe is skipped since their layouts differ. Implausibility caps: catalog-name length > 1MB or entryCount > 1M trigger failure as likely corruption signals. --quiet hides the per-file PASS/FAIL list (summary line only); --json variant for tooling integration.
This commit is contained in:
parent
104de8ffe6
commit
5fe461cca8
6 changed files with 252 additions and 1 deletions
|
|
@ -1357,6 +1357,8 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Recover the correct .w* extension on a file by reading its 4-byte magic. --dry-run prints the planned move; --force overwrites\n");
|
||||
std::printf(" --bulk-rename-by-magic <dir> [--dry-run] [--force]\n");
|
||||
std::printf(" Apply --rename-by-magic recursively to every file in <dir>. Conflicts are skipped without --force; exits 1 if any rename failed\n");
|
||||
std::printf(" --touch-tree <dir> [--json] [--quiet]\n");
|
||||
std::printf(" CI integrity check: open every recognized .w* file in <dir>, parse standard header, report PASS/FAIL + extension mismatches. Exit 1 on any failure\n");
|
||||
std::printf(" --gen-animations <wani-base> [name]\n");
|
||||
std::printf(" Emit .wani starter: 5 essential animations (Stand / Walk / Run / Death / AttackUnarmed) with fallback chains\n");
|
||||
std::printf(" --gen-animations-combat <wani-base> [name]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue