From 975055e40938730cb09d151ba17bf8defd3b4adf Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Sun, 26 Feb 2023 10:43:21 -0500 Subject: Code quality and improvements I genuinely cannot remember what I was doing here, as I never committed it. But basically - it looks like I used my IDE and fixed warnings and improved some code blocks / references --- src/ur.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/ur.cpp') diff --git a/src/ur.cpp b/src/ur.cpp index b3ea5f7..3bbc670 100644 --- a/src/ur.cpp +++ b/src/ur.cpp @@ -5,13 +5,10 @@ #include "timedLatch.hpp" #include #include -#include #include const char* TEXTURE_PATH = "./res/ur.png"; -const float PAD = 32.f; -const float PIECE_PAD = 8.f; -const float TEXT_OFFSET = 8.f; + const sf::Color BG_COLOR = sf::Color(66, 47, 81, 255); const sf::Color SEMI_TRANSPARENT = sf::Color(255, 255, 255, 128); @@ -26,7 +23,6 @@ bool mouse_left_locked = false; // tracks the turn pids int turn_pid = P1_ID; -int rolling_frame = 0; // which player won P1_ID or P2_ID int winner = -1; @@ -97,9 +93,9 @@ inline void render_dice(sf::RenderWindow* window, std::shared_ptr active_player, std::shared_ptr opponent, - std::shared_ptr> dice, - std::shared_ptr> roll_sprites, - std::shared_ptr> pass_sprites, + const std::shared_ptr>& dice, + const std::shared_ptr>& roll_sprites, + const std::shared_ptr>& pass_sprites, std::shared_ptr> textures, sf::Sprite* roll_result, ur::TimedLatch* animation_timer, -- cgit v1.2.3-54-g00ecf