[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.372,2.373 intern.h,2.309,2.310 script_v6he.cpp,2.134,2.135 script_v72he.cpp,2.176,2.177 script_v90he.cpp,2.99,2.100

Gregory Montoir cyx at users.sourceforge.net
Sat Oct 16 22:05:00 CEST 2004


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

Modified Files:
	gfx.cpp intern.h script_v6he.cpp script_v72he.cpp 
	script_v90he.cpp 
Log Message:
cleanup: moved some things to gfx.cpp and changed o60_setState to match disassembly of version 72

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.372
retrieving revision 2.373
diff -u -d -r2.372 -r2.373
--- gfx.cpp	17 Oct 2004 04:35:36 -0000	2.372
+++ gfx.cpp	17 Oct 2004 05:04:49 -0000	2.373
@@ -23,6 +23,7 @@
 #include "scumm/scumm.h"
 #include "scumm/actor.h"
 #include "scumm/charset.h"
+#include "scumm/intern.h"
 #include "scumm/resource.h"
 #include "scumm/usage_bits.h"
 
@@ -585,32 +586,11 @@
 	int i;
 	int diff;
 	int val = 0;
-	bool cont = true;
 
 	if (!(_features & GF_NEW_CAMERA))
 		if (camera._cur.x != camera._last.x && _charset->_hasMask && (_version > 3 && _gameId != GID_PASS))
 			stopTalk();
 
-	if (_heversion >= 70) {
-		byte *room = getResourceAddress(rtRoomImage, _roomResource) + _IM00_offs;
-		if (findResource(MKID('BMAP'), room) != NULL) {
-			if (_fullRedraw) {
-				_bgNeedsRedraw = false;
-				gdi.drawBMAPBg(room, &virtscr[0], _screenStartStrip);
-			}
-			cont = false;
-		} else if (findResource(MKID('SMAP'), room) == NULL) {
-			warning("redrawBGAreas(): Both SMAP and BMAP are missing...");
-			cont = false;
-		}
-
-		if (!cont) {
-			drawRoomObjects(val);
-			_bgNeedsRedraw = false;
-			return;
-		}
-	}
-
 	// Redraw parts of the background which are marked as dirty.
 	if (!_fullRedraw && _bgNeedsRedraw) {
 		for (i = 0; i != gdi._numStrips; i++) {
@@ -650,6 +630,30 @@
 	_bgNeedsRedraw = false;
 }
 
+void ScummEngine_v70he::redrawBGAreas() {
+	int val = 0;
+	if (camera._cur.x != camera._last.x && _charset->_hasMask)
+		stopTalk();
+
+	byte *room = getResourceAddress(rtRoomImage, _roomResource) + _IM00_offs;
+	if (findResource(MKID('BMAP'), room) != NULL) {
+		if (_fullRedraw) {
+			_bgNeedsRedraw = false;
+			gdi.drawBMAPBg(room, &virtscr[0], _screenStartStrip);
+		}
+	} else if (findResource(MKID('SMAP'), room) == NULL) {
+		warning("redrawBGAreas(): Both SMAP and BMAP are missing...");
+	}
+
+	drawRoomObjects(val);
+	_bgNeedsRedraw = false;
+}
+
+void ScummEngine_v72he::redrawBGAreas() {
+	ScummEngine_v70he::redrawBGAreas();
+	flushWizBuffer();
+}
+
 void ScummEngine::redrawBGStrip(int start, int num) {
 	byte *room;
 

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.309
retrieving revision 2.310
diff -u -d -r2.309 -r2.310
--- intern.h	17 Oct 2004 04:35:36 -0000	2.309
+++ intern.h	17 Oct 2004 05:04:49 -0000	2.310
@@ -621,6 +621,8 @@
 	virtual void setupOpcodes();
 	virtual void executeOpcode(byte i);
 	virtual const char *getOpcodeDesc(byte i);
+	
+	virtual void redrawBGAreas();
 
 	void arrrays_unk2(int dst, int src, int len2, int len);
 

Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.134
retrieving revision 2.135
diff -u -d -r2.134 -r2.135
--- script_v6he.cpp	12 Oct 2004 14:40:32 -0000	2.134
+++ script_v6he.cpp	17 Oct 2004 05:04:49 -0000	2.135
@@ -405,11 +405,15 @@
 	int state = pop();
 	int obj = pop();
 
+	if (_heversion >= 72) {
+		putState(obj, state & 0x7FFF);
+		removeObjectFromDrawQue(obj);
+		return;
+	}
+
 	if (state & 0x8000) {
 		state &= 0x7FFF;
 		putState(obj, state);
-		if (_heversion >= 72)
-			removeObjectFromDrawQue(obj);
 		return;
 	}
 

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.176
retrieving revision 2.177
diff -u -d -r2.176 -r2.177
--- script_v72he.cpp	17 Oct 2004 04:35:36 -0000	2.176
+++ script_v72he.cpp	17 Oct 2004 05:04:49 -0000	2.177
@@ -2043,11 +2043,6 @@
 	}
 }
 
-void ScummEngine_v72he::redrawBGAreas() {
-	ScummEngine_v70he::redrawBGAreas();
-	flushWizBuffer();
-}
-
 void ScummEngine_v72he::flushWizBuffer() {
 	for (int i = 0; i < _wizImagesNum; ++i) {
 		WizImage *pwi = &_wizImages[i];

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.99
retrieving revision 2.100
diff -u -d -r2.99 -r2.100
--- script_v90he.cpp	17 Oct 2004 04:35:36 -0000	2.99
+++ script_v90he.cpp	17 Oct 2004 05:04:49 -0000	2.100
@@ -632,21 +632,6 @@
 		}
 		break;
 	case 6:
-		if (params->processFlags & 0x40) {
-			int state = (params->processFlags & 0x400) ? params->img.state : 0;
-			int num = params->remapNum;
-			const uint8 *index = params->remapIndex;
-			uint8 *iwiz = getResourceAddress(rtImage, params->img.resNum);
-			assert(iwiz);
-			uint8 *rmap = findWrappedBlock(MKID('RMAP'), iwiz, state, 0) ;
-			assert(rmap);
-			*(uint32 *)(rmap + 8) = TO_BE_32(0x12345678);
-			while (num--) {
-				uint8 idx = *index++;
-				rmap[0xC + idx] = params->remapColor[idx];
-			}
-		}
-		break;
 	// HE 99+
 	case 7:
 	case 8:





More information about the Scummvm-git-logs mailing list