[Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.172,2.173 wiz_he.cpp,2.95,2.96 wiz_he.h,2.29,2.30

kirben kirben at users.sourceforge.net
Sun Oct 16 02:53:56 CEST 2005


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

Modified Files:
	script_v100he.cpp wiz_he.cpp wiz_he.h 
Log Message:

Add missing function for getWizData.


Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.172
retrieving revision 2.173
diff -u -d -r2.172 -r2.173
--- script_v100he.cpp	31 Aug 2005 20:54:51 -0000	2.172
+++ script_v100he.cpp	16 Oct 2005 09:50:26 -0000	2.173
@@ -2404,7 +2404,7 @@
 
 void ScummEngine_v100he::o100_getWizData() {
 	byte filename[4096];
-	int state, resId;
+	int resId, state, type;
 	int32 w, h;
 	int16 x, y;
 
@@ -2437,11 +2437,10 @@
 		push(h);
 		break;
 	case 34:
-		pop();
-		pop();
-		pop();
-		push(0);
-		debug(0, "o100_getWizData() case 34 unhandled");
+		type = pop();
+		state = pop();
+		resId = pop();
+		push(_wiz->getWizImageData(resId, state, type));
 		break;
 	case 64:
 		state = pop();

Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.95
retrieving revision 2.96
diff -u -d -r2.95 -r2.96
--- wiz_he.cpp	24 Sep 2005 00:44:01 -0000	2.95
+++ wiz_he.cpp	16 Oct 2005 09:50:27 -0000	2.96
@@ -1884,6 +1884,30 @@
 	}
 }
 
+int Wiz::getWizImageData(int resNum, int state, int type) {
+	uint8 *dataPtr, *wizh;
+
+	dataPtr = _vm->getResourceAddress(rtImage, resNum);
+	assert(dataPtr);
+
+	switch (type) {
+	case 0:
+		wizh = _vm->findWrappedBlock(MKID('WIZH'), dataPtr, state, 0);
+		assert(wizh);
+		return READ_LE_UINT32(wizh + 0x0);
+	case 1:
+		return (_vm->findWrappedBlock(MKID('RGBS'), dataPtr, state, 0) != NULL) ? 1 : 0;
+	case 2:
+		return (_vm->findWrappedBlock(MKID('RMAP'), dataPtr, state, 0) != NULL) ? 1 : 0;
+	case 3:
+		return (_vm->findWrappedBlock(MKID('TRNS'), dataPtr, state, 0) != NULL) ? 1 : 0;
+	case 4:
+		return (_vm->findWrappedBlock(MKID('XMAP'), dataPtr, state, 0) != NULL) ? 1 : 0;
+	default:
+		error("getWizImageData: Unknown type %d", type);
+	}
+}
+
 int Wiz::getWizImageStates(int resNum) {
 	const uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum);
 	assert(dataPtr);

Index: wiz_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.h,v
retrieving revision 2.29
retrieving revision 2.30
diff -u -d -r2.29 -r2.30
--- wiz_he.h	31 Aug 2005 20:39:52 -0000	2.29
+++ wiz_he.h	16 Oct 2005 09:50:27 -0000	2.30
@@ -170,6 +170,7 @@
 	int getWizImageStates(int resnum);
 	int isWizPixelNonTransparent(int resnum, int state, int x, int y, int flags);
 	uint8 getWizPixelColor(int resnum, int state, int x, int y, int flags);
+	int getWizImageData(int resNum, int state, int type);
 
 	void flushWizBuffer();
 





More information about the Scummvm-git-logs mailing list