fix(game): restore original scoring and sound dispatch

The rewrite assigned one WAV resource to each logical event, which could not
represent the original call-site behavior. It played reserved WAV 2022 for
media awards, omitted multi-sound bank sequences, and used the wrong cues for
captures, bumpers, targets, nudges, and tilt.

Emit explicit sound-resource events at the reconstructed C control-flow sites
so logical rendering events no longer imply audio. Move media threshold
advancement into score addition, retain one threshold transition per call, and
use wrapping 32-bit score arithmetic. Restore the ninth-diamond 24,464-point
completion, the subsequent double-score activation, and later 100,000-point
secondary-score awards.

Test Plan:
- `cargo test --all-targets` -- passed, 53 tests
- `cargo clippy --all-targets -- -D warnings` -- passed
- `rumdl check CHANGELOG.md RECONSTRUCTION.md` -- passed
- `git diff --cached --check` -- passed
This commit is contained in:
2026-08-23 16:48:41 +02:00
parent 8b99e9607c
commit 9de3dcc755
5 changed files with 194 additions and 100 deletions
+2 -2
View File
@@ -423,8 +423,8 @@ mod tests {
let mut simulation = Simulation::new(Scenario::Flippers, 1);
simulation.advance_to(46);
assert_eq!(simulation.trace[16].events, ["FlipperMove"]);
assert_eq!(simulation.trace[46].events, ["FlipperMove"]);
assert_eq!(simulation.trace[16].events, ["FlipperMove", "Sound(2021)"]);
assert_eq!(simulation.trace[46].events, ["FlipperMove", "Sound(2021)"]);
assert!(!simulation.game.flippers.left_raised);
}