From: Holger Schemel Date: Sun, 6 Jun 2004 23:57:07 +0000 (+0200) Subject: rocksndiamonds-3.1.0 X-Git-Tag: 3.1.0^2 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=201eaae5ae325e0c99e43ab240163a99dc5c0db9;p=rocksndiamonds.git rocksndiamonds-3.1.0 * fixed bug with crash when writing user levelinfo.conf the first time --- diff --git a/CHANGES b/CHANGES index e949e68f..05c4210e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,23 @@ -Release Version 3.1.0 [?? ??? ????] +Release Version 3.1.0 [07 JUN 2004] ----------------------------------- + - fixed obvious bug with wrong "Murphy" graphics (when digging etc.) + - fixed a lot of Emerald Mine and Supaplex game engine emulation bugs + - re-converted Emerald Mine and Supaplex levels to apply engine fixes + - changed default snap/drop keys from left/right Shift to Control keys + - added level loader for loading native Emerald Mine levels + - added level loader for loading native Supaplex packed levels + - added group elements for multiple matches and random element creation + - added elements that can be digged or left behind by custom elements + - added element "Sokoban field with player" missing for Sokoban levels + - added custom element features to allow building of teleporters + - added option to use step limit instead of time limit for level + - added pressing "space" key as valid action to select menu options + - added clipboard (cut and paste buttons) for custom and group elements + - added shortcut to dump brush (type ":DB" in editor) for use in forum + - added network multiplayer code for Windows (still only command line) + - replaced old tutorial level set with far better one by Niko Böhm + - "contributions" levels now separate package to make base set smaller + - too many bugfixes and changes to list them all here (see ChangeLog) Release Version 3.0.8 [14 DEC 2003] ----------------------------------- diff --git a/ChangeLog b/ChangeLog index 4c579db9..0e836744 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-06-07 + * fixed bug with crash when writing user levelinfo.conf the first time + 2004-06-06 * added option "convert LEVELDIR [NR]" to command line batch commands * re-converted Supaplex levels to apply latest engine fixes diff --git a/src/Makefile b/src/Makefile index 8cc3ee95..53bf4003 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,7 +22,7 @@ ifdef X11_PATH # path to X11 specified by top level Makefile XINC_PATH = $(X11_PATH)/include XLIB_PATH = $(X11_PATH)/lib X11_INCL = -I$(XINC_PATH) -X11_LIBS = -L$(XLIB_PATH) +X11_LIBS = -L$(XLIB_PATH) -lX11 endif AR = ar @@ -55,7 +55,7 @@ endif ifeq ($(PLATFORM),macosx) PLATFORM = unix -TARGET=sdl +TARGET = sdl endif ifeq ($(PLATFORM),os2) @@ -64,7 +64,7 @@ PROGNAME = ../$(PROGBASE).exe EXTRA_CFLAGS = -Zbin-files -D__ST_MT_ERRNO__ -Zmtd -fomit-frame-pointer EXTRA_LDFLAGS = -lsocket PLATFORM = unix -TARGET=x11 +TARGET = x11 endif ifeq ($(PLATFORM),unix) @@ -85,16 +85,13 @@ endif ifeq ($(TARGET),x11) SYS_CFLAGS = -DTARGET_X11 $(X11_INCL) -SYS_LDFLAGS = $(X11_LIBS) -lX11 +SYS_LDFLAGS = $(X11_LIBS) endif ifeq ($(TARGET),sdl) SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags) -ifeq ($(PLATFORM),macosx) -SYS_LDFLAGS = -lSDL_image -lSDL_mixer -lsmpeg $(shell sdl-config --libs) -else -SYS_LDFLAGS = -lSDL_image -lSDL_mixer -lSDL_net $(shell sdl-config --libs) -endif +SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg +SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --libs) endif ifeq ($(TARGET),allegro) @@ -121,7 +118,7 @@ CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR) CONFIG = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(JOYSTICK) -DEBUG = -DDEBUG -g +# DEBUG = -DDEBUG -g # PROFILING = $(PROFILING_FLAGS) # OPTIONS = $(DEBUG) -Wall # only for debugging purposes diff --git a/src/conftime.h b/src/conftime.h index e2b33e8d..7e962cc6 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-06-06 16:37]" +#define COMPILE_DATE_STRING "[2004-06-07 01:56]" diff --git a/src/game.c b/src/game.c index ea898eba..762035dc 100644 --- a/src/game.c +++ b/src/game.c @@ -10051,7 +10051,7 @@ void TestIfElementTouchesCustomElement(int x, int y) boolean change_center_element = FALSE; int center_element_change_page = 0; int center_element = Feld[x][y]; /* should always be non-moving! */ - int border_trigger_element; + int border_trigger_element = EL_UNDEFINED; int i, j; for (i = 0; i < NUM_DIRECTIONS; i++) diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 1d5a3591..dc01ad4c 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -1593,23 +1593,23 @@ static LevelDirTree ldi; static struct TokenInfo levelinfo_tokens[] = { /* level directory info */ - { TYPE_STRING, &ldi.identifier, "identifier" }, - { TYPE_STRING, &ldi.name, "name" }, - { TYPE_STRING, &ldi.name_sorting, "name_sorting" }, - { TYPE_STRING, &ldi.author, "author" }, - { TYPE_STRING, &ldi.imported_from, "imported_from" }, - { TYPE_INTEGER, &ldi.levels, "levels" }, - { TYPE_INTEGER, &ldi.first_level, "first_level" }, - { TYPE_INTEGER, &ldi.sort_priority, "sort_priority" }, - { TYPE_BOOLEAN, &ldi.latest_engine, "latest_engine" }, - { TYPE_BOOLEAN, &ldi.level_group, "level_group" }, - { TYPE_BOOLEAN, &ldi.readonly, "readonly" }, - { TYPE_STRING, &ldi.graphics_set, "graphics_set" }, - { TYPE_STRING, &ldi.sounds_set, "sounds_set" }, - { TYPE_STRING, &ldi.music_set, "music_set" }, - { TYPE_STRING, &ldi.level_filename, "filename" }, - { TYPE_STRING, &ldi.level_filetype, "filetype" }, - { TYPE_STRING, &ldi.handicap, "handicap" } + { TYPE_STRING, &ldi.identifier, "identifier" }, + { TYPE_STRING, &ldi.name, "name" }, + { TYPE_STRING, &ldi.name_sorting, "name_sorting" }, + { TYPE_STRING, &ldi.author, "author" }, + { TYPE_STRING, &ldi.imported_from, "imported_from" }, + { TYPE_INTEGER, &ldi.levels, "levels" }, + { TYPE_INTEGER, &ldi.first_level, "first_level" }, + { TYPE_INTEGER, &ldi.sort_priority, "sort_priority" }, + { TYPE_BOOLEAN, &ldi.latest_engine, "latest_engine" }, + { TYPE_BOOLEAN, &ldi.level_group, "level_group" }, + { TYPE_BOOLEAN, &ldi.readonly, "readonly" }, + { TYPE_STRING, &ldi.graphics_set, "graphics_set" }, + { TYPE_STRING, &ldi.sounds_set, "sounds_set" }, + { TYPE_STRING, &ldi.music_set, "music_set" }, + { TYPE_STRING, &ldi.level_filename, "filename" }, + { TYPE_STRING, &ldi.level_filetype, "filetype" }, + { TYPE_BOOLEAN, &ldi.handicap, "handicap" } }; static void setTreeInfoToDefaults(TreeInfo *ldi, int type) @@ -1786,6 +1786,8 @@ static void freeTreeInfo(TreeInfo *ldi) if (ldi->type == TREE_TYPE_LEVEL_DIR) { + checked_free(ldi->imported_from); + checked_free(ldi->graphics_set); checked_free(ldi->sounds_set); checked_free(ldi->music_set); @@ -1793,6 +1795,9 @@ static void freeTreeInfo(TreeInfo *ldi) checked_free(ldi->graphics_path); checked_free(ldi->sounds_path); checked_free(ldi->music_path); + + checked_free(ldi->level_filename); + checked_free(ldi->level_filetype); } } @@ -2628,7 +2633,9 @@ static void SaveUserLevelInfo() for (i = 0; i < NUM_LEVELINFO_TOKENS; i++) if (i != LEVELINFO_TOKEN_IDENTIFIER && i != LEVELINFO_TOKEN_NAME_SORTING && - i != LEVELINFO_TOKEN_IMPORTED_FROM) + i != LEVELINFO_TOKEN_IMPORTED_FROM && + i != LEVELINFO_TOKEN_FILENAME && + i != LEVELINFO_TOKEN_FILETYPE) fprintf(file, "%s\n", getSetupLine(levelinfo_tokens, "", i)); fclose(file); diff --git a/src/libgame/x11.c b/src/libgame/x11.c index 2a21abcc..6d5cb0a9 100644 --- a/src/libgame/x11.c +++ b/src/libgame/x11.c @@ -425,12 +425,14 @@ inline Pixel X11GetPixelFromRGB(unsigned int color_r, unsigned int color_g, inline void X11DestroyImage(XImage *ximage) { +#if defined(TARGET_X11_NATIVE) /* this seems to be needed for OS/2, but does not hurt on other platforms */ if (ximage->data != NULL) { free(ximage->data); ximage->data = NULL; } +#endif /* TARGET_X11_NATIVE */ XDestroyImage(ximage); }