GADGET_ID_BD_ACID_TURNS_TO_ELEMENT,
GADGET_ID_BD_BITER_EATS_ELEMENT,
GADGET_ID_BD_BLADDER_CONVERTS_BY_ELEMENT,
+ GADGET_ID_BD_NUT_CONTENT,
GADGET_ID_START_ELEMENT,
GADGET_ID_ARTWORK_ELEMENT,
GADGET_ID_EXPLOSION_ELEMENT,
ED_DRAWING_ID_BD_ACID_TURNS_TO_ELEMENT,
ED_DRAWING_ID_BD_BITER_EATS_ELEMENT,
ED_DRAWING_ID_BD_BLADDER_CONVERTS_BY_ELEMENT,
+ ED_DRAWING_ID_BD_NUT_CONTENT,
ED_DRAWING_ID_START_ELEMENT,
ED_DRAWING_ID_ARTWORK_ELEMENT,
ED_DRAWING_ID_EXPLOSION_ELEMENT,
&level.bd_bladder_converts_by_element, 1, 1,
"Turns to clock by touching:", NULL, NULL, NULL, "Turns to clock by touching element"
},
+ {
+ ED_DRAWING_ID_BD_NUT_CONTENT,
+ ED_AREA_1X1_SETTINGS_XPOS(0), ED_AREA_1X1_SETTINGS_YPOS(1),
+ ED_AREA_1X1_SETTINGS_XOFF, ED_AREA_1X1_SETTINGS_YOFF,
+ GADGET_ID_BD_NUT_CONTENT, GADGET_ID_NONE,
+ &level.bd_nut_content, 1, 1,
+ "When breaking, changes to:", NULL, NULL, NULL, "Element created when breaking nut"
+ },
// ---------- level start element -------------------------------------------
static int getTabulatorBarWidth(void);
static int getTabulatorBarHeight(void);
static Pixel getTabulatorBarColor(void);
+static void getEditorGraphicAndFrame(int, int *, int *, boolean);
static int numHiresTiles(int);
static int num_editor_gadgets = 0; // dynamically determined
int tilesize = ED_DRAWINGAREA_TILE_SIZE;
for (x = 0; x < area_xsize; x++)
+ {
for (y = 0; y < area_ysize; y++)
+ {
+ int element = value[x * area_ysize + y];
+ int graphic;
+ int frame;
+
+ getEditorGraphicAndFrame(element, &graphic, &frame, TRUE);
+
DrawSizedGraphicExt(drawto,
gi->x + x * tilesize,
gi->y + y * tilesize,
- el2edimg(value[x * area_ysize + y]), 0, tilesize);
+ graphic, frame, tilesize);
+ }
+ }
}
static void ScrollEditorLevel(int from_x, int from_y, int scroll)
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_BD_WATER_CANNOT_FLOW_DOWN);
}
+ if (properties_element == EL_BD_NUT)
+ {
+ MapDrawingArea(ED_DRAWING_ID_BD_NUT_CONTENT);
+ }
+
// special case: slippery walls option for gems only available in R'n'D game engine
if (IS_GEM(properties_element) && level.game_engine_type == GAME_ENGINE_TYPE_RND)
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS);
&li.bd_water_cannot_flow_down, FALSE
},
+ {
+ EL_BD_NUT, -1,
+ TYPE_ELEMENT, CONF_VALUE_16_BIT(1),
+ &li.bd_nut_content, EL_BD_NUT_BREAKING_1
+ },
+
// (the following values are related to various game elements)
{
cave->water_does_not_flow_down = level->bd_water_cannot_flow_down;
+ cave->nut_turns_to_when_crushed = map_element_RND_to_BD_cave(level->bd_nut_content);
+
// level name
strncpy(cave->name, level->name, sizeof(GdString));
cave->name[sizeof(GdString) - 1] = '\0';
level->bd_water_cannot_flow_down = cave->water_does_not_flow_down;
+ level->bd_nut_content = map_element_BD_to_RND_cave(cave->nut_turns_to_when_crushed);
+
// level name
char *cave_name = getStringPrint("%s / %d", cave->name, bd_level_nr + 1);