[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.cpp,1.5,1.6 smush_player.h,1.2,1.3

Pawel Kolodziejski aquadran at users.sourceforge.net
Mon Mar 17 11:11:08 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv14005

Modified Files:
	smush_player.cpp smush_player.h 
Log Message:
few corrections for smush

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- smush_player.cpp	17 Mar 2003 15:22:31 -0000	1.5
+++ smush_player.cpp	17 Mar 2003 19:10:11 -0000	1.6
@@ -654,9 +654,6 @@
 	setPalette(_pal);
 }
 
-void SmushPlayer::initCodecs() {
-}
-
 extern void smush_decode_codec1(byte *dst, byte *src, int height);
 
 void SmushPlayer::handleFrameObject(Chunk &b) {
@@ -672,15 +669,7 @@
 	int width = b.getWord();
 	int height = b.getWord();
 
-	// hack for spontanic changing resolution
-	// differ than width scumm screen, and pass only one width 384x242
-	if((height != _scumm->_realHeight) && (height != 242))
-		return;
-	if (height == 242)
-		return;
-	if((width != _scumm->_realWidth) && (width != 384))
-		return;
-	if (width == 384)
+	if((height != _scumm->_realHeight) || (width != _scumm->_realWidth))
 		return;
 
 	if(_alreadyInit == false) {
@@ -865,13 +854,10 @@
 }
 
 void SmushPlayer::updateScreen() {
-	int width = MIN(_width, _scumm->_realWidth);
-	int height = MIN(_height, _scumm->_realHeight);
-
 	if (_whileUpdate == false) {
 		_whileCopyRect = true;
 		uint32 end_time, start_time = _scumm->_system->get_msecs();
-		_scumm->_system->copy_rect(_data, _width, 0, 0, width, height);
+		_scumm->_system->copy_rect(_data, _width, 0, 0, _width, _height);
 		end_time = _scumm->_system->get_msecs();
 		debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time);
 		_updateNeeded = true;
@@ -880,9 +866,17 @@
 }
 
 void SmushPlayer::play(const char *filename, const char *directory) {
+	File f;
+	f.open(filename, directory);
+	if(f.isOpen() == false) {
+		warning("SmushPlayer::setupAnim() File not found %s", filename);
+		return;
+	}
+
 	_whileUpdate = false;
 	_whileCopyRect = false;
 	_updateNeeded = false;
+
 	setupAnim(filename, directory);
 	init();
 

Index: smush_player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- smush_player.h	17 Mar 2003 15:22:36 -0000	1.2
+++ smush_player.h	17 Mar 2003 19:10:12 -0000	1.3
@@ -79,7 +79,6 @@
 	void init();
 	void deinit();
 	void setupAnim(const char *file, const char *directory);
-	void initCodecs();
 	void updateScreen();
 	void play(const char *filename, const char *directory);
 	void setPalette(byte *palette);
@@ -87,7 +86,6 @@
 protected:
 
 	bool readString(const char *file, const char *directory);
-	void clean();
 	void checkBlock(const Chunk &, Chunk::type, uint32 = 0);
 	void handleAnimHeader(Chunk &);
 	void handleFrame(Chunk &);





More information about the Scummvm-git-logs mailing list