mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
refactor(editor): extract interop --validate-* into cli_validate_interop.cpp
Moves the four structural validators for INTEROP file formats
(--validate-stl, --validate-png, --validate-blp, --validate-jsondbc)
out of main.cpp into a new cli_validate_interop.{hpp,cpp} module.
These check files coming in/out of wowee from third-party tools,
distinct from cli_format_validate.cpp which validates the native
open formats (WOM, WOB, WOC, WHM).
main.cpp shrinks by 524 lines (10,644 to 10,121). Each validator
preserves its --json output mode for machine-readable reports.
This commit is contained in:
parent
8cd6f46aa3
commit
06a4fdb60f
4 changed files with 607 additions and 528 deletions
25
tools/editor/cli_validate_interop.hpp
Normal file
25
tools/editor/cli_validate_interop.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
namespace wowee {
|
||||
namespace editor {
|
||||
namespace cli {
|
||||
|
||||
// Dispatch the structural validators for INTEROP file formats —
|
||||
// the formats that flow into and out of wowee from third-party
|
||||
// tools, where the open-format validators in cli_format_validate
|
||||
// don't apply. Each does a deep structural check (chunks, CRCs,
|
||||
// magic numbers, schema constraints) beyond what --info-* shows.
|
||||
// --validate-stl ASCII STL (matches --export-stl output)
|
||||
// --validate-png PNG signature, chunks, CRCs
|
||||
// --validate-blp BLP1/BLP2 header + mip table bounds
|
||||
// --validate-jsondbc JSON DBC sidecar schema + record shape
|
||||
//
|
||||
// All four support an optional trailing `--json` flag for
|
||||
// machine-readable reports.
|
||||
//
|
||||
// Returns true if matched; outRc holds the exit code.
|
||||
bool handleValidateInterop(int& i, int argc, char** argv, int& outRc);
|
||||
|
||||
} // namespace cli
|
||||
} // namespace editor
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue