MCPcopy Create free account
hub / github.com/DavidColson/Polybox / Tick

Function Tick

source/cpu.cpp:684–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682// ***********************************************************************
683
684void Tick(f32 deltaTime) {
685 FileWatcherProcessChanges(pState->pWatcher);
686
687 if (!pState->appLoaded) return;
688
689 lua_State* L = pState->pProgramState;
690 lua_getglobal(L, "update");
691 if (lua_isfunction(L, -1)) {
692 lua_pushnumber(L, deltaTime);
693 if (lua_pcall(L, 1, 0, 0) != LUA_OK) {
694 Log::Warn("Lua Runtime Error: %s", lua_tostring(L, lua_gettop(L)));
695 lua_pop(L, 1);
696 }
697 } else {
698 lua_pop(L, 1);
699 }
700}
701
702// ***********************************************************************
703

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected