aboutsummaryrefslogtreecommitdiff
path: root/engines/tucker
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-03-04 21:54:22 +0100
committerAdrian Frühwirth2018-03-05 21:32:56 +0100
commit585fc91de5c1fcfc0e51afc9d13bc5736b38edad (patch)
tree2772680013bc5e1819798f82b228391c732faef3 /engines/tucker
parentb04f038fb664fa349d0f343e279490de560e05aa (diff)
downloadscummvm-rg350-585fc91de5c1fcfc0e51afc9d13bc5736b38edad.tar.gz
scummvm-rg350-585fc91de5c1fcfc0e51afc9d13bc5736b38edad.tar.bz2
scummvm-rg350-585fc91de5c1fcfc0e51afc9d13bc5736b38edad.zip
TUCKER: Add VerbPreposition enum
Diffstat (limited to 'engines/tucker')
-rw-r--r--engines/tucker/tucker.cpp8
-rw-r--r--engines/tucker/tucker.h7
2 files changed, 11 insertions, 4 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index e4d7cde18a..f7afd16906 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -2068,12 +2068,12 @@ void TuckerEngine::drawInfoString() {
} else {
infoStringWidth = verbWidth;
}
- int verbPreposition = 0;
+ VerbPreposition verbPreposition = kVerbPrepositionNone;
int verbPrepositionWidth = 0;
if (_actionRequiresTwoObjects) {
- verbPreposition = (_actionVerb == kVerbGive) ? 12 : 11;
+ verbPreposition = (_actionVerb == kVerbGive) ? kVerbPrepositionTo : kVerbPrepositionWith;
verbPrepositionWidth = getStringWidth(verbPreposition, infoStrBuf) + 4;
- if (_gameLang != Common::EN_ANY && (_actionObj2Num > 0 || _actionObj2Type > 0) && verbPreposition > 0) {
+ if (_gameLang != Common::EN_ANY && (_actionObj2Num > 0 || _actionObj2Type > 0) && verbPreposition != kVerbPrepositionNone) {
infoStringWidth = 0;
verbWidth = 0;
object1NameWidth = 0;
@@ -2084,7 +2084,7 @@ void TuckerEngine::drawInfoString() {
}
}
const int xPos = (kScreenWidth / 2) - 1 - (infoStringWidth / 2);
- if (_gameLang == Common::EN_ANY || (_actionObj2Num == 0 && _actionObj2Type == 0) || verbPreposition == 0) {
+ if (_gameLang == Common::EN_ANY || (_actionObj2Num == 0 && _actionObj2Type == 0) || verbPreposition == kVerbPrepositionNone) {
drawItemString(xPos, _actionVerb + 1, infoStrBuf);
if (_actionObj1Num > 0 || _actionObj1Type > 0) {
drawItemString(xPos + 4 + verbWidth, _actionObj1Num + 1, obj1StrBuf);
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index 03046f67de..2972052ce2 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -98,6 +98,13 @@ enum Verb {
kVerbUse = 8
};
+enum VerbPreposition {
+ kVerbPrepositionNone = 0,
+
+ kVerbPrepositionWith = 11,
+ kVerbPrepositionTo = 12
+};
+
enum Part {
kPartInit = 0,
kPartOne = 1,