MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / togglePause

Function togglePause

src/OpenLoco/src/GameCommands/General/TogglePause.cpp:12–31  ·  view source on GitHub ↗

0x00431E32

Source from the content-addressed store, hash-verified

10{
11 // 0x00431E32
12 static uint32_t togglePause(uint8_t flags)
13 {
14 if ((flags & Flags::apply) == 0)
15 {
16 return 0;
17 }
18
19 Ui::WindowManager::invalidate(Ui::WindowType::timeToolbar);
20
21 if ((SceneManager::getPauseFlags() & PauseFlags::player) != PauseFlags::none)
22 {
23 SceneManager::unsetPauseFlag(PauseFlags::player);
24 }
25 else
26 {
27 SceneManager::setPauseFlag(PauseFlags::player);
28 }
29
30 return 0;
31 }
32
33 void togglePause(registers& regs)
34 {

Callers 1

startFunction · 0.85

Calls 4

getPauseFlagsFunction · 0.85
unsetPauseFlagFunction · 0.85
setPauseFlagFunction · 0.85
invalidateFunction · 0.50

Tested by

no test coverage detected