[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.8,2.9 nut_renderer.h,1.2,1.3 nut_renderer.cpp,1.8,1.9

Max Horn fingolfin at users.sourceforge.net
Mon Dec 30 05:56:06 CET 2002


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

Modified Files:
	charset.cpp nut_renderer.h nut_renderer.cpp 
Log Message:
removed more dead weight

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.8
retrieving revision 2.9
diff -u -d -r2.8 -r2.9
--- charset.cpp	27 Dec 2002 15:41:43 -0000	2.8
+++ charset.cpp	30 Dec 2002 13:55:36 -0000	2.9
@@ -403,8 +403,6 @@
 			delete _fr[i];
 			_fr[i] = NULL;
 		}
-	
-		_fr[i]->bindDisplay(_vm->virtscr[0].screenPtr, _vm->_realWidth, _vm->_realHeight, _vm->_realWidth);
 	}
 }
 

Index: nut_renderer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- nut_renderer.h	25 Dec 2002 20:07:09 -0000	1.2
+++ nut_renderer.h	30 Dec 2002 13:55:36 -0000	1.3
@@ -31,10 +31,8 @@
 	int32 _offsets[256];
 	byte _tmpCodecBuffer[2000];
 	byte *_dataSrc;
-	byte *_dstPtr;
 	bool _initialized;
 	bool _loaded;
-	int32 _dstWidth, _dstHeight, _dstPitch;
 
 	void decodeCodec44(byte *dst, byte *src, uint32 length);
 
@@ -42,7 +40,6 @@
 	NutRenderer(Scumm *vm);
 	~NutRenderer();
 
-	void bindDisplay(byte *dst, int32 width, int32 height, int32 pitch);
 	bool loadFont(const char *filename, const char *dir);
 	void drawChar(char c, int32 x, int32 y, byte color);
 	void drawString(const char *string, int32 x, int32 y, byte color, int32 mode);

Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- nut_renderer.cpp	30 Dec 2002 13:52:16 -0000	1.8
+++ nut_renderer.cpp	30 Dec 2002 13:55:36 -0000	1.9
@@ -67,20 +67,6 @@
 	} while (length > 1);
 }
 
-void NutRenderer::bindDisplay(byte *dst, int32 width, int32 height, int32 pitch) {
-	debug(2,  "NutRenderer::init() called");
-	if (_initialized == true) {
-		debug(2, "NutRenderer::init() Already initialized, ok, changing...");
-	}
-
-	_dstPtr = dst;
-	_dstWidth = width;
-	_dstHeight = height;
-	_dstPitch = pitch;
-
-	_initialized = true;
-}
-
 bool NutRenderer::loadFont(const char *filename, const char *dir) {
 	debug(2,  "NutRenderer::loadFont() called");
 	if (_loaded == true) {
@@ -188,7 +174,7 @@
 	int left = x;
 	int height = 0, tmp;
 	do {
-		if ((x < 0) || (y < 0) || (x > _dstWidth) || (y > _dstHeight)) {
+		if ((x < 0) || (y < 0) || (x > _vm->_realWidth) || (y > _vm->_realHeight)) {
 			debug(2, "NutRenderer::drawString() position x, y out of range");
 			return;
 		}
@@ -212,7 +198,7 @@
 	}
 
 	byte * src = (byte*)(_dataSrc + _offsets[c] + 14);
-	byte * dst = _dstPtr + y * _dstPitch + x;
+	byte * dst = _vm->virtscr[0].screenPtr + y * _vm->_realWidth + x;
 	uint32 length = READ_BE_UINT32(_dataSrc + _offsets[c] - 4) - 14;
 
 	decodeCodec44(_tmpCodecBuffer, src, length);
@@ -232,6 +218,6 @@
 				dst[tx] = pixel;
 			}
 		}
-		dst += _dstPitch;
+		dst += _vm->_realWidth;
 	}
 }





More information about the Scummvm-git-logs mailing list