[Scummvm-cvs-logs] SF.net SVN: scummvm:[53109] scummvm/trunk

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Sun Oct 10 11:47:19 CEST 2010


Revision: 53109
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53109&view=rev
Author:   strangerke
Date:     2010-10-10 09:47:19 +0000 (Sun, 10 Oct 2010)

Log Message:
-----------
HUGO: Move Dos strings from Parser to hugo.dat

Modified Paths:
--------------
    scummvm/trunk/dists/engine-data/hugo.dat
    scummvm/trunk/engines/hugo/hugo.h
    scummvm/trunk/engines/hugo/parser.cpp
    scummvm/trunk/engines/hugo/parser.h
    scummvm/trunk/tools/create_hugo/create_hugo.h
    scummvm/trunk/tools/create_hugo/staticparser.h

Modified: scummvm/trunk/dists/engine-data/hugo.dat
===================================================================
(Binary files differ)

Modified: scummvm/trunk/engines/hugo/hugo.h
===================================================================
--- scummvm/trunk/engines/hugo/hugo.h	2010-10-10 08:30:18 UTC (rev 53108)
+++ scummvm/trunk/engines/hugo/hugo.h	2010-10-10 09:47:19 UTC (rev 53109)
@@ -33,7 +33,7 @@
 #include "hugo/game.h"
 
 #define HUGO_DAT_VER_MAJ 0  // 1 byte
-#define HUGO_DAT_VER_MIN 24 // 1 byte
+#define HUGO_DAT_VER_MIN 25 // 1 byte
 #define DATAALIGNMENT 4
 
 namespace Common {

Modified: scummvm/trunk/engines/hugo/parser.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser.cpp	2010-10-10 08:30:18 UTC (rev 53108)
+++ scummvm/trunk/engines/hugo/parser.cpp	2010-10-10 09:47:19 UTC (rev 53109)
@@ -736,13 +736,13 @@
 		return true;
 	} else if (obj->screenIndex != *_vm._screen_p) { // Not in same screen
 		if (obj->objValue)
-			strcpy (comment, "You don't have it!");
+			strcpy (comment, _vm._textParser[kCmtAny4]);
 		return false;
 	}
 
 	if (obj->cycling == INVISIBLE) {
 		if (obj->seqNumb) {                         // There is an image
-			strcpy(comment, "I don't see it anywhere");
+			strcpy(comment, _vm._textParser[kCmtAny5]);
 			return false;
 		} else {                                    // No image, assume visible
 			if ((obj->radius < 0) ||
@@ -754,10 +754,10 @@
 				// or is not carrying it (small, portable objects of value)
 				if (noun) {                         // Don't say unless object specified
 					if (obj->objValue && (verb != _vm._arrayVerbs[_vm._take][0]))
-						strcpy(comment, "You don't have it!");
+						strcpy(comment, _vm._textParser[kCmtAny4]);
 					else
-						strcpy(comment, "You're not close enough!");
-				}
+						strcpy(comment, _vm._textParser[kCmtClose]);
+					}
 				return false;
 			}
 		}
@@ -772,9 +772,9 @@
 		// or is not carrying it (small, portable objects of value)
 		if (noun) {                                 // Don't say unless object specified
 			if (obj->objValue && (verb != _vm._arrayVerbs[_vm._take][0]))
-				strcpy(comment, "You don't have it!");
+				strcpy(comment, _vm._textParser[kCmtAny4]);
 			else
-				strcpy(comment, "You're not close enough!");
+				strcpy(comment, _vm._textParser[kCmtClose]);
 		}
 		return false;
 	}
@@ -794,23 +794,23 @@
 		if ((LOOK & obj->genericCmd) == LOOK)
 			Utils::Box(BOX_ANY, "%s", _vm._textData[obj->dataIndex]);
 		else
-			Utils::Box(BOX_ANY, "I see nothing special about it");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBUnusual_1d]);
 	} else if (word == _vm._arrayVerbs[_vm._take][0]) {
 		if (obj->carriedFl)
-			Utils::Box(BOX_ANY, "You already have it");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBHave]);
 		else if ((TAKE & obj->genericCmd) == TAKE)
 			takeObject(obj);
 		else if (!obj->verbOnlyFl)                  // Make sure not taking object in context!
-			Utils::Box(BOX_ANY, "It is of no use to you");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBNoUse]);
 		else
 			return false;
 	} else if (word == _vm._arrayVerbs[_vm._drop][0]) {
 		if (!obj->carriedFl)
-			Utils::Box(BOX_ANY, "You don't have it");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBDontHave]);
 		else if ((DROP & obj->genericCmd) == DROP)
 			dropObject(obj);
 		else
-			Utils::Box(BOX_ANY, "No! You'll be needing it");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBNeed]);
 	} else {                                        // It was not a generic cmd
 		return false;
 	}
