diff options
author | Nipun Garg | 2019-07-15 12:11:25 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:20 +0200 |
commit | 68b2e9adff5eb3dda5cb8bf788264b08a900e7cb (patch) | |
tree | f49e1068162c2f3490a95f46a8e5c83b725cce01 /engines/hdb/hdb.cpp | |
parent | 26210cfce662880ca5daeeab1f203e86cbbbae63 (diff) | |
download | scummvm-rg350-68b2e9adff5eb3dda5cb8bf788264b08a900e7cb.tar.gz scummvm-rg350-68b2e9adff5eb3dda5cb8bf788264b08a900e7cb.tar.bz2 scummvm-rg350-68b2e9adff5eb3dda5cb8bf788264b08a900e7cb.zip |
HDB: Count FPS and print onto screen
Diffstat (limited to 'engines/hdb/hdb.cpp')
-rw-r--r-- | engines/hdb/hdb.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 27c4b33020..4bbff5b0ea 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -288,7 +288,7 @@ void HDBGame::paint() { // Draw FPS on Screen in Debug Mode if (_debugFlag == 1) { - debug(9, "STUB: Requires StartTiming() and EndTiming()"); + _gfx->drawDebugInfo(_debugLogo, _frames.size()); } else if (_debugFlag == 2) { _debugLogo->drawMasked(kScreenWidth - 32, 0); } @@ -973,6 +973,11 @@ Common::Error HDBGame::run() { paint(); g_system->updateScreen(); + if (g_hdb->getDebug()) { + g_hdb->_frames.push_back(g_system->getMillis()); + while (g_hdb->_frames[0] < g_system->getMillis() - 1000) + g_hdb->_frames.remove_at(0); + } g_system->delayMillis(1000 / kGameFPS); } |