|
42 | 42 | #include <sstream>
|
43 | 43 | #include <unordered_set>
|
44 | 44 | #include <functional>
|
45 |
| -#include <optional> |
| 45 | +#include <SFML/Base/Optional.hpp> |
46 | 46 | #include <vector>
|
47 | 47 | #include <string>
|
48 | 48 | #include <string_view>
|
@@ -114,7 +114,7 @@ class HexagonGame
|
114 | 114 | std::int8_t steamAttempt{1};
|
115 | 115 |
|
116 | 116 | HGAssets& assets;
|
117 |
| - std::optional<TextUI> textUI; |
| 117 | + sf::base::Optional<TextUI> textUI; |
118 | 118 |
|
119 | 119 | Audio* audio;
|
120 | 120 |
|
@@ -151,16 +151,16 @@ class HexagonGame
|
151 | 151 | float timeUntilRichPresenceUpdate = 0.f;
|
152 | 152 |
|
153 | 153 | private:
|
154 |
| - std::optional<ssvs::Camera> backgroundCamera; |
155 |
| - std::optional<ssvs::Camera> overlayCamera; |
| 154 | + sf::base::Optional<ssvs::Camera> backgroundCamera; |
| 155 | + sf::base::Optional<ssvs::Camera> overlayCamera; |
156 | 156 |
|
157 | 157 | struct PreShakeCenters
|
158 | 158 | {
|
159 | 159 | sf::Vector2f background;
|
160 | 160 | sf::Vector2f overlay;
|
161 | 161 | };
|
162 | 162 |
|
163 |
| - std::optional<PreShakeCenters> preShakeCenters; |
| 163 | + sf::base::Optional<PreShakeCenters> preShakeCenters; |
164 | 164 |
|
165 | 165 | const sf::Vector2f centerPos{0.f, 0.f};
|
166 | 166 |
|
@@ -219,7 +219,7 @@ class HexagonGame
|
219 | 219 | float angle;
|
220 | 220 | };
|
221 | 221 |
|
222 |
| - std::optional<SwapParticleSpawnInfo> swapParticlesSpawnInfo; |
| 222 | + sf::base::Optional<SwapParticleSpawnInfo> swapParticlesSpawnInfo; |
223 | 223 | float nextPBParticleSpawn{0.f};
|
224 | 224 | float pbTextGrowth{0.f};
|
225 | 225 |
|
@@ -261,7 +261,7 @@ class HexagonGame
|
261 | 261 | explicit ActiveReplay(const replay_file& mReplayFile);
|
262 | 262 | };
|
263 | 263 |
|
264 |
| - std::optional<ActiveReplay> activeReplay; |
| 264 | + sf::base::Optional<ActiveReplay> activeReplay; |
265 | 265 |
|
266 | 266 | random_number_generator::seed_type lastSeed{};
|
267 | 267 | replay_data lastReplayData{};
|
@@ -347,11 +347,11 @@ class HexagonGame
|
347 | 347 | void initFlashEffect(int r, int g, int b);
|
348 | 348 |
|
349 | 349 | // Fast-forward
|
350 |
| - std::optional<double> fastForwardTarget; |
| 350 | + sf::base::Optional<double> fastForwardTarget; |
351 | 351 | void fastForwardTo(const double target);
|
352 | 352 |
|
353 | 353 | // Advance by ticks
|
354 |
| - std::optional<int> advanceTickCount; |
| 354 | + sf::base::Optional<int> advanceTickCount; |
355 | 355 | void advanceByTicks(const int nTicks);
|
356 | 356 |
|
357 | 357 | // Update methods
|
@@ -501,10 +501,10 @@ class HexagonGame
|
501 | 501 | float customScore;
|
502 | 502 | };
|
503 | 503 |
|
504 |
| - [[nodiscard]] std::optional<GameExecutionResult> executeGameUntilDeath( |
| 504 | + [[nodiscard]] sf::base::Optional<GameExecutionResult> executeGameUntilDeath( |
505 | 505 | const int maxProcessingSeconds, const float timescale);
|
506 | 506 |
|
507 |
| - [[nodiscard]] std::optional<GameExecutionResult> |
| 507 | + [[nodiscard]] sf::base::Optional<GameExecutionResult> |
508 | 508 | runReplayUntilDeathAndGetScore(const replay_file& mReplayFile,
|
509 | 509 | const int maxProcessingSeconds, const float timescale);
|
510 | 510 |
|
|
0 commit comments