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:
@@ -406,6 +406,11 @@ impl Game {
|
||||
events
|
||||
}
|
||||
|
||||
pub(crate) fn begin_effect_scenario(&mut self, effect: u8) {
|
||||
self.target_effect = effect.min(7);
|
||||
self.object_active[usize::from(EFFECT_SENSOR.id)] = self.target_effect != 0;
|
||||
}
|
||||
|
||||
fn fire_launcher(&mut self) {
|
||||
self.launcher_velocity_milli = self
|
||||
.launcher_velocity_milli
|
||||
@@ -1801,6 +1806,10 @@ impl Game {
|
||||
self.object_active[usize::from(EFFECT_SENSOR.id)]
|
||||
}
|
||||
|
||||
pub fn player_effect(&self) -> u8 {
|
||||
self.target_effect.min(7)
|
||||
}
|
||||
|
||||
fn next_claw_terminal_frame(&mut self) -> u8 {
|
||||
CLAW_TERMINAL_FRAMES[usize::from(self.random.below(4))]
|
||||
}
|
||||
@@ -2450,6 +2459,7 @@ mod tests {
|
||||
assert!((1..=6).contains(&game.target_effect));
|
||||
assert!(game.effect_target_active());
|
||||
game.target_effect = 3;
|
||||
assert_eq!(game.player_effect(), 3);
|
||||
game.ball.in_launcher = false;
|
||||
game.ball.position = EFFECT_SENSOR.center;
|
||||
game.check_sensor_objects(
|
||||
@@ -2462,6 +2472,7 @@ mod tests {
|
||||
assert_eq!(game.secondary_score_display(), 50_000);
|
||||
assert_eq!(game.player().score, 2_000);
|
||||
assert_eq!(game.target_effect, 0);
|
||||
assert_eq!(game.player_effect(), 0);
|
||||
assert!(!game.effect_target_active());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user