From d0e401433016fe3bcf3861d3c5b7439d461d12b6 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Sat, 17 Oct 2026 22:23:22 +0700 Subject: [PATCH] spec(t27f): deck -- a still shows the whole glass card (Closes #9985) reel's still_frame is the last frame of a scene, where card_alpha has faded to 0. A still is not a video, so it draws the card at the settled opacity, STILL_CARD_ALPHA = 1000, tied to the video by a new test. Co-Authored-By: Claude Opus 5.5 --- specs/t27f/deck.t27 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specs/t27f/deck.t27 b/specs/t27f/deck.t27 index 5d7cabab99..30f3e7fdef 100644 --- a/specs/t27f/deck.t27 +++ b/specs/t27f/deck.t27 @@ -117,6 +117,11 @@ pub const MIN_FOCUS_R_PX : i32 = 60; /// on screen while the camera moves under it. pub const FADE_OUT_FRAMES : i32 = 8; +/// A still is one picture, not a video: nothing moves, so nothing fades. reel's still_frame is the +/// last frame of a scene, where card_alpha is 0 -- a still drawn with card_alpha would show no card. +/// Draw stills at the card's settled opacity instead. +pub const STILL_CARD_ALPHA : i32 = 1000; + /// The palette, 0xRRGGBB. pub const BACKDROP : i32 = 0x06060B; pub const AURORA_COUNT : i32 = 4; @@ -592,6 +597,21 @@ test the_card_fades_and_never_pops { } } +test a_still_shows_the_whole_card { + var n : i32 = MIN_SCENE_FRAMES; + while (n <= 300) { + // the still's card is the card the video shows once it has landed, never the faded one + assert STILL_CARD_ALPHA == card_alpha(TRANSITION_FRAMES, n); + assert STILL_CARD_ALPHA != card_alpha(n - 1, n); + var k : i32 = 0; + while (k < n) { + assert card_alpha(k, n) <= STILL_CARD_ALPHA; + k = k + 1; + } + n = n + 1; + } +} + test text_reads_on_glass { const under : i32 = worst_under_card(); assert luma(TEXT) - under >= MIN_TEXT_CONTRAST;