aboutsummaryrefslogtreecommitdiff
path: root/kyra/screen.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2005-12-22 18:14:52 +0000
committerJohannes Schickel2005-12-22 18:14:52 +0000
commitc36104ac0ca2f350decd4622a70690f651ce7446 (patch)
tree403115fbfe7c9c5a13304f2f007882989e3c4c8d /kyra/screen.cpp
parentd468c48bdaafcd15cc808115ecc9991d11f44c76 (diff)
downloadscummvm-rg350-c36104ac0ca2f350decd4622a70690f651ce7446.tar.gz
scummvm-rg350-c36104ac0ca2f350decd4622a70690f651ce7446.tar.bz2
scummvm-rg350-c36104ac0ca2f350decd4622a70690f651ce7446.zip
Completed implementation of processItemDrop
also changed implementation of itemDropDown a bit. Implemented new opcodes: - cmd_fadeSpecialPalette - cmd_setCustomPaletteRange svn-id: r19828
Diffstat (limited to 'kyra/screen.cpp')
-rw-r--r--kyra/screen.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/kyra/screen.cpp b/kyra/screen.cpp
index 3c42de0461..de1325452d 100644
--- a/kyra/screen.cpp
+++ b/kyra/screen.cpp
@@ -140,6 +140,19 @@ void Screen::fadeToBlack() {
fadePalette(blackPal, 0x54);
}
+void Screen::fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime) {
+ debug(9, "fadeSpecialPalette(%d, %d, %d, %d)", palIndex, startIndex, size, fadeTime);
+ assert(_vm->palTable1()[palIndex]);
+ assert(_currentPalette);
+ uint8 tempPal[768];
+ memcpy(tempPal, _currentPalette, 768);
+ memcpy(&tempPal[startIndex*3], _vm->palTable1()[palIndex], size*3);
+ fadePalette(tempPal, fadeTime*9);
+ memcpy(&_currentPalette[startIndex*3], &tempPal[startIndex*3], size*3);
+ setScreenPalette(_currentPalette);
+ _system->updateScreen();
+}
+
void Screen::fadePalette(const uint8 *palData, int delay) {
debug(9, "Screen::fadePalette(0x%X, %d)", palData, delay);
uint8 fadePal[768];