+2003-10-18
+ * fixed serious bug in code for delayed element pushing
+ * fixed little bug in animation frame selection for pushed elements
+
2003-10-08
- * added config directive for opening and closing Supaplex exit
+ * added configuration option for opening and closing Supaplex exit
+ * added configuration option for moving up/down animation for Murphy
* fixed incorrectly displayed animation for attacking dragon
* fixed bug with not setting initial gravity for each new game
+ * fixed bug with teleportation of player by custom element change
+ * fixed bug with player not getting smashed by rock sometimes
2003-10-06
* Version number set to 3.0.7.
-#define COMPILE_DATE_STRING "[2003-10-14 00:21]"
+#define COMPILE_DATE_STRING "[2003-10-19 00:50]"
element_info[element].collect_score = 10; /* special default */
element_info[element].collect_count = 1; /* special default */
- element_info[element].push_delay_fixed = 2; /* special default */
+ element_info[element].push_delay_fixed = 8; /* special default */
element_info[element].push_delay_random = 8; /* special default */
element_info[element].move_delay_fixed = 0;
element_info[element].move_delay_random = 0;
{
if (!IS_CUSTOM_ELEMENT(i))
{
- element_info[i].push_delay_fixed = 2;
+ element_info[i].push_delay_fixed = 8;
element_info[i].push_delay_random = 8;
}
}
if (!FrameReached(&player->push_delay, player->push_delay_value) &&
!(tape.playing && tape.file_version < FILE_VERSION_2_0) &&
element != EL_SPRING && element != EL_BALLOON)
+ {
+ /* make sure that there is no move delay before next try to push */
+ if (game.engine_version >= VERSION_IDENT(3,0,7))
+ player->move_delay = INITIAL_MOVE_DELAY_OFF;
+
return MF_NO_ACTION;
+ }
if (IS_SB_ELEMENT(element))
{
(level.em_slippery_gems &&
engine_version > VERSION_IDENT(2,0,1)));
}
-
-#if 0
- /* dynamically adjust element properties according to game engine version */
-#if 0
- if (engine_version < RELEASE_IDENT(2,2,0,7))
-#endif
- {
- for (i=0; i < NUM_CUSTOM_ELEMENTS; i++)
- {
- int element = EL_CUSTOM_START + i;
-
- element_info[element].push_delay_fixed = 2;
- element_info[element].push_delay_random = 8;
- }
- }
-#endif
}
static void InitGlobal()
printf("GOT CUSTOM ARTWORK CONFIG FILE '%s'\n", filename);
#endif
+ DrawInitText("Loading artwork config:", 120, FC_GREEN);
+ DrawInitText(ARTWORKINFO_FILENAME(artwork_info->type), 150, FC_YELLOW);
+
/* always start with reliable default values */
for (i=0; i<num_file_list_entries; i++)
{
#include "misc.h"
#include "hash.h"
-/* file names and filename extensions */
-#if !defined(PLATFORM_MSDOS)
-#define LEVELSETUP_DIRECTORY "levelsetup"
-#define SETUP_FILENAME "setup.conf"
-#define LEVELSETUP_FILENAME "levelsetup.conf"
-#define LEVELINFO_FILENAME "levelinfo.conf"
-#define GRAPHICSINFO_FILENAME "graphicsinfo.conf"
-#define SOUNDSINFO_FILENAME "soundsinfo.conf"
-#define MUSICINFO_FILENAME "musicinfo.conf"
-#define LEVELFILE_EXTENSION "level"
-#define TAPEFILE_EXTENSION "tape"
-#define SCOREFILE_EXTENSION "score"
-#else
-#define LEVELSETUP_DIRECTORY "lvlsetup"
-#define SETUP_FILENAME "setup.cnf"
-#define LEVELSETUP_FILENAME "lvlsetup.cnf"
-#define LEVELINFO_FILENAME "lvlinfo.cnf"
-#define GRAPHICSINFO_FILENAME "gfxinfo.cnf"
-#define SOUNDSINFO_FILENAME "sndinfo.cnf"
-#define MUSICINFO_FILENAME "musinfo.cnf"
-#define LEVELFILE_EXTENSION "lvl"
-#define TAPEFILE_EXTENSION "tap"
-#define SCOREFILE_EXTENSION "sco"
-#endif
#define NUM_LEVELCLASS_DESC 8
+
static char *levelclass_desc[NUM_LEVELCLASS_DESC] =
{
"Tutorial Levels",
"DX Boulderdash"
};
-#define LEVELCOLOR(n) (IS_LEVELCLASS_TUTORIAL(n) ? FC_BLUE : \
- IS_LEVELCLASS_CLASSICS(n) ? FC_RED : \
- IS_LEVELCLASS_BD(n) ? FC_GREEN : \
- IS_LEVELCLASS_EM(n) ? FC_YELLOW : \
- IS_LEVELCLASS_SP(n) ? FC_GREEN : \
- IS_LEVELCLASS_DX(n) ? FC_YELLOW : \
- IS_LEVELCLASS_CONTRIBUTION(n) ? FC_GREEN : \
- IS_LEVELCLASS_USER(n) ? FC_RED : \
+
+#define LEVELCOLOR(n) (IS_LEVELCLASS_TUTORIAL(n) ? FC_BLUE : \
+ IS_LEVELCLASS_CLASSICS(n) ? FC_RED : \
+ IS_LEVELCLASS_BD(n) ? FC_GREEN : \
+ IS_LEVELCLASS_EM(n) ? FC_YELLOW : \
+ IS_LEVELCLASS_SP(n) ? FC_GREEN : \
+ IS_LEVELCLASS_DX(n) ? FC_YELLOW : \
+ IS_LEVELCLASS_CONTRIBUTION(n) ? FC_GREEN : \
+ IS_LEVELCLASS_USER(n) ? FC_RED : \
FC_BLUE)
#define LEVELSORTING(n) (IS_LEVELCLASS_TUTORIAL(n) ? 0 : \
IS_LEVELCLASS_USER(n) ? 7 : \
9)
-#define ARTWORKCOLOR(n) (IS_ARTWORKCLASS_CLASSICS(n) ? FC_RED : \
- IS_ARTWORKCLASS_CONTRIBUTION(n) ? FC_YELLOW : \
- IS_ARTWORKCLASS_LEVEL(n) ? FC_GREEN : \
- IS_ARTWORKCLASS_USER(n) ? FC_RED : \
+#define ARTWORKCOLOR(n) (IS_ARTWORKCLASS_CLASSICS(n) ? FC_RED : \
+ IS_ARTWORKCLASS_CONTRIBUTION(n) ? FC_YELLOW : \
+ IS_ARTWORKCLASS_LEVEL(n) ? FC_GREEN : \
+ IS_ARTWORKCLASS_USER(n) ? FC_RED : \
FC_BLUE)
#define ARTWORKSORTING(n) (IS_ARTWORKCLASS_CLASSICS(n) ? 0 : \
- IS_ARTWORKCLASS_CONTRIBUTION(n) ? 1 : \
- IS_ARTWORKCLASS_LEVEL(n) ? 2 : \
- IS_ARTWORKCLASS_USER(n) ? 3 : \
- 9)
+ IS_ARTWORKCLASS_CONTRIBUTION(n) ? 1 : \
+ IS_ARTWORKCLASS_LEVEL(n) ? 2 : \
+ IS_ARTWORKCLASS_USER(n) ? 3 : \
+ 9)
#define TOKEN_VALUE_POSITION 40
#define TOKEN_COMMENT_POSITION 60
#define MAX_COOKIE_LEN 256
-#define ARTWORKINFO_FILENAME(type) ((type) == ARTWORK_TYPE_GRAPHICS ? \
- GRAPHICSINFO_FILENAME : \
- (type) == ARTWORK_TYPE_SOUNDS ? \
- SOUNDSINFO_FILENAME : \
- (type) == ARTWORK_TYPE_MUSIC ? \
- MUSICINFO_FILENAME : "")
-
-#define ARTWORK_DIRECTORY(type) ((type) == ARTWORK_TYPE_GRAPHICS ? \
- GRAPHICS_DIRECTORY : \
- (type) == ARTWORK_TYPE_SOUNDS ? \
- SOUNDS_DIRECTORY : \
- (type) == ARTWORK_TYPE_MUSIC ? \
- MUSIC_DIRECTORY : "")
-
-#define OPTIONS_ARTWORK_DIRECTORY(type) ((type) == ARTWORK_TYPE_GRAPHICS ? \
- options.graphics_directory : \
- (type) == ARTWORK_TYPE_SOUNDS ? \
- options.sounds_directory : \
- (type) == ARTWORK_TYPE_MUSIC ? \
- options.music_directory : "")
-
/* ------------------------------------------------------------------------- */
/* file functions */
return getListEntry(list->next, token);
}
-void setListEntry(SetupFileList *list, char *token, char *value)
+SetupFileList *setListEntry(SetupFileList *list, char *token, char *value)
{
if (list == NULL)
- return;
+ return NULL;
if (strcmp(list->token, token) == 0)
{
free(list->value);
list->value = getStringCopy(value);
+
+ return list;
}
else if (list->next == NULL)
- list->next = newSetupFileList(token, value);
+ return (list->next = newSetupFileList(token, value));
else
- setListEntry(list->next, token, value);
+ return setListEntry(list->next, token, value);
}
#ifdef DEBUG
int line_len;
char line[MAX_LINE_LEN];
char *token, *value, *line_ptr;
- void *setup_file_data;
+ void *setup_file_data, *insert_ptr;
FILE *file;
if (use_hash)
setup_file_data = newSetupFileHash();
else
- setup_file_data = newSetupFileList("", "");
+ insert_ptr = setup_file_data = newSetupFileList("", "");
if (!(file = fopen(filename, MODE_READ)))
{
if (use_hash)
setHashEntry((SetupFileHash *)setup_file_data, token, value);
else
- setListEntry((SetupFileList *)setup_file_data, token, value);
+ insert_ptr = setListEntry((SetupFileList *)insert_ptr, token, value);
}
}
char *getFormattedSetupEntry(char *, char *);
-struct SetupFileList *newSetupFileList(char *, char *);
-void freeSetupFileList(struct SetupFileList *);
-char *getListEntry(struct SetupFileList *, char *);
-void setListEntry(struct SetupFileList *, char *, char *);
+SetupFileList *newSetupFileList(char *, char *);
+void freeSetupFileList(SetupFileList *);
+char *getListEntry(SetupFileList *, char *);
+SetupFileList *setListEntry(SetupFileList *, char *, char *);
SetupFileList *loadSetupFileList(char *);
SetupFileHash *newSetupFileHash();
#define RO_BASE_PATH RO_GAME_DIR
#define RW_BASE_PATH RW_GAME_DIR
+/* directory names */
#define GRAPHICS_DIRECTORY "graphics"
#define SOUNDS_DIRECTORY "sounds"
#define MUSIC_DIRECTORY "music"
#define MUS_CLASSIC_SUBDIR "mus_orig"
#endif
+/* file names and filename extensions */
+#if !defined(PLATFORM_MSDOS)
+#define LEVELSETUP_DIRECTORY "levelsetup"
+#define SETUP_FILENAME "setup.conf"
+#define LEVELSETUP_FILENAME "levelsetup.conf"
+#define LEVELINFO_FILENAME "levelinfo.conf"
+#define GRAPHICSINFO_FILENAME "graphicsinfo.conf"
+#define SOUNDSINFO_FILENAME "soundsinfo.conf"
+#define MUSICINFO_FILENAME "musicinfo.conf"
+#define LEVELFILE_EXTENSION "level"
+#define TAPEFILE_EXTENSION "tape"
+#define SCOREFILE_EXTENSION "score"
+#else
+#define LEVELSETUP_DIRECTORY "lvlsetup"
+#define SETUP_FILENAME "setup.cnf"
+#define LEVELSETUP_FILENAME "lvlsetup.cnf"
+#define LEVELINFO_FILENAME "lvlinfo.cnf"
+#define GRAPHICSINFO_FILENAME "gfxinfo.cnf"
+#define SOUNDSINFO_FILENAME "sndinfo.cnf"
+#define MUSICINFO_FILENAME "musinfo.cnf"
+#define LEVELFILE_EXTENSION "lvl"
+#define TAPEFILE_EXTENSION "tap"
+#define SCOREFILE_EXTENSION "sco"
+#endif
+
/* areas in bitmap PIX_DOOR */
/* meaning in PIX_DB_DOOR: (3 PAGEs)
(artwork).snd_current_identifier : \
(artwork).mus_current_identifier)
+#define ARTWORKINFO_FILENAME(type) \
+ ((type) == ARTWORK_TYPE_GRAPHICS ? \
+ GRAPHICSINFO_FILENAME : \
+ (type) == ARTWORK_TYPE_SOUNDS ? \
+ SOUNDSINFO_FILENAME : \
+ (type) == ARTWORK_TYPE_MUSIC ? \
+ MUSICINFO_FILENAME : "")
+
+#define ARTWORK_DIRECTORY(type) \
+ ((type) == ARTWORK_TYPE_GRAPHICS ? \
+ GRAPHICS_DIRECTORY : \
+ (type) == ARTWORK_TYPE_SOUNDS ? \
+ SOUNDS_DIRECTORY : \
+ (type) == ARTWORK_TYPE_MUSIC ? \
+ MUSIC_DIRECTORY : "")
+
+#define OPTIONS_ARTWORK_DIRECTORY(type) \
+ ((type) == ARTWORK_TYPE_GRAPHICS ? \
+ options.graphics_directory : \
+ (type) == ARTWORK_TYPE_SOUNDS ? \
+ options.sounds_directory : \
+ (type) == ARTWORK_TYPE_MUSIC ? \
+ options.music_directory : "")
+
/* type definitions */
typedef int (*EventFilter)(const Event *);
{
int element = MovingOrBlocked2Element(next_jx, next_jy);
int graphic = el_act_dir2img(element, ACTION_PUSHING, move_dir);
+#if 1
+ int frame = getGraphicAnimationFrame(graphic, player->StepFrame);
+#else
int frame = getGraphicAnimationFrame(graphic, player->Frame);
+#endif
DrawGraphicShifted(px, py, sxx, syy, graphic, frame,
NO_CUTTING, NO_MASKING);