[Scummvm-cvs-logs] CVS: scummvm/scumm/smush codec1.cpp,1.6,1.7 codec1.h,1.4,1.5 codec37.cpp,1.15,1.16 codec37.h,1.8,1.9 codec44.cpp,1.7,1.8 codec44.h,1.6,1.7 codec47.cpp,1.41,1.42 codec47.h,1.11,1.12 decoder.h,1.6,1.7 frenderer.h,1.10,1.11 player.cpp,1.41,1.42 blitter.cpp,1.8,NONE blitter.h,1.8,NONE

Max Horn fingolfin at users.sourceforge.net
Wed Mar 12 16:41:10 CET 2003


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

Modified Files:
	codec1.cpp codec1.h codec37.cpp codec37.h codec44.cpp 
	codec44.h codec47.cpp codec47.h decoder.h frenderer.h 
	player.cpp 
Removed Files:
	blitter.cpp blitter.h 
Log Message:
removed Blitter class

Index: codec1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec1.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- codec1.cpp	6 Mar 2003 21:46:38 -0000	1.6
+++ codec1.cpp	13 Mar 2003 00:37:02 -0000	1.7
@@ -22,12 +22,11 @@
 #include <stdafx.h>
 #include "codec1.h"
 #include "chunk.h"
-#include "blitter.h"
 
 Codec1Decoder::~Codec1Decoder() {
 }
 
-bool Codec1Decoder::decode(Blitter &dst, Chunk &src) {
+bool Codec1Decoder::decode(byte *dst, Chunk &src) {
 	byte val;
 	int32 size_line;
 	int32 code, length;
@@ -40,18 +39,17 @@
 #endif
 		while(size_line > 0) {
 			code = src.getByte();
-			size_line --;
+			size_line--;
 			length = (code >> 1) + 1;
 #ifdef DEBUG_CODEC1
 			debug(7, "codec1 : length == %d", length);
 #endif
 			if(code & 1) {
 				val = src.getByte();
-				size_line --;
-				if(val)
-					dst.put(val, length);
-				else
-					dst.advance(length);
+				size_line--;
+				if (val)
+					memset(dst, val, length);
+				dst += length;
 #ifdef DEBUG_CODEC1
 			debug(7, "codec1 : blitting %d times %d", length, val);
 #endif
@@ -62,9 +60,9 @@
 #endif
 				while(length--) {
 					val = src.getByte();
-					if(val)
-						dst.put(val);
-					else dst.advance();
+					if (val)
+						*dst = val;
+					dst++;
 				}
 			}
 		}

Index: codec1.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec1.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- codec1.h	6 Mar 2003 21:46:38 -0000	1.4
+++ codec1.h	13 Mar 2003 00:37:02 -0000	1.5
@@ -42,7 +42,7 @@
 class Codec1Decoder : public Decoder {
 public:
 	virtual ~Codec1Decoder();
-	bool decode(Blitter &, Chunk &);
+	bool decode(byte *dst, Chunk &);
 };
 
 #endif

Index: codec37.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec37.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- codec37.cpp	6 Mar 2003 21:46:39 -0000	1.15
+++ codec37.cpp	13 Mar 2003 00:37:02 -0000	1.16
@@ -22,7 +22,6 @@
 #include <stdafx.h>
 #include "codec37.h"
 #include "chunk.h"
-#include "blitter.h"
 
 #include "common/engine.h"
 
@@ -474,7 +473,7 @@
 	} while (--bh);
 }
 
-bool Codec37Decoder::decode(Blitter & dst, Chunk & src) {
+bool Codec37Decoder::decode(byte *dst, Chunk & src) {
 	int32 width = getRect().width();
 	int32 height = getRect().height();
 	int32 bw = (width + 3) >> 2, bh = (height + 3) >> 2;
@@ -549,7 +548,7 @@
 	}
 	_prevSeqNb = seq_nb;
 
-	dst.blit(_deltaBufs[_curtable], width * height);
+	memcpy(dst, _deltaBufs[_curtable], width * height);
 	
 	free(chunk_buffer);
 	return true;

Index: codec37.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec37.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- codec37.h	6 Mar 2003 21:46:40 -0000	1.8
+++ codec37.h	13 Mar 2003 00:37:02 -0000	1.9
@@ -48,7 +48,7 @@
 	void proc4WithFDFE(byte *, byte *, int32, int32, int32, int32, int16 *);
 	void proc4WithoutFDFE(byte *, byte *, int32, int32, int32, int32, int16 *);
 public:
-	bool decode(Blitter &, Chunk &);
+	bool decode(byte *dst, Chunk &);
 };
 
 #endif

Index: codec44.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec44.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- codec44.cpp	6 Mar 2003 21:46:40 -0000	1.7
+++ codec44.cpp	13 Mar 2003 00:37:02 -0000	1.8
@@ -22,9 +22,8 @@
 #include <stdafx.h>
 #include "codec44.h"
 #include "chunk.h"
