aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/screen.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-22 02:35:04 +0000
committerJohannes Schickel2009-06-22 02:35:04 +0000
commit9da52cb28280e0164db7073b0d3ea5abb4d20934 (patch)
treedb192ee1f4860c48bd0e597487b8a97889088643 /engines/kyra/screen.cpp
parentb448d506b89209d79bc153b6b0759ad926fa8794 (diff)
downloadscummvm-rg350-9da52cb28280e0164db7073b0d3ea5abb4d20934.tar.gz
scummvm-rg350-9da52cb28280e0164db7073b0d3ea5abb4d20934.tar.bz2
scummvm-rg350-9da52cb28280e0164db7073b0d3ea5abb4d20934.zip
Got rid of Screen::_currentPalette.
svn-id: r41740
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r--engines/kyra/screen.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 2442286bd2..fc530d684b 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -139,8 +139,7 @@ bool Screen::init() {
}
}
- _currentPalette = _palettes[0]->getData();
- setScreenPalette(_currentPalette);
+ setScreenPalette(getPalette(0));
_curDim = 0;
_charWidth = 0;
@@ -491,7 +490,7 @@ void Screen::setPagePixel(int pageNum, int x, int y, uint8 color) {
}
void Screen::fadeFromBlack(int delay, const UpdateFunctor *upFunc) {
- fadePalette(_currentPalette, delay, upFunc);
+ fadePalette(getPalette(0), delay, upFunc);
}
void Screen::fadeToBlack(int delay, const UpdateFunctor *upFunc) {
@@ -590,10 +589,10 @@ int Screen::fadePalStep(const uint8 *palette, int diff) {
}
void Screen::setPaletteIndex(uint8 index, uint8 red, uint8 green, uint8 blue) {
- _currentPalette[index * 3 + 0] = red;
- _currentPalette[index * 3 + 1] = green;
- _currentPalette[index * 3 + 2] = blue;
- setScreenPalette(_currentPalette);
+ getPalette(0)[index * 3 + 0] = red;
+ getPalette(0)[index * 3 + 1] = green;
+ getPalette(0)[index * 3 + 2] = blue;
+ setScreenPalette(getPalette(0));
}
void Screen::getRealPalette(int num, uint8 *dst) {