From edf9f249260b1fd4364f6727fa622991e81e8cf3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 6 Nov 2008 15:02:50 +0000 Subject: Got rid of OSystem::colorToRGB and RGBToColor; added implementations for OSystem::getOverlayFormat to several ports (pending testing by the porters) svn-id: r34912 --- engines/sword1/animation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/sword1/animation.cpp') diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index a033abbc3d..c0cd85a7c2 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -555,9 +555,10 @@ bool MoviePlayerMPEG::initOverlays(uint32 id) { _logoOvls[fcnt][cnt] = _logoOvls[fcnt - 1][cnt]; } uint8 *pal = ovlFile.fetchFile(12); - _introPal = (OverlayColor*)malloc(256 * sizeof(OverlayColor)); + _introPal = (OverlayColor *)malloc(256 * sizeof(OverlayColor)); + Graphics::PixelFormat format = _system->getOverlayFormat(); for (uint16 cnt = 0; cnt < 256; cnt++) - _introPal[cnt] = _system->RGBToColor(pal[cnt * 3 + 0], pal[cnt * 3 + 1], pal[cnt * 3 + 2]); + _introPal[cnt] = Graphics::RGBToColor(pal[cnt * 3 + 0], pal[cnt * 3 + 1], pal[cnt * 3 + 2], format); } return true; -- cgit v1.2.3