From abb22cda9a82a323fd8f1d077adefd6970a1abaa Mon Sep 17 00:00:00 2001 From: fschildt Date: Mon, 13 Oct 2025 13:59:54 +0200 Subject: minesweeper: draw colored mine counters --- src/games/minesweeper/Minesweeper.hpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/games/minesweeper/Minesweeper.hpp') diff --git a/src/games/minesweeper/Minesweeper.hpp b/src/games/minesweeper/Minesweeper.hpp index 867ca6a..24672f0 100644 --- a/src/games/minesweeper/Minesweeper.hpp +++ b/src/games/minesweeper/Minesweeper.hpp @@ -48,9 +48,9 @@ private: private: - static constexpr int32_t MAX_MAP_HEIGHT = 32; - static constexpr int32_t MAX_MAP_WIDTH = 32; - static constexpr std::string_view s_FontFilepath = "./fonts/dejavu_ttf/DejaVuSans.ttf"; + static constexpr int32_t max_map_height = 32; + static constexpr int32_t max_map_width = 32; + static constexpr const char* s_font_filepath = "./fonts/dejavu_ttf/DejaVuSans.ttf"; private: @@ -64,13 +64,12 @@ private: V2F32 m_cell_outer_size; V2F32 m_cell_inner_size; - uint32_t m_is_covered_bitmap[MAX_MAP_HEIGHT] {}; - uint32_t m_is_flagged_bitmap[MAX_MAP_HEIGHT] {}; - uint32_t m_is_mine_bitmap[MAX_MAP_HEIGHT] {}; - int32_t m_adjacent_mine_counts[MAX_MAP_WIDTH * MAX_MAP_HEIGHT] {}; + uint32_t m_is_covered_bitmap[max_map_height] {}; + uint32_t m_is_flagged_bitmap[max_map_height] {}; + uint32_t m_is_mine_bitmap[max_map_height] {}; + int32_t m_adjacent_mine_counts[max_map_width * max_map_height] {}; Font m_font; - std::array m_digit_glyphs; }; -- cgit v1.2.3