From c66d5eca3a9d8ed7254d07435b74acf7ebf7d2d1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 23 Dec 2015 22:04:03 +0200 Subject: LAB: setAmigaPal() is always using 16 colors --- engines/lab/dispman.cpp | 9 +++------ engines/lab/dispman.h | 4 ++-- engines/lab/intro.cpp | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'engines/lab') diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index 49818bf1f7..e0661b7446 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -468,14 +468,11 @@ void DisplayMan::createScreen(bool hiRes) { _displayBuffer = new byte[_screenBytesPerPage]; } -void DisplayMan::setAmigaPal(uint16 *pal, uint16 numColors) { +void DisplayMan::setAmigaPal(uint16 *pal) { byte vgaPal[16 * 3]; uint16 vgaIdx = 0; - if (numColors > 16) - numColors = 16; - - for (int i = 0; i < numColors; i++) { + for (int i = 0; i < 16; i++) { vgaPal[vgaIdx++] = (byte)(((pal[i] & 0xf00) >> 8) << 2); vgaPal[vgaIdx++] = (byte)(((pal[i] & 0x0f0) >> 4) << 2); vgaPal[vgaIdx++] = (byte)(((pal[i] & 0x00f)) << 2); @@ -999,7 +996,7 @@ void DisplayMan::fade(bool fadeIn, uint16 res) { (0xF00 & fadeNumOut(0xF00 & _fadePalette[palIdx], 0xF00 & res, i)); } - setAmigaPal(newPal, 16); + setAmigaPal(newPal); _vm->waitTOF(); _vm->updateMusicAndEvents(); } diff --git a/engines/lab/dispman.h b/engines/lab/dispman.h index 99a4f45bb0..cbb80ac4cc 100644 --- a/engines/lab/dispman.h +++ b/engines/lab/dispman.h @@ -213,10 +213,10 @@ public: void createScreen(bool hiRes); /** - * Converts an Amiga palette (up to 16 colors) to a VGA palette, then sets + * Converts a 16-color Amiga palette to a VGA palette, then sets * the VGA palette. */ - void setAmigaPal(uint16 *pal, uint16 numColors); + void setAmigaPal(uint16 *pal); /** * Writes any number of the 256 color registers. diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index e918987d31..1b4310ac07 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -283,7 +283,7 @@ void Intro::introSequence() { palette[15] = temp; - _vm->_graphics->setAmigaPal(palette, 16); + _vm->_graphics->setAmigaPal(palette); _vm->waitTOF(); } -- cgit v1.2.3