diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/Arena.hpp | 3 | ||||
| -rw-r--r-- | src/common/Font.cpp | 2 | ||||
| -rw-r--r-- | src/common/Font.hpp | 1 | ||||
| -rw-r--r-- | src/common/MemoryManager.cpp | 2 | ||||
| -rw-r--r-- | src/common/MemoryManager.hpp | 3 | ||||
| -rw-r--r-- | src/common/defs.hpp | 1 | ||||
| -rw-r--r-- | src/common/math.cpp | 2 | ||||
| -rw-r--r-- | src/common/math.hpp | 3 | ||||
| -rw-r--r-- | src/games/Game.cpp | 9 | ||||
| -rw-r--r-- | src/games/Game.hpp | 2 | ||||
| -rw-r--r-- | src/games/minesweeper/Minesweeper.cpp | 12 | ||||
| -rw-r--r-- | src/games/minesweeper/Minesweeper.hpp | 6 | ||||
| -rw-r--r-- | src/games/snake/Snake.cpp | 11 | ||||
| -rw-r--r-- | src/games/snake/Snake.hpp | 4 | ||||
| -rw-r--r-- | src/games/tetris/Board.cpp | 8 | ||||
| -rw-r--r-- | src/games/tetris/Board.hpp | 2 | ||||
| -rw-r--r-- | src/games/tetris/Tetris.cpp | 10 | ||||
| -rw-r--r-- | src/games/tetris/Tetris.hpp | 9 | ||||
| -rw-r--r-- | src/games/tetris/Tetromino.cpp | 6 | ||||
| -rw-r--r-- | src/games/tetris/Tetromino.hpp | 5 | ||||
| -rw-r--r-- | src/main.cpp | 5 | ||||
| -rw-r--r-- | src/renderer/RSoftwareBackend.cpp | 2 | ||||
| -rw-r--r-- | src/renderer/RSoftwareBackend.hpp | 3 | ||||
| -rw-r--r-- | src/renderer/Renderer.cpp | 4 | ||||
| -rw-r--r-- | src/renderer/Renderer.hpp | 9 |
25 files changed, 51 insertions, 73 deletions
diff --git a/src/common/Arena.hpp b/src/common/Arena.hpp index b5e1eb7..0f2273a 100644 --- a/src/common/Arena.hpp +++ b/src/common/Arena.hpp @@ -1,11 +1,10 @@ #pragma once +#include <vector> #include <cstddef> #include <cstdint> #include <cassert> -#include <vector> - class Arena { public: diff --git a/src/common/Font.cpp b/src/common/Font.cpp index 8f058ca..e3595e9 100644 --- a/src/common/Font.cpp +++ b/src/common/Font.cpp @@ -1,4 +1,4 @@ -#include <common/Font.hpp> +#include "common/Font.hpp" #include <fstream> #include <iostream> diff --git a/src/common/Font.hpp b/src/common/Font.hpp index 876b03a..27c2480 100644 --- a/src/common/Font.hpp +++ b/src/common/Font.hpp @@ -1,6 +1,5 @@ #pragma once -#include <common/defs.hpp> #include <stb_truetype.h> #include <memory> diff --git a/src/common/MemoryManager.cpp b/src/common/MemoryManager.cpp index d4fd068..285535b 100644 --- a/src/common/MemoryManager.cpp +++ b/src/common/MemoryManager.cpp @@ -1,4 +1,4 @@ -#include <common/MemoryManager.hpp> +#include "common/MemoryManager.hpp" std::vector<std::u32string> MemoryManager::s_frame_string32s; diff --git a/src/common/MemoryManager.hpp b/src/common/MemoryManager.hpp index 59c31d7..c8c7de0 100644 --- a/src/common/MemoryManager.hpp +++ b/src/common/MemoryManager.hpp @@ -1,9 +1,8 @@ #pragma once -#include <common/defs.hpp> - #include <string> #include <vector> +#include <cstdint> using String32Id = uint32_t; diff --git a/src/common/defs.hpp b/src/common/defs.hpp index 007d560..8bdfd52 100644 --- a/src/common/defs.hpp +++ b/src/common/defs.hpp @@ -1,7 +1,6 @@ #pragma once #include <cassert> -#include <cstdint> #define ARRAY_COUNT(x) (sizeof(x) / sizeof(x[0])) diff --git a/src/common/math.cpp b/src/common/math.cpp index ba54f3a..4873301 100644 --- a/src/common/math.cpp +++ b/src/common/math.cpp @@ -1,4 +1,4 @@ -#include <common/math.hpp> +#include "common/math.hpp" /* V2ST */ diff --git a/src/common/math.hpp b/src/common/math.hpp index de856e8..afbda1a 100644 --- a/src/common/math.hpp +++ b/src/common/math.hpp @@ -1,8 +1,5 @@ #pragma once - -#include <common/defs.hpp> - #include <cstddef> #include <cstdint> diff --git a/src/games/Game.cpp b/src/games/Game.cpp index 7c63b4f..0f6be9c 100644 --- a/src/games/Game.cpp +++ b/src/games/Game.cpp @@ -1,7 +1,8 @@ -#include <games/Game.hpp> -#include <games/tetris/Tetris.hpp> -#include <games/snake/Snake.hpp> -#include <games/minesweeper/Minesweeper.hpp> +#include "games/Game.hpp" +#include "games/tetris/Tetris.hpp" +#include "games/snake/Snake.hpp" +#include "games/minesweeper/Minesweeper.hpp" +#include "common/defs.hpp" #include <assert.h> #include <memory> diff --git a/src/games/Game.hpp b/src/games/Game.hpp index e9eed82..8a44ba9 100644 --- a/src/games/Game.hpp +++ b/src/games/Game.hpp @@ -1,7 +1,5 @@ #pragma once -#include <common/defs.hpp> - #include <SDL3/SDL.h> #include <imgui.h> diff --git a/src/games/minesweeper/Minesweeper.cpp b/src/games/minesweeper/Minesweeper.cpp index 5cc3215..3638af8 100644 --- a/src/games/minesweeper/Minesweeper.cpp +++ b/src/games/minesweeper/Minesweeper.cpp @@ -1,5 +1,5 @@ -#include <games/minesweeper/Minesweeper.hpp> -#include <renderer/Renderer.hpp> +#include "games/minesweeper/Minesweeper.hpp" +#include "renderer/Renderer.hpp" #include <imgui.h> @@ -7,14 +7,6 @@ #include <random> -// Todo: -// - First click may not be a mine! -// - Show current time spent -// - Show current flags/mines left -// - Permit uncovering of flagged cell -// - Game Over: Show Highscore for selected difficulty - - static constexpr Color s_mine_count_colors[8] = { {0.0f, 0.0f, 1.0f, 1.0f}, // Blue {0.0f, 0.5f, 0.0f, 1.0f}, // Green diff --git a/src/games/minesweeper/Minesweeper.hpp b/src/games/minesweeper/Minesweeper.hpp index 1db77ff..9088d10 100644 --- a/src/games/minesweeper/Minesweeper.hpp +++ b/src/games/minesweeper/Minesweeper.hpp @@ -1,8 +1,8 @@ #pragma once -#include <games/Game.hpp> -#include <common/math.hpp> -#include <common/Font.hpp> +#include "games/Game.hpp" +#include "common/math.hpp" +#include "common/Font.hpp" class Minesweeper : public Game { diff --git a/src/games/snake/Snake.cpp b/src/games/snake/Snake.cpp index 81de4f0..7dc7f9d 100644 --- a/src/games/snake/Snake.cpp +++ b/src/games/snake/Snake.cpp @@ -1,11 +1,8 @@ -#include <games/snake/Snake.hpp> -#include <renderer/Renderer.hpp> -#include <imgui.h> - +#include "games/snake/Snake.hpp" +#include "renderer/Renderer.hpp" +#include "common/defs.hpp" -// Todo: -// - gradiant from head to tail -// - reduce thickness from head to tail +#include <imgui.h> std::mt19937 Snake::s_rng{std::random_device{}()}; diff --git a/src/games/snake/Snake.hpp b/src/games/snake/Snake.hpp index 103255c..25facd1 100644 --- a/src/games/snake/Snake.hpp +++ b/src/games/snake/Snake.hpp @@ -1,7 +1,7 @@ #pragma once -#include <games/Game.hpp> -#include <common/math.hpp> +#include "games/Game.hpp" +#include "common/math.hpp" #include <random> diff --git a/src/games/tetris/Board.cpp b/src/games/tetris/Board.cpp index a1ab72a..9018e46 100644 --- a/src/games/tetris/Board.cpp +++ b/src/games/tetris/Board.cpp @@ -1,7 +1,7 @@ -#include <games/tetris/Board.hpp> -#include <games/tetris/Tetromino.hpp> -#include <games/Game.hpp> -#include <renderer/Renderer.hpp> +#include "games/tetris/Board.hpp" +#include "games/tetris/Tetromino.hpp" +#include "games/Game.hpp" +#include "renderer/Renderer.hpp" void Board::Reset() diff --git a/src/games/tetris/Board.hpp b/src/games/tetris/Board.hpp index a91556b..ae6aa0d 100644 --- a/src/games/tetris/Board.hpp +++ b/src/games/tetris/Board.hpp @@ -1,6 +1,6 @@ #pragma once -#include <common/defs.hpp> +#include <cstdint> class Tetromino; diff --git a/src/games/tetris/Tetris.cpp b/src/games/tetris/Tetris.cpp index 8db772f..8b3c5bd 100644 --- a/src/games/tetris/Tetris.cpp +++ b/src/games/tetris/Tetris.cpp @@ -1,8 +1,8 @@ -#include <games/Game.hpp> -#include <games/tetris/Tetromino.hpp> -#include <games/tetris/Tetris.hpp> -#include <renderer/Renderer.hpp> -#include <common/MemoryManager.hpp> +#include "games/Game.hpp" +#include "games/tetris/Tetromino.hpp" +#include "games/tetris/Tetris.hpp" +#include "renderer/Renderer.hpp" +#include "common/MemoryManager.hpp" #include <SDL3/SDL_events.h> #include <SDL3/SDL_timer.h> diff --git a/src/games/tetris/Tetris.hpp b/src/games/tetris/Tetris.hpp index 44ed9ff..5864ff7 100644 --- a/src/games/tetris/Tetris.hpp +++ b/src/games/tetris/Tetris.hpp @@ -1,10 +1,9 @@ #pragma once -#include <common/defs.hpp> -#include <games/Game.hpp> -#include <games/tetris/Tetromino.hpp> -#include <games/tetris/Board.hpp> -#include <common/Font.hpp> +#include "games/Game.hpp" +#include "games/tetris/Tetromino.hpp" +#include "games/tetris/Board.hpp" +#include "common/Font.hpp" class Tetris : public Game { diff --git a/src/games/tetris/Tetromino.cpp b/src/games/tetris/Tetromino.cpp index ad75161..aa9ed59 100644 --- a/src/games/tetris/Tetromino.cpp +++ b/src/games/tetris/Tetromino.cpp @@ -1,6 +1,6 @@ -#include <games/tetris/Tetromino.hpp> -#include <games/Game.hpp> -#include <renderer/Renderer.hpp> +#include "games/tetris/Tetromino.hpp" +#include "games/Game.hpp" +#include "renderer/Renderer.hpp" #include <random> diff --git a/src/games/tetris/Tetromino.hpp b/src/games/tetris/Tetromino.hpp index 86821b9..ca4d788 100644 --- a/src/games/tetris/Tetromino.hpp +++ b/src/games/tetris/Tetromino.hpp @@ -1,8 +1,7 @@ #pragma once -#include <common/defs.hpp> -#include <common/math.hpp> -#include <games/tetris/Board.hpp> +#include "common/math.hpp" +#include "games/tetris/Board.hpp" class Tetromino { diff --git a/src/main.cpp b/src/main.cpp index 44b370b..6fb241e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,6 @@ +#include "renderer/Renderer.hpp" +#include "games/Game.hpp" #include "common/MemoryManager.hpp" -#include <common/defs.hpp> -#include <renderer/Renderer.hpp> -#include <games/Game.hpp> #include <SDL3/SDL.h> #include <SDL3/SDL_video.h> diff --git a/src/renderer/RSoftwareBackend.cpp b/src/renderer/RSoftwareBackend.cpp index 927fc92..2606553 100644 --- a/src/renderer/RSoftwareBackend.cpp +++ b/src/renderer/RSoftwareBackend.cpp @@ -1,6 +1,6 @@ #include "common/MemoryManager.hpp" #include "renderer/Renderer.hpp" -#include <renderer/RSoftwareBackend.hpp> +#include "renderer/RSoftwareBackend.hpp" #include <SDL3/SDL_video.h> #include <GL/glew.h> diff --git a/src/renderer/RSoftwareBackend.hpp b/src/renderer/RSoftwareBackend.hpp index 2563558..8e61945 100644 --- a/src/renderer/RSoftwareBackend.hpp +++ b/src/renderer/RSoftwareBackend.hpp @@ -1,7 +1,8 @@ #pragma once +#include "renderer/Renderer.hpp" + #include <SDL3/SDL.h> -#include <renderer/Renderer.hpp> class RSoftwareBackend { diff --git a/src/renderer/Renderer.cpp b/src/renderer/Renderer.cpp index 17694b0..37d90f3 100644 --- a/src/renderer/Renderer.cpp +++ b/src/renderer/Renderer.cpp @@ -1,5 +1,5 @@ -#include <renderer/Renderer.hpp> -#include <renderer/RSoftwareBackend.hpp> +#include "renderer/Renderer.hpp" +#include "renderer/RSoftwareBackend.hpp" #include <GL/glew.h> #include <imgui.h> diff --git a/src/renderer/Renderer.hpp b/src/renderer/Renderer.hpp index 8981826..eaa9630 100644 --- a/src/renderer/Renderer.hpp +++ b/src/renderer/Renderer.hpp @@ -1,10 +1,9 @@ #pragma once -#include <games/Game.hpp> -#include <common/math.hpp> -#include <common/Font.hpp> -#include <common/shapes.hpp> -#include <common/MemoryManager.hpp> +#include "common/math.hpp" +#include "common/Font.hpp" +#include "common/shapes.hpp" +#include "common/MemoryManager.hpp" #include <SDL3/SDL.h> #include <SDL3/SDL_video.h> |
