From 81111e2d59ecb8aa2cc7a281c058f3e2b675d2a4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 13 Feb 2011 16:39:18 +0100 Subject: MADE: Adapt to setPalette RGBA->RGB change. This change is not tested. It should work just fine though, since it just removes the RGB->RGBA conversion before calling setPalette. --- engines/made/screen.cpp | 11 +---------- engines/made/screen.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'engines') diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 7a4c12eefb..b76ff15851 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -32,7 +32,6 @@ namespace Made { Screen::Screen(MadeEngine *vm) : _vm(vm) { - _screenPalette = new byte[256 * 4]; _palette = new byte[768]; _newPalette = new byte[768]; @@ -95,7 +94,6 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { Screen::~Screen() { - delete[] _screenPalette; delete[] _palette; delete[] _newPalette; @@ -220,14 +218,7 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f } void Screen::setRGBPalette(byte *palRGB, int start, int count) { - for (int i = 0; i < count; i++) { - _screenPalette[i * 4 + 0] = palRGB[i * 3 + 0]; - _screenPalette[i * 4 + 1] = palRGB[i * 3 + 1]; - _screenPalette[i * 4 + 2] = palRGB[i * 3 + 2]; - _screenPalette[i * 4 + 3] = 0; - } - - _vm->_system->getPaletteManager()->setPalette(_screenPalette, start, count); + _vm->_system->getPaletteManager()->setPalette(palRGB + start * 3, start, count); } uint16 Screen::updateChannel(uint16 channelIndex) { diff --git a/engines/made/screen.h b/engines/made/screen.h index c91704ef79..e9292240a1 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -200,7 +200,6 @@ protected: bool _screenLock; bool _paletteLock; - byte *_screenPalette; byte *_palette, *_newPalette; int _paletteColorCount, _oldPaletteColorCount; bool _paletteInitialized, _needPalette; -- cgit v1.2.3