diff options
author | Peter Kohaut | 2019-02-11 20:57:57 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-02-11 22:48:55 +0100 |
commit | 6854ea3ddd83798a9045307763bbb346d8a1736b (patch) | |
tree | 14fefc869658b53c4b2ee62b37fc04735508c13b /engines/bladerunner/ui/ui_scroll_box.cpp | |
parent | b14fbaa72b3218862a533dd7f7c0e97e1bed4df7 (diff) | |
download | scummvm-rg350-6854ea3ddd83798a9045307763bbb346d8a1736b.tar.gz scummvm-rg350-6854ea3ddd83798a9045307763bbb346d8a1736b.tar.bz2 scummvm-rg350-6854ea3ddd83798a9045307763bbb346d8a1736b.zip |
BLADERUNNER: Improved time management
This should fix thi issue with freezing actors after loading save game,
but works on new saves only. Game was not paused before saving
and wrong timer value got saved.
Diffstat (limited to 'engines/bladerunner/ui/ui_scroll_box.cpp')
-rw-r--r-- | engines/bladerunner/ui/ui_scroll_box.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/engines/bladerunner/ui/ui_scroll_box.cpp b/engines/bladerunner/ui/ui_scroll_box.cpp index d39e580cd3..39e4174fa3 100644 --- a/engines/bladerunner/ui/ui_scroll_box.cpp +++ b/engines/bladerunner/ui/ui_scroll_box.cpp @@ -27,6 +27,7 @@ #include "bladerunner/font.h" #include "bladerunner/game_info.h" #include "bladerunner/shape.h" +#include "bladerunner/time.h" #include "bladerunner/ui/kia.h" #include "bladerunner/ui/kia_shapes.h" @@ -62,9 +63,9 @@ UIScrollBox::UIScrollBox(BladeRunnerEngine *vm, UIScrollBoxCallback *lineSelecte _isVisible = false; _style = style; _center = center; - _timeLastScroll = _vm->getTotalPlayTime(); // Original game is using system timer - _timeLastCheckbox = _vm->getTotalPlayTime(); - _timeLastHighlight = _vm->getTotalPlayTime(); + _timeLastScroll = _vm->_time->currentSystem(); + _timeLastCheckbox = _vm->_time->currentSystem(); + _timeLastHighlight = _vm->_time->currentSystem(); _highlightFrame = 0; @@ -113,9 +114,9 @@ void UIScrollBox::show() { _scrollAreaDownHover = false; _scrollBarHover = false; - _timeLastScroll = _vm->getTotalPlayTime(); // Original game is using system timer - _timeLastCheckbox = _vm->getTotalPlayTime(); - _timeLastHighlight = _vm->getTotalPlayTime(); + _timeLastScroll = _vm->_time->currentSystem(); + _timeLastCheckbox = _vm->_time->currentSystem(); + _timeLastHighlight = _vm->_time->currentSystem(); _highlightFrame = 0; _isVisible = true; @@ -267,7 +268,7 @@ void UIScrollBox::handleMouseDown(bool alternateButton) { if (!alternateButton) { if (_scrollUpButtonHover) { _scrollUpButtonState = 2; - _timeLastScroll = _vm->getTotalPlayTime() - 160; // Original game is using system timer + _timeLastScroll = _vm->_time->currentSystem() - 160; } else { _scrollUpButtonState = 1; } @@ -283,13 +284,13 @@ void UIScrollBox::handleMouseDown(bool alternateButton) { } if (_scrollAreaUpHover) { _scrollAreaUpState = 2; - _timeLastScroll = _vm->getTotalPlayTime() - 160; // Original game is using system timer + _timeLastScroll = _vm->_time->currentSystem() - 160; } else { _scrollAreaUpState = 1; } if (_scrollAreaDownHover) { _scrollAreaDownState = 2; - _timeLastScroll = _vm->getTotalPlayTime() - 160; // Original game is using system timer + _timeLastScroll = _vm->_time->currentSystem() - 160; } else { _scrollAreaDownState = 1; } @@ -321,7 +322,7 @@ int UIScrollBox::getSelectedLineData() { } void UIScrollBox::draw(Graphics::Surface &surface) { - int timeNow = _vm->getTotalPlayTime(); // Original game is using system timer + int timeNow = _vm->_time->currentSystem(); // update scrolling if (_scrollUpButtonState == 2 && _scrollUpButtonHover) { |