diff options
author | Johannes Schickel | 2011-02-13 15:36:11 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-02-14 17:08:32 +0100 |
commit | 04d4162357d4de5f29ba65e6c373c0304a0cad6d (patch) | |
tree | b87fddc2f58944b54efc1a65e98575e5dc07115f /engines/gob | |
parent | 8db9fca56ced10acbcaa104de4eeb9c362009301 (diff) | |
download | scummvm-rg350-04d4162357d4de5f29ba65e6c373c0304a0cad6d.tar.gz scummvm-rg350-04d4162357d4de5f29ba65e6c373c0304a0cad6d.tar.bz2 scummvm-rg350-04d4162357d4de5f29ba65e6c373c0304a0cad6d.zip |
GOB: Adapt to setPalette RGBA->RGB change.
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/util.cpp | 4 | ||||
-rw-r--r-- | engines/gob/video.cpp | 10 | ||||
-rw-r--r-- | engines/gob/video.h | 1 |
3 files changed, 7 insertions, 8 deletions
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index f0b475f65b..4d51b3d61f 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -318,13 +318,13 @@ void Util::forceMouseUp(bool onlyWhenSynced) { void Util::clearPalette() { int16 i; - byte colors[1024]; + byte colors[768]; _vm->validateVideoMode(_vm->_global->_videoMode); if (_vm->_global->_setAllPalette) { if (_vm->getPixelFormat().bytesPerPixel == 1) { - memset(colors, 0, 1024); + memset(colors, 0, sizeof(colors)); g_system->getPaletteManager()->setPalette(colors, 0, 256); } diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 4a32489138..444ff8ed9e 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -345,7 +345,7 @@ void Video::drawPackedSprite(const char *path, Surface &dest, int width) { void Video::setPalElem(int16 index, char red, char green, char blue, int16 unused, int16 vidMode) { - byte pal[4]; + byte pal[3]; _vm->validateVideoMode(vidMode); @@ -359,14 +359,14 @@ void Video::setPalElem(int16 index, char red, char green, char blue, } void Video::setPalette(PalDesc *palDesc) { - byte pal[1024]; + byte pal[768]; int16 numcolors; _vm->validateVideoMode(_vm->_global->_videoMode); numcolors = _vm->_global->_setAllPalette ? 256 : 16; for (int i = 0; i < numcolors; i++) - setPalColor(pal + i * 4, palDesc->vgaPal[i]); + setPalColor(pal + i * 3, palDesc->vgaPal[i]); if (_vm->getPixelFormat().bytesPerPixel == 1) g_system->getPaletteManager()->setPalette(pal, 0, numcolors); @@ -374,14 +374,14 @@ void Video::setPalette(PalDesc *palDesc) { void Video::setFullPalette(PalDesc *palDesc) { if (_vm->_global->_setAllPalette) { - byte pal[1024]; + byte pal[768]; Color *colors = palDesc->vgaPal; for (int i = 0; i < 256; i++) { _vm->_global->_redPalette[i] = colors[i].red; _vm->_global->_greenPalette[i] = colors[i].green; _vm->_global->_bluePalette[i] = colors[i].blue; - setPalColor(pal + i * 4, colors[i]); + setPalColor(pal + i * 3, colors[i]); } if (_vm->getPixelFormat().bytesPerPixel == 1) diff --git a/engines/gob/video.h b/engines/gob/video.h index 8828b666b3..69cdfe49ed 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -125,7 +125,6 @@ public: pal[0] = red << 2; pal[1] = green << 2; pal[2] = blue << 2; - pal[3] = 0; } void setPalColor(byte *pal, Color &color) { setPalColor(pal, color.red, color.green, color.blue); |