From 2c3e90cdbd6923993994d4128bc8bb1b7ad7ba25 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 21 Aug 2003 03:04:33 +0200 Subject: [PATCH] rnd-20030821-1-src --- CHANGES | 3 +++ src/Makefile | 2 +- src/conftime.h | 2 +- src/files.c | 44 +++++++++++++++++++++++++++++++++++++++----- src/init.c | 6 +++--- src/main.h | 8 ++++---- 6 files changed, 51 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index 59296c15..d98310b8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +Release Version 3.0.2 [?? ??? ????] +----------------------------------- + Release Version 3.0.1 [18 AUG 2003] ----------------------------------- - fixed bug that caused a crash at startup under Solaris diff --git a/src/Makefile b/src/Makefile index ff288776..595f5996 100644 --- a/src/Makefile +++ b/src/Makefile @@ -103,7 +103,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 052f4be3..0bbfa4c1 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-08-18 21:51]" +#define COMPILE_DATE_STRING "[2003-08-21 03:01]" diff --git a/src/files.c b/src/files.c index 358333a4..e17ef526 100644 --- a/src/files.c +++ b/src/files.c @@ -682,16 +682,17 @@ void LoadLevelFromFilename(struct LevelInfo *level, char *filename) static void LoadLevel_InitLevel(struct LevelInfo *level, char *filename) { - int x, y; + int i, j, x, y; if (leveldir_current == NULL) /* only when dumping level */ return; + /* determine correct game engine version of current level */ if (IS_LEVELCLASS_CONTRIBUTION(leveldir_current) || IS_LEVELCLASS_USER(leveldir_current)) { #if 0 - printf("::: This level is private or contributed: '%s'\n", filename); + printf("\n::: This level is private or contributed: '%s'\n", filename); #endif /* For user contributed and private levels, use the version of @@ -719,7 +720,7 @@ static void LoadLevel_InitLevel(struct LevelInfo *level, char *filename) else { #if 0 - printf("::: ALWAYS USE LATEST ENGINE FOR THIS LEVEL: [%d] '%s'\n", + printf("\n::: ALWAYS USE LATEST ENGINE FOR THIS LEVEL: [%d] '%s'\n", leveldir_current->sort_priority, filename); #endif @@ -743,7 +744,7 @@ static void LoadLevel_InitLevel(struct LevelInfo *level, char *filename) level->em_slippery_gems = TRUE; } - /* map elements which have changed in newer versions */ + /* map elements that have changed in newer versions */ for(y=0; yfieldy; y++) { for(x=0; xfieldx; x++) @@ -773,6 +774,36 @@ static void LoadLevel_InitLevel(struct LevelInfo *level, char *filename) } } + /* map custom element change events that have changed in newer versions + (these following values have accidentally changed in version 3.0.1) */ + if (level->game_version <= VERSION_IDENT(3,0,0)) + { + for (i=0; i < NUM_CUSTOM_ELEMENTS; i++) + { + int element = EL_CUSTOM_START + i; + + /* order of checking events to be mapped is important */ + for (j=CE_BY_OTHER; j >= CE_BY_PLAYER; j--) + { + if (HAS_CHANGE_EVENT(element, j - 2)) + { + SET_CHANGE_EVENT(element, j - 2, FALSE); + SET_CHANGE_EVENT(element, j, TRUE); + } + } + + /* order of checking events to be mapped is important */ + for (j=CE_OTHER_GETS_COLLECTED; j >= CE_COLLISION; j--) + { + if (HAS_CHANGE_EVENT(element, j - 1)) + { + SET_CHANGE_EVENT(element, j - 1, FALSE); + SET_CHANGE_EVENT(element, j, TRUE); + } + } + } + } + /* copy elements to runtime playfield array */ for(x=0; x 0) tape->engine_version = engine_version; + else + tape->engine_version = tape->game_version; } return chunk_size; @@ -1506,7 +1539,8 @@ void LoadTapeFromFilename(char *filename) tape.length_seconds = GetTapeLength(); #if 0 - printf("tape version: %d\n", tape.game_version); + printf("tape game version: %d\n", tape.game_version); + printf("tape engine version: %d\n", tape.engine_version); #endif } diff --git a/src/init.c b/src/init.c index 2403d415..c129a676 100644 --- a/src/init.c +++ b/src/init.c @@ -3241,7 +3241,7 @@ void InitLevelArtworkInfo() static void InitImages() { -#if 0 +#if 1 setLevelArtworkDir(artwork.gfx_first); #endif @@ -3267,7 +3267,7 @@ static void InitSound(char *identifier) if (identifier == NULL) identifier = artwork.snd_current->identifier; -#if 0 +#if 1 /* set artwork path to send it to the sound server process */ setLevelArtworkDir(artwork.snd_first); #endif @@ -3281,7 +3281,7 @@ static void InitMusic(char *identifier) if (identifier == NULL) identifier = artwork.mus_current->identifier; -#if 0 +#if 1 /* set artwork path to send it to the sound server process */ setLevelArtworkDir(artwork.mus_first); #endif diff --git a/src/main.h b/src/main.h index 7f085896..5a9ef388 100644 --- a/src/main.h +++ b/src/main.h @@ -156,7 +156,7 @@ (PROPERTY_VAR(e,p) &= ~PROPERTY_BIT(p))) -/* values for change events for custom elements */ +/* values for change events for custom elements (stored in level file) */ #define CE_DELAY 0 #define CE_TOUCHED_BY_PLAYER 1 #define CE_PRESSED_BY_PLAYER 2 @@ -174,7 +174,7 @@ #define CE_OTHER_GETS_COLLECTED 14 #define CE_OTHER_GETS_DROPPED 15 -/* values for internal purpose only (level editor) */ +/* values for activating change events (also stored in level file!) */ #define CE_BY_PLAYER 16 #define CE_BY_COLLISION 17 #define CE_BY_OTHER 18 @@ -980,9 +980,9 @@ #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 0 -#define PROGRAM_VERSION_PATCH 1 +#define PROGRAM_VERSION_PATCH 2 #define PROGRAM_VERSION_RELEASE 0 -#define PROGRAM_VERSION_STRING "3.0.1" +#define PROGRAM_VERSION_STRING "3.0.2" #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" -- 2.34.1