aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-05-08 10:26:11 +0000
committerTravis Howell2005-05-08 10:26:11 +0000
commit79514d4747eae69ae96ddfb3e5fbb1ff2fe9c787 (patch)
treee49c01ee022e08850c300402ac5e484b12731f69 /scumm
parentfb41dd8284c618460e3b633c38dfb7ab7f41139f (diff)
downloadscummvm-rg350-79514d4747eae69ae96ddfb3e5fbb1ff2fe9c787.tar.gz
scummvm-rg350-79514d4747eae69ae96ddfb3e5fbb1ff2fe9c787.tar.bz2
scummvm-rg350-79514d4747eae69ae96ddfb3e5fbb1ff2fe9c787.zip
Range checks off by 1.
svn-id: r17954
Diffstat (limited to 'scumm')
-rw-r--r--scumm/palette_he.cpp8
-rw-r--r--scumm/script_v90he.cpp4
-rw-r--r--scumm/wiz_he.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/scumm/palette_he.cpp b/scumm/palette_he.cpp
index aea7a17605..b681f6fe6e 100644
--- a/scumm/palette_he.cpp
+++ b/scumm/palette_he.cpp
@@ -80,8 +80,8 @@ uint8 *ScummEngine_v90he::getHEPaletteIndex(int palSlot) {
int ScummEngine_v90he::getHEPaletteSimilarColor(int palSlot, int red, int green, int start, int end) {
checkRange(_numPalettes, 1, palSlot, "Invalid palette %d");
- assert(start >= 1 && start <= 255);
- assert(end >= 1 && end <= 255);
+ checkRange(255, 0, start, "Invalid palette slot %d");
+ checkRange(255, 0, end, "Invalid palette slot %d");
uint8 *pal = _hePalettes + palSlot * 1024 + start * 3;
@@ -106,14 +106,14 @@ int ScummEngine_v90he::getHEPaletteSimilarColor(int palSlot, int red, int green,
int ScummEngine_v90he::getHEPaletteColorComponent(int palSlot, int color, int component) {
checkRange(_numPalettes, 1, palSlot, "Invalid palette %d");
- checkRange(255, 1, color, "Invalid palette slot %d");
+ checkRange(255, 0, color, "Invalid palette slot %d");
return _hePalettes[palSlot * 1024 + color * 3 + component % 3];
}
int ScummEngine_v90he::getHEPaletteColor(int palSlot, int color) {
checkRange(_numPalettes, 1, palSlot, "Invalid palette %d");
- checkRange(255, 1, color, "Invalid palette slot %d");
+ checkRange(255, 0, color, "Invalid palette slot %d");
return _hePalettes[palSlot * 1024 + 768 + color];
}
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 657fb6fd23..d79b3ef610 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -2398,7 +2398,7 @@ void ScummEngine_v90he::o90_getPaletteData() {
default:
error("o90_getPaletteData: Unknown case %d", subOp);
}
- debug(0,"o90_getPaletteData stub (%d)", subOp);
+ debug(1,"o90_getPaletteData stub (%d)", subOp);
}
void ScummEngine_v90he::o90_paletteOps() {
@@ -2470,7 +2470,7 @@ void ScummEngine_v90he::o90_paletteOps() {
default:
error("o90_paletteOps: Unknown case %d", subOp);
}
- debug(0,"o90_paletteOps (%d)", subOp);
+ debug(1,"o90_paletteOps (%d)", subOp);
}
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp
index fef7621ad0..d45fb512fe 100644
--- a/scumm/wiz_he.cpp
+++ b/scumm/wiz_he.cpp
@@ -1807,7 +1807,7 @@ void ScummEngine_v90he::processWizImage(const WizParameters *params) {
// HE 99+
case 7:
// Used in PuttsFunShop/SamsFunShop/soccer2004
- // TODO: Capture polyfon
+ // TODO: Capture polygon
break;
case 8:
createWizEmptyImage(params);