[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.374,2.375 script_v90he.cpp,2.167,2.168 wiz_he.cpp,2.10,2.11 wiz_he.h,2.6,2.7
Gregory Montoir
cyx at users.sourceforge.net
Sat Feb 26 18:57:56 CET 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27842/scummvm/scumm
Modified Files:
intern.h script_v90he.cpp wiz_he.cpp wiz_he.h
Log Message:
added processWizImage mode 8 ; this breaks footdemo, feel free to disable
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.374
retrieving revision 2.375
diff -u -d -r2.374 -r2.375
--- intern.h 27 Feb 2005 02:29:54 -0000 2.374
+++ intern.h 27 Feb 2005 02:55:13 -0000 2.375
@@ -878,6 +878,7 @@
void drawWizComplexPolygon(int resnum, int state, int po_x, int po_y, int arg14, int angle, int zoom, const Common::Rect *r);
void displayWizComplexImage(const WizParameters *params);
+ void createWizEmptyImage(const WizParameters *params);
void processWizImage(const WizParameters *params);
int getWizImageStates(int resnum);
int isWizPixelNonTransparent(int restype, int resnum, int state, int x, int y, int flags);
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.167
retrieving revision 2.168
diff -u -d -r2.167 -r2.168
--- script_v90he.cpp 27 Feb 2005 02:29:54 -0000 2.167
+++ script_v90he.cpp 27 Feb 2005 02:55:13 -0000 2.168
@@ -480,11 +480,11 @@
switch (subOp) {
case -14: // HE99+
- _wizParams.processFlags |= 0x2000;
+ _wizParams.processFlags |= kWPFUseDefImgWidth;
pop();
break;
case -13: // HE99+
- _wizParams.processFlags |= 0x4000;
+ _wizParams.processFlags |= kWPFUseDefImgHeight;
pop();
break;
case 0:
Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -d -r2.10 -r2.11
--- wiz_he.cpp 27 Feb 2005 00:49:09 -0000 2.10
+++ wiz_he.cpp 27 Feb 2005 02:55:13 -0000 2.11
@@ -1247,6 +1247,69 @@
}
}
+void ScummEngine_v90he::createWizEmptyImage(const WizParameters *params) {
+ int img_w = 640;
+ if (params->processFlags & kWPFUseDefImgWidth) {
+ img_w = params->resDefImgW;
+ }
+ int img_h = 480;
+ if (params->processFlags & kWPFUseDefImgHeight) {
+ img_h = params->resDefImgH;
+ }
+ int img_x = 0;
+ int img_y = 0;
+ if (params->processFlags & 1) {
+ img_x = params->img.x1;
+ img_y = params->img.y1;
+ }
+ const uint16 flags = 0xB;
+ int res_size = 0x1C;
+ if (flags & 1) {
+ res_size += 0x308;
+ }
+ if (flags & 2) {
+ res_size += 0x10;
+ }
+ if (flags & 8) {
+ res_size += 0x10C;
+ }
+ res_size += 8 + img_w * img_h;
+ uint8 *res_data = createResource(rtImage, params->img.resNum, res_size);
+ if (!res_data) {
+ VAR(119) = -1;
+ } else {
+ VAR(119) = 0;
+ WRITE_BE_UINT32(res_data, 'AWIZ'); res_data += 4;
+ WRITE_BE_UINT32(res_data, res_size); res_data += 4;
+ WRITE_BE_UINT32(res_data, 'WIZH'); res_data += 4;
+ WRITE_BE_UINT32(res_data, 0x14); res_data += 4;
+ WRITE_BE_UINT32(res_data, 0); res_data += 4;
+ WRITE_BE_UINT32(res_data, img_w); res_data += 4;
+ WRITE_BE_UINT32(res_data, img_h); res_data += 4;
+ if (flags & 1) {
+ WRITE_BE_UINT32(res_data, 'RGBS'); res_data += 4;
+ WRITE_BE_UINT32(res_data, 0x308); res_data += 4;
+ memcpy(res_data, _currentPalette, 0x300); res_data += 0x300;
+ }
+ if (flags & 2) {
+ WRITE_BE_UINT32(res_data, 'SPOT'); res_data += 4;
+ WRITE_BE_UINT32(res_data, 0x10); res_data += 4;
+ WRITE_BE_UINT32(res_data, img_x); res_data += 4;
+ WRITE_BE_UINT32(res_data, img_y); res_data += 4;
+ }
+ if (flags & 8) {
+ WRITE_BE_UINT32(res_data, 'RMAP'); res_data += 4;
+ WRITE_BE_UINT32(res_data, 0x10C); res_data += 4;
+ WRITE_BE_UINT32(res_data, 0); res_data += 4;
+ for (int i = 0; i < 0x100; ++i) {
+ *res_data++ = i;
+ }
+ }
+ WRITE_BE_UINT32(res_data, 'WIZD'); res_data += 4;
+ WRITE_BE_UINT32(res_data, img_w * img_h); res_data += 4;
+ }
+}
+
void ScummEngine_v90he::processWizImage(const WizParameters *params) {
debug(1, "processWizImage: processMode %d", params->processMode);
switch (params->processMode) {
@@ -1304,10 +1367,12 @@
}
}
break;
+ case 8:
+ createWizEmptyImage(params);
+ break;
case 6:
// HE 99+
case 7:
- case 8:
case 9:
case 10:
case 11:
Index: wiz_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.h,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -d -r2.6 -r2.7
--- wiz_he.h 25 Feb 2005 11:45:25 -0000 2.6
+++ wiz_he.h 27 Feb 2005 02:55:13 -0000 2.7
@@ -64,8 +64,8 @@
int unk_15C;
int unk_160;
int unk_164;
- int unk_16C;
- int unk_170;
+ int resDefImgW;
+ int resDefImgH;
int unk_174;
int unk_178;
uint8 remapColor[256];
@@ -91,7 +91,9 @@
kWPFNewFlags = 0x20,
kWPFClipBox = 0x200,
kWPFNewState = 0x400,
- kWPFUseFile = 0x800
+ kWPFUseFile = 0x800,
+ kWPFUseDefImgWidth = 0x2000,
+ kWPFUseDefImgHeight = 0x4000
};
struct Wiz {
More information about the Scummvm-git-logs
mailing list