diff options
author | zaaarf <zaaarf@proton.me> | 2023-11-22 17:16:49 +0100 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-11-22 17:16:49 +0100 |
commit | 738a203e0d8b4df87c42888043b99c13d5d97511 (patch) | |
tree | af8ed836a4789ef94c5bfed27abb713922f45af3 /src/openvic-simulation/GameAdvancementHook.hpp | |
parent | 1683859e333f98fb63f1c72d926bb366a3b89f0b (diff) |
chore: change some lingering lowerCamelCase to snake_case
Diffstat (limited to 'src/openvic-simulation/GameAdvancementHook.hpp')
-rw-r--r-- | src/openvic-simulation/GameAdvancementHook.hpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/openvic-simulation/GameAdvancementHook.hpp b/src/openvic-simulation/GameAdvancementHook.hpp index 2a27ff9..75af718 100644 --- a/src/openvic-simulation/GameAdvancementHook.hpp +++ b/src/openvic-simulation/GameAdvancementHook.hpp @@ -3,6 +3,7 @@ #include <chrono> #include <functional> #include <vector> +#include "openvic-simulation/utility/Getters.hpp" namespace OpenVic { // Conditionally advances game with provided behaviour @@ -19,29 +20,28 @@ namespace OpenVic { private: using time_point_t = std::chrono::time_point<std::chrono::high_resolution_clock>; - time_point_t lastPolledTime; + time_point_t last_polled_time; // A function pointer that advances the simulation, intended to be a capturing // lambda or something similar. May need to be reworked later - AdvancementFunction triggerFunction; - RefreshFunction refreshFunction; - speed_t currentSpeed; + AdvancementFunction trigger_function; + RefreshFunction refresh_function; + speed_t PROPERTY_CUSTOM_NAME(current_speed, get_simulation_speed); public: - bool isPaused; + bool is_paused; GameAdvancementHook( - AdvancementFunction tickFunction, RefreshFunction updateFunction, bool startPaused = true, speed_t startingSpeed = 0 + AdvancementFunction tick_function, RefreshFunction update_function, bool start_paused = true, speed_t starting_speed = 0 ); - void setSimulationSpeed(speed_t speed); - speed_t getSimulationSpeed() const; - void increaseSimulationSpeed(); - void decreaseSimulationSpeed(); - bool canIncreaseSimulationSpeed() const; - bool canDecreaseSimulationSpeed() const; + void set_simulation_speed(speed_t speed); + void increase_simulation_speed(); + void decrease_simulation_speed(); + bool can_increase_simulation_speed() const; + bool can_decrease_simulation_speed() const; GameAdvancementHook& operator++(); GameAdvancementHook& operator--(); - void conditionallyAdvanceGame(); + void conditionally_advance_game(); void reset(); }; } |