|
@@ -994,23 +994,23 @@ void DoPaletteAnimations()
|
|
|
const Colour *s;
|
|
|
Colour *d;
|
|
|
/* Amount of colors to be rotated.
|
|
|
* A few more for the DOS palette, because the water colors are
|
|
|
* 245-254 for DOS and 217-226 for Windows. */
|
|
|
const ExtraPaletteValues *ev = &_extra_palette_values;
|
|
|
int c = _use_dos_palette ? 38 : 28;
|
|
|
Colour old_val[38];
|
|
|
int c = _use_dos_palette ? PALETTE_ANIM_SIZE_DOS : PALETTE_ANIM_SIZE_WIN;
|
|
|
Colour old_val[PALETTE_ANIM_SIZE_DOS];
|
|
|
uint i;
|
|
|
uint j;
|
|
|
uint old_tc = _palette_animation_counter;
|
|
|
|
|
|
if (blitter != NULL && blitter->UsePaletteAnimation() == Blitter::PALETTE_ANIMATION_NONE) {
|
|
|
_palette_animation_counter = 0;
|
|
|
}
|
|
|
|
|
|
d = &_cur_palette[217];
|
|
|
d = &_cur_palette[PALETTE_ANIM_SIZE_START];
|
|
|
memcpy(old_val, d, c * sizeof(*old_val));
|
|
|
|
|
|
/* Dark blue water */
|
|
|
s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->ac : ev->a;
|
|
|
j = EXTR(320, 5);
|
|
|
for (i = 0; i != 5; i++) {
|
|
@@ -1098,14 +1098,14 @@ void DoPaletteAnimations()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (blitter != NULL && blitter->UsePaletteAnimation() == Blitter::PALETTE_ANIMATION_NONE) {
|
|
|
_palette_animation_counter = old_tc;
|
|
|
} else {
|
|
|
if (memcmp(old_val, &_cur_palette[217], c * sizeof(*old_val)) != 0) {
|
|
|
_pal_first_dirty = 217;
|
|
|
if (memcmp(old_val, &_cur_palette[PALETTE_ANIM_SIZE_START], c * sizeof(*old_val)) != 0) {
|
|
|
_pal_first_dirty = PALETTE_ANIM_SIZE_START;
|
|
|
_pal_count_dirty = c;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|