projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with showing DC2 game elements when using EM/EMC engine
[rocksndiamonds.git]
/
src
/
editor.c
diff --git
a/src/editor.c
b/src/editor.c
index c806313b87e379dcb9d2c05ad6e28bfeff567354..d3d6a322bf3002379badf956bddc03ba9b74452a 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-3658,6
+3658,7
@@
static void HandleControlButtons(struct GadgetInfo *);
static void HandleDrawingAreaInfo(struct GadgetInfo *);
static void PrintEditorGadgetInfoText(struct GadgetInfo *);
static boolean AskToCopyAndModifyLevelTemplate();
static void HandleDrawingAreaInfo(struct GadgetInfo *);
static void PrintEditorGadgetInfoText(struct GadgetInfo *);
static boolean AskToCopyAndModifyLevelTemplate();
+static boolean getDrawModeHiRes();
static int num_editor_gadgets = 0; /* dynamically determined */
static int num_editor_gadgets = 0; /* dynamically determined */
@@
-5461,6
+5462,7
@@
static void ReinitializeElementList_EnableSections()
setup_editor_el_more = FALSE;
setup_editor_el_sokoban = FALSE;
setup_editor_el_supaplex = FALSE;
setup_editor_el_more = FALSE;
setup_editor_el_sokoban = FALSE;
setup_editor_el_supaplex = FALSE;
+ setup_editor_el_diamond_caves = FALSE;
setup_editor_el_dx_boulderdash = FALSE;
setup_editor_el_mirror_magic = FALSE;
setup_editor_el_deflektor = FALSE;
setup_editor_el_dx_boulderdash = FALSE;
setup_editor_el_mirror_magic = FALSE;
setup_editor_el_deflektor = FALSE;
@@
-10296,7
+10298,8
@@
static void SetElementSimpleExt(int x, int y, int dx, int dy, int element,
int sx = x - level_xpos;
int sy = y - level_ypos;
int old_element = Feld[x][y];
int sx = x - level_xpos;
int sy = y - level_ypos;
int old_element = Feld[x][y];
- unsigned int new_bitmask = (dx + 1) << (dy * 2);
+ int new_element = element;
+ unsigned int new_bitmask = (getDrawModeHiRes() ? (dx + 1) << (dy * 2) : 0x0f);
boolean draw_masked = FALSE;
if (IS_MM_WALL_EDITOR(element))
boolean draw_masked = FALSE;
if (IS_MM_WALL_EDITOR(element))
@@
-10324,7
+10327,9
@@
static void SetElementSimpleExt(int x, int y, int dx, int dy, int element,
if (IN_ED_FIELD(sx, sy))
{
if (IN_ED_FIELD(sx, sy))
{
- if (draw_masked)
+ if (IS_MM_WALL(old_element) && new_element == EL_EMPTY)
+ DrawSizedWallParts_MM(sx, sy, EL_EMPTY, ed_tilesize, FALSE, new_bitmask);
+ else if (draw_masked)
DrawEditorElementThruMask(sx, sy, element);
else
DrawEditorElement(sx, sy, element);
DrawEditorElementThruMask(sx, sy, element);
else
DrawEditorElement(sx, sy, element);
@@
-12043,6
+12048,8
@@
static void HandleDrawingAreas(struct GadgetInfo *gi)
}
else
{
}
else
{
+ SetDrawModeHiRes(new_element);
+
if (new_element == EL_PLAYER_1)
{
/* remove player at old position */
if (new_element == EL_PLAYER_1)
{
/* remove player at old position */
@@
-12217,6
+12224,7
@@
static void HandleDrawingAreas(struct GadgetInfo *gi)
/* do not mark level as modified for certain non-level-changing gadgets */
if ((type_id >= ED_DRAWING_ID_EDITOR_FIRST &&
type_id <= ED_DRAWING_ID_EDITOR_LAST) ||
/* do not mark level as modified for certain non-level-changing gadgets */
if ((type_id >= ED_DRAWING_ID_EDITOR_FIRST &&
type_id <= ED_DRAWING_ID_EDITOR_LAST) ||
+ actual_drawing_function == GADGET_ID_GRAB_BRUSH ||
actual_drawing_function == GADGET_ID_PICK_ELEMENT)
return;
actual_drawing_function == GADGET_ID_PICK_ELEMENT)
return;
@@
-12393,8
+12401,6
@@
static void HandleSelectboxGadgets(struct GadgetInfo *gi)
}
CopyElementPropertiesToGame(properties_element);
}
CopyElementPropertiesToGame(properties_element);
-
- level.changed = TRUE;
}
else if (type_id == ED_SELECTBOX_ID_GAME_ENGINE_TYPE)
{
}
else if (type_id == ED_SELECTBOX_ID_GAME_ENGINE_TYPE)
{
@@
-12402,6
+12408,12
@@
static void HandleSelectboxGadgets(struct GadgetInfo *gi)
ReinitializeElementList();
ModifyEditorElementList();
}
ReinitializeElementList();
ModifyEditorElementList();
}
+
+ /* do not mark level as modified for certain non-level-changing gadgets */
+ if (type_id == ED_SELECTBOX_ID_SELECT_CHANGE_PAGE)
+ return;
+
+ level.changed = TRUE;
}
static void HandleTextbuttonGadgets(struct GadgetInfo *gi)
}
static void HandleTextbuttonGadgets(struct GadgetInfo *gi)