[Scummvm-cvs-logs] SF.net SVN: scummvm: [26779] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Mon May 7 15:03:04 CEST 2007


Revision: 26779
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26779&view=rev
Author:   kirben
Date:     2007-05-07 06:03:02 -0700 (Mon, 07 May 2007)

Log Message:
-----------
Fixes for conversation response in Waxworks.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/string.cpp
    scummvm/trunk/engines/agos/verb.cpp

Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp	2007-05-07 12:17:24 UTC (rev 26778)
+++ scummvm/trunk/engines/agos/agos.cpp	2007-05-07 13:03:02 UTC (rev 26779)
@@ -386,6 +386,7 @@
 	_boxLineCount = 0;
 	_boxCR = 0;
 	memset(_boxBuffer, 0, sizeof(_boxBuffer));
+	_boxBufferPtr = _boxBuffer;
 
 	_linePtrs[0] = 0;
 	_linePtrs[1] = 0;

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2007-05-07 12:17:24 UTC (rev 26778)
+++ scummvm/trunk/engines/agos/agos.h	2007-05-07 13:03:02 UTC (rev 26779)
@@ -284,6 +284,7 @@
 	byte _boxStarHeight;
 
 	char _boxBuffer[310];
+	char *_boxBufferPtr;
 	int _boxLineCount;
 	int _lineCounts[6];
 	char *_linePtrs[6];

Modified: scummvm/trunk/engines/agos/string.cpp
===================================================================
--- scummvm/trunk/engines/agos/string.cpp	2007-05-07 12:17:24 UTC (rev 26778)
+++ scummvm/trunk/engines/agos/string.cpp	2007-05-07 13:03:02 UTC (rev 26779)
@@ -681,26 +681,25 @@
 }
 
 void AGOSEngine_Waxworks::boxTextMessage(const char *x) {
-	char *BoxBufferPtr = _boxBuffer;
-	sprintf(BoxBufferPtr, "%s\n", x);
+	sprintf(_boxBufferPtr, "%s\n", x);
 	_lineCounts[_boxLineCount] += strlen(x);
-	BoxBufferPtr += strlen(x) + 1;
+	_boxBufferPtr += strlen(x) + 1;
 	_boxLineCount++;
-	_linePtrs[_boxLineCount] = BoxBufferPtr;
+	_linePtrs[_boxLineCount] = _boxBufferPtr;
 	_boxCR = 1;
 }
 
 void AGOSEngine_Waxworks::boxTextMsg(const char *x) {
-	char *BoxBufferPtr = _boxBuffer;
-	sprintf(BoxBufferPtr, "%s", x);
+	sprintf(_boxBufferPtr, "%s", x);
 	_lineCounts[_boxLineCount] += strlen(x);
-	BoxBufferPtr += strlen(x);
+	_boxBufferPtr += strlen(x);
 	_boxCR = 0;
 }
 
 void AGOSEngine_Waxworks::printBox() {
-	char *BoxBufferPtr = 0;
 	uint16 BoxSize;
+
+	*_boxBufferPtr = 0;
 	_linePtrs[0] = _boxBuffer;
 	if (_boxCR == 0)
 		_boxLineCount++;
@@ -754,11 +753,11 @@
 	_textWindow->textLength = 0;
 	justifyStart();
 	waitForSync(99);
-	BoxBufferPtr = _boxBuffer;
-	while (*BoxBufferPtr)
-		justifyOutPut(*BoxBufferPtr++);
+	_boxBufferPtr = _boxBuffer;
+	while (*_boxBufferPtr)
+		justifyOutPut(*_boxBufferPtr++);
 	_boxLineCount = 0;
-	BoxBufferPtr = _boxBuffer;
+	_boxBufferPtr = _boxBuffer;
 	_lineCounts[0] = 0;
 	_lineCounts[1] = 0;
 	_lineCounts[2] = 0;

Modified: scummvm/trunk/engines/agos/verb.cpp
===================================================================
--- scummvm/trunk/engines/agos/verb.cpp	2007-05-07 12:17:24 UTC (rev 26778)
+++ scummvm/trunk/engines/agos/verb.cpp	2007-05-07 13:03:02 UTC (rev 26779)
@@ -851,16 +851,23 @@
 	do {
 		for (i = 0; i != w; ++i) {
 			color = src[i];
-			if (getGameType() == GType_ELVIRA1)  {
-				if (color & 1) {
-					color ^= 2;
+			if (getGameType() == GType_WW)  {
+				if (!(color & 0xF) || (color & 0xF) == 10) {
+					color ^= 10;
 					src[i] = color;
+				} else {
+					printf("Color %d %d\n", color, color & 0xF);
 				}
 			} else if (getGameType() == GType_ELVIRA2)  {
 				if (!(color & 1)) {
 					color ^= 2;
 					src[i] = color;
 				}
+			} else if (getGameType() == GType_ELVIRA1)  {
+				if (color & 1) {
+					color ^= 2;
+					src[i] = color;
+				}
 			} else {
 				if (a >= color && b < color) {
 					if (c >= color)


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