From fda7df57fa2df58818562127aa4c5eb150f55927 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 26 Aug 2003 15:19:29 +0000 Subject: Handle the fadeNow parameter to BS2_SetPalette() so that the palette is only uploaded to the backend if fadeNow == RDPAL_INSTANT. Otherwise, assume that FadeServer() will do it for us, eventually. I think this is the correct behaviour, and it prevents the bug where the unfaded room image might flash by briefly when moving the mouse while changing rooms. svn-id: r9868 --- sword2/driver/palette.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sword2') diff --git a/sword2/driver/palette.cpp b/sword2/driver/palette.cpp index b70634c12e..6955253e82 100644 --- a/sword2/driver/palette.cpp +++ b/sword2/driver/palette.cpp @@ -325,10 +325,9 @@ int32 BS2_SetPalette(int16 startEntry, int16 noEntries, uint8 *colourTable, uint return RD_OK; } - // FIXME: Handle the fadeNow parameter - memcpy(&palCopy[startEntry][0], colourTable, noEntries * 4); - g_sword2->_system->set_palette((byte *) palCopy, startEntry, noEntries); + if (fadeNow == RDPAL_INSTANT) + g_sword2->_system->set_palette((byte *) palCopy, startEntry, noEntries); /* -- cgit v1.2.3