[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.523,2.524 script_c64.cpp,2.20,2.21 string.cpp,1.300,1.301

kirben kirben at users.sourceforge.net
Fri Sep 23 05:43:09 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3284/scumm

Modified Files:
	intern.h script_c64.cpp string.cpp 
Log Message:

Fix subtitle display in C64 maniac.


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.523
retrieving revision 2.524
diff -u -d -r2.523 -r2.524
--- intern.h	22 Sep 2005 13:34:20 -0000	2.523
+++ intern.h	23 Sep 2005 12:35:30 -0000	2.524
@@ -406,6 +406,7 @@
 	virtual const char *getOpcodeDesc(byte i);
 
 	virtual void setupScummVars();
+	virtual void decodeParseString();
 
 	virtual int getVarOrDirectWord(byte mask);
 	virtual uint fetchScriptWord();

Index: script_c64.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_c64.cpp,v
retrieving revision 2.20
retrieving revision 2.21
diff -u -d -r2.20 -r2.21
--- script_c64.cpp	22 Sep 2005 13:34:20 -0000	2.20
+++ script_c64.cpp	23 Sep 2005 12:35:30 -0000	2.21
@@ -389,6 +389,42 @@
 	return fetchScriptByte();
 }
 
+void ScummEngine_c64::decodeParseString() {
+	byte buffer[512];
+	byte *ptr = buffer;
+	byte c;
+	bool insertSpace = false;
+
+	while ((c = fetchScriptByte())) {
+
+		insertSpace = (c & 0x80) != 0;
+		c &= 0x7f;
+
+		if (c == '/') {
+			*ptr++ = 13;
+		} else {
+			*ptr++ = c;
+		}
+
+		if (insertSpace)
+			*ptr++ = ' ';
+
+	}
+	*ptr = 0;
+
+	int textSlot = 0;
+	_string[textSlot].xpos = 0;
+	_string[textSlot].ypos = 0;
+	_string[textSlot].right = 320;
+	_string[textSlot].center = false;
+	_string[textSlot].overhead = false;
+
+	if (_actorToPrintStrFor == 0xFF)
+		_string[textSlot].color = 14;
+
+	actorTalk(buffer);
+}
+
 void ScummEngine_c64::setStateCommon(byte type) {
 	int obj = getObjectFlag();
 	putState(obj, getState(obj) | type);

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.300
retrieving revision 1.301
diff -u -d -r1.300 -r1.301
--- string.cpp	14 Aug 2005 01:41:52 -0000	1.300
+++ string.cpp	23 Sep 2005 12:35:30 -0000	1.301
@@ -236,7 +236,9 @@
 			if (_charset->_center) {
 				_charset->_nextLeft -= _charset->getStringWidth(0, buffer) / 2;
 			}
-			if (!(_platform == Common::kPlatformFMTowns) && _string[0].height) {
+			if (_platform == Common::kPlatformC64 && _gameId == GID_MANIAC) {
+				break;
+			} else if (!(_platform == Common::kPlatformFMTowns) && _string[0].height) {
 				_charset->_nextTop += _string[0].height;
 			} else {
 				_charset->_nextTop += _charset->getFontHeight();





More information about the Scummvm-git-logs mailing list