From: Holger Schemel Date: Sat, 15 Nov 2003 00:03:55 +0000 (+0100) Subject: rnd-20031115-1-src X-Git-Tag: 3.0.8^2~26 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e093d2ffd9547d556207818c38f71d5afa455ad0;p=rocksndiamonds.git rnd-20031115-1-src * fixed a very nasty bug in dragon turning code in TurnRoundExt() (that only showed up on Linux, but not on Windows systems) * fixed turning movement of butterflies and fireflies (no frame reset) * enhanced sniksnak turning movement (two steps instead of only one) * Version number set to 3.0.8. * Version 3.0.7 released. --- diff --git a/CHANGES b/CHANGES index a279c296..0df493d1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +Release Version 3.0.8 [?? ??? ????] +----------------------------------- + Release Version 3.0.7 [10 NOV 2003] ----------------------------------- - fixed incorrectly displayed animation for attacking dragon diff --git a/ChangeLog b/ChangeLog index 2a751c5c..6e736355 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2003-11-14 + * fixed a very nasty bug in dragon turning code in TurnRoundExt() + (that only showed up on Linux, but not on Windows systems) + +2003-11-13 + * fixed turning movement of butterflies and fireflies (no frame reset) + * enhanced sniksnak turning movement (two steps instead of only one) + +2003-11-10 + * Version number set to 3.0.8. + +2003-11-10 + * Version 3.0.7 released. + 2003-11-09 * fixed reset of player animation frame when, for example, walking, digging or collecting share the same animation diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 1b9fd4ee..d0758de8 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -166,12 +166,14 @@ struct ConfigInfo image_config[] = { "bd_butterfly.frames", "2" }, { "bd_butterfly.anim_mode", "pingpong" }, { "bd_butterfly.delay", "4" }, + { "bd_butterfly.global_sync", "true" }, { "bd_butterfly.right", "RocksElements.pcx" }, { "bd_butterfly.right.xpos", "4" }, { "bd_butterfly.right.ypos", "12" }, { "bd_butterfly.right.frames", "2" }, { "bd_butterfly.right.anim_mode", "pingpong" }, { "bd_butterfly.right.delay", "4" }, + { "bd_butterfly.right.global_sync", "true" }, { "bd_butterfly.right.EDITOR", "RocksElements.pcx" }, { "bd_butterfly.right.EDITOR.xpos", "8" }, { "bd_butterfly.right.EDITOR.ypos", "12" }, @@ -182,6 +184,7 @@ struct ConfigInfo image_config[] = { "bd_butterfly.up.frames", "2" }, { "bd_butterfly.up.anim_mode", "pingpong" }, { "bd_butterfly.up.delay", "4" }, + { "bd_butterfly.up.global_sync", "true" }, { "bd_butterfly.up.EDITOR", "RocksElements.pcx" }, { "bd_butterfly.up.EDITOR.xpos", "9" }, { "bd_butterfly.up.EDITOR.ypos", "12" }, @@ -192,6 +195,7 @@ struct ConfigInfo image_config[] = { "bd_butterfly.left.frames", "2" }, { "bd_butterfly.left.anim_mode", "pingpong" }, { "bd_butterfly.left.delay", "4" }, + { "bd_butterfly.left.global_sync", "true" }, { "bd_butterfly.left.EDITOR", "RocksElements.pcx" }, { "bd_butterfly.left.EDITOR.xpos", "10" }, { "bd_butterfly.left.EDITOR.ypos", "12" }, @@ -202,6 +206,7 @@ struct ConfigInfo image_config[] = { "bd_butterfly.down.frames", "2" }, { "bd_butterfly.down.anim_mode", "pingpong" }, { "bd_butterfly.down.delay", "4" }, + { "bd_butterfly.down.global_sync", "true" }, { "bd_butterfly.down.EDITOR", "RocksElements.pcx" }, { "bd_butterfly.down.EDITOR.xpos", "11" }, { "bd_butterfly.down.EDITOR.ypos", "12" }, @@ -213,12 +218,14 @@ struct ConfigInfo image_config[] = { "bd_firefly.frames", "2" }, { "bd_firefly.anim_mode", "pingpong" }, { "bd_firefly.delay", "4" }, + { "bd_firefly.global_sync", "true" }, { "bd_firefly.right", "RocksElements.pcx" }, { "bd_firefly.right.xpos", "6" }, { "bd_firefly.right.ypos", "12" }, { "bd_firefly.right.frames", "2" }, { "bd_firefly.right.anim_mode", "pingpong" }, { "bd_firefly.right.delay", "4" }, + { "bd_firefly.right.global_sync", "true" }, { "bd_firefly.right.EDITOR", "RocksElements.pcx" }, { "bd_firefly.right.EDITOR.xpos", "12" }, { "bd_firefly.right.EDITOR.ypos", "12" }, @@ -229,6 +236,7 @@ struct ConfigInfo image_config[] = { "bd_firefly.up.frames", "2" }, { "bd_firefly.up.anim_mode", "pingpong" }, { "bd_firefly.up.delay", "4" }, + { "bd_firefly.up.global_sync", "true" }, { "bd_firefly.up.EDITOR", "RocksElements.pcx" }, { "bd_firefly.up.EDITOR.xpos", "13" }, { "bd_firefly.up.EDITOR.ypos", "12" }, @@ -239,6 +247,7 @@ struct ConfigInfo image_config[] = { "bd_firefly.left.frames", "2" }, { "bd_firefly.left.anim_mode", "pingpong" }, { "bd_firefly.left.delay", "4" }, + { "bd_firefly.left.global_sync", "true" }, { "bd_firefly.left.EDITOR", "RocksElements.pcx" }, { "bd_firefly.left.EDITOR.xpos", "14" }, { "bd_firefly.left.EDITOR.ypos", "12" }, @@ -249,6 +258,7 @@ struct ConfigInfo image_config[] = { "bd_firefly.down.frames", "2" }, { "bd_firefly.down.anim_mode", "pingpong" }, { "bd_firefly.down.delay", "4" }, + { "bd_firefly.down.global_sync", "true" }, { "bd_firefly.down.EDITOR", "RocksElements.pcx" }, { "bd_firefly.down.EDITOR.xpos", "15" }, { "bd_firefly.down.EDITOR.ypos", "12" }, @@ -529,35 +539,59 @@ struct ConfigInfo image_config[] = { "sp_sniksnak.turning_from_left.up", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_left.up.xpos", "12" }, { "sp_sniksnak.turning_from_left.up.ypos", "6" }, - { "sp_sniksnak.turning_from_left.up.frames", "1" }, + { "sp_sniksnak.turning_from_left.up.frames", "2" }, + { "sp_sniksnak.turning_from_left.up.delay", "4" }, + { "sp_sniksnak.turning_from_left.up.offset", "1408" }, + { "sp_sniksnak.turning_from_left.up.anim_mode","linear" }, { "sp_sniksnak.turning_from_left.down", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_left.down.xpos", "13" }, { "sp_sniksnak.turning_from_left.down.ypos", "6" }, - { "sp_sniksnak.turning_from_left.down.frames","1" }, + { "sp_sniksnak.turning_from_left.down.frames","2" }, + { "sp_sniksnak.turning_from_left.down.delay", "4" }, + { "sp_sniksnak.turning_from_left.down.offset","1504" }, + { "sp_sniksnak.turning_from_left.down.anim_mode","linear" }, { "sp_sniksnak.turning_from_right.up", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_right.up.xpos", "15" }, { "sp_sniksnak.turning_from_right.up.ypos", "6" }, - { "sp_sniksnak.turning_from_right.up.frames", "1" }, + { "sp_sniksnak.turning_from_right.up.frames", "2" }, + { "sp_sniksnak.turning_from_right.up.delay", "4" }, + { "sp_sniksnak.turning_from_right.up.offset", "1312" }, + { "sp_sniksnak.turning_from_right.up.anim_mode","linear" }, { "sp_sniksnak.turning_from_right.down", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_right.down.xpos", "14" }, { "sp_sniksnak.turning_from_right.down.ypos", "6" }, - { "sp_sniksnak.turning_from_right.down.frames","1" }, + { "sp_sniksnak.turning_from_right.down.frames","2" }, + { "sp_sniksnak.turning_from_right.down.delay","4" }, + { "sp_sniksnak.turning_from_right.down.offset","1472" }, + { "sp_sniksnak.turning_from_right.down.anim_mode","linear" }, { "sp_sniksnak.turning_from_up.left", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_up.left.xpos", "12" }, { "sp_sniksnak.turning_from_up.left.ypos", "6" }, - { "sp_sniksnak.turning_from_up.left.frames", "1" }, + { "sp_sniksnak.turning_from_up.left.frames", "2" }, + { "sp_sniksnak.turning_from_up.left.delay", "4" }, + { "sp_sniksnak.turning_from_up.left.offset", "896" }, + { "sp_sniksnak.turning_from_up.left.anim_mode","linear" }, { "sp_sniksnak.turning_from_up.right", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_up.right.xpos", "15" }, { "sp_sniksnak.turning_from_up.right.ypos", "6" }, - { "sp_sniksnak.turning_from_up.right.frames", "1" }, + { "sp_sniksnak.turning_from_up.right.frames", "2" }, + { "sp_sniksnak.turning_from_up.right.delay", "4" }, + { "sp_sniksnak.turning_from_up.right.offset", "928" }, + { "sp_sniksnak.turning_from_up.right.anim_mode","linear" }, { "sp_sniksnak.turning_from_down.left", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_down.left.xpos", "13" }, { "sp_sniksnak.turning_from_down.left.ypos", "6" }, - { "sp_sniksnak.turning_from_down.left.frames","1" }, + { "sp_sniksnak.turning_from_down.left.frames","2" }, + { "sp_sniksnak.turning_from_down.left.delay", "4" }, + { "sp_sniksnak.turning_from_down.left.offset","864" }, + { "sp_sniksnak.turning_from_down.left.anim_mode","linear" }, { "sp_sniksnak.turning_from_down.right", "RocksSP.pcx" }, { "sp_sniksnak.turning_from_down.right.xpos", "14" }, { "sp_sniksnak.turning_from_down.right.ypos", "6" }, - { "sp_sniksnak.turning_from_down.right.frames","1" }, + { "sp_sniksnak.turning_from_down.right.frames","2" }, + { "sp_sniksnak.turning_from_down.right.delay","4" }, + { "sp_sniksnak.turning_from_down.right.offset","960" }, + { "sp_sniksnak.turning_from_down.right.anim_mode","linear" }, { "sp_electron", "RocksSP.pcx" }, { "sp_electron.xpos", "8" }, diff --git a/src/conftime.h b/src/conftime.h index 26d241a2..b3dbda7e 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-11-10 02:01]" +#define COMPILE_DATE_STRING "[2003-11-14 23:13]" diff --git a/src/game.c b/src/game.c index 71013bf5..f5c787f6 100644 --- a/src/game.c +++ b/src/game.c @@ -1460,6 +1460,10 @@ void InitGame() printf("Player %d %sactive.\n", i + 1, (stored_player[i].active ? "" : "not ")); } + +#if 0 + printf("::: starting game [%d]\n", FrameCounter); +#endif } void InitMovDir(int x, int y) @@ -3388,6 +3392,11 @@ inline static void TurnRoundExt(int x, int y) int rnd_value = 24; int rnd = RND(rnd_value); +#if 0 + if (FrameCounter < 1 && x == 0 && y == 29) + printf(":2: %d/%d: %d [%d]\n", x, y, MovDir[x][y], FrameCounter); +#endif + if (can_move_on && rnd > rnd_value / 8) MovDir[x][y] = old_move_dir; else if (can_turn_left && can_turn_right) @@ -3402,8 +3411,25 @@ inline static void TurnRoundExt(int x, int y) xx = x + move_xy[MovDir[x][y]].x; yy = y + move_xy[MovDir[x][y]].y; +#if 0 + if (FrameCounter < 1 && x == 0 && y == 29) + printf(":3: %d/%d: %d (%d/%d: %d) [%d]\n", x, y, MovDir[x][y], + xx, yy, Feld[xx][yy], + FrameCounter); +#endif + +#if 1 + if (!IN_LEV_FIELD_AND_IS_FREE(xx, yy)) + MovDir[x][y] = old_move_dir; +#else if (!IS_FREE(xx, yy)) MovDir[x][y] = old_move_dir; +#endif + +#if 0 + if (FrameCounter < 1 && x == 0 && y == 29) + printf(":4: %d/%d: %d [%d]\n", x, y, MovDir[x][y], FrameCounter); +#endif MovDelay[x][y] = 0; } @@ -4094,6 +4120,11 @@ void StartMoving(int x, int y) #endif #endif +#if 0 + if (FrameCounter < 1 && x == 0 && y == 29) + printf(":1: %d/%d: %d [%d]\n", x, y, MovDir[x][y], FrameCounter); +#endif + if (!MovDelay[x][y]) /* start new movement phase */ { /* all objects that can change their move direction after each step @@ -4108,6 +4139,11 @@ void StartMoving(int x, int y) { TurnRound(x, y); +#if 0 + if (FrameCounter < 1 && x == 0 && y == 29) + printf(":9: %d: %d [%d]\n", y, MovDir[x][y], FrameCounter); +#endif + if (MovDelay[x][y] && (element == EL_BUG || element == EL_SPACESHIP || element == EL_SP_SNIKSNAK || @@ -6129,6 +6165,10 @@ void GameActions() if (tape.pausing) return; +#if 0 + printf("::: getting new tape action [%d]\n", FrameCounter); +#endif + recorded_player_action = (tape.playing ? TapePlayAction() : NULL); for (i=0; i 0 ? random_linux_libc(nr) % max : 0); } +#else +unsigned int get_random_number(int nr, unsigned int max) +{ + unsigned int rnd = (max > 0 ? random_linux_libc(nr) % max : 0); + + if (nr == 0 && FrameCounter < 2) + printf("::: %d [%d]\n", rnd, FrameCounter); + +#if 0 + if (nr == 0 && FrameCounter < 2 && rnd == 8) + rnd /= 0; +#endif + + return rnd; +} +#endif /* ------------------------------------------------------------------------- */ diff --git a/src/main.c b/src/main.c index a06efd1f..00fea82a 100644 --- a/src/main.c +++ b/src/main.c @@ -3699,6 +3699,8 @@ struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] = { ".emptying", ACTION_EMPTYING, FALSE }, { ".changing", ACTION_CHANGING, FALSE }, { ".exploding", ACTION_EXPLODING, FALSE }, + { ".boring", ACTION_BORING, FALSE }, + { ".sleeping", ACTION_SLEEPING, TRUE }, { ".dying", ACTION_DYING, FALSE }, { ".turning", ACTION_TURNING, FALSE }, { ".turning_from_left", ACTION_TURNING_FROM_LEFT, FALSE }, diff --git a/src/main.h b/src/main.h index 7c1134f6..cbfbf67f 100644 --- a/src/main.h +++ b/src/main.h @@ -914,15 +914,17 @@ #define ACTION_EMPTYING 22 #define ACTION_CHANGING 23 #define ACTION_EXPLODING 24 -#define ACTION_DYING 25 -#define ACTION_TURNING 26 -#define ACTION_TURNING_FROM_LEFT 27 -#define ACTION_TURNING_FROM_RIGHT 28 -#define ACTION_TURNING_FROM_UP 29 -#define ACTION_TURNING_FROM_DOWN 30 -#define ACTION_OTHER 31 - -#define NUM_ACTIONS 32 +#define ACTION_BORING 25 +#define ACTION_SLEEPING 26 +#define ACTION_DYING 27 +#define ACTION_TURNING 28 +#define ACTION_TURNING_FROM_LEFT 29 +#define ACTION_TURNING_FROM_RIGHT 30 +#define ACTION_TURNING_FROM_UP 31 +#define ACTION_TURNING_FROM_DOWN 32 +#define ACTION_OTHER 33 + +#define NUM_ACTIONS 34 /* values for special image configuration suffixes (must match game mode) */ #define GFX_SPECIAL_ARG_MAIN 0