Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions specs/t27f/deck.t27
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading