HOPKINS: Fix transition glitch when skipping animations
This commit is contained in:
parent
2634c65d2f
commit
e47d34f951
1 changed files with 2 additions and 7 deletions
|
@ -570,13 +570,8 @@ void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface)
|
|||
*/
|
||||
void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface) {
|
||||
byte palData[PALETTE_BLOCK_SIZE];
|
||||
int fadeStep;
|
||||
if (step > 1)
|
||||
fadeStep = step;
|
||||
else
|
||||
fadeStep = 2;
|
||||
|
||||
if (palette) {
|
||||
if ((step > 1) && (palette) && (!_vm->_eventsManager._escKeyFl)) {
|
||||
int fadeStep = step;
|
||||
for (int fadeIndex = 0; fadeIndex < fadeStep; fadeIndex++) {
|
||||
for (int palOffset = 0; palOffset < PALETTE_BLOCK_SIZE; palOffset += 3) {
|
||||
palData[palOffset + 0] = (fadeStep - fadeIndex - 1) * palette[palOffset + 0] / (fadeStep - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue