added detection of normal/steel characters when drawing text in editor
authorHolger Schemel <info@artsoft.org>
Sun, 12 Oct 2014 23:31:58 +0000 (01:31 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 12 Oct 2014 23:31:58 +0000 (01:31 +0200)
ChangeLog
src/conftime.h
src/editor.c

index dff5a36b32d15950978d73c8575aaf4f55639113..58a94a9c98b5f5974790b8f21ea5010359b09978 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-13
+       * added automatic detection of normal/steel character elements in level
+         editor when drawing text (depending on currently selected element)
+
 2014-10-13
        * eliminated historical ISO-8859-1 characters from source code files
          (but still using them internally for special character encodings)
index 0b03ffe96c34f28182097e3fa59659460ed39765..7d96b1e584d6536fce8750f752ea17ee2f97a9e2 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2014-10-10 09:47"
+#define COMPILE_DATE_STRING "2014-10-13 01:31"
index cc1232f8dabbeab772d20f6d200b90273a1de409..781a3efd8a9b09327f70b4430fec6afaaeff335d 100644 (file)
@@ -10285,6 +10285,10 @@ static int DrawLevelText(int sx, int sy, char letter, int mode)
     case TEXT_WRITECHAR:
       if (letter_element >= EL_CHAR_START && letter_element <= EL_CHAR_END)
       {
+       if (new_element1 >= EL_STEEL_CHAR_START &&
+           new_element1 <= EL_STEEL_CHAR_END)
+         letter_element = letter_element - EL_CHAR_START + EL_STEEL_CHAR_START;
+
        delete_buffer[sx - start_sx] = Feld[lx][ly];
        Feld[lx][ly] = letter_element;