From 69edffddfb17f6efa450285b5f674321e3aa81f2 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 27 Aug 2024 23:56:03 +0200 Subject: [PATCH] added using special editor graphics for scanned BD elements If additional editor graphics are defined for certain BD elements, also use these graphics for scanned BD elements in the level editor (which always use the graphics of their non-scanned counterparts). --- src/tools.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools.c b/src/tools.c index c28d8aca..d94e5e0d 100644 --- a/src/tools.c +++ b/src/tools.c @@ -10500,6 +10500,15 @@ int el2edimg(int element) int el2edimg_with_frame(int element, int *graphic, int *frame) { + // make sure to use special editor graphics for scanned elements, if available + if (IS_BDX_SCANNED_ELEMENT(element)) + { + int element_bd_scanned = map_element_RND_to_BD_cave(element); + int element_bd_unscanned = getNonScannedElement_BD(element_bd_scanned); + + element = map_element_BD_to_RND_cave(element_bd_unscanned); + } + *graphic = el2edimg(element); *frame = 0; -- 2.34.1