diff --git a/src/logic/ingame/mod.rs b/src/logic/ingame/mod.rs index 59944aa..e311944 100644 --- a/src/logic/ingame/mod.rs +++ b/src/logic/ingame/mod.rs @@ -3,10 +3,7 @@ mod playerlogic; use raylib::prelude::*; -use crate::{ - gamecore::{GameCore, GameState}, - lib::wrappers::audio::player::AudioPlayer, -}; +use crate::{gamecore::{GameCore, GameState}, lib::wrappers::audio::player::AudioPlayer, pallette::{SKY, WATER}}; use super::screen::Screen; @@ -38,6 +35,15 @@ impl InGameScreen { width: game_core.resources.cave_mid_layer.width as f32, height: game_core.resources.cave_mid_layer.height as f32, }; + let world_bounds = Rectangle { + x: -100.0, + y: -100.0, + width: game_core.resources.cave_mid_layer.width as f32, + height: game_core.resources.cave_mid_layer.height as f32, + }; + + // Clear the background + context_2d.draw_rectangle_rec(world_bounds, WATER); // Render the world texture context_2d.draw_texture_rec( @@ -61,7 +67,7 @@ impl Screen for InGameScreen { let dt = draw_handle.get_time() - game_core.last_frame_time; // Clear frame - draw_handle.clear_background(Color::BLUE); + draw_handle.clear_background(Color::BLACK); // Handle the pause menu being opened if draw_handle.is_key_pressed(KeyboardKey::KEY_ESCAPE) { diff --git a/src/pallette.rs b/src/pallette.rs index 9d70e98..5d675ca 100644 --- a/src/pallette.rs +++ b/src/pallette.rs @@ -19,4 +19,18 @@ pub const TRANSLUCENT_WHITE_64: Color = Color { g: 255, b: 255, a: 64, +}; + +pub const SKY: Color = Color { + r: 15, + g: 193, + b: 217, + a: 255 +}; + +pub const WATER: Color = Color { + r: 24, + g: 66, + b: 143, + a: 255 }; \ No newline at end of file