From: Holger Schemel Date: Tue, 29 Aug 2006 21:30:03 +0000 (+0200) Subject: rocksndiamonds-3.2.2 X-Git-Tag: 3.2.2^2 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7758484aa10294db3689a7eacc9c4b64132d5d6e;p=rocksndiamonds.git rocksndiamonds-3.2.2 --- diff --git a/src/Makefile b/src/Makefile index 5c273676..7b6345e1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -125,7 +125,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/conf_e2g.c b/src/conf_e2g.c index d597d1b3..5f1685b4 100644 --- a/src/conf_e2g.c +++ b/src/conf_e2g.c @@ -2830,36 +2830,36 @@ element_to_graphic[] = IMG_CURRENT_CE_SCORE }, { - EL_LAST_CE_1, -1, -1, FALSE, - IMG_LAST_CE_1 + EL_PREV_CE_1, -1, -1, FALSE, + IMG_PREV_CE_1 }, { - EL_LAST_CE_2, -1, -1, FALSE, - IMG_LAST_CE_2 + EL_PREV_CE_2, -1, -1, FALSE, + IMG_PREV_CE_2 }, { - EL_LAST_CE_3, -1, -1, FALSE, - IMG_LAST_CE_3 + EL_PREV_CE_3, -1, -1, FALSE, + IMG_PREV_CE_3 }, { - EL_LAST_CE_4, -1, -1, FALSE, - IMG_LAST_CE_4 + EL_PREV_CE_4, -1, -1, FALSE, + IMG_PREV_CE_4 }, { - EL_LAST_CE_5, -1, -1, FALSE, - IMG_LAST_CE_5 + EL_PREV_CE_5, -1, -1, FALSE, + IMG_PREV_CE_5 }, { - EL_LAST_CE_6, -1, -1, FALSE, - IMG_LAST_CE_6 + EL_PREV_CE_6, -1, -1, FALSE, + IMG_PREV_CE_6 }, { - EL_LAST_CE_7, -1, -1, FALSE, - IMG_LAST_CE_7 + EL_PREV_CE_7, -1, -1, FALSE, + IMG_PREV_CE_7 }, { - EL_LAST_CE_8, -1, -1, FALSE, - IMG_LAST_CE_8 + EL_PREV_CE_8, -1, -1, FALSE, + IMG_PREV_CE_8 }, { EL_NEXT_CE_1, -1, -1, FALSE, diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 3596063d..b67f1f53 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -3484,45 +3484,45 @@ struct ConfigInfo image_config[] = { "current_ce_score.ypos", "12" }, { "current_ce_score.frames", "1" }, - { "last_ce_1", "RocksMore.pcx" }, - { "last_ce_1.xpos", "0" }, - { "last_ce_1.ypos", "7" }, - { "last_ce_1.frames", "1" }, - - { "last_ce_2", "RocksMore.pcx" }, - { "last_ce_2.xpos", "1" }, - { "last_ce_2.ypos", "7" }, - { "last_ce_2.frames", "1" }, - - { "last_ce_3", "RocksMore.pcx" }, - { "last_ce_3.xpos", "2" }, - { "last_ce_3.ypos", "7" }, - { "last_ce_3.frames", "1" }, - - { "last_ce_4", "RocksMore.pcx" }, - { "last_ce_4.xpos", "3" }, - { "last_ce_4.ypos", "7" }, - { "last_ce_4.frames", "1" }, - - { "last_ce_5", "RocksMore.pcx" }, - { "last_ce_5.xpos", "4" }, - { "last_ce_5.ypos", "7" }, - { "last_ce_5.frames", "1" }, - - { "last_ce_6", "RocksMore.pcx" }, - { "last_ce_6.xpos", "5" }, - { "last_ce_6.ypos", "7" }, - { "last_ce_6.frames", "1" }, - - { "last_ce_7", "RocksMore.pcx" }, - { "last_ce_7.xpos", "6" }, - { "last_ce_7.ypos", "7" }, - { "last_ce_7.frames", "1" }, - - { "last_ce_8", "RocksMore.pcx" }, - { "last_ce_8.xpos", "7" }, - { "last_ce_8.ypos", "7" }, - { "last_ce_8.frames", "1" }, + { "prev_ce_1", "RocksMore.pcx" }, + { "prev_ce_1.xpos", "0" }, + { "prev_ce_1.ypos", "7" }, + { "prev_ce_1.frames", "1" }, + + { "prev_ce_2", "RocksMore.pcx" }, + { "prev_ce_2.xpos", "1" }, + { "prev_ce_2.ypos", "7" }, + { "prev_ce_2.frames", "1" }, + + { "prev_ce_3", "RocksMore.pcx" }, + { "prev_ce_3.xpos", "2" }, + { "prev_ce_3.ypos", "7" }, + { "prev_ce_3.frames", "1" }, + + { "prev_ce_4", "RocksMore.pcx" }, + { "prev_ce_4.xpos", "3" }, + { "prev_ce_4.ypos", "7" }, + { "prev_ce_4.frames", "1" }, + + { "prev_ce_5", "RocksMore.pcx" }, + { "prev_ce_5.xpos", "4" }, + { "prev_ce_5.ypos", "7" }, + { "prev_ce_5.frames", "1" }, + + { "prev_ce_6", "RocksMore.pcx" }, + { "prev_ce_6.xpos", "5" }, + { "prev_ce_6.ypos", "7" }, + { "prev_ce_6.frames", "1" }, + + { "prev_ce_7", "RocksMore.pcx" }, + { "prev_ce_7.xpos", "6" }, + { "prev_ce_7.ypos", "7" }, + { "prev_ce_7.frames", "1" }, + + { "prev_ce_8", "RocksMore.pcx" }, + { "prev_ce_8.xpos", "7" }, + { "prev_ce_8.ypos", "7" }, + { "prev_ce_8.frames", "1" }, { "next_ce_1", "RocksMore.pcx" }, { "next_ce_1.xpos", "0" }, diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 06f4ffe6..332c6ac0 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -724,14 +724,14 @@ #define IMG_TRIGGER_CE_SCORE 703 #define IMG_CURRENT_CE_VALUE 704 #define IMG_CURRENT_CE_SCORE 705 -#define IMG_LAST_CE_1 706 -#define IMG_LAST_CE_2 707 -#define IMG_LAST_CE_3 708 -#define IMG_LAST_CE_4 709 -#define IMG_LAST_CE_5 710 -#define IMG_LAST_CE_6 711 -#define IMG_LAST_CE_7 712 -#define IMG_LAST_CE_8 713 +#define IMG_PREV_CE_1 706 +#define IMG_PREV_CE_2 707 +#define IMG_PREV_CE_3 708 +#define IMG_PREV_CE_4 709 +#define IMG_PREV_CE_5 710 +#define IMG_PREV_CE_6 711 +#define IMG_PREV_CE_7 712 +#define IMG_PREV_CE_8 713 #define IMG_NEXT_CE_1 714 #define IMG_NEXT_CE_2 715 #define IMG_NEXT_CE_3 716 diff --git a/src/conftime.h b/src/conftime.h index 1009d8da..78c8fc41 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-08-29 19:52]" +#define COMPILE_DATE_STRING "[2006-08-29 23:29]" diff --git a/src/editor.c b/src/editor.c index 6ec3cd8f..2a7a8e4e 100644 --- a/src/editor.c +++ b/src/editor.c @@ -4144,15 +4144,15 @@ static int editor_el_reference[] = EL_CURRENT_CE_VALUE, EL_CURRENT_CE_SCORE, - EL_LAST_CE_8, - EL_LAST_CE_7, - EL_LAST_CE_6, - EL_LAST_CE_5, - - EL_LAST_CE_4, - EL_LAST_CE_3, - EL_LAST_CE_2, - EL_LAST_CE_1, + EL_PREV_CE_8, + EL_PREV_CE_7, + EL_PREV_CE_6, + EL_PREV_CE_5, + + EL_PREV_CE_4, + EL_PREV_CE_3, + EL_PREV_CE_2, + EL_PREV_CE_1, EL_NEXT_CE_1, EL_NEXT_CE_2, diff --git a/src/game.c b/src/game.c index 7eb62bb5..d8eb7353 100644 --- a/src/game.c +++ b/src/game.c @@ -176,7 +176,7 @@ (e) == EL_TRIGGER_CE_SCORE ? (ch)->actual_trigger_ce_score : \ (e) == EL_CURRENT_CE_VALUE ? (cv) : \ (e) == EL_CURRENT_CE_SCORE ? (cs) : \ - (e) >= EL_LAST_CE_8 && (e) <= EL_NEXT_CE_8 ? \ + (e) >= EL_PREV_CE_8 && (e) <= EL_NEXT_CE_8 ? \ RESOLVED_REFERENCE_ELEMENT(be, e) : \ (e)) @@ -12546,10 +12546,6 @@ static void SaveEngineSnapshotValues_RND() engine_snapshot_rnd.belt_anim_mode[i * 4 + j] = anim_mode; } } - -#if 0 - printf("::: SAVE: %d RNDs\n", game.num_random_calls); -#endif } static void LoadEngineSnapshotValues_RND() @@ -12582,10 +12578,6 @@ static void LoadEngineSnapshotValues_RND() } } -#if 0 - printf("::: LOADING ... : %d RNDs\n", num_random_calls); -#endif - if (level.game_engine_type == GAME_ENGINE_TYPE_RND) { InitRND(tape.random_seed); @@ -12600,10 +12592,6 @@ static void LoadEngineSnapshotValues_RND() Error(ERR_RETURN, "number of random calls is %d", game.num_random_calls); Error(ERR_EXIT, "this should not happen -- please debug"); } - -#if 0 - printf("::: LOADED: %d RNDs\n", num_random_calls); -#endif } static void SaveEngineSnapshotBuffer(void *buffer, int size) diff --git a/src/game_em/Makefile b/src/game_em/Makefile index 4fc21cd0..aec69d09 100644 --- a/src/game_em/Makefile +++ b/src/game_em/Makefile @@ -1,7 +1,7 @@ # ============================================================================= # Rocks'n'Diamonds Makefile (game_em) # ----------------------------------------------------------------------------- -# (c) 1995-2006 Holger Schemel +# (c) 1995-2005 Holger Schemel # ----------------------------------------------------------------------------- # Emerald Mine for X11 © 2000,2001 David Tritscher # ============================================================================= diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 916ce2bd..ae54541f 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -328,17 +328,8 @@ void WaitUntilDelayReached(unsigned long *counter_var, unsigned long delay) /* random generator functions */ /* ------------------------------------------------------------------------- */ -#if 0 -static int foo = -1; -#endif - unsigned int init_random_number(int nr, long seed) { -#if 0 - if (nr == 0) - foo = 0; -#endif - if (seed == NEW_RANDOMIZE) { #if defined(TARGET_SDL) @@ -358,26 +349,7 @@ unsigned int init_random_number(int nr, long seed) unsigned int get_random_number(int nr, int max) { -#if 0 - if (max > 0) - { - long int rnd_raw = random_linux_libc(nr); - unsigned int rnd = rnd_raw % max; - - if (nr == 0) - { - printf("::: %d: %d [%d MOD %d]\n", foo++, rnd, rnd_raw, max); - } - - return rnd; - } - else - { - return 0; - } -#else return (max > 0 ? random_linux_libc(nr) % max : 0); -#endif } diff --git a/src/main.c b/src/main.c index ccf8e42a..25bdd22b 100644 --- a/src/main.c +++ b/src/main.c @@ -3695,43 +3695,43 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = "growing wall (horizontal, BD style)" }, { - "last_ce_8", - "last_ce", + "prev_ce_8", + "prev_ce", "CE 8 positions earlier in list" }, { - "last_ce_7", - "last_ce", + "prev_ce_7", + "prev_ce", "CE 7 positions earlier in list" }, { - "last_ce_6", - "last_ce", + "prev_ce_6", + "prev_ce", "CE 6 positions earlier in list" }, { - "last_ce_5", - "last_ce", + "prev_ce_5", + "prev_ce", "CE 5 positions earlier in list" }, { - "last_ce_4", - "last_ce", + "prev_ce_4", + "prev_ce", "CE 4 positions earlier in list" }, { - "last_ce_3", - "last_ce", + "prev_ce_3", + "prev_ce", "CE 3 positions earlier in list" }, { - "last_ce_2", - "last_ce", + "prev_ce_2", + "prev_ce", "CE 2 positions earlier in list" }, { - "last_ce_1", - "last_ce", + "prev_ce_1", + "prev_ce", "CE 1 position earlier in list" }, { diff --git a/src/main.h b/src/main.h index a88e12b8..893d8d8f 100644 --- a/src/main.h +++ b/src/main.h @@ -1303,14 +1303,14 @@ #define EL_BD_EXPANDABLE_WALL 713 -#define EL_LAST_CE_8 714 -#define EL_LAST_CE_7 715 -#define EL_LAST_CE_6 716 -#define EL_LAST_CE_5 717 -#define EL_LAST_CE_4 718 -#define EL_LAST_CE_3 719 -#define EL_LAST_CE_2 720 -#define EL_LAST_CE_1 721 +#define EL_PREV_CE_8 714 +#define EL_PREV_CE_7 715 +#define EL_PREV_CE_6 716 +#define EL_PREV_CE_5 717 +#define EL_PREV_CE_4 718 +#define EL_PREV_CE_3 719 +#define EL_PREV_CE_2 720 +#define EL_PREV_CE_1 721 #define EL_SELF 722 #define EL_NEXT_CE_1 723 #define EL_NEXT_CE_2 724