[Scummvm-cvs-logs] CVS: scummvm/queen command.h,1.1,1.2 command.cpp,1.1,1.2

Gregory Montoir cyx at users.sourceforge.net
Sun Nov 2 08:47:04 CET 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv3577

Modified Files:
	command.h command.cpp 
Log Message:
fix locking verb crash

Index: command.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- command.h	31 Oct 2003 13:46:45 -0000	1.1
+++ command.h	2 Nov 2003 16:46:12 -0000	1.2
@@ -51,8 +51,8 @@
 	};
 
 	char _command[MAX_COMMAND_LEN];
-	const char* lockedVerbPrefix;
-	Graphics* _graphics;
+	Graphics *_graphics;
+	Logic *_logic;
 };
 
 

Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- command.cpp	31 Oct 2003 13:46:45 -0000	1.1
+++ command.cpp	2 Nov 2003 16:46:12 -0000	1.2
@@ -40,7 +40,7 @@
 void CmdText::display(uint8 color) {
 
 	_graphics->textCurrentColor(color);
-	_graphics->textSetCentered(COMMAND_Y_POS, _command);
+	_graphics->textSetCentered(COMMAND_Y_POS, _command, false);
 }
 
 
@@ -48,7 +48,7 @@
 
 	char temp[MAX_COMMAND_LEN];
 	if (locked) {
-		sprintf(temp, "%s%s", lockedVerbPrefix, v.name());
+		sprintf(temp, "%s%s", _logic->lockedVerbPrefix(), v.name());
 	}
 	else {
 		strcpy(temp, v.name());
@@ -58,7 +58,7 @@
 		strcat(temp, name);
 	}
 	_graphics->textCurrentColor(color);
-	_graphics->textSetCentered(COMMAND_Y_POS, temp);
+	_graphics->textSetCentered(COMMAND_Y_POS, temp, false);
 }
 
 
@@ -67,7 +67,7 @@
 	char temp[MAX_COMMAND_LEN];
 	sprintf(temp, "%s %s", _command, name);
 	_graphics->textCurrentColor(color);
-	_graphics->textSetCentered(COMMAND_Y_POS, temp);
+	_graphics->textSetCentered(COMMAND_Y_POS, temp, false);
 }
 
 
@@ -100,7 +100,7 @@
 Command::Command(Logic *l, Graphics *g, Input *i, Walk *w)
 	: _logic(l), _graphics(g), _input(i), _walk(w) {
 	_cmdText._graphics = _graphics;
-	_cmdText.lockedVerbPrefix = _logic->lockedVerbPrefix();
+	_cmdText._logic = _logic;
 }
 
 
@@ -345,8 +345,9 @@
 	// l.419-452 execute.c
 	switch (com->specialSection) {
 	case 1:
-		// XXX l.428-438
+		// XXX l.428-438		
 		warning("Command::executeCurrentAction() - Journal unimplemented");
+		// XXX if(DEMO) SPEAK("This is a demo, so I can't load or save games*14", "JOE", "");
 		return;
 	case 2:
 		_logic->joeUseDress(true);
@@ -807,7 +808,8 @@
 
 	warning("Command::executeIfCutaway(%s) unimplemented", description);
 
-	if(scumm_stricmp(description + strlen(description) - 4, ".cut") == 0) {
+	if (strlen(description) > 4 && 
+		scumm_stricmp(description + strlen(description) - 4, ".cut") == 0) {
 		/* XXX
 		CUTAWAY(description);
 		strcpy(Kstr,Paramstr);
@@ -825,7 +827,8 @@
 
 	warning("Command::executeIfDialog(%s) unimplemented", description);
 
-	if(scumm_stricmp(description + strlen(description) - 4, ".dog") == 0) {
+	if (strlen(description) > 4 && 
+		scumm_stricmp(description + strlen(description) - 4, ".dog") == 0) {
 		/* XXX
 		talk(Kstr);
 		strcpy(Kstr,Paramstr);





More information about the Scummvm-git-logs mailing list