From c2e89eeaa1877624b9aa0cdf6353617a6bd934be Mon Sep 17 00:00:00 2001 From: claude Date: Tue, 14 Jul 2026 07:12:39 +0200 Subject: [PATCH] ci/tasks/readme: register hitbox-tool Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MmdG9GqfSWCzts7AkDwRDh --- .gitea/workflows/release.yml | 4 +++- .vscode/tasks.json | 18 +++++++++++++++++- README.md | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 44df8dd..940609f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Detektera ändrade tools id: changed run: | - TOOLS="pixel-sprite-maker mesh-tool bitmap-font-maker sfx-maker" + TOOLS="pixel-sprite-maker mesh-tool bitmap-font-maker sfx-maker hitbox-tool" BEFORE="${{ github.event.before }}" CHANGED="" if [ "${{ github.event_name }}" = "workflow_dispatch" ] \ @@ -58,6 +58,7 @@ jobs: mesh-tool) BIN=mesht ;; bitmap-font-maker) BIN=fontc ;; sfx-maker) BIN=sfxc ;; + hitbox-tool) BIN=hitbox ;; *) echo "okänt tool $t"; exit 1 ;; esac echo "=== $t ($BIN) ===" @@ -86,6 +87,7 @@ jobs: mesh-tool) BIN=mesht ;; bitmap-font-maker) BIN=fontc ;; sfx-maker) BIN=sfxc ;; + hitbox-tool) BIN=hitbox ;; esac TAG="$t-latest" BODY="$t (binär: $BIN) - rullande bygge från senaste master. Commit: ${{ github.sha }}. Arkitekturer: linux x64 + arm64 (Pi5)." diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6536d15..49701d4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -49,6 +49,22 @@ "group": "test", "problemMatcher": ["$go"] }, + { + "label": "build hitbox-tool", + "type": "shell", + "command": "go build -trimpath -ldflags '-s -w' -o build/hitbox .", + "options": { "cwd": "${workspaceFolder}/hitbox-tool" }, + "group": "build", + "problemMatcher": ["$go"] + }, + { + "label": "test hitbox-tool", + "type": "shell", + "command": "go test ./...", + "options": { "cwd": "${workspaceFolder}/hitbox-tool" }, + "group": "test", + "problemMatcher": ["$go"] + }, { "label": "test pixel-sprite-maker", "type": "shell", @@ -67,7 +83,7 @@ }, { "label": "build", - "dependsOn": ["build pixel-sprite-maker", "build mesh-tool", "build bitmap-font-maker", "build sfx-maker"], + "dependsOn": ["build pixel-sprite-maker", "build mesh-tool", "build bitmap-font-maker", "build sfx-maker", "build hitbox-tool"], "dependsOrder": "parallel", "group": { "kind": "build", "isDefault": true }, "problemMatcher": [] diff --git a/README.md b/README.md index 0510819..b7194d0 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ agent understands the result without opening an image viewer. | [`mesh-tool/`](mesh-tool/) | `mesht` | Creates, inspects and edits 3D models (OBJ + STL). ASCII multi-view rendering + measurements (bbox, volume, watertightness) let an agent *see* a model, edit it (scale/rotate/mirror/merge/primitives) and verify the result. | | [`bitmap-font-maker/`](bitmap-font-maker/) | `fontc` | Turns `.font` text files (pixel glyph grids, proportional widths) into font atlases (PNG + JSON metrics) and renders text strings to PNG or the terminal. | | [`sfx-maker/`](sfx-maker/) | `sfxc` | Synthesizes retro game sound effects (sfxr-style) from `.sfx` text presets to 16-bit WAV: waves, envelope, pitch slides, vibrato, arpeggio, filters. Deterministic, with built-in presets (jump, coin, laser…). | +| [`hitbox-tool/`](hitbox-tool/) | `hitbox` | Scans sprite sheet PNGs and writes per-frame collision boxes as JSON from the alpha channel. Understands the spritec sheet naming convention including upscaled sheets. | Each tool has its own folder, its own README with the full format/CLI reference, its own tests and its own dev branch (`dev/`).