diff options
Diffstat (limited to 'engines/agos/verb.cpp')
| -rw-r--r-- | engines/agos/verb.cpp | 19 |
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) { |
