From 80a4a2dd8e047298e7d7d385005a7049d25bc675 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 29 Jun 2009 16:49:14 +0000 Subject: Cleanup GUI_HoF::setupPalette. svn-id: r41950 --- engines/kyra/gui_hof.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index e1c22d6d78..5a3317a131 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -802,14 +802,9 @@ void GUI_HoF::createScreenThumbnail(Graphics::Surface &dst) { void GUI_HoF::setupPalette() { _screen->copyPalette(1, 0); - uint8 *palette = _screen->getPalette(0).getData(); - for (int i = 0; i < 768; ++i) - palette[i] >>= 1; - - static const uint8 guiPal[] = { 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFc, 0xFD, 0xFE }; - - for (uint i = 0; i < ARRAYSIZE(guiPal); ++i) - _screen->getPalette(0).copy(_screen->getPalette(1), guiPal[i], 1); + Palette &pal = _screen->getPalette(0); + for (int i = 0; i < 741; ++i) + pal[i] >>= 1; if (_isDeathMenu) _screen->fadePalette(_screen->getPalette(0), 0x64); -- cgit v1.2.3