fix(render): restore timed record overlays

Replace the shared bumper cooldown and synthetic circle outlines with the
original per-record countdown bytes. Bumpers 51-53 use five active callbacks,
side targets 140-147 use twenty, and top targets 150-152 use ten; countdowns
pause while the ball is idle and decrement once per active detail callback.

Render each active record by copying its exact inclusive binary render bounds
from overlay A at the same destination, then naturally fall back to overlay B
when the countdown reaches zero. This removes invented vector effects and keeps
visual lifetime tied to gameplay timer state.

Test Plan:
- `cargo test --all-targets` -- passed, 75 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 17:55:59 +02:00
parent 096d923c79
commit f8292dc87e
4 changed files with 67 additions and 21 deletions
+28 -5
View File
@@ -4,7 +4,6 @@ use crate::{
persistence::{
HighScore, Language, Persistence, SavedData, insert_high_score, qualifies_high_score,
},
table::BUMPERS,
};
use macroquad::prelude::*;
use std::path::Path;
@@ -383,10 +382,34 @@ impl App {
{
self.draw_target_rotation(game, state);
}
for (index, bumper) in BUMPERS.into_iter().enumerate() {
if game.bumper_flash[index] > 0.0 {
draw_circle_lines(bumper.center.x, bumper.center.y, 17.0, 3.0, WHITE);
draw_circle_lines(bumper.center.x, bumper.center.y, 13.0, 2.0, YELLOW);
for (record_id, left, top, right, bottom) in [
(51, 150, 133, 180, 163),
(52, 191, 95, 221, 125),
(53, 204, 150, 234, 180),
(140, 17, 174, 31, 188),
(141, 11, 155, 25, 169),
(142, 10, 136, 24, 150),
(143, 10, 117, 24, 131),
(144, 10, 98, 24, 112),
(145, 10, 79, 24, 93),
(146, 10, 60, 24, 79),
(147, 10, 41, 24, 55),
(150, 199, 40, 211, 50),
(151, 228, 41, 240, 51),
(152, 257, 42, 269, 52),
] {
if game.record_countdown(record_id) != 0 {
let width = (right - left + 1) as f32;
let height = (bottom - top + 1) as f32;
draw_texture_region(
&self.assets.active_table,
left as f32,
top as f32,
width,
height,
left as f32,
top as f32,
);
}
}
if game.player().diamond_segments > 0 {