diff options
Diffstat (limited to 'engines/made/screenfx.cpp')
-rw-r--r-- | engines/made/screenfx.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index ad71f1fb49..bae59f05cc 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -51,7 +51,12 @@ ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) { vfxHeight = 0; _fxPalette = new byte[768]; - + + _blendedPaletteStatus._active = false; + _blendedPaletteStatus._palette = _blendedPaletteStatus._newPalette = nullptr; + _blendedPaletteStatus._colorCount = 0; + _blendedPaletteStatus._value = _blendedPaletteStatus._maxValue = 0; + _blendedPaletteStatus._incr = 0; } ScreenEffects::~ScreenEffects() { @@ -165,7 +170,7 @@ void ScreenEffects::flash(int flashCount, byte *palette, int colorCount) { _screen->setRGBPalette(_fxPalette, 0, colorCount); _screen->updateScreenAndWait(20); _screen->setRGBPalette(palette, 0, colorCount); - _screen->updateScreenAndWait(20); + _screen->updateScreenAndWait(20); } } @@ -196,7 +201,7 @@ void ScreenEffects::startBlendedPalette(byte *palette, byte *newPalette, int col } void ScreenEffects::stepBlendedPalette() { - if (_blendedPaletteStatus._active && _blendedPaletteStatus._value < _blendedPaletteStatus._maxValue) { + if (_blendedPaletteStatus._active && _blendedPaletteStatus._value <= _blendedPaletteStatus._maxValue) { setBlendedPalette(_blendedPaletteStatus._palette, _blendedPaletteStatus._newPalette, _blendedPaletteStatus._colorCount, _blendedPaletteStatus._value, _blendedPaletteStatus._maxValue); if (_blendedPaletteStatus._value == _blendedPaletteStatus._maxValue) @@ -368,7 +373,7 @@ void ScreenEffects::vfx07(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen slide in" right to left void ScreenEffects::vfx08(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int x = 8; x <= 320; x += 8) { - _screen->copyRectToScreen(surface->getBasePtr(0, 0), surface->pitch, 320 - x, 0, x, 200); + _screen->copyRectToScreen(surface->getPixels(), surface->pitch, 320 - x, 0, x, 200); _screen->updateScreenAndWait(25); } setPalette(palette); @@ -529,7 +534,7 @@ void ScreenEffects::vfx19(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen slide in" bottom to top void ScreenEffects::vfx20(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int y = 4; y <= 200; y += 4) { - _screen->copyRectToScreen(surface->getBasePtr(0, 0), surface->pitch, 0, 200 - y, 320, y); + _screen->copyRectToScreen(surface->getPixels(), surface->pitch, 0, 200 - y, 320, y); _screen->updateScreenAndWait(25); } |