diff options
author | Eugene Sandulenko | 2018-03-26 23:54:58 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-27 01:07:38 +0200 |
commit | 20c8b949a9a790f7d2b2110587109f9767822de6 (patch) | |
tree | ac4142623cba3c9335ddf076f472e6e3f8dc187c /engines/bladerunner/ui | |
parent | 5e81dc3f8fc08558f76cb81d83e842461cc70d25 (diff) | |
download | scummvm-rg350-20c8b949a9a790f7d2b2110587109f9767822de6.tar.gz scummvm-rg350-20c8b949a9a790f7d2b2110587109f9767822de6.tar.bz2 scummvm-rg350-20c8b949a9a790f7d2b2110587109f9767822de6.zip |
BLADERUNNER: Implement Scores::tick()
Diffstat (limited to 'engines/bladerunner/ui')
-rw-r--r-- | engines/bladerunner/ui/scores.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/bladerunner/ui/scores.cpp b/engines/bladerunner/ui/scores.cpp index 55d3111af4..c97a68d581 100644 --- a/engines/bladerunner/ui/scores.cpp +++ b/engines/bladerunner/ui/scores.cpp @@ -128,6 +128,35 @@ int Scores::handleMouseDown(int x, int y) { } void Scores::tick() { + if (!_vm->_gameIsRunning) { + return; + } + + int frame = _vqaPlayer->update(); + assert(frame >= -1); + + // vqaPlayer renders to _surfaceBack + blit(_vm->_surfaceBack, _vm->_surfaceFront); + + _vm->_surfaceFront.hLine(200, 139, 400, 0x3e0); + _vm->_surfaceFront.hLine(200, 347, 400, 0x1f); + + _font->draw(_txtScorers->getText(7), _vm->_surfaceFront, 200, 114); + + int y = 140; + + for (int i = 0; i < 7; i++) { + _font->draw(_txtScorers->getText(_scorers[i]), _vm->_surfaceFront, 220, y); + _font->drawNumber(_scores[i], _vm->_surfaceFront, 360, y); + + y += 26; + } + + _font->draw(_txtScorers->getText(8), _vm->_surfaceFront, 200, 322); + _font->draw(_txtScorers->getText(_lastScoreId), _vm->_surfaceFront, 220, 348); + _font->drawNumber(_lastScoreValue, _vm->_surfaceFront, 360, 348); + + _vm->blitToScreen(_vm->_surfaceFront); } void Scores::fill() { |