From: Holger Schemel Date: Tue, 2 Feb 2010 22:51:55 +0000 (+0100) Subject: rnd-20100202-2-src X-Git-Tag: 3.3.0.0^2~44 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=266e2ba566bc95aa4e4d727ea8d585ee92ecf086;p=rocksndiamonds.git rnd-20100202-2-src --- diff --git a/ChangeLog b/ChangeLog index babc5be4..037fc4b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2010-02-02 * added small kludge that allows transparent pushing animation over - non-black background + non-black background (by using "game.use_masked_pushing: true") * added editor flag to Sokoban field/object elements to automatically finish solved Sokoban style levels (even if they contain non-Sokoban elements, which prevents auto-enabling this feature for such levels) diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 4c7e7cb7..f76d7663 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -6348,6 +6348,7 @@ struct ConfigInfo image_config[] = { "game.forced_scroll_delay_value", "-1" }, { "game.use_native_emc_graphics_engine", "false" }, + { "game.use_masked_pushing", "false" }, { "[player].boring_delay_fixed", "1000" }, { "[player].boring_delay_random", "1000" }, diff --git a/src/conf_var.c b/src/conf_var.c index f0993e6e..dc35009e 100644 --- a/src/conf_var.c +++ b/src/conf_var.c @@ -5012,6 +5012,10 @@ struct TokenIntPtrInfo image_config_vars[] = "game.use_native_emc_graphics_engine", &game.use_native_emc_graphics_engine }, + { + "game.use_masked_pushing", + &game.use_masked_pushing + }, { "[player].boring_delay_fixed", &game.player_boring_delay_fixed diff --git a/src/conftime.h b/src/conftime.h index 39e9985c..351c99c3 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2010-02-02 16:06" +#define COMPILE_DATE_STRING "2010-02-02 23:29" diff --git a/src/game.h b/src/game.h index c957974c..e6b3f396 100644 --- a/src/game.h +++ b/src/game.h @@ -117,6 +117,7 @@ struct GameInfo /* values for graphics engine customization */ boolean use_native_emc_graphics_engine; + boolean use_masked_pushing; int forced_scroll_delay_value; int scroll_delay_value; diff --git a/src/tools.c b/src/tools.c index aacba670..07c5a491 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2720,9 +2720,10 @@ void DrawPlayer(struct PlayerInfo *player) /* draw background element under pushed element (like the Sokoban field) */ #if 1 - /* this allows transparent pushing animation over non-black background */ - if (IS_MOVING(jx, jy)) + if (game.use_masked_pushing && IS_MOVING(jx, jy)) { + /* this allows transparent pushing animation over non-black background */ + if (Back[jx][jy]) DrawLevelElement(jx, jy, Back[jx][jy]); else @@ -2733,6 +2734,8 @@ void DrawPlayer(struct PlayerInfo *player) else DrawLevelElement(next_jx, next_jy, EL_EMPTY); } + else if (Back[next_jx][next_jy]) + DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]); #else if (Back[next_jx][next_jy]) DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]);