[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6he.cpp,2.153,2.154 script_v7he.cpp,2.146,2.147 script_v80he.cpp,2.94,2.95 wiz_he.cpp,2.57,2.58
kirben
kirben at users.sourceforge.net
Sat Apr 16 04:02:11 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26266/scumm
Modified Files:
script_v6he.cpp script_v7he.cpp script_v80he.cpp wiz_he.cpp
Log Message:
Error on all unknown compression types.
Remove some unused cases.
Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.153
retrieving revision 2.154
diff -u -d -r2.153 -r2.154
--- script_v6he.cpp 16 Apr 2005 10:42:19 -0000 2.153
+++ script_v6he.cpp 16 Apr 2005 11:01:30 -0000 2.154
@@ -509,14 +509,6 @@
setupShadowPalette(a, b, c, d, e, 0, 256);
break;
- case 184: // SO_SAVE_STRING
- error("save string not implemented");
- break;
-
- case 185: // SO_LOAD_STRING
- error("load string not implemented");
- break;
-
case 186: // SO_ROOM_TRANSFORM
d = pop();
c = pop();
@@ -1290,9 +1282,6 @@
_string[m].overhead = true;
_string[m].no_talk_anim = false;
break;
- case 73: // SO_SAY_VOICE
- error("decodeParseString: case 73");
- break;
case 74: // SO_MUMBLE
_string[m].no_talk_anim = true;
break;
Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.146
retrieving revision 2.147
diff -u -d -r2.146 -r2.147
--- script_v7he.cpp 16 Apr 2005 10:26:49 -0000 2.146
+++ script_v7he.cpp 16 Apr 2005 11:01:30 -0000 2.147
@@ -379,8 +379,7 @@
int charset = _string[0]._default.charset;
byte *ptr = getResourceAddress(rtCharset, charset);
- if (ptr == 0)
- error("getStringCharWidth::charset %d not found!", charset);
+ assert(ptr);
ptr += 29;
int spacing = 0;
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.94
retrieving revision 2.95
diff -u -d -r2.94 -r2.95
--- script_v80he.cpp 16 Apr 2005 05:36:01 -0000 2.94
+++ script_v80he.cpp 16 Apr 2005 11:01:31 -0000 2.95
@@ -547,9 +547,6 @@
case 0x97: // SO_USERPUT_SOFT_OFF
_userPut--;
break;
- case 0x99: // SO_CURSOR_IMAGE Set cursor image
- warning("o80_cursorCommand: Can't set cursors to ID. Use images.");
- break;
case 0x9C: // SO_CHARSET_SET
initCharset(pop());
break;
Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.57
retrieving revision 2.58
diff -u -d -r2.57 -r2.58
--- wiz_he.cpp 16 Apr 2005 06:16:22 -0000 2.57
+++ wiz_he.cpp 16 Apr 2005 11:01:31 -0000 2.58
@@ -646,7 +646,7 @@
struct wizPackCtx {
uint32 len;
uint8 saveCode;
- uint8 saveBuf[0x100];
+ uint8 saveBuf[256];
};
static void wizPackType1Helper1(uint8 *&dst, int len, byte newColor, byte prevColor, wizPackCtx *ctx) {
@@ -846,8 +846,7 @@
dataSize = wizPackType0(0, src, pvs->pitch, rCapt, tColor);
break;
default:
- warning("unhandled compression type %d", compType);
- break;
+ error("unhandled compression type %d", compType);
}
// alignment
@@ -1004,28 +1003,29 @@
}
}
- // XXX handle 'XMAP' / 'RMAP' data
+ // XXX handle 'XMAP' data
if (xmap) {
palPtr = xmap;
}
if (flags & kWIFRemapPalette) {
palPtr = rmap + 4;
}
+
if (comp == 1) {
// TODO Adding masking for flags 0x80 and 0x100
if (flags & 0x80) {
- warning("drawWizImage() unhandled flag 0x80");
- } else if (flags & 0x100) {
- error("drawWizImage() unhandled flag 0x100");
- } else {
- _wiz.copyWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, palPtr);
+ warning("drawWizImage: Unhandled flag 0x80");
}
+ if (flags & 0x100) {
+ error("drawWizImage: Unhandled flag 0x100");
+ }
+ _wiz.copyWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, palPtr);
} else if (comp == 0 || comp == 2 || comp == 3) {
uint8 *trns = findWrappedBlock(MKID('TRNS'), dataPtr, state, 0);
int color = (trns == NULL) ? VAR(VAR_WIZ_TCOLOR) : -1;
_wiz.copyRawWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, color);
} else {
- warning("unhandled wiz compression type %d", comp);
+ error("drawWizImage: Unhandled wiz compression type %d", comp);
}
if (!(flags & kWIFBlitToMemBuffer) && dstResNum == 0) {
@@ -1481,7 +1481,7 @@
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) {
+ for (int i = 0; i < 256; ++i) {
*res_data++ = i;
}
}
@@ -1811,16 +1811,16 @@
Common::Rect rCap(x, y, w + 1, h + 1);
if (rCap.intersects(rWiz)) {
rCap.clip(rWiz);
- uint32 histogram[0x100];
+ uint32 histogram[256];
memset(histogram, 0, sizeof(histogram));
if (ic == 1) {
_wiz.computeWizHistogram(histogram, wizd, &rCap);
} else if (ic == 0 || ic == 2 || ic == 3) {
_wiz.computeRawWizHistogram(histogram, wizd, w, &rCap);
} else {
- warning("Unable to return histogram for type %d", ic);
+ error("computeWizHistogram: Unable to return histogram for type %d", ic);
}
- for (int i = 0; i < 0x100; ++i) {
+ for (int i = 0; i < 256; ++i) {
writeArray(0, 0, i, histogram[i]);
}
}
More information about the Scummvm-git-logs
mailing list