diff options
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui_lol.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/lol.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/lol.h | 2 | ||||
-rw-r--r-- | engines/kyra/scene_lol.cpp | 10 | ||||
-rw-r--r-- | engines/kyra/script_lol.cpp | 6 |
5 files changed, 14 insertions, 14 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp index 15dcbff761..5e03f3d9bb 100644 --- a/engines/kyra/gui_lol.cpp +++ b/engines/kyra/gui_lol.cpp @@ -1814,7 +1814,7 @@ int LoLEngine::clickedAutomap(Button *button) { displayAutomap(); gui_drawPlayField(); - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, _lampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect); return 1; } @@ -1842,7 +1842,7 @@ int LoLEngine::clickedLamp(Button *button) { } if (_brightness) - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, _lampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect); return 1; } diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 3e812b0922..e4002f7274 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -1538,7 +1538,7 @@ void LoLEngine::restoreAfterSceneWindowDialogue(int redraw) { if (_screen->_fadeFlag != 2) _screen->fadeClearSceneWindow(10); gui_drawPlayField(); - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, _lampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect); _screen->_fadeFlag = 0; } @@ -1672,8 +1672,8 @@ void LoLEngine::transformRegion(int x1, int y1, int x2, int y2, int w, int h, in } } -void LoLEngine::setPaletteBrightness(uint8 *palette, int brightness, int modifier) { - generateBrightnessPalette(palette, _screen->getPalette(1).getData(), brightness, modifier); +void LoLEngine::setPaletteBrightness(Palette &pal, int brightness, int modifier) { + generateBrightnessPalette(pal.getData(), _screen->getPalette(1).getData(), brightness, modifier); _screen->fadePalette(_screen->getPalette(1), 5, 0); _screen->_fadeFlag = 0; } diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 75c1ed5af7..1373d6bc94 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -872,7 +872,7 @@ private: void toggleSelectedCharacterFrame(bool mode); void fadeText(); void transformRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage); - void setPaletteBrightness(uint8 *palette, int brightness, int modifier); + void setPaletteBrightness(Palette &pal, int brightness, int modifier); void generateBrightnessPalette(uint8 *src, uint8 *dst, int brightness, int modifier); void generateFlashPalette(uint8 *src, uint8 *dst, int colorFlags); void updateSequenceBackgroundAnimations(); diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp index 50fb562a90..56d1081d9a 100644 --- a/engines/kyra/scene_lol.cpp +++ b/engines/kyra/scene_lol.cpp @@ -94,7 +94,7 @@ void LoLEngine::loadLevel(int index) { gui_drawPlayField(); - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, _lampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect); setMouseCursorToItemInHand(); snd_playTrack(_curMusicTheme); @@ -544,14 +544,14 @@ void LoLEngine::updateLampStatus() { if (!_brightness || !_lampOilStatus) { newLampEffect = 8; if (newLampEffect != _lampEffect && _screen->_fadeFlag == 0) - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, newLampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, newLampEffect); } else { tmpOilStatus = (_lampOilStatus < 100) ? _lampOilStatus : 100; newLampEffect = (3 - ((tmpOilStatus - 1) / 25)) << 1; if (_lampEffect == -1) { if (_screen->_fadeFlag == 0) - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, newLampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, newLampEffect); _lampStatusTimer = _system->getMillis() + (10 + _rnd.getRandomNumberRng(1, 30)) * _tickLength; } else { if ((_lampEffect & 0xfe) == (newLampEffect & 0xfe)) { @@ -563,7 +563,7 @@ void LoLEngine::updateLampStatus() { } } else { if (_screen->_fadeFlag == 0) - setPaletteBrightness(_screen->getPalette(0).getData(), _lampEffect, newLampEffect); + setPaletteBrightness(_screen->getPalette(0), _lampEffect, newLampEffect); } } } @@ -1491,7 +1491,7 @@ int LoLEngine::restoreAfterSpecialScene(int fadeFlag, int redrawPlayField, int r if (redrawPlayField) gui_drawPlayField(); - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, _lampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect); } else { _currentControlMode = 0; diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index 87dd654ea6..df238742d6 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -876,7 +876,7 @@ int LoLEngine::olol_redrawPlayfield(EMCState *script) { if (_screen->_fadeFlag != 2) _screen->fadeClearSceneWindow(10); gui_drawPlayField(); - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, _lampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect); _screen->_fadeFlag = 0; return 1; } @@ -1428,7 +1428,7 @@ int LoLEngine::olol_setPaletteBrightness(EMCState *script) { uint16 old = _brightness; _brightness = stackPos(0); if (stackPos(1) == 1) - setPaletteBrightness(_screen->getPalette(0).getData(), stackPos(0), _lampEffect); + setPaletteBrightness(_screen->getPalette(0), stackPos(0), _lampEffect); return old; } @@ -2420,7 +2420,7 @@ int LoLEngine::tlol_fadeClearWindow(const TIM *tim, const uint16 *param) { if (_screen->_fadeFlag != 2) _screen->fadeClearSceneWindow(10); gui_drawPlayField(); - setPaletteBrightness(_screen->getPalette(0).getData(), _brightness, _lampEffect); + setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect); _screen->_fadeFlag = 0; break; |