Ticket #4160: bs1-palette.diff
File bs1-palette.diff, 1.8 KB (added by , 16 years ago) |
---|
-
engines/sword1/screen.h
137 137 uint8 _rleBuffer[RLE_BUFFER_SIZE]; 138 138 uint8 _shrinkBuffer[SHRINK_BUFFER_SIZE]; 139 139 bool _fullRefresh; 140 bool _updatePalette; 140 141 uint16 _oldScrollX, _oldScrollY; // for drawing additional frames 141 142 142 143 uint32 _foreList[MAX_FORE]; -
engines/sword1/screen.cpp
55 55 _backLength = _foreLength = _sortLength = 0; 56 56 _fadingStep = 0; 57 57 _currentScreen = 0xFFFF; 58 _updatePalette = false; 58 59 } 59 60 60 61 Screen::~Screen(void) { … … 186 187 } 187 188 188 189 void Screen::updateScreen(void) { 190 if (_updatePalette) { 191 fnSetPalette(0, 184, _roomDefTable[_currentScreen].palettes[0], false); 192 fnSetPalette(184, 72, _roomDefTable[_currentScreen].palettes[1], false); 193 _updatePalette = false; 194 } 189 195 if (Logic::_scriptVars[NEW_PALETTE]) { 190 196 _fadingStep = 1; 191 197 _fadingDirection = FADE_UP; … … 338 344 if (_roomDefTable[_currentScreen].parallax[1]) 339 345 _parallax[1] = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].parallax[1]); 340 346 341 fnSetPalette(0, 184, _roomDefTable[_currentScreen].palettes[0], SwordEngine::_systemVars.wantFade); 342 fnSetPalette(184, 72, _roomDefTable[_currentScreen].palettes[1], SwordEngine::_systemVars.wantFade); 347 if (SwordEngine::_systemVars.wantFade) { 348 fnSetPalette(0, 184, _roomDefTable[_currentScreen].palettes[0], SwordEngine::_systemVars.wantFade); 349 fnSetPalette(184, 72, _roomDefTable[_currentScreen].palettes[1], SwordEngine::_systemVars.wantFade); 350 } else 351 _updatePalette = true; 343 352 _fullRefresh = true; 344 353 } 345 354