aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2003-02-05 19:21:23 +0000
committerMax Horn2003-02-05 19:21:23 +0000
commit53fd53fe4bc8abb54d0de85561f8d7931b02250c (patch)
treeea5f7ccad15974d6f384a16f75309f89843b2be1 /simon
parentda26741452b9d07e384ed8e1e961bf0722917bcc (diff)
downloadscummvm-rg350-53fd53fe4bc8abb54d0de85561f8d7931b02250c.tar.gz
scummvm-rg350-53fd53fe4bc8abb54d0de85561f8d7931b02250c.tar.bz2
scummvm-rg350-53fd53fe4bc8abb54d0de85561f8d7931b02250c.zip
fixed a copy&paste bug; rewrote the code in question to streamline it a bit
svn-id: r6587
Diffstat (limited to 'simon')
-rw-r--r--simon/verb.cpp36
1 files changed, 10 insertions, 26 deletions
diff --git a/simon/verb.cpp b/simon/verb.cpp
index eb29eb5162..13c0b919cb 100644
--- a/simon/verb.cpp
+++ b/simon/verb.cpp
@@ -107,37 +107,21 @@ void SimonState::focusVerb(uint hitarea_id)
{
uint x;
const char *txt;
+ const char * const *verb_prep_names;
hitarea_id -= 101;
- if (_language == 20) {
- CHECK_BOUNDS(hitarea_id, hebrew_verb_prep_names);
- } else if (_language == 5) {
- CHECK_BOUNDS(hitarea_id, spanish_verb_prep_names);
- } else if (_language == 3) {
- CHECK_BOUNDS(hitarea_id, italian_verb_prep_names);
- } else if (_language == 2) {
- CHECK_BOUNDS(hitarea_id, french_verb_prep_names);
- } else if (_language == 1) {
- CHECK_BOUNDS(hitarea_id, german_verb_prep_names);
- } else {
- CHECK_BOUNDS(hitarea_id, english_verb_prep_names);
- }
-
if (_show_preposition) {
- if (_language == 20) {
- CHECK_BOUNDS(hitarea_id, hebrew_verb_prep_names);
- } else if (_language == 5) {
- txt = spanish_verb_prep_names[hitarea_id];
- } else if (_language == 3) {
- txt = italian_verb_prep_names[hitarea_id];
- } else if (_language == 2) {
- txt = french_verb_prep_names[hitarea_id];
- } else if (_language == 1) {
- txt = german_verb_prep_names[hitarea_id];
- } else {
- txt = english_verb_prep_names[hitarea_id];
+ switch (_language) {
+ case 20: verb_prep_names = hebrew_verb_prep_names; break;
+ case 5: verb_prep_names = spanish_verb_prep_names; break;
+ case 3: verb_prep_names = italian_verb_prep_names; break;
+ case 2: verb_prep_names = french_verb_prep_names; break;
+ case 1: verb_prep_names = german_verb_prep_names; break;
+ default: verb_prep_names = english_verb_prep_names; break;
}
+ CHECK_BOUNDS(hitarea_id, verb_prep_names);
+ txt = english_verb_prep_names[hitarea_id];
} else {
txt = verb_names[hitarea_id];
}