@@ -908,7 +908,7 @@
 	Utils::strlwr(_line);                           // Convert to lower case
 
 	if (!strcmp("exit", _line) || strstr(_line, "quit")) {
-		if (Utils::Box(BOX_YESNO, "Are you sure you want to QUIT?") != 0)
+		if (Utils::Box(BOX_YESNO, "%s", _vm._textParser[kTBExit_1d]) != 0)
 			_vm.endGame();
 		else
 			return;
@@ -969,9 +969,7 @@
 	else if (!isCatchallVerb(true, noun, verb, _vm._catchallList) &&
 		     !isCatchallVerb(false, noun, verb, _vm._backgroundObjects[*_vm._screen_p])  &&
 			 !isCatchallVerb(false, noun, verb, _vm._catchallList))
-		Utils::Box(BOX_ANY, "Apparently our hero either doesn't\n"
-				   "understand what you mean or doesn't\n"
-				   "think that would be very useful!");
+		Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBEh_1d]);
 }
 
 Parser_v2d::Parser_v2d(HugoEngine &vm) : Parser_v1d(vm) {
@@ -990,7 +988,7 @@
 	Utils::strlwr(_line);                           // Convert to lower case
 
 	if (!strcmp("exit", _line) || strstr(_line, "quit")) {
-		if (Utils::Box(BOX_YESNO, "Are you sure you want to QUIT?") != 0)
+		if (Utils::Box(BOX_YESNO, "%s", _vm._textParser[kTBExit_1d]) != 0)
 			_vm.endGame();
 		else
 			return;
@@ -1054,17 +1052,14 @@
 		if (*farComment != '\0') {                  // An object matched but not near enough
 			Utils::Box(BOX_ANY, "%s", farComment);
 		} else if (_maze.enabledFl && (verb == _vm._arrayVerbs[_vm._look][0])) {
-			Utils::Box(BOX_ANY, "You are in a maze of\n"
-					   "twisty little paths,\n"
-					   "which are all alike!");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBMaze]);
 			showTakeables();
 		} else if (verb && noun) {                  // A combination I didn't think of
-			Utils::Box(BOX_ANY, "I don't think that would\n"
-					   "accomplish much, somehow!");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBNoUse_2d]);
 		} else if (verb || noun) {
-			Utils::Box(BOX_ANY, "I don't fully understand!");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBNoun]);
 		} else {
-			Utils::Box(BOX_ANY, "I find that befuddling!");
+			Utils::Box(BOX_ANY, "%s", _vm._textParser[kTBEh_2d]);
 		}
 	}
 }

Modified: scummvm/trunk/engines/hugo/parser.h
===================================================================
--- scummvm/trunk/engines/hugo/parser.h	2010-10-10 08:30:18 UTC (rev 53108)
+++ scummvm/trunk/engines/hugo/parser.h	2010-10-10 09:47:19 UTC (rev 53109)
@@ -35,10 +35,11 @@
 namespace Hugo {
 
 enum seqTextParser {
-	kTBExit  = 0, kTBMaze,    kTBNoPoint, kTBNoun,  kTBVerb,
-	kTBEh,        kTBUnusual, kTBHave,    kTBNoUse, kTBDontHave,
-	kTBNeed,      kTBOk,      kCmtAny1,   kCmtAny2, kCmtAny3,
-	kCmtClose,    kTBIntro,   kTBOutro
+	kTBExit  = 0, kTBMaze,    kTBNoPoint, kTBNoun,       kTBVerb,
+	kTBEh,        kTBUnusual, kTBHave,    kTBNoUse,      kTBDontHave,
+	kTBNeed,      kTBOk,      kCmtAny1,   kCmtAny2,      kCmtAny3,
+	kCmtClose,    kTBIntro,   kTBOutro,   kTBUnusual_1d, kCmtAny4,
+	kCmtAny5,     kTBExit_1d, kTBEh_1d,   kTBEh_2d,      kTBNoUse_2d
 };
 
 class Parser {

Modified: scummvm/trunk/tools/create_hugo/create_hugo.h
===================================================================
--- scummvm/trunk/tools/create_hugo/create_hugo.h	2010-10-10 08:30:18 UTC (rev 53108)
+++ scummvm/trunk/tools/create_hugo/create_hugo.h	2010-10-10 09:47:19 UTC (rev 53109)
@@ -31,7 +31,7 @@
 #define DATAALIGNMENT 4
 
 #define HUGO_DAT_VER_MAJ 0  // 1 byte
-#define HUGO_DAT_VER_MIN 24 // 1 byte
+#define HUGO_DAT_VER_MIN 25 // 1 byte
 
 typedef unsigned char  uint8;
 typedef unsigned char  byte;

Modified: scummvm/trunk/tools/create_hugo/staticparser.h
===================================================================
--- scummvm/trunk/tools/create_hugo/staticparser.h	2010-10-10 08:30:18 UTC (rev 53108)
+++ scummvm/trunk/tools/create_hugo/staticparser.h	2010-10-10 09:47:19 UTC (rev 53109)
@@ -33,7 +33,7 @@
 #ifndef STATICPARSER_H
 #define STATICPARSER_H
 
-#define NUM_PARSER_TEXT 18
+#define NUM_PARSER_TEXT 25
 const char *textParser[NUM_PARSER_TEXT] = {
 	"You should press ALT+F4 or click on Game/Exit.",
 	"You are in a maze of\ntwisty little paths,\nwhich are all alike!",
@@ -52,7 +52,14 @@
 	"I don't see any here!",
 	"You're not close enough!",
 	"You are carrying:",
-	"\nPress ESCAPE to continue"
+	"\nPress ESCAPE to continue",
+	"I see nothing special about it",
+	"You don't have it!",
+	"I don't see it anywhere",
+	"Are you sure you want to QUIT?",
+	"Apparently our hero either doesn't\nunderstand what you mean or doesn't\nthink that would be very useful!",
+	"I find that befuddling!",
+	"I don't think that would\naccomplish much, somehow!"
 };
 
 #endif //STATICPARSER_H


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list