From 1da44acae34cf678d43c0fa17f6d8a84aea3b22e Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Sat, 6 Nov 2010 09:59:07 +0000 Subject: HUGO: Implement REMAPPAL. Palettes in H3 Win intro are now correct svn-id: r54100 --- engines/hugo/display.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engines/hugo/display.cpp') diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index b368ce9357..6b182eafa6 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -110,8 +110,14 @@ void Screen::displayRect(int16 x, int16 y, int16 dx, int16 dy) { void Screen::remapPal(uint16 oldIndex, uint16 newIndex) { debugC(1, kDebugDisplay, "Remap_pal(%d, %d)", oldIndex, newIndex); - warning("STUB: Remap_pal()"); - //bminfo.bmiColors[oldIndex] = ctab[newIndex]; + byte pal[4]; + + pal[0] = _vm->_palette[newIndex * 4 + 0]; + pal[1] = _vm->_palette[newIndex * 4 + 1]; + pal[2] = _vm->_palette[newIndex * 4 + 2]; + pal[3] = _vm->_palette[newIndex * 4 + 3]; + + g_system->setPalette(pal, oldIndex, 1); } void Screen::savePal(Common::WriteStream *f) { -- cgit v1.2.3