Skip to content

Commit

Permalink
Fixup f2ab245 via feedback
Browse files Browse the repository at this point in the history
TC-ing working again
  • Loading branch information
Vultraz committed Dec 1, 2016
1 parent f2ab245 commit 00b9d6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sdl/utils.cpp
Expand Up @@ -1076,11 +1076,11 @@ surface recolor_image(surface surf, const color_range_map& map_rgb, bool optimiz
// Don't recolor invisible pixels.
if(alpha) {
// Palette use only RGB channels, so remove alpha
Uint32 oldrgb = (*beg) & 0x00FFFFFF;
Uint32 oldrgb = (*beg) | 0xFF000000;

auto i = map_rgb.find(color_t::from_argb_bytes(oldrgb));
if(i != map_rgb.end()) {
*beg = (alpha << 24) | i->second.to_argb_bytes();
*beg = (alpha << 24) | (i->second.to_argb_bytes() & 0x00FFFFFF);
}
}

Expand Down

0 comments on commit 00b9d6e

Please sign in to comment.