From 9b337ae01e4f3efc6ad3be5af33e3df8e9224d71 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Wed, 11 Dec 2024 15:47:49 +0100 Subject: make format --- src/crepe/facade/SDLContext.cpp | 10 +++++----- src/example/rendering_particle.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 8597f06..7676cfd 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -1,8 +1,8 @@ #include -#include #include #include #include +#include #include #include #include @@ -245,10 +245,10 @@ SDL_FRect SDLContext::get_dst_rect(const DestinationRectangleData & ctx) const { size *= cam_aux_data.render_scale * ctx.img_scale * data.scale_offset; - vec2 screen_pos - = (ctx.pos + data.position_offset - cam_aux_data.cam_pos + (cam_aux_data.zoomed_viewport) / 2) - * cam_aux_data.render_scale - - size / 2 + cam_aux_data.bar_size; + vec2 screen_pos = (ctx.pos + data.position_offset - cam_aux_data.cam_pos + + (cam_aux_data.zoomed_viewport) / 2) + * cam_aux_data.render_scale + - size / 2 + cam_aux_data.bar_size; return SDL_FRect{ .x = screen_pos.x, diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp index b57ba04..48e02ba 100644 --- a/src/example/rendering_particle.cpp +++ b/src/example/rendering_particle.cpp @@ -71,21 +71,21 @@ public: anim.set_anim(2); anim.pause(); - auto & cam = game_object.add_component(ivec2{1280, 720}, vec2{400, 400}, + auto & cam = game_object.add_component(ivec2{720, 1280}, vec2{400, 400}, Camera::Data{ .bg_color = Color::WHITE, }); - function on_click = [&](){ cout << "button clicked" << std::endl; }; - function on_enter = [&](){ cout << "enter" << std::endl; }; - function on_exit = [&](){ cout << "exit" << std::endl; }; + function on_click = [&]() { cout << "button clicked" << std::endl; }; + function on_enter = [&]() { cout << "enter" << std::endl; }; + function on_exit = [&]() { cout << "exit" << std::endl; }; - auto & button = game_object.add_component