aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic2/GameAdvancementHook.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-04-26 01:26:33 +0200
committer GitHub <noreply@github.com>2023-04-26 01:26:33 +0200
commit10053cf259c55ee45803268a844edf1011d8a16b (patch)
treefcf86e6fac31430ba537a0d056e97f901ad76dd7 /extension/src/openvic2/GameAdvancementHook.hpp
parent639f86febf39184cccde9f898fc328375048233f (diff)
parent563834e7e6f9ce565bbfd553a0d9ff80a98c677d (diff)
Merge pull request #98 from OpenVic2Project/some-cleanup
Req comments + cleanup + c++ registry refactoring
Diffstat (limited to 'extension/src/openvic2/GameAdvancementHook.hpp')
-rw-r--r--extension/src/openvic2/GameAdvancementHook.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/extension/src/openvic2/GameAdvancementHook.hpp b/extension/src/openvic2/GameAdvancementHook.hpp
index 572494a..07f8414 100644
--- a/extension/src/openvic2/GameAdvancementHook.hpp
+++ b/extension/src/openvic2/GameAdvancementHook.hpp
@@ -21,12 +21,12 @@ namespace OpenVic2 {
//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;
public:
bool isPaused;
- speed_t currentSpeed;
- GameAdvancementHook(AdvancementFunction tickFunction, RefreshFunction updateFunction, bool startPaused = false, speed_t startingSpeed = 0);
+ GameAdvancementHook(AdvancementFunction tickFunction, RefreshFunction updateFunction, bool startPaused = true, speed_t startingSpeed = 0);
void setSimulationSpeed(speed_t speed);
speed_t getSimulationSpeed() const;
@@ -37,5 +37,6 @@ namespace OpenVic2 {
GameAdvancementHook& operator++();
GameAdvancementHook& operator--();
void conditionallyAdvanceGame();
+ void reset();
};
} \ No newline at end of file