mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 11:33:52 +00:00
feat(editor): WCAM JSON round-trip closure
Adds --export-wcam-json / --import-wcam-json with the established
readEnumField template factoring int+name dual encoding for
purposeKind ("cinematic"/"combat"/"mounted"/"vehicle"/
"cutscene"/"photomode"). Float fields (FOV, distance, pitch,
yaw, shoulder offset) preserved bit-for-bit through JSON.
All 3 presets (combat/mounted/cinematic) byte-identical binary
roundtrip OK including the Cinematic Portrait preset's offbeat
yaw=15deg + 35deg telephoto + head-bone tracking combination.
Live-tested gimbal-lock validator: hand-mutated Cinematic
Establishing preset pitch from -30 to -95 (beyond the -89
gimbal-lock limit). Validator correctly errored:
"pitchDegrees=-95.000000 gimbal-locks the camera (must be
within (-89, +89))". Catches the class of cinematic-camera bugs
where a pitch of ±90 mathematically aligns with the world up
vector and causes the camera basis to collapse.
CLI flag count 1497 -> 1499.
This commit is contained in:
parent
ab69171ad9
commit
a4dd71fc90
3 changed files with 179 additions and 0 deletions
|
|
@ -2779,6 +2779,10 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Print WCAM entries (id / purpose / damping / FOV / distance / pitch / yaw / shoulder / focusBone / name)\n");
|
||||
std::printf(" --validate-wcam <wcam-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name required, purposeKind 0..5, no duplicate presetIds, FOV in (0,180) (zero/negative makes no sense, >=180 inverts the view frustum), distanceFromTarget >= 0 (negative places camera in front of target); CRITICAL: pitch within (-89,+89) — beyond gimbal-locks the camera. Warns on FOV outside 30..120 player-comfort range (motion-sickness risk), distanceFromTarget < 0.5m (clips into model), and yawOffsetDegrees beyond ±180 (wraps to smaller equivalent — simplify)\n");
|
||||
std::printf(" --export-wcam-json <wcam-base> [out.json]\n");
|
||||
std::printf(" Export binary .wcam to a human-editable JSON sidecar (defaults to <base>.wcam.json; emits purposeKind as int + name string; floats preserved bit-for-bit)\n");
|
||||
std::printf(" --import-wcam-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wcam.json sidecar back into binary .wcam (purposeKind int OR \"cinematic\"/\"combat\"/\"mounted\"/\"vehicle\"/\"cutscene\"/\"photomode\" — round-trips FOV+distance+pitch+yaw+shoulder floats byte-identical)\n");
|
||||
std::printf(" --catalog-pluck <wXXX-file> <id> [--json]\n");
|
||||
std::printf(" Extract one entry by id from any registered catalog format. Auto-detects magic, dispatches to the per-format --info-* handler internally, then prints just the matching entry. Primary-key field is auto-detected (first *Id field, or first numeric)\n");
|
||||
std::printf(" --catalog-find <directory> <id> [--magic <WXXX>] [--json]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue