aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2011-02-13 16:39:18 +0100
committerJohannes Schickel2011-02-14 17:08:32 +0100
commit81111e2d59ecb8aa2cc7a281c058f3e2b675d2a4 (patch)
tree848d39018100f450e3c73fca3e2801dc7e2ba2d6 /engines
parent68b17128c12b1e47ba56c014fa38de5632b0a810 (diff)
downloadscummvm-rg350-81111e2d59ecb8aa2cc7a281c058f3e2b675d2a4.tar.gz
scummvm-rg350-81111e2d59ecb8aa2cc7a281c058f3e2b675d2a4.tar.bz2
scummvm-rg350-81111e2d59ecb8aa2cc7a281c058f3e2b675d2a4.zip
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.
Diffstat (limited to 'engines')
-rw-r--r--engines/made/screen.cpp11
-rw-r--r--engines/made/screen.h1
2 files changed, 1 insertions, 11 deletions
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;