Commit Graph

4 Commits

Author SHA1 Message Date
Axel Meyer
7316ebc7dd Add encode subcommand
Wraps gid.encodeGid, prints the packed-u32 as decimal on stdout,
emits usage on stderr on bad arity, and a labelled error on
out-of-range or non-integer input.
2026-05-23 13:46:03 +02:00
Axel Meyer
b1743ad19f Add CLI dispatcher and bin entry
Top-level run(argv,{out,err}) accepts an injectable output sink so
handlers can be unit-tested without spawning a subprocess. Handler
map is empty for now; subcommands are wired in as they land.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 13:44:10 +02:00
Axel Meyer
2949a96e11 Add GID encode/decode with range validation
Bit layout [atlas:8][tile_id:20][rot:2][res:2] matches
lib-core.maps init.lua so JS-produced GIDs are byte-identical to
engine-produced ones. >>> 0 forces unsigned u32 output.
2026-05-23 13:40:25 +02:00
Axel Meyer
86aea8e2de Scaffold sporel-tool-mapper package
Empty Node 18+ CommonJS package with bin entry and node --test
script. Subcommand implementations follow in subsequent commits.
2026-05-23 13:38:02 +02:00