From: Holger Schemel Date: Sun, 11 May 2003 01:17:54 +0000 (+0200) Subject: rnd-20030511-2-src X-Git-Tag: 3.0.0^2~65 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=54a07f99492ff2571a6bec16fef524de5b4439fb;p=rocksndiamonds.git rnd-20030511-2-src --- diff --git a/src/conftime.h b/src/conftime.h index d896f4a3..c4519f2d 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-05-11 02:07]" +#define COMPILE_DATE_STRING "[2003-05-11 03:13]" diff --git a/src/editor.c b/src/editor.c index da21b2dd..6553ee4f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -116,6 +116,10 @@ #define ED_AREA_ELEM_CONTENT3_YPOS (ED_SETTINGS_YPOS(2) + \ ED_GADGET_DISTANCE) +#define ED_AREA_ELEM_CONTENT4_XPOS (17 * MINI_TILEX) +#define ED_AREA_ELEM_CONTENT4_YPOS (ED_SETTINGS_YPOS(8) + \ + ED_GADGET_DISTANCE - MINI_TILEY) + /* values for random placement background drawing area */ #define ED_AREA_RANDOM_BACKGROUND_XPOS (29 * MINI_TILEX) #define ED_AREA_RANDOM_BACKGROUND_YPOS (31 * MINI_TILEY) @@ -313,11 +317,12 @@ #define GADGET_ID_ELEMENT_CONTENT_7 (GADGET_ID_DRAWING_AREA_FIRST + 8) #define GADGET_ID_AMOEBA_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 9) #define GADGET_ID_CUSTOM_GRAPHIC (GADGET_ID_DRAWING_AREA_FIRST + 10) -#define GADGET_ID_CUSTOM_CHANGED (GADGET_ID_DRAWING_AREA_FIRST + 11) -#define GADGET_ID_RANDOM_BACKGROUND (GADGET_ID_DRAWING_AREA_FIRST + 12) +#define GADGET_ID_CUSTOM_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 11) +#define GADGET_ID_CUSTOM_CHANGED (GADGET_ID_DRAWING_AREA_FIRST + 12) +#define GADGET_ID_RANDOM_BACKGROUND (GADGET_ID_DRAWING_AREA_FIRST + 13) /* text input identifiers */ -#define GADGET_ID_TEXT_INPUT_FIRST (GADGET_ID_DRAWING_AREA_FIRST + 13) +#define GADGET_ID_TEXT_INPUT_FIRST (GADGET_ID_DRAWING_AREA_FIRST + 14) #define GADGET_ID_LEVEL_NAME (GADGET_ID_TEXT_INPUT_FIRST + 0) #define GADGET_ID_LEVEL_AUTHOR (GADGET_ID_TEXT_INPUT_FIRST + 1) @@ -366,18 +371,19 @@ #define GADGET_ID_EM_SLIPPERY_GEMS (GADGET_ID_CHECKBUTTON_FIRST + 6) #define GADGET_ID_CUSTOM_INDESTRUCTIBLE (GADGET_ID_CHECKBUTTON_FIRST + 7) #define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 8) -#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 9) -#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 10) -#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 11) -#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 12) -#define GADGET_ID_CUSTOM_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 13) -#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 14) -#define GADGET_ID_CUSTOM_CHANGEABLE (GADGET_ID_CHECKBUTTON_FIRST + 15) -#define GADGET_ID_CHANGE_DELAY_FIXED (GADGET_ID_CHECKBUTTON_FIRST + 16) -#define GADGET_ID_CHANGE_DELAY_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 17) +#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 9) +#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 10) +#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 11) +#define GADGET_ID_CUSTOM_CAN_EXPLODE (GADGET_ID_CHECKBUTTON_FIRST + 12) +#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 13) +#define GADGET_ID_CUSTOM_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 14) +#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 15) +#define GADGET_ID_CUSTOM_CHANGEABLE (GADGET_ID_CHECKBUTTON_FIRST + 16) +#define GADGET_ID_CHANGE_DELAY_FIXED (GADGET_ID_CHECKBUTTON_FIRST + 17) +#define GADGET_ID_CHANGE_DELAY_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 18) /* gadgets for buttons in element list */ -#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 18) +#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 19) #define GADGET_ID_ELEMENTLIST_LAST (GADGET_ID_ELEMENTLIST_FIRST + \ ED_NUM_ELEMENTLIST_BUTTONS - 1) @@ -470,17 +476,18 @@ #define ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS 4 #define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE 5 #define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 6 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 7 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 8 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 9 -#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 10 -#define ED_CHECKBUTTON_ID_CUSTOM_WALKABLE 11 -#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 12 -#define ED_CHECKBUTTON_ID_CUSTOM_CHANGEABLE 13 -#define ED_CHECKBUTTON_ID_CHANGE_DELAY_FIXED 14 -#define ED_CHECKBUTTON_ID_CHANGE_DELAY_RANDOM 15 - -#define ED_NUM_CHECKBUTTONS 16 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 7 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 8 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 9 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE 10 +#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 11 +#define ED_CHECKBUTTON_ID_CUSTOM_WALKABLE 12 +#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 13 +#define ED_CHECKBUTTON_ID_CUSTOM_CHANGEABLE 14 +#define ED_CHECKBUTTON_ID_CHANGE_DELAY_FIXED 15 +#define ED_CHECKBUTTON_ID_CHANGE_DELAY_RANDOM 16 + +#define ED_NUM_CHECKBUTTONS 17 #define ED_CHECKBUTTON_ID_LEVEL_FIRST ED_CHECKBUTTON_ID_DOUBLE_SPEED #define ED_CHECKBUTTON_ID_LEVEL_LAST ED_CHECKBUTTON_ID_RANDOM_RESTRICTED @@ -770,7 +777,7 @@ static struct NULL, "diggable, collectible or pushable" }, { - ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(9), + ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(10), GADGET_ID_CUSTOM_WALKABLE_LAYER, 0, options_walkable_layer, &index_walkable_layer, @@ -783,7 +790,7 @@ static struct 0, options_time_units, &index_time_units, &custom_element.change.delay_frames, - "delay units given in", "time units for change" + "delay time given in", "delay time units for change" }, { ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(8), @@ -984,30 +991,36 @@ static struct }, { ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(5), + GADGET_ID_CUSTOM_CAN_MOVE, + &custom_element_properties[EP_CAN_MOVE], + "can move", "element can move in some direction" + }, + { + ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(6), GADGET_ID_CUSTOM_CAN_FALL, &custom_element_properties[EP_CAN_FALL], "can fall", "element can fall down" }, { - ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(6), + ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(7), GADGET_ID_CUSTOM_CAN_SMASH, &custom_element_properties[EP_CAN_SMASH], "can smash", "element can smash other elements" }, { - ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(7), - GADGET_ID_CUSTOM_CAN_MOVE, - &custom_element_properties[EP_CAN_MOVE], - "can move", "element can move in some direction" + ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(8), + GADGET_ID_CUSTOM_CAN_EXPLODE, + &custom_element_properties[EP_CAN_EXPLODE], + "can explode to:", "element can explode to other elements" }, { - ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(8), + ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(9), GADGET_ID_CUSTOM_SLIPPERY, &custom_element_properties[EP_SLIPPERY], "slippery", "other elements can fall down from it" }, { - ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(9), + ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(10), GADGET_ID_CUSTOM_WALKABLE, &custom_element_properties[EP_WALKABLE], NULL, "player can walk on the same field" @@ -2440,6 +2453,26 @@ static void CreateDrawingAreas() level_editor_gadget[id] = gi; + /* ... one areas for custom element explosion content ... */ + id = GADGET_ID_CUSTOM_CONTENT; + gi = CreateGadget(GDI_CUSTOM_ID, id, + GDI_CUSTOM_TYPE_ID, i, + GDI_X, SX + ED_AREA_ELEM_CONTENT4_XPOS, + GDI_Y, SX + ED_AREA_ELEM_CONTENT4_YPOS, + GDI_WIDTH, 3 * MINI_TILEX, + GDI_HEIGHT, 3 * MINI_TILEY, + GDI_TYPE, GD_TYPE_DRAWING_AREA, + GDI_ITEM_SIZE, MINI_TILEX, MINI_TILEY, + GDI_EVENT_MASK, event_mask, + GDI_CALLBACK_INFO, HandleDrawingAreaInfo, + GDI_CALLBACK_ACTION, HandleDrawingAreas, + GDI_END); + + if (gi == NULL) + Error(ERR_EXIT, "cannot create gadget"); + + level_editor_gadget[id] = gi; + /* ... one for each custom element change target element ... */ id = GADGET_ID_CUSTOM_CHANGED; gi = CreateGadget(GDI_CUSTOM_ID, id, @@ -3524,6 +3557,41 @@ static void DrawCustomGraphicElementArea() MapDrawingArea(GADGET_ID_CUSTOM_GRAPHIC); } +static void DrawCustomContentArea() +{ + struct GadgetInfo *gi = level_editor_gadget[GADGET_ID_CUSTOM_CONTENT]; + int area_sx = SX + ED_AREA_ELEM_CONTENT4_XPOS; + int area_sy = SY + ED_AREA_ELEM_CONTENT4_YPOS; + int x, y; + + if (!IS_CUSTOM_ELEMENT(properties_element)) + { + /* this should never happen */ + Error(ERR_WARN, "element %d is no custom element", properties_element); + + return; + } + + for (y=0; y<3; y++) + for (x=0; x<3; x++) + ElementContent[0][x][y] = custom_element.content[x][y]; + + DrawElementBorder(area_sx, area_sy, 3 * MINI_TILEX, 3 * MINI_TILEY, TRUE); + + for (y=0; y<3; y++) + for (x=0; x<3; x++) +#if 1 + DrawMiniGraphicExt(drawto, + gi->x + x * MINI_TILEX, + gi->y + y * MINI_TILEY, + el2edimg(ElementContent[0][0][0])); +#else + DrawMiniElement(area_x + x, area_y + y, ElementContent[0][x][y]); +#endif + + MapDrawingArea(GADGET_ID_CUSTOM_CONTENT); +} + static void DrawCustomChangedArea() { struct GadgetInfo *gi = level_editor_gadget[GADGET_ID_CUSTOM_CHANGED]; @@ -4092,7 +4160,10 @@ static void DrawPropertiesConfig() MapCheckbuttonGadget(i); if (IS_CUSTOM_ELEMENT(properties_element)) + { DrawCustomGraphicElementArea(); + DrawCustomContentArea(); + } else if (IS_AMOEBOID(properties_element)) DrawAmoebaContentArea(); else diff --git a/src/game.c b/src/game.c index cd8e5341..ccf0d477 100644 --- a/src/game.c +++ b/src/game.c @@ -1809,7 +1809,7 @@ void Explode(int ex, int ey, int phase, int mode) if (IS_PLAYER(x, y)) KillHeroUnlessProtected(x, y); - else if (IS_CAN_EXPLODE(element)) + else if (CAN_EXPLODE(element)) { Feld[x][y] = Store2[x][y]; Store2[x][y] = 0; @@ -3247,7 +3247,7 @@ void StartMoving(int x, int y) { int flamed = MovingOrBlocked2Element(xx, yy); - if (IS_ENEMY(flamed) || IS_CAN_EXPLODE(flamed)) + if (IS_ENEMY(flamed) || CAN_EXPLODE(flamed)) Bang(xx, yy); else RemoveMovingField(xx, yy); diff --git a/src/init.c b/src/init.c index 88bfaeb8..97752134 100644 --- a/src/init.c +++ b/src/init.c @@ -1251,6 +1251,79 @@ void InitElementPropertiesStatic() -1 }; + static int ep_can_explode[] = + { + EL_BOMB, + EL_DYNAMITE_ACTIVE, + EL_DYNAMITE, + EL_DYNABOMB_PLAYER_1_ACTIVE, + EL_DYNABOMB_PLAYER_2_ACTIVE, + EL_DYNABOMB_PLAYER_3_ACTIVE, + EL_DYNABOMB_PLAYER_4_ACTIVE, + EL_DYNABOMB_INCREASE_NUMBER, + EL_DYNABOMB_INCREASE_SIZE, + EL_DYNABOMB_INCREASE_POWER, + EL_SP_DISK_RED_ACTIVE, + EL_BUG, + EL_MOLE, + EL_PENGUIN, + EL_PIG, + EL_DRAGON, + EL_SATELLITE, + EL_SP_DISK_RED, + EL_SP_DISK_ORANGE, + EL_SP_DISK_YELLOW, + EL_SP_SNIKSNAK, + EL_SP_ELECTRON, + EL_DX_SUPABOMB, + -1 + }; + + static int ep_can_move[] = + { + /* only stored in level file */ + EL_BUG_RIGHT, + EL_BUG_UP, + EL_BUG_LEFT, + EL_BUG_DOWN, + EL_SPACESHIP_RIGHT, + EL_SPACESHIP_UP, + EL_SPACESHIP_LEFT, + EL_SPACESHIP_DOWN, + EL_BD_BUTTERFLY_RIGHT, + EL_BD_BUTTERFLY_UP, + EL_BD_BUTTERFLY_LEFT, + EL_BD_BUTTERFLY_DOWN, + EL_BD_FIREFLY_RIGHT, + EL_BD_FIREFLY_UP, + EL_BD_FIREFLY_LEFT, + EL_BD_FIREFLY_DOWN, + EL_PACMAN_RIGHT, + EL_PACMAN_UP, + EL_PACMAN_LEFT, + EL_PACMAN_DOWN, + + /* level file and runtime elements */ + EL_BUG, + EL_SPACESHIP, + EL_BD_BUTTERFLY, + EL_BD_FIREFLY, + EL_YAMYAM, + EL_DARK_YAMYAM, + EL_ROBOT, + EL_PACMAN, + EL_MOLE, + EL_PENGUIN, + EL_PIG, + EL_DRAGON, + EL_SATELLITE, + EL_SP_SNIKSNAK, + EL_SP_ELECTRON, + EL_BALLOON, + EL_SPRING, + -1 + }; + static int ep_can_fall[] = { EL_ROCK, @@ -1416,51 +1489,6 @@ void InitElementPropertiesStatic() -1 }; - static int ep_can_move[] = - { - /* only stored in level file */ - EL_BUG_RIGHT, - EL_BUG_UP, - EL_BUG_LEFT, - EL_BUG_DOWN, - EL_SPACESHIP_RIGHT, - EL_SPACESHIP_UP, - EL_SPACESHIP_LEFT, - EL_SPACESHIP_DOWN, - EL_BD_BUTTERFLY_RIGHT, - EL_BD_BUTTERFLY_UP, - EL_BD_BUTTERFLY_LEFT, - EL_BD_BUTTERFLY_DOWN, - EL_BD_FIREFLY_RIGHT, - EL_BD_FIREFLY_UP, - EL_BD_FIREFLY_LEFT, - EL_BD_FIREFLY_DOWN, - EL_PACMAN_RIGHT, - EL_PACMAN_UP, - EL_PACMAN_LEFT, - EL_PACMAN_DOWN, - - /* level file and runtime elements */ - EL_BUG, - EL_SPACESHIP, - EL_BD_BUTTERFLY, - EL_BD_FIREFLY, - EL_YAMYAM, - EL_DARK_YAMYAM, - EL_ROBOT, - EL_PACMAN, - EL_MOLE, - EL_PENGUIN, - EL_PIG, - EL_DRAGON, - EL_SATELLITE, - EL_SP_SNIKSNAK, - EL_SP_ELECTRON, - EL_BALLOON, - EL_SPRING, - -1 - }; - static int ep_can_pass_magic_wall[] = { EL_ROCK, @@ -1553,34 +1581,6 @@ void InitElementPropertiesStatic() -1 }; - static int ep_can_explode[] = - { - EL_BOMB, - EL_DYNAMITE_ACTIVE, - EL_DYNAMITE, - EL_DYNABOMB_PLAYER_1_ACTIVE, - EL_DYNABOMB_PLAYER_2_ACTIVE, - EL_DYNABOMB_PLAYER_3_ACTIVE, - EL_DYNABOMB_PLAYER_4_ACTIVE, - EL_DYNABOMB_INCREASE_NUMBER, - EL_DYNABOMB_INCREASE_SIZE, - EL_DYNABOMB_INCREASE_POWER, - EL_SP_DISK_RED_ACTIVE, - EL_BUG, - EL_MOLE, - EL_PENGUIN, - EL_PIG, - EL_DRAGON, - EL_SATELLITE, - EL_SP_DISK_RED, - EL_SP_DISK_ORANGE, - EL_SP_DISK_YELLOW, - EL_SP_SNIKSNAK, - EL_SP_ELECTRON, - EL_DX_SUPABOMB, - -1 - }; - static int ep_bd_element[] = { EL_EMPTY, diff --git a/src/main.h b/src/main.h index 302ba8c4..4b69a028 100644 --- a/src/main.h +++ b/src/main.h @@ -68,8 +68,8 @@ #define EP_UNUSED_4 4 #define EP_INDESTRUCTIBLE 5 #define EP_SLIPPERY 6 -#define EP_UNUSED_7 7 -#define EP_UNUSED_8 8 +#define EP_CAN_EXPLODE 7 +#define EP_CAN_MOVE 8 #define EP_CAN_FALL 9 #define EP_CAN_SMASH 10 #define EP_WALKABLE_OVER 11 @@ -95,50 +95,48 @@ /* values for pre-defined properties */ #define EP_PLAYER 27 -#define EP_CAN_MOVE 28 -#define EP_CAN_PASS_MAGIC_WALL 29 -#define EP_SWITCHABLE 30 -#define EP_DONT_TOUCH 31 -#define EP_ENEMY 32 -#define EP_DONT_GO_TO 33 -#define EP_CAN_EXPLODE 34 -#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_BELT 44 -#define EP_BELT_ACTIVE 45 -#define EP_BELT_SWITCH 46 -#define EP_TUBE 47 -#define EP_KEYGATE 48 -#define EP_AMOEBOID 49 -#define EP_AMOEBALIVE 50 -#define EP_HAS_CONTENT 51 -#define EP_ACTIVE_BOMB 52 -#define EP_INACTIVE 53 +#define EP_CAN_PASS_MAGIC_WALL 28 +#define EP_SWITCHABLE 29 +#define EP_DONT_TOUCH 30 +#define EP_ENEMY 31 +#define EP_DONT_GO_TO 32 +#define EP_BD_ELEMENT 33 +#define EP_SP_ELEMENT 34 +#define EP_SB_ELEMENT 35 +#define EP_GEM 36 +#define EP_FOOD_DARK_YAMYAM 37 +#define EP_FOOD_PENGUIN 38 +#define EP_FOOD_PIG 39 +#define EP_HISTORIC_WALL 40 +#define EP_HISTORIC_SOLID 41 +#define EP_BELT 42 +#define EP_BELT_ACTIVE 43 +#define EP_BELT_SWITCH 44 +#define EP_TUBE 45 +#define EP_KEYGATE 46 +#define EP_AMOEBOID 47 +#define EP_AMOEBALIVE 48 +#define EP_HAS_CONTENT 49 +#define EP_ACTIVE_BOMB 50 +#define EP_INACTIVE 51 /* values for derived properties (determined from properties above) */ -#define EP_ACCESSIBLE_OVER 54 -#define EP_ACCESSIBLE_INSIDE 55 -#define EP_ACCESSIBLE_UNDER 56 -#define EP_WALKABLE 57 -#define EP_PASSABLE 58 -#define EP_ACCESSIBLE 59 -#define EP_SNAPPABLE 60 -#define EP_WALL 61 -#define EP_SOLID_FOR_PUSHING 62 -#define EP_DRAGONFIRE_PROOF 63 -#define EP_EXPLOSION_PROOF 64 +#define EP_ACCESSIBLE_OVER 52 +#define EP_ACCESSIBLE_INSIDE 53 +#define EP_ACCESSIBLE_UNDER 54 +#define EP_WALKABLE 55 +#define EP_PASSABLE 56 +#define EP_ACCESSIBLE 57 +#define EP_SNAPPABLE 58 +#define EP_WALL 59 +#define EP_SOLID_FOR_PUSHING 60 +#define EP_DRAGONFIRE_PROOF 61 +#define EP_EXPLOSION_PROOF 62 /* values for internal purpose only (level editor) */ -#define EP_WALK_TO_OBJECT 65 +#define EP_WALK_TO_OBJECT 63 -#define NUM_ELEMENT_PROPERTIES 66 +#define NUM_ELEMENT_PROPERTIES 64 #define NUM_EP_BITFIELDS ((NUM_ELEMENT_PROPERTIES + 31) / 32) #define EP_BITFIELD_BASE 0 @@ -179,6 +177,8 @@ #define IS_COLLECTIBLE(e) HAS_PROPERTY(e, EP_COLLECTIBLE) #define IS_INDESTRUCTIBLE(e) HAS_PROPERTY(e, EP_INDESTRUCTIBLE) #define IS_SLIPPERY(e) HAS_PROPERTY(e, EP_SLIPPERY) +#define CAN_EXPLODE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE) +#define CAN_MOVE(e) HAS_PROPERTY(e, EP_CAN_MOVE) #define CAN_FALL(e) HAS_PROPERTY(e, EP_CAN_FALL) #define CAN_SMASH(e) HAS_PROPERTY(e, EP_CAN_SMASH) #define IS_WALKABLE_OVER(e) HAS_PROPERTY(e, EP_WALKABLE_OVER) @@ -198,13 +198,11 @@ /* macros for pre-defined properties */ #define ELEM_IS_PLAYER(e) HAS_PROPERTY(e, EP_PLAYER) -#define CAN_MOVE(e) HAS_PROPERTY(e, EP_CAN_MOVE) #define CAN_PASS_MAGIC_WALL(e) HAS_PROPERTY(e, EP_CAN_PASS_MAGIC_WALL) #define IS_SWITCHABLE(e) HAS_PROPERTY(e, EP_SWITCHABLE) #define DONT_TOUCH(e) HAS_PROPERTY(e, EP_DONT_TOUCH) #define IS_ENEMY(e) HAS_PROPERTY(e, EP_ENEMY) #define DONT_GO_TO(e) HAS_PROPERTY(e, EP_DONT_GO_TO) -#define IS_CAN_EXPLODE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE) #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) @@ -1040,6 +1038,8 @@ struct CustomElementInfo int walk_to_action; /* only for level editor; not stored */ int walkable_layer; /* only for level editor; not stored */ + int content[3][3]; /* new elements after explosion */ + struct CustomElementChangeInfo change; };