[Scummvm-git-logs] scummvm master -> ada79c7f65264a073a2f7ae55ec23211a924a1e6

bonki bonki at users.noreply.github.com
Mon Mar 5 21:34:14 CET 2018


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
585fc91de5 TUCKER: Add VerbPreposition enum
ada79c7f65 TUCKER: Workaround capitalized "With"/"Con" in sentence bar


Commit: 585fc91de5c1fcfc0e51afc9d13bc5736b38edad
    https://github.com/scummvm/scummvm/commit/585fc91de5c1fcfc0e51afc9d13bc5736b38edad
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-03-05T21:32:56+01:00

Commit Message:
TUCKER: Add VerbPreposition enum

Changed paths:
    engines/tucker/tucker.cpp
    engines/tucker/tucker.h


diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index e4d7cde..f7afd16 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 03046f6..2972052 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,


Commit: ada79c7f65264a073a2f7ae55ec23211a924a1e6
    https://github.com/scummvm/scummvm/commit/ada79c7f65264a073a2f7ae55ec23211a924a1e6
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-03-05T21:32:56+01:00

Commit Message:
TUCKER: Workaround capitalized "With"/"Con" in sentence bar

infobar.txt contains all text used for the sentence bar and, among
other things, the prepositions to use for the "Use" and "Give" verbs.
In the English and Spanish versions of the game the preposition for
"Use" ("With" and "Con", respectively) is incorrectly stored in
capitalized form which this commit fixes.

Fixes Trac#10445.

Changed paths:
    engines/tucker/tucker.cpp


diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index f7afd16..11ff5a4 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -364,7 +364,16 @@ void TuckerEngine::mainLoop() {
 	}
 	loadCharset();
 	loadPanel();
+
 	loadFile("infobar.txt", _infoBarBuf);
+	// WORKAROUND capitalized "With"/"Con" in the English/Spanish versions
+	// Fixes Trac#10445.
+	if (_gameLang == Common::EN_ANY) {
+		_infoBarBuf[getPositionForLine(kVerbPrepositionWith, _infoBarBuf)] = 'w';
+	} else if (_gameLang == Common::ES_ESP) {
+		_infoBarBuf[getPositionForLine(kVerbPrepositionWith, _infoBarBuf)] = 'c';
+	}
+
 	_data5Buf = loadFile("data5.c", 0);
 	_bgTextBuf = loadFile("bgtext.c", 0);
 	_charNameBuf = loadFile("charname.c", 0);





More information about the Scummvm-git-logs mailing list