aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/screen_lok.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-22 02:36:54 +0000
committerJohannes Schickel2009-06-22 02:36:54 +0000
commit73ea378dee4e7ec31c7a898e7fcc3a65a9eb6cc1 (patch)
tree6d00cd2c533aeefb72d874f59aa01b9d0e918db5 /engines/kyra/screen_lok.cpp
parent4bb392b593c492299dd916784548dc56bc0b25cb (diff)
downloadscummvm-rg350-73ea378dee4e7ec31c7a898e7fcc3a65a9eb6cc1.tar.gz
scummvm-rg350-73ea378dee4e7ec31c7a898e7fcc3a65a9eb6cc1.tar.bz2
scummvm-rg350-73ea378dee4e7ec31c7a898e7fcc3a65a9eb6cc1.zip
- Changed the following Screen functions to take a reference to a Palette object:
-> setScreenPalette -> fadePalette -> getFadeParams -> fadePalStep - Fixed initialization of 256 color palettes svn-id: r41743
Diffstat (limited to 'engines/kyra/screen_lok.cpp')
-rw-r--r--engines/kyra/screen_lok.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp
index a7cad28aa8..fbeb2a7a63 100644
--- a/engines/kyra/screen_lok.cpp
+++ b/engines/kyra/screen_lok.cpp
@@ -81,14 +81,14 @@ const ScreenDim *Screen_LoK::getScreenDim(int dim) {
void Screen_LoK::fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime) {
assert(_vm->palTable1()[palIndex]);
- uint8 tempPal[768];
- memcpy(tempPal, getPalette(0).getData(), 768);
- memcpy(&tempPal[startIndex*3], _vm->palTable1()[palIndex], size*3);
+ Palette tempPal(getPalette(0).getNumColors());
+ tempPal.copy(getPalette(0));
+ tempPal.copy(_vm->palTable1()[palIndex], 0, size, startIndex);
fadePalette(tempPal, fadeTime*18);
getPalette(0).copy(tempPal, startIndex, size);
- setScreenPalette(getPalette(0).getData());
+ setScreenPalette(getPalette(0));
_system->updateScreen();
}