From: Holger Schemel Date: Thu, 3 Oct 2024 14:02:16 +0000 (+0200) Subject: added updating BD cave colors when redrawing editor screen X-Git-Tag: 4.4.0.0-test-4~181 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=998c3a26f70c9289a7cdf97413961e4cec105cc2;p=rocksndiamonds.git added updating BD cave colors when redrawing editor screen --- diff --git a/src/editor.c b/src/editor.c index 8523c97e..88fdbccc 100644 --- a/src/editor.c +++ b/src/editor.c @@ -10086,6 +10086,8 @@ static void DrawEditModeWindowExt(boolean remap_toolbox_gadgets) { if (remap_toolbox_gadgets) { + SetCurrentLevelColors_BD(); + ModifyEditorElementList(); RedrawDrawingElements(); } @@ -11767,6 +11769,20 @@ void SetDefaultLevelColors_BD(void) bd_color_default[i] = *bd_color[i]; } +void SetCurrentLevelColors_BD(void) +{ + struct LevelInfo_BD *level_bd = level.native_bd_level; + GdCave *cave = level_bd->cave; + + cave->colorb = level.bd_color_b; + cave->color0 = level.bd_color_0; + cave->color1 = level.bd_color_1; + cave->color2 = level.bd_color_2; + cave->color3 = level.bd_color_3; + cave->color4 = level.bd_color_4; + cave->color5 = level.bd_color_5; +} + void SetRandomLevelColors_BD(int bd_color_type) { struct LevelInfo_BD *level_bd = level.native_bd_level; diff --git a/src/editor.h b/src/editor.h index 8dd3e390..a05f14b7 100644 --- a/src/editor.h +++ b/src/editor.h @@ -38,6 +38,7 @@ void RedoLevelEditorOperation(void); void SetDefaultLevelColorType_BD(void); void SetDefaultLevelColors_BD(void); +void SetCurrentLevelColors_BD(void); void SetRandomLevelColors_BD(int); #endif