diff options
author | Filippos Karapetis | 2014-12-26 23:18:54 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-12-26 23:18:54 +0200 |
commit | f9595b11fc2bef08d84a00b81f9b2884f77897b0 (patch) | |
tree | 8626ab1737e0f02ad51aef52fb0baf520043ee98 /engines/zvision/core | |
parent | 19ce38d40e9f273335b06a62bcb0d3643602080c (diff) | |
download | scummvm-rg350-f9595b11fc2bef08d84a00b81f9b2884f77897b0.tar.gz scummvm-rg350-f9595b11fc2bef08d84a00b81f9b2884f77897b0.tar.bz2 scummvm-rg350-f9595b11fc2bef08d84a00b81f9b2884f77897b0.zip |
ZVISION: Add an FPS timer (accessible with F10, or the "FRAME" cheat)
Diffstat (limited to 'engines/zvision/core')
-rw-r--r-- | engines/zvision/core/events.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp index 4438474078..7804130e2a 100644 --- a/engines/zvision/core/events.cpp +++ b/engines/zvision/core/events.cpp @@ -158,15 +158,18 @@ void ZVision::cheatCodes(uint8 key) { } } - if (checkCode("FRAME")) - _renderManager->showDebugMsg(Common::String::format("FPS: ???, not implemented")); + if (checkCode("FRAME")) { + Common::String fpsStr = Common::String::format("FPS: %d", getFPS()); + _renderManager->showDebugMsg(fpsStr); + } + + if (checkCode("COMPUTERARCH")) + _renderManager->showDebugMsg("COMPUTERARCH: var-viewer not implemented"); + // This cheat essentially toggles the GOxxxx cheat below if (checkCode("XYZZY")) _scriptManager->setStateValue(StateKey_DebugCheats, 1 - _scriptManager->getStateValue(StateKey_DebugCheats)); - if (checkCode("COMPUTERARCH")) - _renderManager->showDebugMsg(Common::String::format("COMPUTERARCH: var-viewer not implemented")); - if (_scriptManager->getStateValue(StateKey_DebugCheats) == 1) if (checkCode("GO????")) _scriptManager->changeLocation(getBufferedKey(3), @@ -240,6 +243,11 @@ void ZVision::processEvents() { _scriptManager->getStateValue(StateKey_KbdRotateSpeed)) * 2; break; + case Common::KEYCODE_F10: { + Common::String fpsStr = Common::String::format("FPS: %d", getFPS()); + _renderManager->showDebugMsg(fpsStr); + } + break; default: break; } |