diff options
author | Paul Gilbert | 2014-05-24 13:41:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-05-24 13:41:22 -0400 |
commit | 3202abaa8922bc741b3f28e1a2c1a86d8639a5f4 (patch) | |
tree | 47ed20e9092ce4b9e3d50673740fe97a70391df1 /engines/mads | |
parent | 1bcd02177424aa2dd10dfe9788f1c0c75bc0c662 (diff) | |
download | scummvm-rg350-3202abaa8922bc741b3f28e1a2c1a86d8639a5f4.tar.gz scummvm-rg350-3202abaa8922bc741b3f28e1a2c1a86d8639a5f4.tar.bz2 scummvm-rg350-3202abaa8922bc741b3f28e1a2c1a86d8639a5f4.zip |
MADS: Standardized fading out methods as fadeOut
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 4 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.cpp | 3 | ||||
-rw-r--r-- | engines/mads/palette.cpp | 6 | ||||
-rw-r--r-- | engines/mads/palette.h | 5 |
4 files changed, 7 insertions, 11 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index f22ec1ad90..2a421d1639 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -404,7 +404,7 @@ void PictureDialog::save() { // Fade the screen to grey int numColors = PALETTE_COUNT - PALETTE_RESERVED_LOW_COUNT - PALETTE_RESERVED_HIGH_COUNT; - palette.fadeToGrey(palette._mainPalette, &map[PALETTE_RESERVED_LOW_COUNT], + palette.fadeOut(palette._mainPalette, &map[PALETTE_RESERVED_LOW_COUNT], PALETTE_RESERVED_LOW_COUNT, numColors, 248, 8, 1, 16); // Remap the greyed out screen to use the small greyscale range @@ -521,7 +521,7 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm), _vm->_palette->setFullPalette(pal); } else { _vm->_palette->getFullPalette(pal); - _vm->_palette->fadeOut(pal, 0, PALETTE_COUNT, 16, 1, 1, 0, 0, 0); + _vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16); } _vm->_screen.copyTo(&_savedSurface); diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index 5d7ee40207..ddff434ca0 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -3323,7 +3323,8 @@ void Scene319::step() { case 72: _vm->_palette->setColorFlags(0xFF, 0, 0); _vm->_palette->setColorValues(0, 0, 0); - _vm->_palette->fadeOut(_vm->_palette->_mainPalette, 18, 228, 16, 1, 8, 248, 0, 0); + _vm->_palette->fadeOut(_vm->_palette->_mainPalette, nullptr, 18, 228, + 248, 0, 1, 16); warning("TODO: shake_countdown = 1;"); _scene->_reloadSceneFlag = true; break; diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp index fd39492d0e..29045bc34c 100644 --- a/engines/mads/palette.cpp +++ b/engines/mads/palette.cpp @@ -365,7 +365,7 @@ void Fader::grabPalette(byte *colors, uint start, uint num) { g_system->getPaletteManager()->grabPalette(colors, start, num); } -void Fader::fadeToGrey(byte palette[PALETTE_SIZE], byte *paletteMap, +void Fader::fadeOut(byte palette[PALETTE_SIZE], byte *paletteMap, int baseColor, int numColors, int baseGrey, int numGreys, int tickDelay, int steps) { GreyEntry map[PALETTE_COUNT]; @@ -736,10 +736,6 @@ void Palette::setColorValues(byte r, byte g, byte b) { _colorValues[2] = b; } -void Palette::fadeOut(byte palette[PALETTE_SIZE], int start, int count, int v1, int v2, int v3, int v4, int v5, int v6) { - warning("TODO: Palette::fadeOut()"); -} - void Palette::lock() { if (_rgbList[31] && !_lockFl) error("Palette Lock - Unexpected values"); diff --git a/engines/mads/palette.h b/engines/mads/palette.h index 92d23d65d9..6d9498dd5f 100644 --- a/engines/mads/palette.h +++ b/engines/mads/palette.h @@ -232,9 +232,9 @@ public: int rgbMerge(RGB6 &palEntry); /** - * Fades the given palette to greyscale + * Fades the given palette out to black or grey */ - void fadeToGrey(byte palette[PALETTE_SIZE], byte *paletteMap, + void fadeOut(byte palette[PALETTE_SIZE], byte *paletteMap, int baseColor, int numColors, int baseGrey, int numGreys, int tickDelay, int steps); }; @@ -311,7 +311,6 @@ public: void setColorFlags(byte r, byte g, byte b); void setColorValues(byte r, byte g, byte b); - void fadeOut(byte palette[PALETTE_SIZE], int start, int count, int v1, int v2, int v3, int v4, int v5, int v6); void lock(); void unlock(); |