GADGET_ID_LEVELSET_SAVE_MODE,
GADGET_ID_WIND_DIRECTION,
GADGET_ID_PLAYER_SPEED,
+ GADGET_ID_BD_GRAVITY_DIRECTION,
GADGET_ID_MM_BALL_CHOICE_MODE,
GADGET_ID_CUSTOM_WALK_TO_ACTION,
GADGET_ID_CUSTOM_EXPLOSION_TYPE,
GADGET_ID_BD_HAMMER_WALLS_REAPPEAR,
GADGET_ID_BD_CREATURES_START_BACKWARDS,
GADGET_ID_BD_CREATURES_TURN_ON_HATCHING,
+ GADGET_ID_BD_GRAVITY_SWITCH_ACTIVE,
GADGET_ID_ENVELOPE_AUTOWRAP,
GADGET_ID_ENVELOPE_CENTERED,
GADGET_ID_MM_LASER_RED,
ED_SELECTBOX_ID_LEVELSET_SAVE_MODE,
ED_SELECTBOX_ID_WIND_DIRECTION,
ED_SELECTBOX_ID_PLAYER_SPEED,
+ ED_SELECTBOX_ID_BD_GRAVITY_DIRECTION,
ED_SELECTBOX_ID_MM_BALL_CHOICE_MODE,
ED_SELECTBOX_ID_CUSTOM_ACCESS_TYPE,
ED_SELECTBOX_ID_CUSTOM_ACCESS_LAYER,
ED_CHECKBUTTON_ID_BD_HAMMER_WALLS_REAPPEAR,
ED_CHECKBUTTON_ID_BD_CREATURES_START_BACKWARDS,
ED_CHECKBUTTON_ID_BD_CREATURES_TURN_ON_HATCHING,
+ ED_CHECKBUTTON_ID_BD_GRAVITY_SWITCH_ACTIVE,
ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP,
ED_CHECKBUTTON_ID_ENVELOPE_CENTERED,
ED_CHECKBUTTON_ID_MM_LASER_RED,
{ -1, NULL }
};
+static struct ValueTextInfo options_bd_gravity_direction[] =
+{
+ { GD_MV_DOWN, "down" },
+ { GD_MV_UP, "up" },
+ { GD_MV_LEFT, "left" },
+ { GD_MV_RIGHT, "right" },
+
+ { -1, NULL }
+};
+
static struct ValueTextInfo options_wind_direction[] =
{
{ MV_START_NONE, "none" },
&level.initial_player_stepsize[0],
NULL, "Initial player speed:", NULL, "Select initial player speed"
},
+ {
+ ED_SELECTBOX_ID_BD_GRAVITY_DIRECTION,
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0),
+ GADGET_ID_BD_GRAVITY_DIRECTION, GADGET_ID_NONE,
+ -1,
+ options_bd_gravity_direction,
+ &level.bd_gravity_direction,
+ NULL, "Gravity direction:", NULL, "Select initial gravity direction"
+ },
{
ED_SELECTBOX_ID_MM_BALL_CHOICE_MODE,
ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(4),
NULL, NULL,
"Creatures turn on hatching", "Creatures change direction on hatching"
},
+ {
+ ED_CHECKBUTTON_ID_BD_GRAVITY_SWITCH_ACTIVE,
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
+ GADGET_ID_BD_GRAVITY_SWITCH_ACTIVE, GADGET_ID_NONE,
+ &level.bd_gravity_switch_active,
+ NULL, NULL,
+ "Gravity switch active at start", "Gravity switch starts in active state"
+ },
{
ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP,
ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
#define TEXT_SKELETONS_NEEDED "Skeletons needed to use pot"
#define TEXT_SKELETONS_WORTH "Counts as this many diamonds"
#define TEXT_AUTO_TURN_DELAY "Creatures auto turn delay"
+#define TEXT_GRAVITY_DELAY "Gravity switch change delay"
static struct
{
{ EL_BD_SKELETON, &level.bd_skeleton_worth_num_diamonds, TEXT_SKELETONS_WORTH,
0, 10 },
{ EL_BD_CREATURE_SWITCH, &level.bd_creatures_auto_turn_delay, TEXT_AUTO_TURN_DELAY },
+ { EL_BD_GRAVITY_SWITCH, &level.bd_gravity_switch_delay, TEXT_GRAVITY_DELAY,
+ 1, 60 },
{ EL_EXTRA_TIME, &level.extra_time, TEXT_TIME_BONUS },
{ EL_TIME_ORB_FULL, &level.time_orb_time, TEXT_TIME_BONUS },
{ EL_GAME_OF_LIFE, &level.game_of_life[0], TEXT_GAME_OF_LIFE_1,0,8 },
element == EL_BD_MEGA_ROCK ||
element == EL_BD_SWEET ||
element == EL_BD_VOODOO_DOLL ||
- element == EL_BD_WATER)
+ element == EL_BD_WATER ||
+ element == EL_BD_GRAVITY_SWITCH)
{
return TRUE;
}
(properties_element == EL_BD_ACID ? 1 : 0) +
(properties_element == EL_BD_REPLICATOR ? 1 : 0) +
(properties_element == EL_BD_CREATURE_SWITCH ? 2 : 0) +
+ (properties_element == EL_BD_GRAVITY_SWITCH ? 2 : 0) +
(properties_element == EL_EMC_MAGIC_BALL ? 2 : 0) +
num_element_counters);
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_BD_CREATURES_TURN_ON_HATCHING);
}
+ if (properties_element == EL_BD_GRAVITY_SWITCH)
+ {
+ MapSelectboxGadget(ED_SELECTBOX_ID_BD_GRAVITY_DIRECTION);
+
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_BD_GRAVITY_SWITCH_ACTIVE);
+ }
+
if (properties_element == EL_BD_NUT)
{
MapDrawingArea(ED_DRAWING_ID_BD_NUT_CONTENT);
&li.bd_creatures_auto_turn_delay, 0
},
+ {
+ EL_BD_GRAVITY_SWITCH, -1,
+ TYPE_INTEGER, CONF_VALUE_8_BIT(1),
+ &li.bd_gravity_direction, GD_MV_DOWN
+ },
+ {
+ EL_BD_GRAVITY_SWITCH, -1,
+ TYPE_BOOLEAN, CONF_VALUE_8_BIT(2),
+ &li.bd_gravity_switch_active, FALSE
+ },
+ {
+ EL_BD_GRAVITY_SWITCH, -1,
+ TYPE_INTEGER, CONF_VALUE_8_BIT(3),
+ &li.bd_gravity_switch_delay, 10
+ },
+
{
EL_BD_SAND, -1,
TYPE_ELEMENT, CONF_VALUE_16_BIT(1),
cave->creatures_direction_auto_change_on_start = level->bd_creatures_turn_on_hatching;
cave->creatures_direction_auto_change_time = level->bd_creatures_auto_turn_delay;
+ cave->gravity = level->bd_gravity_direction;
+ cave->gravity_switch_active = level->bd_gravity_switch_active;
+ cave->gravity_change_time = level->bd_gravity_switch_delay;
+
// level name
strncpy(cave->name, level->name, sizeof(GdString));
cave->name[sizeof(GdString) - 1] = '\0';
level->bd_creatures_turn_on_hatching = cave->creatures_direction_auto_change_on_start;
level->bd_creatures_auto_turn_delay = cave->creatures_direction_auto_change_time;
+ level->bd_gravity_direction = cave->gravity;
+ level->bd_gravity_switch_active = cave->gravity_switch_active;
+ level->bd_gravity_switch_delay = cave->gravity_change_time;
+
// level name
char *cave_name = getStringPrint("%s / %d", cave->name, bd_level_nr + 1);