aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-06-03 21:51:11 +0000
committerMax Horn2002-06-03 21:51:11 +0000
commitb58baf3560e6a939b31d39efce66b813251c0350 (patch)
tree9c5a976815e72a594385b32d4962fbca3f0d7259
parent9ca2964e745aba7cf9cec4099b7c7954818c4f45 (diff)
downloadscummvm-rg350-b58baf3560e6a939b31d39efce66b813251c0350.tar.gz
scummvm-rg350-b58baf3560e6a939b31d39efce66b813251c0350.tar.bz2
scummvm-rg350-b58baf3560e6a939b31d39efce66b813251c0350.zip
cleaned up var names in darkenPalette a bit, making it easier to understand
svn-id: r4401
-rw-r--r--gfx.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/gfx.cpp b/gfx.cpp
index e303200828..bbbd30b588 100644
--- a/gfx.cpp
+++ b/gfx.cpp
@@ -591,8 +591,6 @@ void Scumm::fadeToBlackEffect(int a)
// Just blit screen 0 to the display (i.e. display will be black)
setDirtyRange(0, 0, vs->height);
updateDirtyScreen(0);
- /* XXX: EGA_proc4(0); */
-// warning("EGA_proc4"); /* FIXME */
break;
case 134:
unkScreenEffect5(0);
@@ -2365,41 +2363,41 @@ byte *Scumm::getPalettePtr()
return cptr;
}
-void Scumm::darkenPalette(int a, int b, int c, int d, int e)
+void Scumm::darkenPalette(int startColor, int endColor, int redScale, int greenScale, int blueScale)
{
- byte *cptr, *cur;
- int num;
- int color;
-
- cptr = getPalettePtr() + a * 3;
- cur = _currentPalette + a * 3;
- if (a <= b) {
- num = b - a + 1;
+ if (startColor <= endColor) {
+ byte *cptr, *cur;
+ int num;
+ int color;
+
+ cptr = getPalettePtr() + startColor * 3;
+ cur = _currentPalette + startColor * 3;
+ num = endColor - startColor + 1;
do {
color = *cptr++;
- if (c != 0xFF)
- color = color * c / 0xFF;
+ if (redScale != 0xFF)
+ color = color * redScale / 0xFF;
if (color > 255)
color = 255;
*cur++ = color;
color = *cptr++;
- if (d != 0xFF)
- color = color * d / 0xFF;
+ if (greenScale != 0xFF)
+ color = color * greenScale / 0xFF;
if (color > 255)
color = 255;
*cur++ = color;
color = *cptr++;
- if (e != 0xFF)
- color = color * e / 0xFF;
+ if (blueScale != 0xFF)
+ color = color * blueScale / 0xFF;
if (color > 255)
color = 255;
*cur++ = color;
} while (--num);
+ setDirtyColors(startColor, endColor);
}
- setDirtyColors(a, b);
}
void Scumm::grabCursor(int x, int y, int w, int h)