[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.422,2.423 gfx.h,1.111,1.112 script_v100he.cpp,2.98,2.99 script_v90he.cpp,2.193,2.194 wiz_he.cpp,2.23,2.24 wiz_he.h,2.10,2.11
kirben
kirben at users.sourceforge.net
Fri Mar 25 22:01:31 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.168,1.169 gfx.cpp,2.421,2.422 gfx.h,1.110,1.111 script_v2.cpp,2.266,2.267
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/wince wince-sdl.cpp,1.18.2.7,1.18.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7712/scumm
Modified Files:
gfx.cpp gfx.h script_v100he.cpp script_v90he.cpp wiz_he.cpp
wiz_he.h
Log Message:
Rename WizParameters field.
Correct start strip in drawBMAPBg()
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.422
retrieving revision 2.423
diff -u -d -r2.422 -r2.423
--- gfx.cpp 26 Mar 2005 03:49:06 -0000 2.422
+++ gfx.cpp 26 Mar 2005 06:00:57 -0000 2.423
@@ -785,7 +785,7 @@
if (findResource(MKID('BMAP'), room) != NULL) {
if (_fullRedraw) {
_bgNeedsRedraw = false;
- gdi.drawBMAPBg(room, &virtscr[0], _screenStartStrip);
+ gdi.drawBMAPBg(room, &virtscr[0]);
}
} else if (findResource(MKID('SMAP'), room) == NULL) {
warning("redrawBGAreas(): Both SMAP and BMAP are missing...");
@@ -1538,18 +1538,17 @@
* @note This function essentially is a stripped down & special cased version of
* the generic Gdi::drawBitmap() method.
*/
-void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs, int startstrip) {
- assert(ptr);
- const byte *bmap_ptr;
- byte code;
+void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) {
const byte *z_plane_ptr;
byte *mask_ptr;
const byte *zplane_list[9];
- bmap_ptr = _vm->findResourceData(MKID('BMAP'), ptr);
+ const byte *bmap_ptr = _vm->findResourceData(MKID('BMAP'), ptr);
assert(bmap_ptr);
- code = *bmap_ptr++;
+ byte code = *bmap_ptr++;
+ int scrX = _vm->_screenStartStrip * 8;
+ byte *dst = (byte *)_vm->virtscr[0].backBuf + scrX;
// The following few lines more or less duplicate decompressBitmap(), only
// for an area spanning multiple strips. In particular, the codecs 13 & 14
@@ -1560,13 +1559,13 @@
switch (code) {
case 13:
- drawStripHE((byte *)vs->backBuf, vs->pitch, bmap_ptr, vs->w, vs->h, false);
+ drawStripHE(dst, vs->pitch, bmap_ptr, vs->w, vs->h, false);
break;
case 14:
- drawStripHE((byte *)vs->backBuf, vs->pitch, bmap_ptr, vs->w, vs->h, true);
+ drawStripHE(dst, vs->pitch, bmap_ptr, vs->w, vs->h, true);
break;
case 15:
- fill((byte *)vs->backBuf, vs->pitch, *bmap_ptr, vs->w, vs->h);
+ fill(dst, vs->pitch, *bmap_ptr, vs->w, vs->h);
break;
default:
// Alternayive russian freddi3 uses badly formatted bitmaps
@@ -1612,6 +1611,7 @@
Common::Rect rect2(scrX, 0, vs->w + scrX, vs->h);
if (rect1.intersects(rect2)) {
+ rect1.clip(rect2);
rect1.left -= rect2.left;
rect1.right -= rect2.left;
rect1.top -= rect2.top;
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- gfx.h 26 Mar 2005 03:49:06 -0000 1.111
+++ gfx.h 26 Mar 2005 06:00:58 -0000 1.112
@@ -292,7 +292,7 @@
void decodeNESGfx(const byte *room);
void decodeNESObject(const byte *ptr, int xpos, int ypos, int width, int height);
- void drawBMAPBg(const byte *ptr, VirtScreen *vs, int startstrip);
+ void drawBMAPBg(const byte *ptr, VirtScreen *vs);
void drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h);
void copyVirtScreenBuffers(Common::Rect rect);
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.98
retrieving revision 2.99
diff -u -d -r2.98 -r2.99
--- script_v100he.cpp 24 Mar 2005 03:58:59 -0000 2.98
+++ script_v100he.cpp 26 Mar 2005 06:00:58 -0000 2.99
@@ -1193,7 +1193,7 @@
_wizParams.unk_178 = pop();
break;
case 11:
- _wizParams.processFlags |= 0x300;
+ _wizParams.processFlags |= kWPFClipBox | 0x100;
_wizParams.processMode = 2;
_wizParams.box.bottom = pop();
_wizParams.box.right = pop();
@@ -1267,7 +1267,7 @@
_wizParams.unk_174 = pop();
break;
case 58:
- _wizParams.processFlags |= 0x1102;
+ _wizParams.processFlags |= 0x1000 | 0x100 | 0x2;
_wizParams.processMode = 7;
_wizParams.unk_164 = pop();
_wizParams.unk_160 = pop();
@@ -1277,7 +1277,7 @@
_wizParams.processFlags |= kWPFUseFile;
_wizParams.processMode = 4;
copyScriptString(_wizParams.filename);
- _wizParams.unk_14C = pop();
+ _wizParams.fileWriteMode = pop();
break;
case 65:
_wizParams.processFlags |= kWPFZoom;
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.193
retrieving revision 2.194
diff -u -d -r2.193 -r2.194
--- script_v90he.cpp 24 Mar 2005 03:59:00 -0000 2.193
+++ script_v90he.cpp 26 Mar 2005 06:00:58 -0000 2.194
@@ -546,10 +546,10 @@
_wizParams.processFlags |= kWPFUseFile;
_wizParams.processMode = 4;
copyScriptString(_wizParams.filename);
- _wizParams.unk_14C = pop();
+ _wizParams.fileWriteMode = pop();
break;
case 5:
- _wizParams.processFlags |= 0x300;
+ _wizParams.processFlags |= kWPFClipBox | 0x100;
_wizParams.processMode = 2;
_wizParams.box.bottom = pop();
_wizParams.box.right = pop();
@@ -628,7 +628,7 @@
_wizParams.unk_15C = pop();
break;
case 85: // HE99+
- _wizParams.processFlags |= 0x1102;
+ _wizParams.processFlags |= 0x1000 | 0x100 | 0x2;
_wizParams.processMode = 7;
_wizParams.unk_164 = pop();
_wizParams.unk_160 = pop();
Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.23
retrieving revision 2.24
diff -u -d -r2.23 -r2.24
--- wiz_he.cpp 24 Mar 2005 04:15:01 -0000 2.23
+++ wiz_he.cpp 26 Mar 2005 06:00:58 -0000 2.24
@@ -1388,11 +1388,14 @@
if (params->processFlags & kWPFUseFile) {
File f;
if (!f.open((const char *)params->filename, File::kFileReadMode)) {
+ VAR(VAR_GAME_LOADED) = -3;
+ VAR(119) = -3;
warning("Unable to open for read '%s'", params->filename);
} else {
uint32 id = f.readUint32BE();
if (id != MKID('AWIZ') && id != MKID('MULT')) {
VAR(VAR_GAME_LOADED) = -1;
+ VAR(119) = -1;
} else {
uint32 size = f.readUint32BE();
f.seek(0, SEEK_SET);
@@ -1401,8 +1404,10 @@
nukeResource(rtImage, params->img.resNum);
warning("i/o error when reading '%s'", params->filename);
VAR(VAR_GAME_LOADED) = -2;
+ VAR(119) = -2;
} else {
VAR(VAR_GAME_LOADED) = 0;
+ VAR(119) = 0;
}
}
f.close();
@@ -1411,10 +1416,16 @@
break;
case 4:
if (params->processFlags & kWPFUseFile) {
- if (params->unk_14C != 0) {
+ File f;
+
+ switch(params->fileWriteMode) {
+ case 2:
VAR(119) = -1;
- } else {
- File f;
+ break;
+ case 1:
+ // TODO Write image to file
+ break;
+ case 0:
if (!f.open((const char *)params->filename, File::kFileWriteMode)) {
warning("Unable to open for write '%s'", params->filename);
VAR(119) = -3;
@@ -1429,6 +1440,9 @@
}
f.close();
}
+ break;
+ default:
+ error("processWizImage: processMode 4 unhandled fileWriteMode %d", params->fileWriteMode);
}
}
break;
Index: wiz_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.h,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -d -r2.10 -r2.11
--- wiz_he.h 23 Mar 2005 21:55:07 -0000 2.10
+++ wiz_he.h 26 Mar 2005 06:00:58 -0000 2.11
@@ -58,7 +58,7 @@
int unk_134;
int unk_138;
int compType;
- int unk_14C;
+ int fileWriteMode;
int angle;
int zoom;
int unk_15C;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.168,1.169 gfx.cpp,2.421,2.422 gfx.h,1.110,1.111 script_v2.cpp,2.266,2.267
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/wince wince-sdl.cpp,1.18.2.7,1.18.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list