MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / FrameStepMainLoop

Method FrameStepMainLoop

src/Commands/FrameByFrame.cpp:46–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46bool FrameByFrameCommandClass::FrameStepMainLoop()
47{
48 if (Game::IsActive)
49 {
50 Game::CallBack();
51
52 if (Game::IsFocused && Game::SpecialDialog == 0)
53 {
54 MapClass::Instance.MarkNeedsRedraw(2);
55
56 DWORD input;
57 int x, y;
58 MapClass::Instance.GetInputAndUpdate(input, x, y);
59 if (input != NULL)
60 {
61 Game::KeyboardProcess(input);
62
63 // Allow to open options
64 if (input == VK_ESCAPE || input == VK_SPACE)
65 Game::SpecialDialog = 1;
66 }
67
68 MapClass::Instance.Render();
69 TacticalClass::Instance->Update();
70 }
71 }
72
73 Sleep(1);
74 return Game::IsActive == false;
75}
76
77DEFINE_HOOK(0x55D360, MainLoop_FrameStep_Begin, 0x5)
78{

Callers

nothing calls this directly

Calls 1

UpdateMethod · 0.80

Tested by

no test coverage detected