aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-26 15:19:29 +0000
committerTorbjörn Andersson2003-08-26 15:19:29 +0000
commitfda7df57fa2df58818562127aa4c5eb150f55927 (patch)
treef0c30253a34147b72b520e38144c67f4679e0adf /sword2
parent8277c6cb798552de5ef315311db18f91a25e42fc (diff)
downloadscummvm-rg350-fda7df57fa2df58818562127aa4c5eb150f55927.tar.gz
scummvm-rg350-fda7df57fa2df58818562127aa4c5eb150f55927.tar.bz2
scummvm-rg350-fda7df57fa2df58818562127aa4c5eb150f55927.zip
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
Diffstat (limited to 'sword2')
-rw-r--r--sword2/driver/palette.cpp5
1 files changed, 2 insertions, 3 deletions
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);
/*