aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-04-16 11:01:31 +0000
committerTravis Howell2005-04-16 11:01:31 +0000
commit58298999f349831f18a3a4d33dac97215cffa334 (patch)
treec8ddfd51d1740dd158d579741d6fb1ec6df02e53
parent6e903f684ac6c5a2e7f4e54e1c3336a089f6c5b9 (diff)
downloadscummvm-rg350-58298999f349831f18a3a4d33dac97215cffa334.tar.gz
scummvm-rg350-58298999f349831f18a3a4d33dac97215cffa334.tar.bz2
scummvm-rg350-58298999f349831f18a3a4d33dac97215cffa334.zip
Error on all unknown compression types.
Remove some unused cases. svn-id: r17617
-rw-r--r--scumm/script_v6he.cpp11
-rw-r--r--scumm/script_v7he.cpp3
-rw-r--r--scumm/script_v80he.cpp3
-rw-r--r--scumm/wiz_he.cpp28
4 files changed, 15 insertions, 30 deletions
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index eeff736806..ab3f45d962 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -509,14 +509,6 @@ void ScummEngine_v60he::o60_roomOps() {
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 @@ void ScummEngine_v60he::decodeParseString(int m, int n) {
_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;
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp
index 7fa5154312..e9c99cd5ba 100644
--- a/scumm/script_v7he.cpp
+++ b/scumm/script_v7he.cpp
@@ -379,8 +379,7 @@ int ScummEngine_v70he::getStringCharWidth(byte chr) {
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;
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 6156abf947..9a3755bbb4 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -547,9 +547,6 @@ void ScummEngine_v80he::o80_cursorCommand() {
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;
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp
index 23bf7c04cc..6074bbcb77 100644
--- a/scumm/wiz_he.cpp
+++ b/scumm/wiz_he.cpp
@@ -646,7 +646,7 @@ void Wiz::computeRawWizHistogram(uint32 *histogram, const uint8 *data, int srcPi
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 @@ void ScummEngine_v72he::captureWizImage(int resNum, const Common::Rect& r, bool
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 @@ uint8 *ScummEngine_v72he::drawWizImage(int resNum, int state, int x1, int y1, in
}
}
- // 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 @@ void ScummEngine_v90he::createWizEmptyImage(const WizParameters *params) {
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 @@ int ScummEngine_v90he::computeWizHistogram(int resNum, int state, int x, int y,
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]);
}
}