+Release Version 3.0.4 [13 SEP 2003]
+-----------------------------------
+ * fixed bug in multiple config pages code that caused crashes
+ * fixed bug in custom definition of crumbled element graphic
+
Release Version 3.0.3 [08 SEP 2003]
-----------------------------------
- fixed bug (missing array boundary check) which could crash the game
- added envelope content which gets displayed when collecting envelope
- added multiple change event pages for custom elements
- added support for loading various music formats through SDL_mixer
+ - added music to Supaplex classic level set
Release Version 3.0.2 [22 AUG 2003]
-----------------------------------
-#define COMPILE_DATE_STRING "[2003-09-08 00:04]"
+#define COMPILE_DATE_STRING "[2003-09-13 01:34]"
/* read change property values */
+ setElementChangePages(ei, ei->num_change_pages);
+
for (i=0; i < ei->num_change_pages; i++)
{
struct ElementChangeInfo *change = &ei->change_page[i];
ExplodePhase[x][y] = (phase < last_phase ? phase + 1 : 0);
+#ifdef DEBUG
+
+ /* activate this even in non-DEBUG version until cause for crash in
+ getGraphicAnimationFrame() (see below) is found and eliminated */
+#endif
+#if 1
+
+ if (GfxElement[x][y] == EL_UNDEFINED)
+ {
+ printf("Explode(): x = %d, y = %d: GfxElement == EL_UNDEFINED\n", x, y);
+ printf("Explode(): This should never happen!\n");
+
+ GfxElement[x][y] = EL_EMPTY;
+ }
+#endif
+
if (phase == first_phase_after_start)
{
int element = Store2[x][y];
RelocatePlayer(x, y, target_element);
}
-static void ChangeElementNow(int x, int y, int element, int page)
+static boolean ChangeElementNow(int x, int y, int element, int page)
{
struct ElementChangeInfo *change = &element_info[element].change_page[page];
+ if (Changed[x][y]) /* do not change already changed elements */
+ return FALSE;
+
Changed[x][y] = TRUE; /* no more changes in this frame */
CheckTriggeredElementChange(x, y, Feld[x][y], CE_OTHER_IS_CHANGING);
if (change->explode)
{
Bang(x, y);
- return;
+
+ return TRUE;
}
if (change->use_content)
if (change->only_complete && change->use_random_change &&
RND(100) < change->random)
- return;
+ return FALSE;
for (yy = 0; yy < 3; yy++) for(xx = 0; xx < 3 ; xx++)
{
PlaySoundLevelElementAction(x, y, element, ACTION_CHANGING);
}
+
+ return TRUE;
}
static void ChangeElement(int x, int y, int page)
return;
}
- ChangeElementNow(x, y, element, page);
-
- if (change->post_change_function)
- change->post_change_function(x, y);
+ if (ChangeElementNow(x, y, element, page))
+ {
+ if (change->post_change_function)
+ change->post_change_function(x, y);
+ }
}
}
if (x == lx && y == ly) /* do not change trigger element itself */
continue;
+#if 0
if (Changed[x][y]) /* do not change already changed elements */
continue;
+#endif
if (Feld[x][y] == element)
{
#define MAX_ENVELOPE_YSIZE 20
#define MAX_ENVELOPE_TEXT_LEN (MAX_ENVELOPE_XSIZE * MAX_ENVELOPE_YSIZE)
#define MIN_CHANGE_PAGES 1
-#define MAX_CHANGE_PAGES 10
+#define MAX_CHANGE_PAGES 16
/* values for elements with content */
#define MIN_ELEMENT_CONTENTS 1
#define PROGRAM_VERSION_MAJOR 3
#define PROGRAM_VERSION_MINOR 0
-#define PROGRAM_VERSION_PATCH 3
+#define PROGRAM_VERSION_PATCH 4
#define PROGRAM_VERSION_RELEASE 0
-#define PROGRAM_VERSION_STRING "3.0.3"
+#define PROGRAM_VERSION_STRING "3.0.4"
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
#define PROGRAM_AUTHOR_STRING "Holger Schemel"
{ TYPE_SWITCH, &setup.editor.el_chars, "Characters:" },
{ TYPE_SWITCH, &setup.editor.el_custom, "Custom:" },
{ TYPE_SWITCH, &setup.editor.el_custom_more, "More Custom:" },
- { TYPE_EMPTY, NULL, "" },
{ TYPE_SWITCH, &setup.editor.el_headlines, "Headlines:" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_LEAVE_MENU, execSetupMain, "Back" },
static void UnmapToolButtons();
static void HandleToolButtons(struct GadgetInfo *);
static int el_act_dir2crm(int, int, int);
+static int el_act2crm(int, int);
static struct GadgetInfo *tool_gadget[NUM_TOOL_BUTTONS];
static int request_gadget_id = -1;
{ 0, +1 }
};
+#if 0
+ if (x == 0 && y == 7)
+ printf("::: %d, %d [%d]\n", GfxElement[x][y], Feld[x][y],
+ crumbled_border_size);
+#endif
+
if (!IN_LEV_FIELD(x, y))
return;
}
else /* crumble neighbour fields */
{
+#if 0
getGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
+#endif
for(i=0; i<4; i++)
{
IS_MOVING(xx, yy))
continue;
+#if 1
+ graphic = el_act2crm(Feld[xx][yy], ACTION_DEFAULT);
+
+ getGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
+#endif
+
if (i == 1 || i == 2)
{
width = crumbled_border_size;
void DrawLevelFieldCrumbledSand(int x, int y)
{
+#if 1
+ int graphic;
+
+ if (!IN_LEV_FIELD(x, y))
+ return;
+
+ graphic = el_act2crm(Feld[x][y], ACTION_DEFAULT);
+
+ DrawLevelFieldCrumbledSandExt(x, y, graphic, 0);
+#else
DrawLevelFieldCrumbledSandExt(x, y, IMG_SAND_CRUMBLED, 0);
+#endif
}
void DrawLevelFieldCrumbledSandDigging(int x, int y, int direction,
return element_info[element].graphic[action];
}
+int el_act2crm(int element, int action)
+{
+ element = GFX_ELEMENT(element);
+
+ return element_info[element].crumbled[action];
+}
+
int el_dir2img(int element, int direction)
{
element = GFX_ELEMENT(element);