[Scummvm-cvs-logs] CVS: scummvm/scumm/smush codec37.cpp,1.26,1.27 smush_player.cpp,1.116,1.117 smush_player.h,1.26,1.27

Pawel Kolodziejski aquadran at users.sourceforge.net
Sat Apr 10 02:32:00 CEST 2004


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

Modified Files:
	codec37.cpp smush_player.cpp smush_player.h 
Log Message:
special case for 384x242 smush resolution for ft pc demo, it use additional buffer

Index: codec37.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec37.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- codec37.cpp	6 Jan 2004 12:45:31 -0000	1.26
+++ codec37.cpp	10 Apr 2004 09:17:34 -0000	1.27
@@ -464,7 +464,7 @@
 		memcpy(_deltaBufs[_curtable], src + 16, decoded_size);
 		break;
 	case 1:
-		error("codec37: missing opcode 1");
+		warning("codec37: missing opcode 1");
 		break;
 	case 2:
 		bompDecodeLine(_deltaBufs[_curtable], src + 16, decoded_size);

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- smush_player.cpp	2 Apr 2004 22:01:25 -0000	1.116
+++ smush_player.cpp	10 Apr 2004 09:17:35 -0000	1.117
@@ -224,7 +224,8 @@
 	_sf[4] = NULL;
 	_base = NULL;
 	_frameBuffer = NULL;
-	
+	_specialBuffer = NULL;
+
 	_skipNext = false;
 	_subtitles = ConfMan.getBool("subtitles");
 	_dst = NULL;
@@ -283,6 +284,10 @@
 		delete _base;
 		_base = NULL;
 	}
+	if (_specialBuffer) {
+		free(_specialBuffer);
+		_specialBuffer = NULL;
+	}
 	
 	_vm->_mixer->stopHandle(_IACTchannel);
 
@@ -676,18 +681,19 @@
 	}
 
 	int codec = b.getWord();
-	int left = b.getWord(); // left
-	int top = b.getWord(); // top
+	int left = b.getWord();
+	int top = b.getWord();
 	int width = b.getWord();
 	int height = b.getWord();
 
-	if ((height > _vm->_screenHeight) || (width > _vm->_screenWidth))
+	if ((height == 242) && (width == 384)) {
+		_dst = _specialBuffer = (byte *)malloc(242 * 384);
+	} else if ((height > _vm->_screenHeight) || (width > _vm->_screenWidth))
 		return;
-
 	// FT Insane uses smaller frames to draw overlays with moving objects
 	// Other .san files do have them as well but their purpose in unknown
 	// and often it causes memory overdraw. So just skip those frames
-	if (!_insanity && ((height != _vm->_screenHeight) || (width != _vm->_screenWidth)))
+	else if (!_insanity && ((height != _vm->_screenHeight) || (width != _vm->_screenWidth)))
 		return;
 
 	if (!_alreadyInit) {
@@ -696,8 +702,8 @@
 		_alreadyInit = true;
 	}
 
-	_width = _vm->_screenWidth;
-	_height = _vm->_screenHeight;
+	_width = width;
+	_height = height;
 	b.getWord();
 	b.getWord();
 

Index: smush_player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- smush_player.h	9 Feb 2004 18:57:05 -0000	1.26
+++ smush_player.h	10 Apr 2004 09:17:36 -0000	1.27
@@ -49,6 +49,7 @@
 	Codec47Decoder _codec47;
 	FileChunk *_base;
 	byte *_frameBuffer;
+	byte *_specialBuffer;
 
 	bool _skipNext;
 	bool _subtitles;





More information about the Scummvm-git-logs mailing list