void DrawLevelEd()
{
- int old_sx = SX;
- int old_sy = SY;
- int old_sxsize = SXSIZE;
- int old_sysize = SYSIZE;
-
StopAnimation();
CloseDoor(DOOR_CLOSE_ALL);
/* needed if different viewport properties defined for editor */
ChangeViewportPropertiesIfNeeded();
- if (old_sx != SX ||
- old_sy != SY ||
- old_sxsize != SXSIZE ||
- old_sysize != SYSIZE)
- playfield_area_changed = TRUE;
- else
- playfield_area_changed = FALSE;
+ playfield_area_changed = DrawingAreaChanged();
OpenDoor(DOOR_OPEN_1 | DOOR_OPEN_2 | DOOR_NO_DELAY);
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
DOOR_GFX_PAGEX8, 236, EXSIZE, EYSIZE, EX, EY);
- redraw_mask |= REDRAW_ALL;
+ // redraw_mask |= REDRAW_ALL;
FreeLevelEditorGadgets();
CreateLevelEditorGadgets();
else if (element >= NUM_FILE_ELEMENTS)
element_mapped = EL_UNKNOWN;
- printf("%c%03d", (mode == CB_DUMP_BRUSH ? '`' : '¸'), element_mapped);
+ // dump brush as level sketch text for the R'n'D forum:
+ // - large tiles: `xxx (0x60 ASCII)
+ // - small tiles: ¸xxx (0xb8 ISO-8859-1, 0xc2b8 UTF-8)
+ printf("%s%03d", (mode == CB_DUMP_BRUSH ? "`" : "¸"), element_mapped);
}
printf("\n");
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;
/* needed before playing if editor playfield area has different size */
ClearRectangle(drawto, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
- redraw_mask = REDRAW_ALL;
+ // redraw_mask = REDRAW_ALL;
level_editor_test_game = TRUE;