-#include "blitter.h"
 
-bool Codec44Decoder::decode(Blitter & dst, Chunk & src) {
+bool Codec44Decoder::decode(byte *dst, Chunk & src) {
 	int32 size_line, num;
 	int32 length = src.getSize() - 14;
 	int32 width = getRect().width();
@@ -61,7 +60,7 @@
 
 	} while (length > 1);
 
-	dst.blit(_buffer, width * height);
+	memcpy(dst, _buffer, width * height);
 
 	free(org_src2);
 

Index: codec44.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec44.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- codec44.h	6 Mar 2003 21:46:40 -0000	1.6
+++ codec44.h	13 Mar 2003 00:37:02 -0000	1.7
@@ -28,7 +28,7 @@
 	byte _buffer[1000];
 
 public:
-	bool decode(Blitter &dst, Chunk &src);
+	bool decode(byte *dst, Chunk &src);
 };
 
 #endif

Index: codec47.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec47.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- codec47.cpp	6 Mar 2003 21:46:40 -0000	1.41
+++ codec47.cpp	13 Mar 2003 00:37:02 -0000	1.42
@@ -24,7 +24,6 @@
 #include "engine.h"
 #include "codec47.h"
 #include "chunk.h"
-#include "blitter.h"
 
 static int32 codec37_table[] = {
        0,       1,       2,       3,       3,       3,
@@ -664,7 +663,7 @@
 	clean();
 }
 
-bool Codec47Decoder::decode(Blitter &dst, Chunk &src) {
+bool Codec47Decoder::decode(byte *dst, Chunk &src) {
 	int32 width = getRect().width();
 	int32 height = getRect().height();
 	_offset1 = _deltaBufs[1] - _curBuf;
@@ -713,7 +712,7 @@
 		break;
 	}
 
-	dst.blit(_curBuf, width * height);
+	memcpy(dst, _curBuf, width * height);
 
 	if (seq_nb == _prevSeqNb + 1) {
 		if (chunk_buffer[3] == 1) {

Index: codec47.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec47.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- codec47.h	6 Mar 2003 21:46:42 -0000	1.11
+++ codec47.h	13 Mar 2003 00:37:03 -0000	1.12
@@ -54,7 +54,7 @@
 	virtual ~Codec47Decoder();
 	bool initSize(const Point &, const Rect &);
 	void clean();
-	bool decode(Blitter &, Chunk &);
+	bool decode(byte *dst, Chunk &);
 };
 
 #endif

Index: decoder.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/decoder.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- decoder.h	6 Mar 2003 21:46:43 -0000	1.6
+++ decoder.h	13 Mar 2003 00:37:03 -0000	1.7
@@ -47,7 +47,7 @@
 	Decoder() {};
 	virtual ~Decoder() {};
 	virtual bool initSize(const Point &p, const Rect &r) { _p = p; _r = r; return true; };
-	virtual bool decode(Blitter &, Chunk &) = 0;
+	virtual bool decode(byte *dst, Chunk &src) = 0;
 };
 
 #endif

Index: frenderer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/frenderer.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- frenderer.h	6 Mar 2003 21:46:43 -0000	1.10
+++ frenderer.h	13 Mar 2003 00:37:03 -0000	1.11
@@ -36,7 +36,6 @@
 
 #include "brenderer.h"
 #include "common/util.h"
-#include "blitter.h"
 
 /*!	@brief ::renderer implementation specifically designed for font files.
 

Index: player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/player.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- player.cpp	7 Mar 2003 06:41:44 -0000	1.41
+++ player.cpp	13 Mar 2003 00:37:03 -0000	1.42
@@ -33,7 +33,6 @@
 #include "frenderer.h"
 #include "channel.h"
 #include "chunk_type.h"
-#include "blitter.h"
 
 #include <assert.h>
 #include <stdlib.h>
@@ -608,8 +607,7 @@
 
 void SmushPlayer::decodeCodec(Chunk &b, const Rect &r, Decoder &codec) {
 	assert(_curBuffer);
-	Blitter blit((byte *)_curBuffer, _frameSize, r);
-	codec.decode(blit, b);
+	codec.decode((byte *)_curBuffer, b);
 	if (_storeFrame == true) {
 		if (_frameBuffer == NULL) {
 			_frameBuffer = (byte *)malloc(_frameSize.getX() * _frameSize.getY());
@@ -648,7 +646,7 @@
 	_alreadyInit = true;
 }
 
-void SmushPlayer::handleFrameObject(Chunk & b) {
+void SmushPlayer::handleFrameObject(Chunk &b) {
 	checkBlock(b, TYPE_FOBJ, 14);
 	if(_skipNext) {
 		_skipNext = false;

--- blitter.cpp DELETED ---

--- blitter.h DELETED ---





More information about the Scummvm-git-logs mailing list