[Scummvm-cvs-logs] SF.net SVN: scummvm:[35767] scummvm/trunk/engines/agi

sev at users.sourceforge.net sev at users.sourceforge.net
Wed Jan 7 14:27:59 CET 2009


Revision: 35767
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35767&view=rev
Author:   sev
Date:     2009-01-07 13:27:58 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
Fix bug #1942471: "AGI: Fan(Get Outta SQ): No Word wrapping"

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/detection.cpp
    scummvm/trunk/engines/agi/op_cmd.cpp
    scummvm/trunk/engines/agi/text.cpp

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2009-01-07 08:16:18 UTC (rev 35766)
+++ scummvm/trunk/engines/agi/agi.h	2009-01-07 13:27:58 UTC (rev 35767)
@@ -963,7 +963,7 @@
 	void printText(const char *, int, int, int, int, int, int, bool checkerboard = false);
 	void printTextConsole(const char *, int, int, int, int, int);
 	int print(const char *, int, int, int);
-	char *wordWrapString(char *, int *);
+	char *wordWrapString(const char *, int *);
 	char *agiSprintf(const char *);
 	void writeStatus(void);
 	void writePrompt(void);

Modified: scummvm/trunk/engines/agi/detection.cpp
===================================================================
--- scummvm/trunk/engines/agi/detection.cpp	2009-01-07 08:16:18 UTC (rev 35766)
+++ scummvm/trunk/engines/agi/detection.cpp	2009-01-07 13:27:58 UTC (rev 35767)
@@ -216,7 +216,7 @@
 	// Menus not tested
 	GAME3_P("goldrush", "1.0M 1989-02-28 (CE) aka 2.01 1988-12-22", "grdir", "3f7b9ce62631434389f85371b11921d6", 0x3149, GID_GOLDRUSH, Common::kPlatformApple2GS),
 
-		// Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
+	// Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
 	GAME3_P("goldrush", "1.01 1989-01-13 aka 2.01 1988-12-22", "grdir", "4dd4d50480a3d6c206fa227ce8142735", 0x3149, GID_GOLDRUSH, Common::kPlatformAtariST),
 
 	// Gold Rush! (PC 5.25") 2.01 12/22/88 [AGI 3.002.149]

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2009-01-07 08:16:18 UTC (rev 35766)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2009-01-07 13:27:58 UTC (rev 35767)
@@ -1387,7 +1387,13 @@
 }
 
 cmd(display) {
-	g_agi->printText(curLogic->texts[p2 - 1], p1, 0, p0, 40, game.colorFg, game.colorBg);
+	int len = 40;
+
+	char *s = g_agi->wordWrapString(curLogic->texts[p2 - 1], &len);
+
+	g_agi->printText(s, p1, 0, p0, 40, game.colorFg, game.colorBg);
+
+	free(s);
 }
 
 cmd(display_f) {

Modified: scummvm/trunk/engines/agi/text.cpp
===================================================================
--- scummvm/trunk/engines/agi/text.cpp	2009-01-07 08:16:18 UTC (rev 35766)
+++ scummvm/trunk/engines/agi/text.cpp	2009-01-07 13:27:58 UTC (rev 35767)
@@ -224,8 +224,9 @@
  *
  * Based on GBAGI implementaiton with permission from the author
  */
-char *AgiEngine::wordWrapString(char *s, int *len) {
-	char *pWord, *outStr, *msgBuf, maxWidth = *len;
+char *AgiEngine::wordWrapString(const char *s, int *len) {
+	char *outStr, *msgBuf, maxWidth = *len;
+	const char *pWord;
 	int lnLen, wLen;
 
 	msgBuf = outStr = strdup(s);


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