Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
VOYEUR: Fix occasional issue in hour display
  • Loading branch information
Strangerke authored and dreammaster committed Mar 16, 2023
1 parent bdb32bf commit 5a7bfc3
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions engines/voyeur/files_threads.cpp
Expand Up @@ -1297,9 +1297,6 @@ void ThreadResource::doRoom() {
}

int ThreadResource::doInterface() {
PictureResource *pic;
Common::Point pt;

_vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
if (_vm->_voy->_abortInterface) {
_vm->_voy->_abortInterface = false;
Expand Down Expand Up @@ -1382,7 +1379,7 @@ int ThreadResource::doInterface() {
}

// Calculate the mouse position within the entire mansion
pt = _vm->_eventsManager->getMousePos();
Common::Point pt = _vm->_eventsManager->getMousePos();
if (!mansionViewBounds.contains(pt))
pt = Common::Point(-1, -1);
else
Expand Down Expand Up @@ -1430,13 +1427,19 @@ int ThreadResource::doInterface() {
_vm->_gameMinute % 10, Common::Point(201, 25));

if (_vm->_voy->_RTANum & 4) {
int v = _vm->_gameHour / 10;
_vm->_screen->drawANumber(_vm->_screen->_vPort,
v == 0 ? 10 : v, Common::Point(161, 25));
_vm->_screen->drawANumber(_vm->_screen->_vPort,
_vm->_gameHour % 10, Common::Point(172, 25));
int v1, v2;
if (!_vm->_voy->_isAM && _vm->getLanguage() == Common::DE_DEU) {
v1 = (_vm->_gameHour + 12) / 10;
v2 = (_vm->_gameHour + 12) % 10;
} else {
v1 = _vm->_gameHour / 10;
v2 = _vm->_gameHour % 10;
}

_vm->_screen->drawANumber(_vm->_screen->_vPort, v1 == 0 ? 10 : v1, Common::Point(161, 25));
_vm->_screen->drawANumber(_vm->_screen->_vPort, v2, Common::Point(172, 25));

pic = _vm->_bVoy->boltEntry(_vm->_voy->_isAM ? 272 : 273)._picResource;
PictureResource *pic = _vm->_bVoy->boltEntry(_vm->_voy->_isAM ? 272 : 273)._picResource;
_vm->_screen->sDrawPic(pic, _vm->_screen->_vPort,
Common::Point(215, 27));
}
Expand Down

0 comments on commit 5a7bfc3

Please sign in to comment.