+2006-06-21
+ * fixed newly introduced bug with wrongly initializing clipboard element
+
+2006-06-19
+ * fixed bug with displaying visible/invisible level border in editor
+
+2006-06-14
+ * reorganized some elements in the level editor element list
+
2006-06-06
* fixed bug with displaying any player as "yellow" when moving into acid
* fixed bug with displaying running player when player stopped at border
-#define COMPILE_DATE_STRING "[2006-06-14 01:07]"
+#define COMPILE_DATE_STRING "[2006-06-21 01:26]"
DrawAreaBorder(sx, sy, sx, sy);
}
+static void CheckLevelBorderElement(boolean redraw_playfield)
+{
+ int last_border_element = BorderElement;
+
+ SetBorderElement();
+
+ if (redraw_playfield && BorderElement != last_border_element)
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+}
+
static void CopyLevelToUndoBuffer(int mode)
{
static boolean accumulated_undo = FALSE;
boolean new_undo_buffer_position = TRUE;
- int last_border_element;
int x, y;
switch (mode)
UndoBuffer[undo_buffer_position][x][y] = Feld[x][y];
/* check if drawing operation forces change of border style */
- last_border_element = BorderElement;
- SetBorderElement();
- if (BorderElement != last_border_element)
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ CheckLevelBorderElement(TRUE);
level.changed = TRUE;
}
for (x = 0; x < lev_fieldx; x++)
for (y = 0; y < lev_fieldy; y++)
Feld[x][y] = UndoBuffer[undo_buffer_position][x][y];
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos,level_ypos);
+
+ /* check if undo operation forces change of border style */
+ CheckLevelBorderElement(FALSE);
+
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+
break;
case GADGET_ID_INFO:
int element = i;
struct ElementInfo *ei = &element_info[element];
+ /* never initialize clipboard elements after the very first time */
+ /* (to be able to use clipboard elements between several levels) */
+ if (IS_CLIPBOARD_ELEMENT(element) && clipboard_elements_initialized)
+ continue;
+
if (IS_ENVELOPE(element))
{
int envelope_nr = element - EL_ENVELOPE_1;
}
#endif
- /* never initialize clipboard elements after the very first time */
- /* (to be able to use clipboard elements between several levels) */
- if (IS_CLIPBOARD_ELEMENT(element) && clipboard_elements_initialized)
- continue;
-
setElementChangePages(ei, 1);
setElementChangeInfoToDefaults(ei->change);
last_element == EL_EM_DYNAMITE_ACTIVE ||
last_element == EL_SP_DISK_RED_ACTIVE)
DrawDynamite(last_jx, last_jy);
+#if 0
+ /* !!! this is not enough to prevent flickering of players which are
+ moving next to each others without a free tile between them -- this
+ can only be solved by drawing all players layer by layer (first the
+ background, then the foreground etc.) !!! => TODO */
+ else if (!IS_PLAYER(last_jx, last_jy))
+ DrawLevelField(last_jx, last_jy);
+#else
else
DrawLevelField(last_jx, last_jy);
+#endif
if (player->is_pushing && IN_SCR_FIELD(SCREENX(next_jx), SCREENY(next_jy)))
DrawLevelElement(next_jx, next_jy, EL_EMPTY);