|
13 | 13 | #include "tetromino.hpp" |
14 | 14 | #include "ui/layouts/grid_layout.hpp" |
15 | 15 | #include "ui/widget.hpp" |
| 16 | +#include "helper/windows.hpp" |
16 | 17 |
|
17 | 18 | #include <array> |
18 | 19 |
|
@@ -90,44 +91,44 @@ struct SimulatedTetrion { |
90 | 91 | m_service_provider; // NOLINT(misc-non-private-member-variables-in-classes,cppcoreguidelines-non-private-member-variables-in-classes) |
91 | 92 |
|
92 | 93 | public: |
93 | | - SimulatedTetrion( |
| 94 | + OOPETRIS_GRAPHICS_EXPORTED SimulatedTetrion( |
94 | 95 | u8 tetrion_index, |
95 | 96 | Random::Seed random_seed, |
96 | 97 | u32 starting_level, |
97 | 98 | ServiceProvider* service_provider, |
98 | 99 | std::optional<std::shared_ptr<recorder::RecordingWriter>> recording_writer |
99 | 100 | ); |
100 | 101 |
|
101 | | - virtual ~SimulatedTetrion(); |
| 102 | + OOPETRIS_GRAPHICS_EXPORTED virtual ~SimulatedTetrion(); |
102 | 103 |
|
103 | | - SimulatedTetrion(const SimulatedTetrion& other); |
104 | | - SimulatedTetrion& operator=(const SimulatedTetrion& other) = delete; |
| 104 | + OOPETRIS_GRAPHICS_EXPORTED SimulatedTetrion(const SimulatedTetrion& other); |
| 105 | + OOPETRIS_GRAPHICS_EXPORTED SimulatedTetrion& operator=(const SimulatedTetrion& other) = delete; |
105 | 106 |
|
106 | | - SimulatedTetrion(SimulatedTetrion&& other) noexcept; |
107 | | - SimulatedTetrion& operator=(SimulatedTetrion&& other) noexcept = delete; |
| 107 | + OOPETRIS_GRAPHICS_EXPORTED SimulatedTetrion(SimulatedTetrion&& other) noexcept; |
| 108 | + OOPETRIS_GRAPHICS_EXPORTED SimulatedTetrion& operator=(SimulatedTetrion&& other) noexcept = delete; |
108 | 109 |
|
109 | | - void update_step(SimulationStep simulation_step_index); |
| 110 | + OOPETRIS_GRAPHICS_EXPORTED void update_step(SimulationStep simulation_step_index); |
110 | 111 |
|
111 | 112 | // returns if the input event lead to a movement |
112 | | - bool handle_input_command(input::GameInputCommand command, SimulationStep simulation_step_index); |
113 | | - void spawn_next_tetromino(SimulationStep simulation_step_index); |
114 | | - void spawn_next_tetromino(helper::TetrominoType type, SimulationStep simulation_step_index); |
115 | | - bool rotate_tetromino_right(); |
116 | | - bool rotate_tetromino_left(); |
117 | | - bool move_tetromino_down(MovementType movement_type, SimulationStep simulation_step_index); |
118 | | - bool move_tetromino_left(); |
119 | | - bool move_tetromino_right(); |
120 | | - bool drop_tetromino(SimulationStep simulation_step_index); |
121 | | - void hold_tetromino(SimulationStep simulation_step_index); |
122 | | - |
123 | | - [[nodiscard]] u8 tetrion_index() const; |
124 | | - [[nodiscard]] u32 level() const; |
125 | | - [[nodiscard]] u64 score() const; |
126 | | - [[nodiscard]] u32 lines_cleared() const; |
127 | | - [[nodiscard]] const MinoStack& mino_stack() const; |
128 | | - [[nodiscard]] std::unique_ptr<TetrionCoreInformation> core_information() const; |
129 | | - |
130 | | - [[nodiscard]] bool is_game_over() const; |
| 113 | + OOPETRIS_GRAPHICS_EXPORTED bool handle_input_command(input::GameInputCommand command, SimulationStep simulation_step_index); |
| 114 | + OOPETRIS_GRAPHICS_EXPORTED void spawn_next_tetromino(SimulationStep simulation_step_index); |
| 115 | + OOPETRIS_GRAPHICS_EXPORTED void spawn_next_tetromino(helper::TetrominoType type, SimulationStep simulation_step_index); |
| 116 | + OOPETRIS_GRAPHICS_EXPORTED bool rotate_tetromino_right(); |
| 117 | + OOPETRIS_GRAPHICS_EXPORTED bool rotate_tetromino_left(); |
| 118 | + OOPETRIS_GRAPHICS_EXPORTED bool move_tetromino_down(MovementType movement_type, SimulationStep simulation_step_index); |
| 119 | + OOPETRIS_GRAPHICS_EXPORTED bool move_tetromino_left(); |
| 120 | + OOPETRIS_GRAPHICS_EXPORTED bool move_tetromino_right(); |
| 121 | + OOPETRIS_GRAPHICS_EXPORTED bool drop_tetromino(SimulationStep simulation_step_index); |
| 122 | + OOPETRIS_GRAPHICS_EXPORTED void hold_tetromino(SimulationStep simulation_step_index); |
| 123 | + |
| 124 | + OOPETRIS_GRAPHICS_EXPORTED [[nodiscard]] u8 tetrion_index() const; |
| 125 | + OOPETRIS_GRAPHICS_EXPORTED [[nodiscard]] u32 level() const; |
| 126 | + OOPETRIS_GRAPHICS_EXPORTED [[nodiscard]] u64 score() const; |
| 127 | + OOPETRIS_GRAPHICS_EXPORTED [[nodiscard]] u32 lines_cleared() const; |
| 128 | + OOPETRIS_GRAPHICS_EXPORTED [[nodiscard]] const MinoStack& mino_stack() const; |
| 129 | + OOPETRIS_GRAPHICS_EXPORTED [[nodiscard]] std::unique_ptr<TetrionCoreInformation> core_information() const; |
| 130 | + |
| 131 | + OOPETRIS_GRAPHICS_EXPORTED [[nodiscard]] bool is_game_over() const; |
131 | 132 |
|
132 | 133 | private: |
133 | 134 | template<typename Callable> |
|
0 commit comments