From 998c3a26f70c9289a7cdf97413961e4cec105cc2 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 3 Oct 2024 16:02:16 +0200 Subject: [PATCH] added updating BD cave colors when redrawing editor screen --- src/editor.c | 16 ++++++++++++++++ src/editor.h | 1 + 2 files changed, 17 insertions(+) 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 -- 2.34.1