From 42cea0975a39b570a2e0a463530a0dc0534db8b3 Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Mon, 22 Dec 2003 11:23:40 +0000 Subject: added fnSetPaletteToFade/fnSetPaletteToCut svn-id: r11851 --- sword1/screen.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sword1/screen.cpp') diff --git a/sword1/screen.cpp b/sword1/screen.cpp index f33437df9d..2e0cf14836 100644 --- a/sword1/screen.cpp +++ b/sword1/screen.cpp @@ -30,6 +30,7 @@ #include "common/util.h" #include "system.h" #include "menu.h" +#include "sword1.h" #define SCROLL_FRACTION 16 #define MAX_SCROLL_DISTANCE 8 @@ -106,7 +107,7 @@ void SwordScreen::fnSetPalette(uint8 start, uint16 length, uint32 id, bool fadeU memset(_currentPalette, 0, 256 * 4); _system->set_palette(_currentPalette, 0, 256); } else - _system->set_palette(_targetPalette, start, length); + _system->set_palette(_targetPalette + 4 * start, start, length); } void SwordScreen::refreshPalette(void) { @@ -259,8 +260,8 @@ void SwordScreen::newScreen(uint32 screen) { if (_roomDefTable[_currentScreen].parallax[1]) _parallax[1] = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].parallax[1]); - fnSetPalette(0, 184, _roomDefTable[_currentScreen].palettes[0], true); - fnSetPalette(184, 72, _roomDefTable[_currentScreen].palettes[1], true); + fnSetPalette(0, 184, _roomDefTable[_currentScreen].palettes[0], SwordEngine::_systemVars.wantFade); + fnSetPalette(184, 72, _roomDefTable[_currentScreen].palettes[1], SwordEngine::_systemVars.wantFade); } void SwordScreen::quitScreen(void) { -- cgit v1.2.3