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.
This commit is contained in:
Johannes Schickel 2011-02-13 16:39:18 +01:00
parent 68b17128c1
commit 81111e2d59
2 changed files with 1 additions and 11 deletions

View File

@ -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) {

View File

@ -200,7 +200,6 @@ protected:
bool _screenLock;
bool _paletteLock;
byte *_screenPalette;
byte *_palette, *_newPalette;
int _paletteColorCount, _oldPaletteColorCount;
bool _paletteInitialized, _needPalette;