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

Function update

src/OpenLoco/src/OpenLoco.cpp:708–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706 }
707
708 static void update()
709 {
710 auto timeNow = Clock::now();
711 auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(timeNow - _lastUpdate).count() / 1'000'000.0;
712
713 elapsed *= TimeScale;
714
715 _accumulator = std::min(_accumulator + elapsed, MaxUpdateTime);
716 _lastUpdate = timeNow;
717
718 if (Config::get().uncapFPS)
719 {
720 variableUpdate();
721 }
722 else
723 {
724 fixedUpdate();
725 }
726 }
727
728 // 0x00406386
729 static void run()

Callers 4

sub_431695Function · 0.70
tickFunction · 0.70
tickLogicFunction · 0.70
runFunction · 0.70

Calls 4

variableUpdateFunction · 0.85
fixedUpdateFunction · 0.85
countMethod · 0.80
getFunction · 0.70

Tested by

no test coverage detected