+2006-01-07
+ * uploaded fixed pre-release version 3.2.0-6 binary and source code
+
2006-01-07
* fixed bug when using "CE can leave behind <trigger element>"
* added new change condition "(after/when) creation of <element>"
* added new change condition "(after/when) digging <element>"
+ * fixed bug accessing invalid gadget that caused crashes under Windows
+ * deactivated new possibility for multiple CE changes per frame
2006-01-04
* uploaded pre-release (test) version 3.2.0-6 binary and source code
-#define COMPILE_DATE_STRING "[2006-01-07 01:18]"
+#define COMPILE_DATE_STRING "[2006-01-07 03:59]"
}
}
- /* this function is also called before editor gadgets are initialized */
- if (level_editor_gadget[GADGET_ID_SCROLL_LIST_VERTICAL] != NULL)
- AdjustElementListScrollbar();
+ /* (this function is also called before editor gadgets are initialized!) */
+ AdjustElementListScrollbar();
}
void PrintEditorElementList()
int i;
for (i = 0; i < NUM_EDITOR_GADGETS; i++)
+ {
FreeGadget(level_editor_gadget[i]);
+
+ level_editor_gadget[i] = NULL;
+ }
}
static void MapCounterButtons(int id)
static int playfield_scan_delta_y = 1;
#define SCAN_PLAYFIELD(x, y) for ((y) = playfield_scan_start_y; \
- (y) >= 0 && (y) <= lev_fieldy; \
+ (y) >= 0 && (y) <= lev_fieldy - 1; \
(y) += playfield_scan_delta_y) \
for ((x) = playfield_scan_start_x; \
- (x) >= 0 && (x) <= lev_fieldx; \
+ (x) >= 0 && (x) <= lev_fieldx - 1; \
(x) += playfield_scan_delta_x) \
static void InitPlayfieldScanModeVars()
static void DrawGadget(struct GadgetInfo *gi, boolean pressed, boolean direct)
{
+ struct GadgetDesign *gd;
int state = (pressed ? GD_BUTTON_PRESSED : GD_BUTTON_UNPRESSED);
- struct GadgetDesign *gd = (!gi->active ? &gi->alt_design[state] :
- gi->checked ? &gi->alt_design[state] :
- &gi->design[state]);
boolean redraw_selectbox = FALSE;
+ if (gi == NULL)
+ return;
+
+ gd = (!gi->active ? &gi->alt_design[state] :
+ gi->checked ? &gi->alt_design[state] : &gi->design[state]);
+
switch (gi->type)
{
case GD_TYPE_NORMAL_BUTTON:
{
int tag = first_tag;
+ if (gi == NULL)
+ return;
+
while (tag != GDI_END)
{
switch(tag)
void RedrawGadget(struct GadgetInfo *gi)
{
+ if (gi == NULL)
+ return;
+
if (gi->mapped)
DrawGadget(gi, gi->state, gi->direct_draw);
}