Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp
- index e188928833..eabffcd0db 100644
- --- a/src/cata_tiles.cpp
- +++ b/src/cata_tiles.cpp
- @@ -363,13 +363,13 @@ void tileset_loader::create_textures_from_tile_atlas( const SDL_Surface_Ptr &til
- copy_surface_to_texture( tile_atlas, offset, ts.tile_values );
- /** perform color filter conversion here */
- - copy_surface_to_texture( apply_color_filter( tile_atlas, color_pixel_grayscale ), offset,
- + copy_surface_to_texture( apply_color_filter( tile_atlas, color_pixel_memorized ), offset,
- ts.shadow_tile_values );
- copy_surface_to_texture( apply_color_filter( tile_atlas, color_pixel_nightvision ), offset,
- ts.night_tile_values );
- copy_surface_to_texture( apply_color_filter( tile_atlas, color_pixel_overexposed ), offset,
- ts.overexposed_tile_values );
- - copy_surface_to_texture( apply_color_filter( tile_atlas, color_pixel_memorized ), offset,
- + copy_surface_to_texture( apply_color_filter( tile_atlas, color_pixel_grayscale ), offset,
- ts.memory_tile_values );
- }
- diff --git a/src/sdl_utils.h b/src/sdl_utils.h
- index b2e9f4a3d3..6fe2fea748 100644
- --- a/src/sdl_utils.h
- +++ b/src/sdl_utils.h
- @@ -102,21 +102,12 @@ inline SDL_Color color_pixel_memorized( const SDL_Color &color )
- return color;
- }
- - /*
- - * Objective is to provide a gradient between two color points
- - * (sepia_dark and sepia_light) based on the grayscale value.
- - * This presents an effect intended to mimic a faded sepia photograph.
- - */
- -
- - const SDL_Color sepia_dark = { 39, 23, 19, color.a};
- - const SDL_Color sepia_light = { 241, 220, 163, color.a};
- -
- - const Uint8 av = average_pixel_color( color );
- - const float gammav = 1.6;
- - const float pv = av / 255.0;
- - const Uint8 finalv = std::min( int( round( pow( pv, gammav ) * 150 ) ), 100 );
- -
- - return mix_colors( sepia_dark, sepia_light, finalv );
- + return {
- + std::max<Uint8>( 85 * color.r >> 8, 0x01 ),
- + std::max<Uint8>( 85 * color.g >> 8, 0x01 ),
- + std::max<Uint8>( 85 * color.b >> 8, 0x01 ),
- + color.a
- + };
- }
- SDL_Color curses_color_to_SDL( const nc_color &color );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement