aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/verb.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-01 17:28:24 -0500
committerPaul Gilbert2014-03-01 17:28:24 -0500
commit7880ae0b18c3e2a25ed1c4a2bc42e22066d1ff3e (patch)
tree96de4f3470bd9bcc81bbae82a3e1c59f523a8edf /engines/agos/verb.cpp
parentbadb8d97444767b7d8fea0f877ac044249696a5f (diff)
parent2218d14fb5276724c757406d5ac1ec581160721b (diff)
downloadscummvm-rg350-7880ae0b18c3e2a25ed1c4a2bc42e22066d1ff3e.tar.gz
scummvm-rg350-7880ae0b18c3e2a25ed1c4a2bc42e22066d1ff3e.tar.bz2
scummvm-rg350-7880ae0b18c3e2a25ed1c4a2bc42e22066d1ff3e.zip
Merge branch 'master' into mads
Diffstat (limited to 'engines/agos/verb.cpp')
-rw-r--r--engines/agos/verb.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index f5b57a01c8..fb3878381f 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -216,7 +216,14 @@ void AGOSEngine_Simon2::clearName() {
return;
}
- AGOSEngine_Simon1::clearName();
+ if (_currentVerbBox == _lastVerbOn)
+ return;
+
+ resetNameWindow();
+ _lastVerbOn = _currentVerbBox;
+
+ if (_currentVerbBox != NULL && !(_currentVerbBox->flags & kBFBoxDead))
+ printVerbOf(_currentVerbBox->id);
}
void AGOSEngine_Simon1::clearName() {
@@ -242,12 +249,18 @@ void AGOSEngine::clearName() {
resetNameWindow();
}
+static const byte convertVerbID[9] = {
+ 0, 1, 5, 11, 8, 7, 10, 3, 2
+};
+
void AGOSEngine::printVerbOf(uint hitarea_id) {
const char *txt;
const char * const *verb_names;
const char * const *verb_prep_names;
hitarea_id -= 101;
+ if (getGameType() == GType_SIMON2)
+ hitarea_id = convertVerbID[hitarea_id];
if (_showPreposition) {
switch (_language) {