From: Holger Schemel Date: Fri, 23 Apr 2004 19:40:04 +0000 (+0200) Subject: rnd-20040423-1-src X-Git-Tag: 3.1.0^2~16 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=37b49c4250f7db1000f65efe06ab5969f86a7b84;p=rocksndiamonds.git rnd-20040423-1-src * fixed graphical bug when pushing things from elements walkable inside --- diff --git a/ChangeLog b/ChangeLog index 1f52e0d5..3abd5c1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * added "replace when walkable" to relocate player to walkable element * added "enter"/"leave" event for elements affected by relocation * fixed "direct"/"indirect" change order also for "when change" event + * fixed graphical bug when pushing things from elements walkable inside 2004-04-18 * fixed graphic bug when player is snapping while moving in old levels diff --git a/src/conftime.h b/src/conftime.h index c9566923..bbf0b89c 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-04-22 00:31]" +#define COMPILE_DATE_STRING "[2004-04-23 09:52]" diff --git a/src/game.c b/src/game.c index 0077517d..f0e568b8 100644 --- a/src/game.c +++ b/src/game.c @@ -3503,9 +3503,15 @@ void DynaExplode(int ex, int ey) Explode(x, y, EX_PHASE_START, EX_TYPE_BORDER); #if 1 +#if 1 + if (element != EL_EMPTY && element != EL_EXPLOSION && + !IS_DIGGABLE(element) && !dynabomb_xl) + break; +#else if (element != EL_EMPTY && element != EL_EXPLOSION && !CAN_GROW_INTO(element) && !dynabomb_xl) break; +#endif #else /* !!! extend EL_SAND to anything diggable (but maybe not SP_BASE) !!! */ if (element != EL_EMPTY && element != EL_EXPLOSION && @@ -7554,7 +7560,7 @@ static boolean ChangeElementNow(int x, int y, int element, int page) } #if 1 - /* !!! indirect change before direct change !!! */ + /* this uses direct change before indirect change */ CheckTriggeredElementChangeByPage(x,y,old_element,CE_OTHER_IS_CHANGING,page); #endif @@ -9009,7 +9015,7 @@ static boolean canMoveToValidFieldWithGravity(int x, int y, int move_dir) #if 1 return (IN_LEV_FIELD(newx, newy) && !IS_FREE_OR_PLAYER(newx, newy) && - (IS_DIGGABLE(Feld[newx][newy]) || + (IS_DIGGABLE_WITH_GRAVITY(Feld[newx][newy]) || IS_WALKABLE_FROM(Feld[newx][newy], opposite_dir) || canPassField(newx, newy, move_dir))); #else diff --git a/src/init.c b/src/init.c index 58595e5b..b19f825b 100644 --- a/src/init.c +++ b/src/init.c @@ -2428,6 +2428,14 @@ void InitElementPropertiesStatic() -1 }; + static int ep_sp_buggy_base[] = + { + EL_SP_BUGGY_BASE, + EL_SP_BUGGY_BASE_ACTIVATING, + EL_SP_BUGGY_BASE_ACTIVE, + -1 + }; + static int ep_gem[] = { EL_BD_DIAMOND, @@ -3072,6 +3080,7 @@ void InitElementPropertiesStatic() { ep_bd_element, EP_BD_ELEMENT }, { ep_sp_element, EP_SP_ELEMENT }, { ep_sb_element, EP_SB_ELEMENT }, + { ep_sp_buggy_base, EP_SP_BUGGY_BASE }, { ep_gem, EP_GEM }, { ep_food_dark_yamyam, EP_FOOD_DARK_YAMYAM }, { ep_food_penguin, EP_FOOD_PENGUIN }, @@ -3378,6 +3387,10 @@ void InitElementPropertiesEngine(int engine_version) SET_PROPERTY(i, EP_MAYBE_DONT_COLLIDE_WITH, (i == EL_SP_SNIKSNAK || i == EL_SP_ELECTRON)); + /* ---------- DIGGABLE_WITH_GRAVITY ------------------------------------ */ + SET_PROPERTY(i, EP_DIGGABLE_WITH_GRAVITY, (IS_DIGGABLE(i) && + !IS_SP_BUGGY_BASE(i))); + /* ---------- CAN_MOVE_INTO_ACID --------------------------------------- */ if (COULD_MOVE_INTO_ACID(i) && !IS_CUSTOM_ELEMENT(i)) SET_PROPERTY(i, EP_CAN_MOVE_INTO_ACID, diff --git a/src/main.h b/src/main.h index 7b7342e9..9637f6ad 100644 --- a/src/main.h +++ b/src/main.h @@ -98,60 +98,62 @@ #define EP_BD_ELEMENT 35 #define EP_SP_ELEMENT 36 #define EP_SB_ELEMENT 37 -#define EP_GEM 38 -#define EP_FOOD_DARK_YAMYAM 39 -#define EP_FOOD_PENGUIN 40 -#define EP_FOOD_PIG 41 -#define EP_HISTORIC_WALL 42 -#define EP_HISTORIC_SOLID 43 -#define EP_CLASSIC_ENEMY 44 -#define EP_BELT 45 -#define EP_BELT_ACTIVE 46 -#define EP_BELT_SWITCH 47 -#define EP_TUBE 48 -#define EP_KEYGATE 49 -#define EP_AMOEBOID 50 -#define EP_AMOEBALIVE 51 -#define EP_HAS_CONTENT 52 -#define EP_CAN_TURN_EACH_MOVE 53 -#define EP_CAN_GROW 54 -#define EP_ACTIVE_BOMB 55 -#define EP_INACTIVE 56 +#define EP_SP_BUGGY_BASE 38 +#define EP_GEM 39 +#define EP_FOOD_DARK_YAMYAM 40 +#define EP_FOOD_PENGUIN 41 +#define EP_FOOD_PIG 42 +#define EP_HISTORIC_WALL 43 +#define EP_HISTORIC_SOLID 44 +#define EP_CLASSIC_ENEMY 45 +#define EP_BELT 46 +#define EP_BELT_ACTIVE 47 +#define EP_BELT_SWITCH 48 +#define EP_TUBE 49 +#define EP_KEYGATE 50 +#define EP_AMOEBOID 51 +#define EP_AMOEBALIVE 52 +#define EP_HAS_CONTENT 53 +#define EP_CAN_TURN_EACH_MOVE 54 +#define EP_CAN_GROW 55 +#define EP_ACTIVE_BOMB 56 +#define EP_INACTIVE 57 /* values for special configurable properties (depending on level settings) */ -#define EP_EM_SLIPPERY_WALL 57 +#define EP_EM_SLIPPERY_WALL 58 /* values for special graphics properties (no effect on game engine) */ -#define EP_GFX_CRUMBLED 58 +#define EP_GFX_CRUMBLED 59 /* values for derived properties (determined from properties above) */ -#define EP_ACCESSIBLE_OVER 59 -#define EP_ACCESSIBLE_INSIDE 60 -#define EP_ACCESSIBLE_UNDER 61 -#define EP_WALKABLE 62 -#define EP_PASSABLE 63 -#define EP_ACCESSIBLE 64 -#define EP_COLLECTIBLE 65 -#define EP_SNAPPABLE 66 -#define EP_WALL 67 -#define EP_SOLID_FOR_PUSHING 68 -#define EP_DRAGONFIRE_PROOF 69 -#define EP_EXPLOSION_PROOF 70 -#define EP_CAN_SMASH 71 -#define EP_CAN_EXPLODE 72 -#define EP_CAN_EXPLODE_3X3 73 -#define EP_SP_PORT 74 -#define EP_CAN_EXPLODE_BY_DRAGONFIRE 75 -#define EP_CAN_EXPLODE_BY_EXPLOSION 76 -#define EP_COULD_MOVE_INTO_ACID 77 -#define EP_MAYBE_DONT_COLLIDE_WITH 78 +#define EP_ACCESSIBLE_OVER 60 +#define EP_ACCESSIBLE_INSIDE 61 +#define EP_ACCESSIBLE_UNDER 62 +#define EP_WALKABLE 63 +#define EP_PASSABLE 64 +#define EP_ACCESSIBLE 65 +#define EP_COLLECTIBLE 66 +#define EP_SNAPPABLE 67 +#define EP_WALL 68 +#define EP_SOLID_FOR_PUSHING 69 +#define EP_DRAGONFIRE_PROOF 70 +#define EP_EXPLOSION_PROOF 71 +#define EP_CAN_SMASH 72 +#define EP_CAN_EXPLODE 73 +#define EP_CAN_EXPLODE_3X3 74 +#define EP_SP_PORT 75 +#define EP_CAN_EXPLODE_BY_DRAGONFIRE 76 +#define EP_CAN_EXPLODE_BY_EXPLOSION 77 +#define EP_COULD_MOVE_INTO_ACID 78 +#define EP_MAYBE_DONT_COLLIDE_WITH 79 +#define EP_DIGGABLE_WITH_GRAVITY 80 /* values for internal purpose only (level editor) */ -#define EP_EXPLODE_RESULT 79 -#define EP_WALK_TO_OBJECT 80 -#define EP_DEADLY 81 +#define EP_EXPLODE_RESULT 81 +#define EP_WALK_TO_OBJECT 82 +#define EP_DEADLY 83 -#define NUM_ELEMENT_PROPERTIES 82 +#define NUM_ELEMENT_PROPERTIES 84 #define NUM_EP_BITFIELDS ((NUM_ELEMENT_PROPERTIES + 31) / 32) #define EP_BITFIELD_BASE 0 @@ -349,6 +351,7 @@ #define IS_BD_ELEMENT(e) HAS_PROPERTY(e, EP_BD_ELEMENT) #define IS_SP_ELEMENT(e) HAS_PROPERTY(e, EP_SP_ELEMENT) #define IS_SB_ELEMENT(e) HAS_PROPERTY(e, EP_SB_ELEMENT) +#define IS_SP_BUGGY_BASE(e) HAS_PROPERTY(e, EP_SP_BUGGY_BASE) #define IS_GEM(e) HAS_PROPERTY(e, EP_GEM) #define IS_FOOD_DARK_YAMYAM(e) HAS_PROPERTY(e, EP_FOOD_DARK_YAMYAM) #define IS_FOOD_PENGUIN(e) HAS_PROPERTY(e, EP_FOOD_PENGUIN) @@ -391,7 +394,8 @@ #define CAN_EXPLODE_BY_EXPLOSION(e) \ HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_EXPLOSION) #define COULD_MOVE_INTO_ACID(e) HAS_PROPERTY(e, EP_COULD_MOVE_INTO_ACID) -#define MAYBE_DONT_COLLIDE_WITH(e) HAS_PROPERTY(e, EP_MAYBE_DONT_COLLIDE_WITH) +#define MAYBE_DONT_COLLIDE_WITH(e) HAS_PROPERTY(e, EP_MAYBE_DONT_COLLIDE_WITH) +#define IS_DIGGABLE_WITH_GRAVITY(e) HAS_PROPERTY(e, EP_DIGGABLE_WITH_GRAVITY) /* special macros used in game engine */ #define IS_CUSTOM_ELEMENT(e) ((e) >= EL_CUSTOM_START && \