From 79514d4747eae69ae96ddfb3e5fbb1ff2fe9c787 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 8 May 2005 10:26:11 +0000 Subject: Range checks off by 1. svn-id: r17954 --- scumm/palette_he.cpp | 8 ++++---- scumm/script_v90he.cpp | 4 ++-- scumm/wiz_he.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'scumm') 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); -- cgit v1.2.3