mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
feat(editor): add --diff-headers cross-file header comparison
Compares two .w* files at the standard catalog header level: 4-byte magic, version, catalog name, entry count, total file bytes. Useful for confirming a JSON round-trip didn't drift, checking whether two preset emissions produced equivalent output, or quickly diagnosing when a content snapshot has silently shifted (entry count up means content was added, file bytes up but everything else same means entry payloads got fatter). Output uses = / ≠ markers per field so visual scanning is fast. Three diagnostic summary cases: identical headers (and same bytes — possibly byte-equal, run cmp(1) to confirm), same shape but bytes differ (entry payloads diverged), and different formats entirely (files are unrelated). Returns exit 1 if any field differs, so the flag composes into shell pipelines (`if diff-headers a.wcms b.wcms; then ...`). World/asset formats stop after magic since their layouts diverge from the standard catalog header. Supports --json variant for tooling integration.
This commit is contained in:
parent
48984ca375
commit
99a952299b
6 changed files with 205 additions and 1 deletions
|
|
@ -1363,6 +1363,8 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Emit a Markdown report of a content tree (per-format counts + per-file detail with catalog name + entry count). Stdout if no out path\n");
|
||||
std::printf(" --catalog-grep <pattern> <dir> [--case-sensitive] [--json]\n");
|
||||
std::printf(" Recursively search catalog NAMES (the internal name field) across .w* files in <dir>. Case-insensitive by default. Exit 1 if no match\n");
|
||||
std::printf(" --diff-headers <fileA> <fileB> [--json]\n");
|
||||
std::printf(" Compare two .w* files at the standard catalog header level (magic / version / name / entry count / file size). Exit 1 if any field differs\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