From 6337291461cfb983ed4a6dfa1cb886ec12c383f3 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Sun, 23 Aug 2026 17:43:44 +0200 Subject: [PATCH] fix(ui): preserve original idle view and function keys Remove the invented attract-screen instruction panel so idle mode presents the original table artwork without a modern overlay. Keep the original plus-key start flow and automatic high-score presentation. Stop assigning F2 and F3 to modern screens; those keys are normally inactive in the original executable outside dormant debug paths. Retain optional portable settings and high-score viewers on F10 and F9, documenting them as additional host controls rather than original behavior. Test Plan: - `cargo test --all-targets` -- passed, 70 tests - `cargo clippy --all-targets -- -D warnings` -- passed - `rumdl check CHANGELOG.md README.md RECONSTRUCTION.md` -- passed - `git diff --cached --check` -- passed --- tdkpin-rs/CHANGELOG.md | 3 +++ tdkpin-rs/README.md | 4 ++-- tdkpin-rs/RECONSTRUCTION.md | 2 +- tdkpin-rs/src/app.rs | 22 ++-------------------- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/tdkpin-rs/CHANGELOG.md b/tdkpin-rs/CHANGELOG.md index 1caf819..547633b 100644 --- a/tdkpin-rs/CHANGELOG.md +++ b/tdkpin-rs/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to ### Fixed +- Remove the invented attract-screen instruction panel and stop assigning the + original F2/F3 keys to modern overlays. The idle view is the original table; + optional settings/high-score viewers move to F10/F9. - Batch physics and flipper publication on the original 50/40/30/20/10-ms detail callbacks with exactly 5/4/3/2/1 internal 10-ms substeps, instead of exposing every substep on host render frames. diff --git a/tdkpin-rs/README.md b/tdkpin-rs/README.md index 4b25640..68645d3 100644 --- a/tdkpin-rs/README.md +++ b/tdkpin-rs/README.md @@ -59,8 +59,8 @@ validation runs. | Right flipper | Keypad Enter | Right Ctrl, `D`, or Right arrow | | Nudge | Space, Left Shift, keypad `3` | Right Shift aliases keypad `3` | | Help | F1 | Enter/Escape returns | -| Settings | F2 | - | -| High scores | F3 | - | +| Settings | `TDKPIN.INI` before launch | F10 opens the portable settings screen | +| High scores | Automatic when a player finishes | F9 opens the portable table viewer | | Sound | F12 | - | The five original speed choices remain available in settings. Physics now uses diff --git a/tdkpin-rs/RECONSTRUCTION.md b/tdkpin-rs/RECONSTRUCTION.md index 3244403..3dd9826 100644 --- a/tdkpin-rs/RECONSTRUCTION.md +++ b/tdkpin-rs/RECONSTRUCTION.md @@ -29,7 +29,7 @@ implementation. | Numeric scoring | Recovered gameplay values | Static scores come from the initialized 175-object ledger. Dynamic bumper progression, target-bank completion, diamond awards, 10k-160k lock bonuses, 310k transfer, six effect values, multiball mode, and all four media thresholds are transcribed from `1000:b476`, `1000:c4e1`, `1000:bc36`, and live state probes. Lock and effect awards share the original per-player secondary score and display multiplier; the fifth hole transfers and clears it, increments the multiplier, and grants the recovered ball award. Score mutation uses the original 32-bit wrapping behavior, and each add operation can advance at most one media threshold. | | High scores | Recovered visible flow; portable storage | The original 276-byte table is decoded as ten `IWIK`-XOR-obfuscated little-endian scores plus ten 22-byte names. Each player is checked immediately when their own last ball is lost; qualifying scores use the original signed-high/unsigned-low comparison and a `TDK Pinball Player`-prefilled name screen before the table is shown and play resumes. Persisted updates use portable JSON rather than rewriting the Win16 file. | | Configuration | Behaviorally compatible | Sound, language, and five detail levels are retained. Storage moves from a local Win16 INI file to the platform user-data directory. | -| Windows UI shell | Deliberately modernized | Win16 menus, modal dialogs, GDI blitting, and multimedia timers are replaced by a fixed native window with keyboard overlays. The visible game and original help render one-for-one at the original 640x460 pixels. | +| Windows UI shell | Original gameplay surface with native host shell | Win16 window ownership and GDI calls are replaced by a fixed native window, but the visible game, idle table, help resources, automatic per-player high-score flow, original keys, and 640x460 logical pixels are retained. F2/F3 remain unassigned as in normal original operation; optional portable settings and table viewers use F10/F9 and do not replace gameplay input. | ## Extracted asset inventory diff --git a/tdkpin-rs/src/app.rs b/tdkpin-rs/src/app.rs index 0cd4da6..e27ed87 100644 --- a/tdkpin-rs/src/app.rs +++ b/tdkpin-rs/src/app.rs @@ -125,7 +125,7 @@ impl App { self.screen = Screen::Help; } } - if is_key_pressed(KeyCode::F2) && self.screen != Screen::NameEntry { + if is_key_pressed(KeyCode::F10) && self.screen != Screen::NameEntry { if self.screen == Screen::Settings { self.screen = self.return_screen; } else { @@ -133,7 +133,7 @@ impl App { self.screen = Screen::Settings; } } - if is_key_pressed(KeyCode::F3) && self.screen != Screen::NameEntry { + if is_key_pressed(KeyCode::F9) && self.screen != Screen::NameEntry { if self.screen == Screen::HighScores { self.screen = self.return_screen; } else { @@ -352,24 +352,6 @@ impl App { fn draw_attract(&self) { draw_texture(&self.assets.inactive_table, 0.0, 0.0, WHITE); - draw_panel(342.0, 72.0, 267.0, 144.0); - draw_centered_at("TDK PINBALL MACHINE", 475.5, 107.0, 22, BLACK); - draw_centered_at( - "PRESS + TO START", - 475.5, - 139.0, - 22, - Color::from_rgba(0, 72, 102, 255), - ); - draw_centered_at("PRESS + AGAIN TO ADD PLAYERS", 475.5, 165.0, 15, BLACK); - draw_centered_at("THEN HOLD DOWN TO LAUNCH", 475.5, 196.0, 16, BLACK); - draw_text( - "F1 HELP F2 SETTINGS F3 HIGHSCORES F12 SOUND", - 322.0, - 448.0, - 10.0, - BLACK, - ); } #[allow(clippy::cast_precision_loss, clippy::too_many_lines)]