mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
Moves the three asset-dependency analysis handlers
(--list-zone-deps, --list-project-orphans,
--remove-project-orphans) out of main.cpp into a new
cli_deps.{hpp,cpp} module. All three surface the relationship
between content references (objects.json + WOB doodad lists)
and on-disk model files: list-deps enumerates what a zone
needs, list-orphans flips that into 'what's on disk but
unreferenced', and remove-orphans deletes the resulting set
(with --dry-run for safe previews).
main.cpp shrinks by 355 lines (3,319 to 2,964) and finally
drops below 3K. The shared 'normalize basename' rule for
matching path references stays duplicated between the list
and remove handlers — a deliberate tradeoff, with comments
flagging the sync requirement.
20 lines
702 B
C++
20 lines
702 B
C++
#pragma once
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
namespace cli {
|
|
|
|
// Dispatch the asset-dependency analysis handlers. All three
|
|
// surface the relationship between content references
|
|
// (objects.json placements + WOB doodad lists) and on-disk
|
|
// model files, supporting --json output for CI pipelines.
|
|
// --list-zone-deps enumerate external model paths a zone needs
|
|
// --list-project-orphans on-disk .wom/.wob files no zone references
|
|
// --remove-project-orphans destructive cleanup (with --dry-run)
|
|
//
|
|
// Returns true if matched; outRc holds the exit code.
|
|
bool handleDeps(int& i, int argc, char** argv, int& outRc);
|
|
|
|
} // namespace cli
|
|
} // namespace editor
|
|
} // namespace wowee
|