From: Holger Schemel Date: Tue, 27 Aug 2024 21:56:03 +0000 (+0200) Subject: added using special editor graphics for scanned BD elements X-Git-Tag: 4.4.0.0-test-4~285 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=69edffddfb17f6efa450285b5f674321e3aa81f2;p=rocksndiamonds.git 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). --- 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;