From: Holger Schemel Date: Fri, 13 Dec 2024 20:04:27 +0000 (+0100) Subject: added variable to be set when using extended color template colors X-Git-Tag: 4.4.0.0-test-6~6 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f80d5789450769a0173130f94f3708a0f0706f5d;p=rocksndiamonds.git added variable to be set when using extended color template colors --- diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index ceaa12df..c6fd7d03 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -376,6 +376,9 @@ static SDL_Surface *get_colored_surface_from_template(GdCave *cave, SDL_Surface r = color[index].r * color_value / 255; g = color[index].g * color_value / 255; b = color[index].b * color_value / 255; + + if (color_value > 0 && color_value < 255) + gfx.has_extended_color_template = TRUE; } pixels[out++] = ((r << format->Rshift >> format->Rloss) | diff --git a/src/init.c b/src/init.c index f68d10a9..6302b927 100644 --- a/src/init.c +++ b/src/init.c @@ -387,6 +387,7 @@ void InitColorTemplateImages(void) void InitColorTemplateImagesIfNeeded(void) { + gfx.has_extended_color_template = FALSE; game.InitColorTemplateImagesNeeded = FALSE; if (program.headless) diff --git a/src/libgame/system.h b/src/libgame/system.h index 36c41d6f..4a332d0f 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1255,6 +1255,8 @@ struct GfxInfo int cursor_mode_override; int cursor_mode_final; int mouse_x, mouse_y; + + boolean has_extended_color_template; }; struct TileCursorInfo