Commit Graph
110 Commits
Author SHA1 Message Date
ddidderr 91ae8cdfd8 fix(game): restore the original plunger launch
Start each ball at the recovered right-lane coordinates and charge the
plunger while Down is held, firing only on release. Render all eleven frames
of resource 901, preserve object 25 as the returning-ball catch, and use the
object table's center-contact extents without adding the art radius twice.

Test Plan:
- cargo fmt --all -- --check
- cargo test
- cargo clippy --all-targets --all-features -- -D warnings
- runtime smoke: start, hold Down, release, and inspect the right shooter lane
2026-08-22 17:37:28 +02:00
ddidderr f904977ae4 fix(game): restore the recovered collision table
Replace the mirrored, partial wall transcription with all active static line
and circle objects from the Win16 registration table. Preserve the original
object IDs for drain and shooter-stop handling, and use bounded physics
substeps so fast balls cannot skip thin rails.

Test Plan:
- cargo fmt --all -- --check
- cargo test
- cargo clippy --all-targets --all-features -- -D warnings
- git diff --check
2026-08-22 17:27:34 +02:00
ddidderr 4bc370be12 fix(game): ignore nudges while waiting to launch
A cabinet nudge could still raise the tilt meter after a drain while the next
ball was parked in the launcher. If that latched TILT, launching was correctly
disabled but no active ball remained to drain and clear it, creating a new
softlock.

Only accept nudges for an active ball. This keeps the latched tilt rules intact
while guaranteeing every waiting ball can be launched.

Test Plan:
- `cargo fmt -- --check` -- passed
- `cargo test --all-targets` -- passed, including the waiting-ball regression
- `cargo clippy --all-targets -- -D warnings` -- passed
- `git diff --check` -- passed
2026-08-22 17:06:01 +02:00
ddidderr e815391980 fix(ui): preserve the original canvas and display styling
High-DPI sizing and a resizable client allowed the 640x460 canvas to be placed
inside a much taller window, producing the large internal black band captured in
the gameplay recording. Open an aspect-correct fixed 960x690 client with high-DPI
framebuffer scaling disabled, giving every platform a predictable 1.5x canvas.

Use exact active-table patches for the cyan score fields and derive transparent
numeral glyphs from the recovered Win16 bitmap font. Fill the complete display
slots, move the KBytes readout clear of its border, and place shortcuts on a
readable footer so no dynamic text is clipped or left over an inactive panel.

Test Plan:
- `cargo fmt -- --check` -- passed
- `cargo test --all-targets` -- passed
- `cargo clippy --all-targets -- -D warnings` -- passed
- launched the Linux window and confirmed a 960x690 client with no letterbox,
  full-width cyan fields, recovered score digits, and readable footer -- passed
- `git diff --check` -- passed
2026-08-22 17:03:46 +02:00
ddidderr cf2c839f83 fix(render): restore animated playfield artwork
The gameplay renderer drew the inactive table and then placed thin line flippers
and procedural circles over baked resting artwork. This left two flipper poses
visible at once, made the ball difficult to see, and ignored recovered animation
resources already embedded with the reconstruction.

Build an alpha-masked texture from the original ball bitmap and mask, erase the
baked flipper pose before drawing collision-aligned moving flippers, and animate
the recovered wheel, robot, and magnet sheets from their gameplay events. Add
bumper flashes, exact lit-table pixels for TILT, and a short visual table shake
for nudges so contacts and machine state have immediate feedback.

Test Plan:
- `cargo fmt -- --check` -- passed
- `cargo test --all-targets` -- passed
- `cargo clippy --all-targets -- -D warnings` -- passed
- launched the Linux window and inspected attract, gameplay, resting flippers,
  raised flipper cleanup, and the masked ball sprite -- passed
- `git diff --check` -- passed
2026-08-22 16:58:32 +02:00
ddidderr 7da0f4d171 fix(game): launch immediately and enforce tilt
Starting from the attract screen previously created an idle ball and required a
second Down press to launch it. Launch the first ball as part of the start action
while retaining the normal launch action for later balls.

Replace the decaying visual-only tilt value with a latched game state. A tilt now
forfeits the current bonus, suppresses scoring and further nudges, returns both
flippers to rest, and remains active until the ball drains. Keep the warning on
the playfield and use the recovered tilt sound instead of treating the state as
a temporary decorative overlay.

Test Plan:
- `cargo fmt -- --check` -- passed
- `cargo test --all-targets` -- passed, including tilt latch, scoring, flipper,
  drain-reset, and launch coverage
- `cargo clippy --all-targets -- -D warnings` -- passed
- `git diff --check` -- passed
2026-08-22 16:54:12 +02:00
ddidderr e19162d54d fix(game): reopen the drain and recover stalled balls
The recovered bottom apron had been represented as one solid collision segment,
which prevented the ball from reaching the drain threshold. Split that apron
around the visible center drain so a lost ball decrements the ball count and
allows player and game-over progression to continue.

Add a conservative ball-search impulse after three seconds below the movement
threshold. This protects long-running games from other low-energy rests without
changing active trajectories, and reuses the original nudge sound as feedback.

Test Plan:
- `cargo fmt -- --check` -- passed
- `cargo test --all-targets` -- passed, including drain and ball-search regressions
- `cargo clippy --all-targets -- -D warnings` -- passed
- `git diff --check` -- passed
2026-08-22 16:52:42 +02:00
ddidderr fe33ef902f fix(assets): mark legacy data files non-executable
The source copy preserved executable permission bits from the evidence archive
on HISCORES.DAT and TDKPIN.INI. Keep their exact bytes while recording them as
ordinary embedded data files in the reconstruction repository.

Test Plan:
- `git diff --cached --check` -- passed
- verified the staged changes are mode-only transitions from 100755 to 100644
2026-08-22 16:12:34 +02:00
ddidderr f817b63683 feat: rebuild TDK Pinball Machine in Rust
Replace the empty Rust scaffold with a playable native reconstruction of the
1995 Win16 game. Embed the complete decoded asset set, retain the original
640x460 presentation and localized help, and implement a resizable letterboxed
Macroquad frontend for Linux, macOS, and Windows.

Recreate the multiplayer ball flow, flippers, nudging, target banks, wheel,
robot, lock, magnets, bumper progression, TDK diamond multiplier, media extra
balls, sound dispatch, settings, and high-score entry. The physics engine uses
a fixed time step and 101 static collision segments transcribed from the
original 175-object table. Portable JSON persistence imports and decodes the
original XOR-obfuscated high-score file on first run.

Document the evidence boundary explicitly: artwork and PCM samples are exact,
static geometry is recovered, and several numeric scoring/impulse values remain
best-evidence behavioral tuning rather than bit-identical Win16 arithmetic.
Add a native three-OS CI matrix and retain every decoded resource for future
fidelity work.

Test Plan:
- `diff -qr original/assets/decoded tdkpin-rs/assets/original` with the two
  intentionally added legacy root files excluded -- passed
- `cargo fmt --all -- --check` -- passed
- `cargo check --all-targets` -- passed
- `cargo test --all-targets` -- passed, 8 tests
- `cargo clippy --all-targets -- -D warnings` -- passed
- `cargo build --profile production` -- passed
- `cargo check --all-targets --target x86_64-pc-windows-gnu` -- passed
- `cargo check --all-targets --target x86_64-apple-darwin` -- passed
- `cargo run` graphical start, launch, collision, and score smoke test -- passed;
  audible output was unavailable because the host has no ALSA device
2026-08-22 16:12:11 +02:00
ddidderr 54061f1eb7 init 2026-08-22 15:52:52 +02:00