From d6945864ea450cdaa20e5120771e3c497e5515ee Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 4 Apr 2015 22:39:56 -0500 Subject: MADS: Keep Rex's speech on-screen longer when exitting crashed ship --- engines/mads/messages.cpp | 8 +++++--- engines/mads/nebular/nebular_scenes1.cpp | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'engines/mads') diff --git a/engines/mads/messages.cpp b/engines/mads/messages.cpp index 4b105630d6..304c79aa46 100644 --- a/engines/mads/messages.cpp +++ b/engines/mads/messages.cpp @@ -91,7 +91,7 @@ int KernelMessages::add(const Common::Point &pt, uint fontColor, uint8 flags, rec._position = pt; rec._textDisplayIndex = -1; rec._timeout = timeout; - rec._frameTimer = _vm->_game->_priorFrameTimer; + rec._frameTimer = scene._frameStartTime; rec._trigger = endTrigger; rec._abortMode = _vm->_game->_triggerSetupMode; @@ -162,8 +162,10 @@ void KernelMessages::update() { uint32 currentTimer = _vm->_game->_scene._frameStartTime; for (uint i = 0; i < _entries.size() && !_vm->_game->_trigger; ++i) { - KernelMessage &msg = _entries[i]; + if (_vm->_game->_trigger) + break; + KernelMessage &msg = _entries[i]; if (((msg._flags & KMSG_ACTIVE) != 0) && (currentTimer >= msg._frameTimer)) processText(i); } @@ -172,7 +174,7 @@ void KernelMessages::update() { void KernelMessages::processText(int msgIndex) { Scene &scene = _vm->_game->_scene; KernelMessage &msg = _entries[msgIndex]; - uint32 currentTimer = _vm->_game->_priorFrameTimer; + uint32 currentTimer = scene._frameStartTime; bool flag = false; if ((msg._flags & KMSG_EXPIRE) != 0) { diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index 0a62e375d7..bcc4fb43d5 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -2112,9 +2112,9 @@ void Scene106::step() { } if (msgId >= 0) { - int nextAbortVal = _game._trigger + 1; + int nextTrigger = _game._trigger + 1; _scene->_kernelMessages.add(Common::Point(15, _positionY), 0x1110, 0, 0, 360, _game.getQuote(msgId)); - _scene->_sequences.addTimer(150, nextAbortVal); + _scene->_sequences.addTimer(150, nextTrigger); _positionY += 14; } } -- cgit v1.2.3