puffin stuffin

This commit is contained in:
Evan Pratten 2021-10-01 23:00:40 -04:00
parent 21272ba5d6
commit a0cb49edf2
4 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,7 @@ impl ScreenSpaceRender for InGameScreen {
raylib: &mut crate::utilities::non_ref_raylib::HackedRaylibHandle, raylib: &mut crate::utilities::non_ref_raylib::HackedRaylibHandle,
config: &GameConfig config: &GameConfig
) { ) {
puffin::profile_function!();
// Calculate the logo position // Calculate the logo position
let screen_size = raylib.get_screen_size(); let screen_size = raylib.get_screen_size();

View File

@ -51,6 +51,7 @@ impl Action<Scenes, ScreenError, GameContext> for InGameScreen {
delta: &chrono::Duration, delta: &chrono::Duration,
context: &GameContext, context: &GameContext,
) -> Result<dirty_fsm::ActionFlag<Scenes>, ScreenError> { ) -> Result<dirty_fsm::ActionFlag<Scenes>, ScreenError> {
puffin::profile_function!();
trace!("execute() called on InGameScreen"); trace!("execute() called on InGameScreen");
// Grab exclusive access to the renderer // Grab exclusive access to the renderer

View File

@ -16,6 +16,7 @@ impl FrameUpdate for InGameScreen {
delta_seconds: &Duration, delta_seconds: &Duration,
config: &GameConfig, config: &GameConfig,
) { ) {
puffin::profile_function!();
// Set the camera's offset based on screen size // Set the camera's offset based on screen size
self.camera.offset = raylib.get_screen_size().div(Vector2::new(2.0, 1.05)); self.camera.offset = raylib.get_screen_size().div(Vector2::new(2.0, 1.05));
self.camera.target = Vector2::new(self.player.position.x, self.camera.target.y); self.camera.target = Vector2::new(self.player.position.x, self.camera.target.y);

View File

@ -14,6 +14,7 @@ impl WorldSpaceRender for InGameScreen {
raylib: &mut RaylibMode2D<'_, HackedRaylibHandle>, raylib: &mut RaylibMode2D<'_, HackedRaylibHandle>,
config: &GameConfig, config: &GameConfig,
) { ) {
puffin::profile_function!();
// Render the player // Render the player
render_character_in_camera_space(raylib, &self.player, &config); render_character_in_camera_space(raylib, &self.player, &config);