From 3afcae9dd472ead2d5f2b667fc6479f8ee6db10c Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Sat, 30 Nov 2024 21:03:11 +0100 Subject: make format --- src/crepe/facade/SDLContext.cpp | 13 +++++++------ src/crepe/facade/SDLContext.h | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/crepe/facade') diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index f0a21d5..9c2ead4 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -113,11 +113,12 @@ SDL_Rect SDLContext::get_src_rect(const Sprite & sprite) const { SDL_FRect SDLContext::get_dst_rect(const DstRect & ctx) const { - - vec2 size = { - ctx.sprite.size.x == 0 && ctx.sprite.size.y != 0 ? ctx.sprite.size.y * ctx.sprite.aspect_ratio : ctx.sprite.size.x, - ctx.sprite.size.y == 0 && ctx.sprite.size.x != 0 ? ctx.sprite.size.x / ctx.sprite.aspect_ratio : ctx.sprite.size.y - }; + vec2 size = {ctx.sprite.size.x == 0 && ctx.sprite.size.y != 0 + ? ctx.sprite.size.y * ctx.sprite.aspect_ratio + : ctx.sprite.size.x, + ctx.sprite.size.y == 0 && ctx.sprite.size.x != 0 + ? ctx.sprite.size.x / ctx.sprite.aspect_ratio + : ctx.sprite.size.y}; const CameraValues & cam = ctx.cam; @@ -169,7 +170,7 @@ void SDLContext::set_camera(const Camera & cam, CameraValues & ctx) { double screen_aspect = static_cast(cam.screen.x) / cam.screen.y; double viewport_aspect = zoomed_viewport.x / zoomed_viewport.y; - // calculate black bars + // calculate black bars if (screen_aspect > viewport_aspect) { // pillarboxing float scale = cam.screen.y / zoomed_viewport.y; diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h index 285eee2..cd52be6 100644 --- a/src/crepe/facade/SDLContext.h +++ b/src/crepe/facade/SDLContext.h @@ -45,7 +45,6 @@ public: const double & scale; }; - public: /** * \brief Gets the singleton instance of SDLContext. -- cgit v1.2.3