diff options
Diffstat (limited to 'src/render.rs')
-rw-r--r-- | src/render.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/render.rs b/src/render.rs index be8adbc..298b7ed 100644 --- a/src/render.rs +++ b/src/render.rs @@ -30,7 +30,9 @@ pub const START_UWUSPACE: f64 = 0.0; pub const START_BOUNCE: f64 = 0.5; pub const START_SIN: f64 = 1.5; pub const START_COMETOCOSIN: f64 = 2.5; +#[cfg(not(feature = "32k"))] pub const SCENE_GREETINGS: f64 = 32.0; +#[cfg(not(feature = "32k"))] pub const JUST_DVD: f64 = SCENE_GREETINGS + 28.0; pub const PRINT_TIME: bool = true; @@ -55,9 +57,13 @@ pub fn render( canvas.set_draw_color(Color::RGB(12, 12, 12)); canvas.clear(); + #[cfg(not(feature = "32k"))] let is_dvd = time_seconds < SCENE_GREETINGS || time_seconds >= JUST_DVD; + #[cfg(feature = "32k")] + let is_dvd = true; if is_dvd { + #[cfg(not(feature = "32k"))] let time_seconds = if time_seconds >= JUST_DVD { time_seconds - JUST_DVD + 15.0 } else { @@ -111,9 +117,17 @@ pub fn render( } } - if time_seconds >= JUST_DVD { + #[cfg(not(feature = "32k"))] + let no_other_rendering = time_seconds >= JUST_DVD; + #[cfg(feature = "32k")] + let no_other_rendering = false; + #[cfg(not(feature = "32k"))] + let is_greetings_scene = time_seconds >= SCENE_GREETINGS; + #[cfg(feature = "32k")] + let is_greetings_scene = false; + if no_other_rendering { // - } else if time_seconds >= SCENE_GREETINGS { + } else if is_greetings_scene { #[cfg(not(feature = "32k"))] { let time_seconds = time_seconds - SCENE_GREETINGS; |