[Scummvm-cvs-logs] SF.net SVN: scummvm: [22034] scummvm/trunk/engines/simon

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed Apr 19 04:07:01 CEST 2006


Revision: 22034
Author:   eriktorbjorn
Date:     2006-04-19 04:05:47 -0700 (Wed, 19 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22034&view=rev

Log Message:
-----------
Number the FF conversation options.

Modified Paths:
--------------
    scummvm/trunk/engines/simon/items.cpp
    scummvm/trunk/engines/simon/simon.h
    scummvm/trunk/engines/simon/string.cpp
Modified: scummvm/trunk/engines/simon/items.cpp
===================================================================
--- scummvm/trunk/engines/simon/items.cpp	2006-04-19 11:01:03 UTC (rev 22033)
+++ scummvm/trunk/engines/simon/items.cpp	2006-04-19 11:05:47 UTC (rev 22034)
@@ -1818,7 +1818,7 @@
 	// 70: show string from array
 	int num = getVarOrByte();
 	const char *str = (const char *)getStringPtrByID(_stringIdArray3[num]);
-	printInteractText(num, str);
+	sendInteractText(num, "%d. %s\n", num, str);
 }
 
 void SimonEngine::o3_addBox() {

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-04-19 11:01:03 UTC (rev 22033)
+++ scummvm/trunk/engines/simon/simon.h	2006-04-19 11:05:47 UTC (rev 22034)
@@ -695,6 +695,7 @@
 	bool printTextOf(uint a, uint x, uint y);
 	bool printNameOf(Item *item, uint x, uint y);
 	void printInteractText(uint16 num, const char *string);
+	void sendInteractText(uint16 num, const char *fmt, ...);
 	void printScreenText(uint vga_sprite_id, uint color, const char *string_ptr, int16 x, int16 y, int16 width);
 
 	void renderStringAmiga(uint vga_sprite_id, uint color, uint width, uint height, const char *txt);

Modified: scummvm/trunk/engines/simon/string.cpp
===================================================================
--- scummvm/trunk/engines/simon/string.cpp	2006-04-19 11:01:03 UTC (rev 22033)
+++ scummvm/trunk/engines/simon/string.cpp	2006-04-19 11:05:47 UTC (rev 22034)
@@ -59,7 +59,7 @@
 	while (*string != 0) {
 		byte chr = *string;
 		if ((pixels + charWidth[chr]) > maxWidth)
-			break;	
+			break;
 		pixels += charWidth[chr];
 		string++;
 	}
@@ -175,6 +175,17 @@
 	_interactY += height;
 }
 
+void SimonEngine::sendInteractText(uint16 num, const char *fmt, ...) {
+	va_list arglist;
+	char string[256];
+
+	va_start(arglist, fmt);
+	vsprintf(string, fmt, arglist);
+	va_end(arglist);
+
+	printInteractText(num, string);
+}
+
 void SimonEngine::printScreenText(uint vgaSpriteId, uint color, const char *string, int16 x, int16 y, int16 width) {
 	char convertedString[320];
 	char *convertedString2 = convertedString;


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