fix(ui): restore effect and player display assets
Load and render DAT400-407 effect panels with the preserved wheel overlap, and add deterministic effect-7 coverage. Restore exact 1008:0996/0b9e score fields, configured-player rows, current/status indicators, signed status thresholds, and six 5x5 per-player ball-marker slots. Test Plan: - cargo test --all-targets - cargo clippy --all-targets --all-features -- -D warnings - rumdl check CHANGELOG.md RECONSTRUCTION.md README.md - cargo run --quiet -- --simulate effect-7 --step 0 --screenshot /tmp/tdkpin-effect7.png - cargo run --quiet -- --simulate launcher --step 0 --screenshot /tmp/tdkpin-display.png - git diff --check
This commit is contained in:
@@ -17,6 +17,7 @@ pub enum Scenario {
|
||||
Attract,
|
||||
HighScores,
|
||||
NameEntry,
|
||||
Effect7,
|
||||
Autoplay,
|
||||
Launcher,
|
||||
Flippers,
|
||||
@@ -35,6 +36,7 @@ impl Scenario {
|
||||
Self::Attract => "attract",
|
||||
Self::HighScores => "highscores",
|
||||
Self::NameEntry => "name-entry",
|
||||
Self::Effect7 => "effect-7",
|
||||
Self::Autoplay => "autoplay",
|
||||
Self::Launcher => "launcher",
|
||||
Self::Flippers => "flippers",
|
||||
@@ -57,6 +59,7 @@ impl Scenario {
|
||||
| Self::Attract
|
||||
| Self::HighScores
|
||||
| Self::NameEntry
|
||||
| Self::Effect7
|
||||
| Self::Autoplay
|
||||
| Self::Launcher
|
||||
| Self::Flippers
|
||||
@@ -75,6 +78,7 @@ impl FromStr for Scenario {
|
||||
"attract" => Ok(Self::Attract),
|
||||
"highscores" => Ok(Self::HighScores),
|
||||
"name-entry" => Ok(Self::NameEntry),
|
||||
"effect-7" => Ok(Self::Effect7),
|
||||
"autoplay" => Ok(Self::Autoplay),
|
||||
"launcher" => Ok(Self::Launcher),
|
||||
"flippers" => Ok(Self::Flippers),
|
||||
@@ -85,7 +89,7 @@ impl FromStr for Scenario {
|
||||
"claw-7" => Ok(Self::Claw7),
|
||||
"claw-18" => Ok(Self::Claw18),
|
||||
_ => Err(format!(
|
||||
"unknown scenario {value:?}; expected loading, attract, highscores, name-entry, autoplay, launcher, flippers, panel, targets, claw-1, claw-6, claw-7, or claw-18"
|
||||
"unknown scenario {value:?}; expected loading, attract, highscores, name-entry, effect-7, autoplay, launcher, flippers, panel, targets, claw-1, claw-6, claw-7, or claw-18"
|
||||
)),
|
||||
}
|
||||
}
|
||||
@@ -169,7 +173,7 @@ fn seconds_to_step(value: &str) -> Result<u64, String> {
|
||||
}
|
||||
|
||||
pub const fn usage() -> &'static str {
|
||||
"Usage:\n tdkpin-rs\n tdkpin-rs --simulate SCENARIO [--at SECONDS | --step N] [--screenshot FILE.png] [--trace FILE.json] [--seed N]\n\nScenarios: loading, attract, highscores, name-entry, autoplay, launcher, flippers, panel, targets, claw-1, claw-6, claw-7, claw-18"
|
||||
"Usage:\n tdkpin-rs\n tdkpin-rs --simulate SCENARIO [--at SECONDS | --step N] [--screenshot FILE.png] [--trace FILE.json] [--seed N]\n\nScenarios: loading, attract, highscores, name-entry, effect-7, autoplay, launcher, flippers, panel, targets, claw-1, claw-6, claw-7, claw-18"
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, PartialEq)]
|
||||
@@ -229,6 +233,9 @@ impl Simulation {
|
||||
game.target_rotation_state = Some(0);
|
||||
game.wheel_holes = [true, false, true, false, false];
|
||||
}
|
||||
if scenario == Scenario::Effect7 {
|
||||
game.begin_effect_scenario(7);
|
||||
}
|
||||
let initial_events = scenario
|
||||
.claw_terminal()
|
||||
.map_or_else(Vec::new, |terminal| game.begin_claw_scenario(terminal));
|
||||
@@ -364,6 +371,7 @@ fn controls_for(scenario: Scenario, step: u64) -> Controls {
|
||||
| Scenario::Attract
|
||||
| Scenario::HighScores
|
||||
| Scenario::NameEntry
|
||||
| Scenario::Effect7
|
||||
| Scenario::Panel
|
||||
| Scenario::Targets
|
||||
| Scenario::Claw1
|
||||
|
||||
Reference in New Issue
Block a user