20130313
[gdash.git] / src / cave / cavestored.cpp
blob48147cfff6eb708a3f477be18fa96a7645f3a8fb
1 /*
2 * Copyright (c) 2007-2013, Czirkos Zoltan http://code.google.com/p/gdash/
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #include "config.h"
19 #include <glib/gi18n.h>
21 #include "cave/cavestored.hpp"
22 #include "cave/helper/caverandom.hpp"
26 /* entries. */
27 /* type given for each element;
28 * GD_TYPE_ELEMENT represents a combo box of gdash objects.
29 * GD_TAB&LABEL represents a notebook tab or a label.
30 * others are self-explanatory. */
31 PropertyDescription const CaveStored::descriptor[] = {
32 /* default data */
33 {"", GD_TAB, 0, N_("Cave data")},
34 {"Name", GD_TYPE_STRING, 0, N_("Name"), GetterBase::create_new(&CaveStored::name), N_("Name of cave")},
35 {"Description", GD_TYPE_STRING, 0, N_("Description"), GetterBase::create_new(&CaveStored::description), N_("Some words about the cave")},
36 {"Author", GD_TYPE_STRING, 0, N_("Author"), GetterBase::create_new(&CaveStored::author), N_("Name of author")},
37 {"Date", GD_TYPE_STRING, 0, N_("Date"), GetterBase::create_new(&CaveStored::date), N_("Date of creation")},
38 {"WWW", GD_TYPE_STRING, 0, N_("WWW"), GetterBase::create_new(&CaveStored::www), N_("Web page or e-mail address")},
39 {"Difficulty", GD_TYPE_STRING, 0, N_("Difficulty"), GetterBase::create_new(&CaveStored::difficulty), N_("Difficulty (informative)")},
41 {"Selectable", GD_TYPE_BOOLEAN, 0, N_("Selectable as start"), GetterBase::create_new(&CaveStored::selectable), N_("This sets whether the game can be started at this cave.")},
42 {"IntermissionProperties.instantlife", GD_TYPE_BOOLEAN, 0, N_(" Instant life"), GetterBase::create_new(&CaveStored::intermission_instantlife), N_("If true, an extra life is given to the player, when the intermission cave is reached.")},
43 {"Intermission", GD_TYPE_BOOLEAN, GD_ALWAYS_SAVE, N_("Intermission"), GetterBase::create_new(&CaveStored::intermission), N_("Intermission caves are usually small and fast caves, which are not required to be solved. The player will not lose a life if he is not successful. The game always proceeds to the next cave.")},
44 {"IntermissionProperties.rewardlife", GD_TYPE_BOOLEAN, 0, N_(" Reward life"), GetterBase::create_new(&CaveStored::intermission_rewardlife), N_("If true, an extra life is given to the player, when the intermission cave is successfully finished.")},
45 {"Size", GD_TYPE_INT, GD_ALWAYS_SAVE, N_("Width"), GetterBase::create_new(&CaveStored::w), N_("Width of cave. The standard size for a cave is 40x22, and 20x12 for an intermission."), 12, 128},
46 {"Size", GD_TYPE_INT, GD_ALWAYS_SAVE, N_("Height"), GetterBase::create_new(&CaveStored::h), N_("Height of cave. The standard size for a cave is 40x22, and 20x12 for an intermission."), 12, 128},
47 {"Size", GD_TYPE_INT, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, N_("Visible, left"), GetterBase::create_new(&CaveStored::x1), N_("Visible parts of the cave, upper left and lower right corner."), 0, 127},
48 {"Size", GD_TYPE_INT, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, N_("Visible, upper"), GetterBase::create_new(&CaveStored::y1), N_("Visible parts of the cave, upper left and lower right corner."), 0, 127},
49 {"Size", GD_TYPE_INT, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, N_("Visible, right"), GetterBase::create_new(&CaveStored::x2), N_("Visible parts of the cave, upper left and lower right corner."), 0, 127},
50 {"Size", GD_TYPE_INT, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, N_("Visible, lower"), GetterBase::create_new(&CaveStored::y2), N_("Visible parts of the cave, upper left and lower right corner."), 0, 127},
52 {"Charset", GD_TYPE_STRING, 0, N_("Character set"), GetterBase::create_new(&CaveStored::charset), N_("Theme used for displaying the game.")},
53 {"Fontset", GD_TYPE_STRING, 0, N_("Font set"), GetterBase::create_new(&CaveStored::fontset), N_("Font used during the game.")},
55 /* story - a tab on its own */
56 {"", GD_TAB, 0, N_("Story")},
57 {"Story", GD_TYPE_LONGSTRING, 0, 0, GetterBase::create_new(&CaveStored::story), N_("Story for the cave. It will be shown when the cave is played.")},
59 /* remark - also a tab on its own */
60 {"", GD_TAB, 0, N_("Remark")},
61 {"Remark", GD_TYPE_LONGSTRING, 0, 0, GetterBase::create_new(&CaveStored::remark), N_("Remark (informative). Can contain supplementary information about the design of the cave. It is not shown during the game, only when the user requests the cave info dialog, so can also contain spoilers and hints.")},
63 // do not show them in editor, but save them in bdcff. they have a separate dialog box
64 {"Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, 0, GetterBase::create_new(&CaveStored::colorb), 0},
65 {"Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, 0, GetterBase::create_new(&CaveStored::color0), 0},
66 {"Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, 0, GetterBase::create_new(&CaveStored::color1), 0},
67 {"Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, 0, GetterBase::create_new(&CaveStored::color2), 0},
68 {"Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, 0, GetterBase::create_new(&CaveStored::color3), 0},
69 {"Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, 0, GetterBase::create_new(&CaveStored::color4), 0},
70 {"Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE|GD_DONT_SHOW_IN_EDITOR, 0, GetterBase::create_new(&CaveStored::color5), 0},
72 /* difficulty */
73 {"", GD_TAB, 0, N_("Difficulty")},
74 {"", GD_LABEL, GD_SHOW_LEVEL_LABEL, N_("Difficulty")},
75 {"DiamondsRequired", GD_TYPE_INT_LEVELS, GD_ALWAYS_SAVE, N_("Diamonds needed"), GetterBase::create_new(&CaveStored::level_diamonds), N_("Here zero means automatically count diamonds before level start. If negative, the value is subtracted from that. This is useful for totally random caves."), -100, 999},
76 {"", GD_LABEL, 0, N_("Time")},
77 {"CaveTime", GD_TYPE_INT_LEVELS, GD_ALWAYS_SAVE, N_("Time (s)"), GetterBase::create_new(&CaveStored::level_time), N_("Time available to solve cave, in seconds."), 1, 999},
78 {"CaveMaxTime", GD_TYPE_INT, 0, N_("Maximum time (s)"), GetterBase::create_new(&CaveStored::max_time), N_("If you reach this time by collecting too many clocks, the timer will overflow."), 60, 999},
79 {"CaveScheduling", GD_TYPE_SCHEDULING, GD_ALWAYS_SAVE, N_("Scheduling type"), GetterBase::create_new(&CaveStored::scheduling), N_("This flag sets whether the game uses an emulation of the original timing (c64-style), or a more modern milliseconds-based timing. The original game used a delay (empty loop) based timing of caves; this is selected by setting this to BD1, BD2, Construction Kit or Crazy Dream 7. This is a compatibility setting only; milliseconds-based timing is recommended for every new cave.")},
80 {"PALTiming", GD_TYPE_BOOLEAN, 0, N_("PAL timing"), GetterBase::create_new(&CaveStored::pal_timing), N_("On the PAL version of the C64 computer, the timer was actually slower than normal seconds. This flag is used to compensate for this. If enabled, one game second will last 1.2 real seconds. Most original games were authored for the PAL version. This is a compatibility setting for imported caves; it is not recommended to enable it for newly authored ones.")},
81 {"FrameTime", GD_TYPE_INT_LEVELS, GD_ALWAYS_SAVE, N_(" Speed (ms)"), GetterBase::create_new(&CaveStored::level_speed), N_("Number of milliseconds between game frames. Used when milliseconds-based timing is active, i.e. C64 scheduling is off."), 50, 500},
82 {"HatchingDelay", GD_TYPE_INT_LEVELS, 0, N_(" Hatching delay (frames)"), GetterBase::create_new(&CaveStored::level_hatching_delay_frame), N_("This value sets how much the cave will move until the player enters the cave, and is expressed in frames. This is used for the milliseconds-based scheduling."), 1, 40},
83 {"CaveDelay", GD_TYPE_INT_LEVELS, GD_ALWAYS_SAVE, N_(" Delay (C64-style)"), GetterBase::create_new(&CaveStored::level_ckdelay), N_("The length of the delay loop between game frames. Used when milliseconds-based timing is inactive, i.e. some kind of C64 or Atari scheduling is selected."), 0, 32},
84 {"HatchingTime", GD_TYPE_INT_LEVELS, 0, N_(" Hatching time (seconds)"), GetterBase::create_new(&CaveStored::level_hatching_delay_time), N_("This value sets how much the cave will move until the player enters the cave. This is used for the C64-like schedulings."), 1, 40},
85 {"", GD_LABEL, GD_SHOW_LEVEL_LABEL, N_("Scoring")},
86 {"TimeValue", GD_TYPE_INT_LEVELS, 0, N_("Score for time"), GetterBase::create_new(&CaveStored::level_timevalue), N_("Points for each second remaining, when the player exits the level."), 0, 50},
87 {"DiamondValue", GD_TYPE_INT, GD_ALWAYS_SAVE, N_("Score for diamonds"), GetterBase::create_new(&CaveStored::diamond_value), N_("Number of points per diamond collected, before opening the exit."), 0, 100},
88 {"DiamondValue", GD_TYPE_INT, GD_ALWAYS_SAVE, N_("Score for extra diamonds"), GetterBase::create_new(&CaveStored::extra_diamond_value), N_("Number of points per diamond collected, after opening the exit."), 0, 100},
90 // cave initial fill - do not show them in editor (they are shown in a separate dialog box), but save them in bdcff
91 /* initial fill */
92 {"RandSeed", GD_TYPE_INT_LEVELS, GD_DONT_SHOW_IN_EDITOR, NULL /* random seed value */, GetterBase::create_new(&CaveStored::level_rand), NULL, -1, 255},
93 {"InitialBorder", GD_TYPE_ELEMENT, GD_DONT_SHOW_IN_EDITOR, NULL /* Initial border */, GetterBase::create_new(&CaveStored::initial_border), NULL},
94 {"InitialFill", GD_TYPE_ELEMENT, GD_DONT_SHOW_IN_EDITOR, NULL /* Initial fill */, GetterBase::create_new(&CaveStored::initial_fill), NULL},
95 /* RandomFill */
96 {"RandomFill", GD_TYPE_ELEMENT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_1), NULL},
97 {"RandomFill", GD_TYPE_INT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_probability_1), NULL, 0, 255},
98 {"RandomFill", GD_TYPE_ELEMENT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_2), NULL},
99 {"RandomFill", GD_TYPE_INT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_probability_2), NULL, 0, 255},
100 {"RandomFill", GD_TYPE_ELEMENT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_3), NULL},
101 {"RandomFill", GD_TYPE_INT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_probability_3), NULL, 0, 255},
102 {"RandomFill", GD_TYPE_ELEMENT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_4), NULL},
103 {"RandomFill", GD_TYPE_INT, GD_DONT_SHOW_IN_EDITOR, NULL, GetterBase::create_new(&CaveStored::random_fill_probability_4), NULL, 0, 255},
105 /* PLAYER */
106 {"", GD_TAB, 0, N_("Player")},
107 /* player */
108 {"", GD_LABEL, 0, N_("Player movements")},
109 {"DiagonalMovement", GD_TYPE_BOOLEAN, 0, N_("Diagonal movements"), GetterBase::create_new(&CaveStored::diagonal_movements), N_("Controls if the player can move diagonally.")},
110 {"ActiveGuyIsFirst", GD_TYPE_BOOLEAN, 0, N_("Uppermost player active"), GetterBase::create_new(&CaveStored::active_is_first_found), N_("In 1stB, cave is scrolled to the uppermost and leftmost player found, whereas in the original game to the last one. Chasing stones also follow the active player.")},
111 {"SnapEffect", GD_TYPE_ELEMENT, 0, N_("Snap element"), GetterBase::create_new(&CaveStored::snap_element), N_("Snapping (pressing fire while moving) usually creates space, but it can create any other element.")},
112 {"PushingBoulderProb", GD_TYPE_PROBABILITY, 0, N_("Probability of pushing (%)"), GetterBase::create_new(&CaveStored::pushing_stone_prob), N_("Chance of player managing to push a stone, every game cycle he tries. This is the normal probability.")},
113 {"", GD_LABEL, 0, N_("Sweet")},
114 {"PushingBoulderProb", GD_TYPE_PROBABILITY, 0, N_("Probability of pushing (%)"), GetterBase::create_new(&CaveStored::pushing_stone_prob_sweet), N_("Chance of player managing to push a stone, every game cycle he tries. This is used after eating sweet.")},
115 {"PushingMegaStonesAfterSweet", GD_TYPE_BOOLEAN, 0, N_("Mega stones pushable"), GetterBase::create_new(&CaveStored::mega_stones_pushable_with_sweet), N_("If it is true, mega stones can be pushed after eating sweet.")},
116 /* pneumatic hammer */
117 {"", GD_LABEL, 0, N_("Pneumatic hammer")},
118 {"PneumaticHammer.frames", GD_TYPE_INT, 0, N_("Time for hammer (frames)"), GetterBase::create_new(&CaveStored::pneumatic_hammer_frame), N_("This is the number of game frames, a pneumatic hammer is required to break a wall."), 1, 100},
119 {"PneumaticHammer.wallsreappear", GD_TYPE_BOOLEAN, 0, N_("Hammered walls reappear"), GetterBase::create_new(&CaveStored::hammered_walls_reappear), N_("If this is set to true, walls broken with a pneumatic hammer will reappear later.")},
120 {"PneumaticHammer.wallsreappearframes", GD_TYPE_INT, 0, N_(" Timer for reappear (frames)"), GetterBase::create_new(&CaveStored::hammered_wall_reappear_frame), N_("This sets the number of game frames, after hammered walls reappear, when the above setting is true."), 1, 200},
121 /* clock */
122 {"", GD_LABEL, GD_SHOW_LEVEL_LABEL, N_("Clock")},
123 {"BonusTime", GD_TYPE_INT_LEVELS, 0, N_("Time bonus (s)"), GetterBase::create_new(&CaveStored::level_bonus_time), N_("Bonus time when a clock is collected."), -100, 100},
124 /* voodoo */
125 {"", GD_LABEL, 0, N_("Voodoo Doll")},
126 {"DummyProperties.diamondcollector", GD_TYPE_BOOLEAN, 0, N_("Can collect diamonds"), GetterBase::create_new(&CaveStored::voodoo_collects_diamonds), N_("Controls if a voodoo doll can collect diamonds for the player.")},
127 {"DummyProperties.penalty", GD_TYPE_BOOLEAN, 0, N_("Dies if hit by a stone"), GetterBase::create_new(&CaveStored::voodoo_dies_by_stone), N_("Controls if the voodoo doll dies if it is hit by a stone. Then the player gets a time penalty, and it is turned to a gravestone surrounded by steel wall.")},
128 {"DummyProperties.destructable", GD_TYPE_BOOLEAN, 0, N_("Disappear in explosion"), GetterBase::create_new(&CaveStored::voodoo_disappear_in_explosion), N_("Controls if the voodoo can be destroyed by an explosion nearby. If not, it is converted to a gravestone, and you get a time penalty. If yes, the voodoo simply disappears.")},
129 {"DummyProperties.alwayskillsplayer", GD_TYPE_BOOLEAN, 0, N_("Any way hurt, player explodes"), GetterBase::create_new(&CaveStored::voodoo_any_hurt_kills_player), N_("If this setting is enabled, the player will explode if the voodoo is hurt in any possible way, i.e. touched by a firefly, hit by a stone or an explosion.")},
130 {"PenaltyTime", GD_TYPE_INT_LEVELS, 0, N_("Time penalty (s)"), GetterBase::create_new(&CaveStored::level_penalty_time), N_("Penalty time when the voodoo is destroyed by a stone."), 0, 100},
132 /* AMOEBA */
133 {"", GD_TAB, 0, N_("Amoeba")},
134 {"AmoebaProperties.immediately", GD_TYPE_BOOLEAN, 0, N_("Timer started immediately"), GetterBase::create_new(&CaveStored::amoeba_timer_started_immediately), N_("If this flag is enabled, the amoeba slow growth timer will start at the beginning of the cave, regardless of the amoeba being let free or not. This can make a big difference when playing the cave!")},
135 {"AmoebaProperties.waitforhatching", GD_TYPE_BOOLEAN, 0, N_("Timer waits for hatching"), GetterBase::create_new(&CaveStored::amoeba_timer_wait_for_hatching), N_("This determines if the amoeba timer starts before the player appearing. Amoeba can always be activated before that; but if this is set to true, the timer will not start. This setting is for compatiblity for some old imported caves. As the player is usually born within a few seconds, changing this setting makes not much difference. It is not advised to change it, set the slow growth time to fit your needs instead.")},
136 /* amoeba */
137 {"", GD_LABEL, GD_SHOW_LEVEL_LABEL, N_("Amoeba")},
138 {"AmoebaThreshold", GD_TYPE_INT_LEVELS, GD_BDCFF_RATIO_TO_CAVE_SIZE, N_("Threshold (cells)"), GetterBase::create_new(&CaveStored::level_amoeba_threshold), N_("If the amoeba grows more than this fraction of the cave, it is considered too big and it converts to the element specified below."), 0, 16383},
139 {"AmoebaTime", GD_TYPE_INT_LEVELS, 0, N_("Slow growth time (s)"), GetterBase::create_new(&CaveStored::level_amoeba_time), N_("After this time, amoeba will grow very quickly."), 0, 999},
140 {"AmoebaGrowthProb", GD_TYPE_PROBABILITY, 0, N_("Growth ratio, slow (%)"), GetterBase::create_new(&CaveStored::amoeba_growth_prob), N_("This sets the speed at which a slow amoeba grows.")},
141 {"AmoebaGrowthProb", GD_TYPE_PROBABILITY, 0, N_("Growth ratio, fast (%)"), GetterBase::create_new(&CaveStored::amoeba_fast_growth_prob), N_("This sets the speed at which a fast amoeba grows.")},
142 {"AMOEBABOULDEReffect", GD_TYPE_EFFECT, 0, N_("If too big, converts to"), GetterBase::create_new(&CaveStored::amoeba_too_big_effect), N_("Controls which element an overgrown amoeba converts to.")},
143 {"AMOEBADIAMONDeffect", GD_TYPE_EFFECT, 0, N_("If enclosed, converts to"), GetterBase::create_new(&CaveStored::amoeba_enclosed_effect), N_("Controls which element an enclosed amoeba converts to.")},
144 {"", GD_LABEL, GD_SHOW_LEVEL_LABEL, N_("Amoeba 2")},
145 {"Amoeba2Threshold", GD_TYPE_INT_LEVELS, GD_BDCFF_RATIO_TO_CAVE_SIZE, N_("Threshold (cells)"), GetterBase::create_new(&CaveStored::level_amoeba_2_threshold), N_("If the amoeba grows more than this fraction of the cave, it is considered too big and it converts to the element specified below."), 0, 16383},
146 {"Amoeba2Time", GD_TYPE_INT_LEVELS, 0, N_("Slow growth time (s)"), GetterBase::create_new(&CaveStored::level_amoeba_2_time), N_("After this time, amoeba will grow very quickly."), 0, 999},
147 {"Amoeba2GrowthProb", GD_TYPE_PROBABILITY, 0, N_("Growth ratio, slow (%)"), GetterBase::create_new(&CaveStored::amoeba_2_growth_prob), N_("This sets the speed at which a slow amoeba grows.")},
148 {"Amoeba2GrowthProb", GD_TYPE_PROBABILITY, 0, N_("Growth ratio, fast (%)"), GetterBase::create_new(&CaveStored::amoeba_2_fast_growth_prob), N_("This sets the speed at which a fast amoeba grows.")},
149 {"Amoeba2Properties.explode", GD_TYPE_BOOLEAN, 0, N_("Explodes by amoeba"), GetterBase::create_new(&CaveStored::amoeba_2_explodes_by_amoeba), N_("If this setting is enabled, an amoeba 2 will explode if it is touched by a normal amoeba.")},
150 {"AMOEBA2EXPLOSIONeffect", GD_TYPE_EFFECT, 0, N_(" Explosion ends in"), GetterBase::create_new(&CaveStored::amoeba_2_explosion_effect), N_("An amoeba 2 explodes to this element, when touched by the original amoeba.")},
151 {"AMOEBA2BOULDEReffect", GD_TYPE_EFFECT, 0, N_("If too big, converts to"), GetterBase::create_new(&CaveStored::amoeba_2_too_big_effect), N_("Controls which element an overgrown amoeba converts to.")},
152 {"AMOEBA2DIAMONDeffect", GD_TYPE_EFFECT, 0, N_("If enclosed, converts to"), GetterBase::create_new(&CaveStored::amoeba_2_enclosed_effect), N_("Controls which element an enclosed amoeba converts to.")},
153 {"AMOEBA2LOOKSLIKEeffect", GD_TYPE_EFFECT, 0, N_("Looks like"), GetterBase::create_new(&CaveStored::amoeba_2_looks_like), N_("Amoeba 2 can look like any other element. Hint: it can also look like a normal amoeba. Or it can look like slime, and then you have two different colored amoebas!")},
155 /* magic wall */
156 {"", GD_TAB, 0, N_("Magic Wall")},
157 {"", GD_LABEL, GD_SHOW_LEVEL_LABEL, N_("Timing")},
158 {"MagicWallTime", GD_TYPE_INT_LEVELS, 0, N_("Milling time (s)"), GetterBase::create_new(&CaveStored::level_magic_wall_time), N_("Magic wall will stop after this time, and it cannot be activated again."), 0, 999},
159 {"MagicWallProperties.waitforhatching", GD_TYPE_BOOLEAN, 0, N_("Timer waits for hatching"), GetterBase::create_new(&CaveStored::magic_timer_wait_for_hatching), N_("This determines if the magic wall timer starts before the player appearing. Magic can always be activated before that; but if this is set to true, the timer will not start.")},
160 {"MagicWallProperties.convertamoeba", GD_TYPE_BOOLEAN, 0, N_("Stops amoeba"), GetterBase::create_new(&CaveStored::magic_wall_stops_amoeba), N_("When the magic wall is activated, it can convert amoeba into diamonds.")},
161 {"", GD_LABEL, 0, N_("Conversions")},
162 {"MagicWallProperties", GD_TYPE_ELEMENT, 0, N_("Diamond to"), GetterBase::create_new(&CaveStored::magic_diamond_to), N_("As a special effect, magic walls can convert diamonds to any other element.")},
163 {"MagicWallProperties", GD_TYPE_ELEMENT, 0, N_("Stone to"), GetterBase::create_new(&CaveStored::magic_stone_to), N_("As a special effect, magic walls can convert stones to any other element.")},
164 {"MagicWallProperties.megastoneto", GD_TYPE_ELEMENT, 0, N_("Mega stone to"), GetterBase::create_new(&CaveStored::magic_mega_stone_to), N_("If a mega stone falls into the magic wall, it will drop this element.")},
165 {"MagicWallProperties.nitropackto", GD_TYPE_ELEMENT, 0, N_("Nitro pack to"), GetterBase::create_new(&CaveStored::magic_nitro_pack_to), N_("If a nitro pack falls into the magic wall, it will be turned to this element.")},
166 {"MagicWallProperties.nutto", GD_TYPE_ELEMENT, 0, N_("Nut to"), GetterBase::create_new(&CaveStored::magic_nut_to), N_("As a special effect, magic walls can convert nuts to any other element.")},
167 {"MagicWallProperties.flyingstoneto", GD_TYPE_ELEMENT, 0, N_("Flying stone to"), GetterBase::create_new(&CaveStored::magic_flying_stone_to), N_("If a flying stone climbs up into the magic wall, it will be turned to this element. Remember that flying stones enter the magic wall from its bottom, not from the top!")},
168 {"MagicWallProperties.flyingdiamondto", GD_TYPE_ELEMENT, 0, N_("Flying diamonds to"), GetterBase::create_new(&CaveStored::magic_flying_diamond_to), N_("If a flying diamond enters the magic wall, it will be turned to this element. Remember that flying diamonds enter the magic wall from its bottom, not from the top!")},
170 /* slime */
171 {"", GD_TAB, 0, N_("Slime")},
172 {"", GD_LABEL, GD_SHOW_LEVEL_LABEL, N_("Permeability")},
173 {"", GD_TYPE_BOOLEAN, GD_DONT_SAVE, N_("Predictable"), GetterBase::create_new(&CaveStored::slime_predictable), N_("Controls if the predictable random generator is used for slime. It is required for compatibility with some older caves.")},
174 /* permeabilities are "always" saved; and according to the predictability, one of them is removed "by hand" before saving the file. */
175 {"SlimePermeability", GD_TYPE_PROBABILITY_LEVELS, GD_ALWAYS_SAVE, N_("Permeability (unpredictable, %)"), GetterBase::create_new(&CaveStored::level_slime_permeability), N_("This controls the rate at which elements go through the slime. Higher values represent higher probability of passing. This one is for unpredictable slime.")},
176 {"SlimePermeabilityC64", GD_TYPE_INT_LEVELS, GD_ALWAYS_SAVE, N_("Permeability (predictable, bits)"), GetterBase::create_new(&CaveStored::level_slime_permeability_c64), N_("This controls the rate at which elements go through the slime. This one is for predictable slime, and the value is used for a bitwise AND function. The values used by the C64 engines are 0, 128, 192, 224, 240, 248, 252, 254 and 255."), 0, 255},
177 {"SlimePredictableC64.seed", GD_TYPE_INT_LEVELS, 0, N_("Random seed (predictable)"), GetterBase::create_new(&CaveStored::level_slime_seed_c64), N_("The random number seed for predictable slime. Use -1 to leave on its default. Not recommended to change. Does not affect unpredictable slime."), -1, 65535},
178 {"", GD_LABEL, 0, N_("Passing elements")},
179 {"SlimeProperties", GD_TYPE_ELEMENT, 0, N_("Eats this..."), GetterBase::create_new(&CaveStored::slime_eats_1), N_("Slime can let other elements than stone and diamond go through. It always lets a waiting or a chasing stone pass, though. Also, flying diamonds and stones, as well as bladders are always passed.")},
180 {"SlimeProperties", GD_TYPE_ELEMENT, 0, N_(" ... and converts to"), GetterBase::create_new(&CaveStored::slime_converts_1), N_("Slime can let other elements than stone and diamond go through. It always lets a waiting or a chasing stone pass, though. Also, flying diamonds and stones, as well as bladders are always passed.")},
181 {"SlimeProperties", GD_TYPE_ELEMENT, 0, N_("Eats this..."), GetterBase::create_new(&CaveStored::slime_eats_2), N_("Slime can let other elements than stone and diamond go through. It always lets a waiting or a chasing stone pass, though. Also, flying diamonds and stones, as well as bladders are always passed.")},
182 {"SlimeProperties", GD_TYPE_ELEMENT, 0, N_(" ... and converts to"), GetterBase::create_new(&CaveStored::slime_converts_2), N_("Slime can let other elements than stone and diamond go through. It always lets a waiting or a chasing stone pass, though. Also, flying diamonds and stones, as well as bladders are always passed.")},
183 {"SlimeProperties", GD_TYPE_ELEMENT, 0, N_("Eats this..."), GetterBase::create_new(&CaveStored::slime_eats_3), N_("Slime can let other elements than stone and diamond go through. It always lets a waiting or a chasing stone pass, though. Also, flying diamonds and stones, as well as bladders are always passed.")},
184 {"SlimeProperties", GD_TYPE_ELEMENT, 0, N_(" ... and converts to"), GetterBase::create_new(&CaveStored::slime_converts_3), N_("Slime can let other elements than stone and diamond go through. It always lets a waiting or a chasing stone pass, though. Also, flying diamonds and stones, as well as bladders are always passed.")},
186 /* ACTIVE 2 */
187 {"", GD_TAB, 0, N_("Other elements")},
188 /* acid */
189 {"", GD_LABEL, 0, N_("Acid")},
190 {"AcidProperties", GD_TYPE_ELEMENT, 0, N_("Eats this element"), GetterBase::create_new(&CaveStored::acid_eats_this), N_("The element which acid eats. If it cannot find any, it simply disappears.")},
191 {"AcidProperties", GD_TYPE_PROBABILITY, 0, N_("Spread ratio (%)"), GetterBase::create_new(&CaveStored::acid_spread_ratio), N_("The probability at which an acid will explode and eat neighbouring elements.")},
192 {"ACIDEffect", GD_TYPE_EFFECT, 0, N_("Leaves this behind"), GetterBase::create_new(&CaveStored::acid_turns_to), N_("If acid converts to an explosion puff on spreading or any other element.")},
193 /* biter */
194 {"", GD_LABEL, 0, N_("Biter")},
195 {"BiterProperties", GD_TYPE_INT, 0, N_("Delay (frame)"), GetterBase::create_new(&CaveStored::biter_delay_frame), N_("Number of frames biters wait between movements."), 0, 3},
196 {"BiterProperties", GD_TYPE_ELEMENT, 0, N_("Eats this"), GetterBase::create_new(&CaveStored::biter_eat), N_("Biters eat this element. (They always eat dirt.)")},
197 /* bladder */
198 {"", GD_LABEL, 0, N_("Bladder")},
199 {"BladderProperties", GD_TYPE_ELEMENT, 0, N_("Converts to clock by touching"), GetterBase::create_new(&CaveStored::bladder_converts_by), NULL},
200 /* expanding wall */
201 {"", GD_LABEL, 0, N_("Expanding wall")},
202 {"ExpandingWallDirection.changed", GD_TYPE_BOOLEAN, 0, N_("Direction changed"), GetterBase::create_new(&CaveStored::expanding_wall_changed), N_("If this option is enabled, the direction of growing for the horizontal and vertical expanding wall is switched. As you can use both horizontal and vertical expanding walls in a cave, it is not recommended to change this setting, as it might be confusing. You should rather select the type with the correct direction from the element box when drawing the cave.")},
203 /* replicator */
204 {"", GD_LABEL, 0, N_("Replicator")},
205 {"ReplicatorActive", GD_TYPE_BOOLEAN, 0, N_("Active at start"), GetterBase::create_new(&CaveStored::replicators_active), N_("Whether the replicators are turned on or off at the cave start.")},
206 {"ReplicatorDelayFrame", GD_TYPE_INT, 0, N_("Delay (frame)"), GetterBase::create_new(&CaveStored::replicator_delay_frame), N_("Number of frames to wait between replicating elements."), 0, 100},
207 /* conveyor belt */
208 {"", GD_LABEL, 0, N_("Conveyor belt")},
209 {"ConveyorBeltActive", GD_TYPE_BOOLEAN, 0, N_("Active at start"), GetterBase::create_new(&CaveStored::conveyor_belts_active), N_("Whether the conveyor belts are moving when the cave starts.")},
210 {"ConveyorBeltDirection.changed", GD_TYPE_BOOLEAN, 0, N_("Direction changed"), GetterBase::create_new(&CaveStored::conveyor_belts_direction_changed), N_("If the conveyor belts' movement is changed, i.e. they are running in the opposite direction. As you can freely use left and right going versions of the conveyor belt in a cave, it is not recommended to change this setting, rather you should select the correct one from the element box when drawing.")},
211 /* water */
212 {"", GD_LABEL, 0, N_("Water")},
213 {"WaterProperties.doesnotflowdown", GD_TYPE_BOOLEAN, 0, N_("Does not flow downwards"), GetterBase::create_new(&CaveStored::water_does_not_flow_down), N_("In CrDr, the water element had the odd property that it did not flow downwards, only in other directions. This flag emulates this behaviour.")},
214 /* nut */
215 {"", GD_LABEL, 0, N_("Nut")},
216 {"Nut.whencrushed", GD_TYPE_ELEMENT, 0, N_("Turns to when crushed"), GetterBase::create_new(&CaveStored::nut_turns_to_when_crushed), N_("Normally, a nut contains a diamond. If you crush it with a stone, the diamond will appear after the usual nut explosion sequence. This setting can be used to change the element the nut contains.")},
218 /* EFFECTS 1 */
219 {"", GD_TAB, 0, N_("Effects")},
220 /* cave effects */
221 {"", GD_LABEL, 0, N_("Stone and diamond effects")},
222 {"BOULDERfallingeffect", GD_TYPE_EFFECT, 0, N_("Falling stones convert to"), GetterBase::create_new(&CaveStored::stone_falling_effect), N_("When a stone begins falling, it converts to this element.")},
223 {"BOULDERbouncingeffect", GD_TYPE_EFFECT, 0, N_("Bouncing stones convert to"), GetterBase::create_new(&CaveStored::stone_bouncing_effect), N_("When a stone stops falling and rolling, it converts to this element.")},
224 {"DIAMONDfallingeffect", GD_TYPE_EFFECT, 0, N_("Falling diamonds convert to"), GetterBase::create_new(&CaveStored::diamond_falling_effect), N_("When a diamond begins falling, it converts to this element.")},
225 {"DIAMONDbouncingeffect", GD_TYPE_EFFECT, 0, N_("Bouncing diamonds convert to"), GetterBase::create_new(&CaveStored::diamond_bouncing_effect), N_("When a diamond stops falling and rolling, it converts to this element.")},
227 {"", GD_LABEL, 0, N_("Creature explosion effects")},
228 {"FireflyExplodeTo", GD_TYPE_ELEMENT, 0, N_("Fireflies explode to"), GetterBase::create_new(&CaveStored::firefly_explode_to), N_("When a firefly explodes, it will create this element. Change this setting wisely. The firefly is a traditional element which is expected to explode to empty space.")},
229 {"AltFireflyExplodeTo", GD_TYPE_ELEMENT, 0, N_("Alt. fireflies explode to"), GetterBase::create_new(&CaveStored::alt_firefly_explode_to), N_("When an alternative firefly explodes, it will create this element. Use this setting wisely. Do not create a firefly which explodes to stones, for example: use the stonefly instead.")},
230 {"ButterflyExplodeTo", GD_TYPE_ELEMENT, 0, N_("Butterflies explode to"), GetterBase::create_new(&CaveStored::butterfly_explode_to), N_("When a butterfly explodes, it will create this element. Use this setting wisely. Butterflies should explode to diamonds. If you need a creature which explodes to space, use the firefly instead.")},
231 {"AltButterflyExplodeTo", GD_TYPE_ELEMENT, 0, N_("Alt. butterflies explode to"), GetterBase::create_new(&CaveStored::alt_butterfly_explode_to), N_("When an alternative butterfly explodes, it will create this element. Use this setting wisely.")},
232 {"StoneflyExplodeTo", GD_TYPE_ELEMENT, 0, N_("Stoneflies explode to"), GetterBase::create_new(&CaveStored::stonefly_explode_to), N_("When a stonefly explodes, it will create this element.")},
233 {"DragonflyExplodeTo", GD_TYPE_ELEMENT, 0, N_("Dragonflies explode to"), GetterBase::create_new(&CaveStored::dragonfly_explode_to), N_("When a dragonfly explodes, it will create this element.")},
235 {"", GD_LABEL, 0, N_("Explosion effects")},
236 {"EXPLOSIONEffect", GD_TYPE_EFFECT, 0, N_("Explosions end in"), GetterBase::create_new(&CaveStored::explosion_effect), N_("This element appears in places where an explosion finishes.")},
237 {"DIAMONDBIRTHEffect", GD_TYPE_EFFECT, 0, N_("Diamond births end in"), GetterBase::create_new(&CaveStored::diamond_birth_effect), N_("When a diamond birth animation reaches its end, it will leave this element there. This can be used to change the element butterflies explode to.")},
238 {"BOMBEXPLOSIONeffect", GD_TYPE_EFFECT, 0, N_("Bombs explosions end in"), GetterBase::create_new(&CaveStored::bomb_explosion_effect), N_("Use this setting to select the element the exploding bomb creates.")},
239 {"NITROEXPLOSIONeffect", GD_TYPE_EFFECT, 0, N_("Nitro explosions end in"), GetterBase::create_new(&CaveStored::nitro_explosion_effect), N_("The nitro explosions can create some element other than space.")},
241 /* EFFECTS 2 */
242 {"", GD_TAB, 0, N_("More effects")},
243 /* visual effects */
244 {"", GD_LABEL, 0, N_("Visual effects")},
245 {"EXPANDINGWALLLOOKSLIKEeffect", GD_TYPE_EFFECT, 0, N_("Expanding wall looks like"), GetterBase::create_new(&CaveStored::expanding_wall_looks_like), N_("This is a compatibility setting for old caves. If you need an expanding wall which looks like steel, you should rather choose the expanding steel wall from the element box.")},
246 {"DIRTLOOKSLIKEeffect", GD_TYPE_EFFECT, 0, N_("Dirt looks like"), GetterBase::create_new(&CaveStored::dirt_looks_like), N_("Compatibility setting. Use it wisely! Anything other than Dirt 2 (which can be used to emulate the Dirt Mod) is not recommended.")},
248 /* creature effects */
249 {"", GD_LABEL, 0, N_("Creature movement")},
250 {"EnemyDirectionProperties.startbackwards", GD_TYPE_BOOLEAN, 0, N_("Start backwards"), GetterBase::create_new(&CaveStored::creatures_backwards), N_("Whether the direction creatures travel will already be switched at the cave start.")},
251 {"EnemyDirectionProperties.time", GD_TYPE_INT, 0, N_("Automatically turn (s)"), GetterBase::create_new(&CaveStored::creatures_direction_auto_change_time), N_("If this is greater than zero, creatures will automatically change direction in every x seconds."), 0, 999},
252 {"EnemyDirectionProperties.changeathatching", GD_TYPE_BOOLEAN, 0, N_("Auto turn on hatching"), GetterBase::create_new(&CaveStored::creatures_direction_auto_change_on_start), N_("If this is set to true, creatures also turn at the start signal. If false, the first change in direction occurs only later.")},
253 /* gravity */
254 {"", GD_LABEL, 0, N_("Gravity change")},
255 {"Gravitation", GD_TYPE_DIRECTION, 0, N_("Direction"), GetterBase::create_new(&CaveStored::gravity), N_("The direction where stones and diamonds fall.")},
256 {"GravitationSwitchActive", GD_TYPE_BOOLEAN, 0, N_("Switch active at start"), GetterBase::create_new(&CaveStored::gravity_switch_active), N_("If set to true, the gravity switch will be already activated, when the cave is started, as if a pot has already been collected.")},
257 {"SkeletonsForPot", GD_TYPE_INT, 0, N_("Skeletons needed for pot"), GetterBase::create_new(&CaveStored::skeletons_needed_for_pot), N_("The number of skeletons to be collected to be able to use a pot."), 0, 50},
258 {"GravitationChangeDelay", GD_TYPE_INT, 0, N_("Gravity switch delay"), GetterBase::create_new(&CaveStored::gravity_change_time), N_("The gravity changes after a while using the gravity switch. This option sets the number of seconds to wait."), 1, 60},
260 /* SOUND */
261 {"", GD_TAB, 0, N_("Sound")},
262 {"", GD_LABEL, 0, N_("Sound for elements")},
263 {"Diamond.sound", GD_TYPE_BOOLEAN, 0, N_("Diamond"), GetterBase::create_new(&CaveStored::diamond_sound), N_("If true, falling diamonds will have sound.")},
264 {"Stone.sound", GD_TYPE_BOOLEAN, 0, N_("Stone"), GetterBase::create_new(&CaveStored::stone_sound), N_("If true, falling and pushed stones will have sound.")},
265 {"Nut.sound", GD_TYPE_BOOLEAN, 0, N_("Nut"), GetterBase::create_new(&CaveStored::nut_sound), N_("If true, falling and cracked nuts have sound.")},
266 {"NitroPack.sound", GD_TYPE_BOOLEAN, 0, N_("Nitro pack"), GetterBase::create_new(&CaveStored::nitro_sound), N_("If true, falling and pushed nitro packs will have sound.")},
267 {"ExpandingWall.sound", GD_TYPE_BOOLEAN, 0, N_("Expanding wall"), GetterBase::create_new(&CaveStored::expanding_wall_sound), N_("If true, expanding wall will have sound.")},
268 {"FallingWall.sound", GD_TYPE_BOOLEAN, 0, N_("Falling wall"), GetterBase::create_new(&CaveStored::falling_wall_sound), N_("If true, falling wall will have sound.")},
269 {"AmoebaProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Amoeba"), GetterBase::create_new(&CaveStored::amoeba_sound), N_("Controls if the living amoeba has sound or not.")},
270 {"MagicWallProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Magic wall"), GetterBase::create_new(&CaveStored::magic_wall_sound), N_("If true, the activated magic wall will have sound.")},
271 {"SlimeProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Slime"), GetterBase::create_new(&CaveStored::slime_sound), N_("If true, the elements passing slime will have sound.")},
272 {"LavaProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Lava"), GetterBase::create_new(&CaveStored::lava_sound), N_("If true, the elements sinking in lava will have sound.")},
273 {"ReplicatorProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Replicator"), GetterBase::create_new(&CaveStored::replicator_sound), N_("If true, the new element appearing under the replicator will make sound.")},
274 {"AcidProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Acid"), GetterBase::create_new(&CaveStored::acid_spread_sound), N_("If true, the acid spreading will have sound.")},
275 {"BiterProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Biter"), GetterBase::create_new(&CaveStored::biter_sound), N_("Biters eating something or pushing a stone will have sound.")},
276 {"BladderProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Bladder"), GetterBase::create_new(&CaveStored::bladder_sound), N_("Bladders moving and being pushed can have sound.")},
277 {"WaterProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Water"), GetterBase::create_new(&CaveStored::water_sound), N_("If true, the cave containing water will have sound.")},
278 {"PneumaticHammer.sound", GD_TYPE_BOOLEAN, 0, N_("Pneumatic hammer"), GetterBase::create_new(&CaveStored::pneumatic_hammer_sound), N_("If true, using the pneumatic hammer will have sound.")},
279 {"BladderSpender.sound", GD_TYPE_BOOLEAN, 0, N_("Bladder spender"), GetterBase::create_new(&CaveStored::bladder_spender_sound), N_("If true, the bladder spender will make sound, when the bladder appears.")},
280 {"BladderConvert.sound", GD_TYPE_BOOLEAN, 0, N_("Bladder convert"), GetterBase::create_new(&CaveStored::bladder_convert_sound), N_("If true, the bladder converting to a clock will make sound.")},
281 {"", GD_LABEL, 0, N_("Event sounds")},
282 {"GravityChange.sound", GD_TYPE_BOOLEAN, 0, N_("Gravity change"), GetterBase::create_new(&CaveStored::gravity_change_sound), N_("If true, the gravity changing will make sound.")},
283 {"EnemyDirectionProperties.sound", GD_TYPE_BOOLEAN, 0, N_("Creature direction change"), GetterBase::create_new(&CaveStored::creature_direction_auto_change_sound), N_("If this is set to true, creatures changing direction will be signaled by a sound.")},
285 /* COMPATIBILITY */
286 {"", GD_TAB, 0, N_("Compatibility")},
287 {"", GD_LABEL, 0, N_("Skeleton")},
288 {"SkeletonsWorthDiamonds", GD_TYPE_INT, GD_COMPATIBILITY_SETTING, N_("Skeletons worth diamonds"), GetterBase::create_new(&CaveStored::skeletons_worth_diamonds), N_("The number of diamonds each skeleton is worth. Normally skeletons are used for letting the player use the pot! They are not intended to be used as a second kind of diamond."), 0, 10},
289 {"", GD_LABEL, 0, N_("Borders")},
290 {"BorderProperties.lineshift", GD_TYPE_BOOLEAN, 0, N_("Line shifting border"), GetterBase::create_new(&CaveStored::lineshift), N_("If this is set to true, the player exiting on either side will appear one row lower or upper on the other side.")},
291 {"BorderProperties.objectwraparound", GD_TYPE_BOOLEAN, 0, N_("Objects wrap around"), GetterBase::create_new(&CaveStored::wraparound_objects), N_("If true, objects will wrap around the cave borders as well, i.e. if you drag a line to the left, part of it will appear on the right hand side of the cave. The drawing in this case is also affected by the line shifting border property. If that one is enabled, too, crossing the left hand side or right hand side boundary will decrement or increment the row, and crossing the top or the bottom boundary will have no effect at all.")},
292 {"BorderProperties.scan", GD_TYPE_BOOLEAN, 0, N_("Scan first and last row"), GetterBase::create_new(&CaveStored::border_scan_first_and_last), N_("Elements move on first and last row, too. Usually those rows are the border. The games created by the original editor were not allowed to put anything but steel wall there, so it was not apparent that the borders were not processed by the engine. Some old caves need this for compatibility; it is not recommended to change this setting for newly designed caves, though.")},
293 {"", GD_LABEL, 0, N_("Other")},
294 {"ShortExplosions", GD_TYPE_BOOLEAN, 0, N_("Short explosions"), GetterBase::create_new(&CaveStored::short_explosions), N_("In 1stB and newer engines, explosions were longer, they took five cave frames to complete, as opposed to four frames in the original.")},
295 {"GravityAffectsAll", GD_TYPE_BOOLEAN, 0, N_("Gravity change affects everything"), GetterBase::create_new(&CaveStored::gravity_affects_all), N_("If this is enabled, changing the gravity will also affect bladders (moving and pushing), bladder spenders, falling walls and waiting stones. Otherwise, those elements behave as gravity was always pointing downwards. This is a compatibility setting which is not recommended to change. It is intended for imported caves.")},
296 {"EXPLOSION3S", GD_TYPE_EFFECT, 0, N_("Explosion stage 3 to"), GetterBase::create_new(&CaveStored::explosion_3_effect), N_("This element appears as the next stage of explosion 3. Not recommended to change. Check explosion effects on the effects page for a better alternative.")},
298 /* tags - a tab on its own */
299 {"", GD_TAB, 0, N_("Unknown tags")},
300 {"", GD_TYPE_LONGSTRING, GD_DONT_SAVE, 0, GetterBase::create_new(&CaveStored::unknown_tags), N_("Tags which were read from the BDCFF, but are not understood by GDash.")},
302 {0} /* end of array */
305 PropertyDescription const CaveStored::color_dialog[] = {
306 {"", GD_TAB, 0, N_("Colors")},
307 {"", GD_TYPE_COLOR, 0, N_("Border color"), GetterBase::create_new(&CaveStored::colorb), N_("Border color for C64 graphics. Only for compatibility, not used by GDash.")},
308 {"", GD_TYPE_COLOR, 0, N_("Background color"), GetterBase::create_new(&CaveStored::color0), N_("Background color for C64 graphics")},
309 {"", GD_TYPE_COLOR, 0, N_("Color 1 (dirt)"), GetterBase::create_new(&CaveStored::color1), N_("Foreground color 1 for C64 graphics")},
310 {"", GD_TYPE_COLOR, 0, N_("Color 2 (steel wall)"), GetterBase::create_new(&CaveStored::color2), N_("Foreground color 2 for C64 graphics")},
311 {"", GD_TYPE_COLOR, 0, N_("Color 3 (brick wall)"), GetterBase::create_new(&CaveStored::color3), N_("Foreground color 3 for C64 graphics")},
312 {"", GD_TYPE_COLOR, 0, N_("Amoeba color"), GetterBase::create_new(&CaveStored::color4), N_("Amoeba color for C64 graphics")},
313 {"", GD_TYPE_COLOR, 0, N_("Slime color"), GetterBase::create_new(&CaveStored::color5), N_("Slime color for C64 graphics")},
317 PropertyDescription const CaveStored::random_dialog[] = {
318 {"", GD_TAB, 0, N_("Random fill")},
319 /* initial fill */
320 {"", GD_TYPE_INT_LEVELS, 0, N_("Random seed"), GetterBase::create_new(&CaveStored::level_rand),
321 N_("Random seed value controls the predictable random number generator, which fills the cave initially. If set to -1, cave is totally random every time it is played."), -1, GD_CAVE_SEED_MAX},
322 {"", GD_TYPE_ELEMENT, 0, N_("Initial fill"), GetterBase::create_new(&CaveStored::initial_fill), NULL},
323 {"", GD_TYPE_INT, GD_BD_PROBABILITY, N_("Probability 1"), GetterBase::create_new(&CaveStored::random_fill_probability_1), NULL, 0, 255},
324 {"", GD_TYPE_ELEMENT, 0, N_("Random fill 1"), GetterBase::create_new(&CaveStored::random_fill_1), NULL},
325 {"", GD_TYPE_INT, GD_BD_PROBABILITY, N_("Probability 2"), GetterBase::create_new(&CaveStored::random_fill_probability_2), NULL, 0, 255},
326 {"", GD_TYPE_ELEMENT, 0, N_("Random fill 2"), GetterBase::create_new(&CaveStored::random_fill_2), NULL},
327 {"", GD_TYPE_INT, GD_BD_PROBABILITY, N_("Probability 3"), GetterBase::create_new(&CaveStored::random_fill_probability_3), NULL, 0, 255},
328 {"", GD_TYPE_ELEMENT, 0, N_("Random fill 3"), GetterBase::create_new(&CaveStored::random_fill_3), NULL},
329 {"", GD_TYPE_INT, GD_BD_PROBABILITY, N_("Probability 4"), GetterBase::create_new(&CaveStored::random_fill_probability_4), NULL, 0, 255},
330 {"", GD_TYPE_ELEMENT, 0, N_("Random fill 4"), GetterBase::create_new(&CaveStored::random_fill_4), NULL},
331 {"", GD_TYPE_ELEMENT, 0, N_("Initial border"), GetterBase::create_new(&CaveStored::initial_border), N_("The border which is drawn around the cave, after filling it. You can set it to no element to skip the drawing.")},
336 void CaveStored::set_gdash_defaults() {
337 /* default data */
338 selectable=true;
339 intermission=false;
340 intermission_instantlife=false;
341 intermission_rewardlife=true;
342 w=40;
343 h=22;
344 x1=0;
345 y1=0;
346 x2=39;
347 y2=21;
348 colorb=GdColor::from_c64(0);
349 color0=GdColor::from_c64(0);
350 color1=GdColor::from_c64(8);
351 color2=GdColor::from_c64(11);
352 color3=GdColor::from_c64(1);
353 color4=GdColor::from_c64(5);
354 color5=GdColor::from_c64(6);
356 /* difficulty */
357 for (unsigned i=0; i<5; i++) {
358 level_diamonds[i]=10;
359 level_time[i]=999;
360 level_timevalue[i]=i+1;
361 level_ckdelay[i]=0;
362 level_hatching_delay_time[i]=2;
363 level_speed[i]=200;
364 level_hatching_delay_frame[i]=21;
365 level_rand[i]=i;
367 diamond_value=0;
368 extra_diamond_value=0;
369 max_time=999;
370 pal_timing=false;
371 scheduling=GD_SCHEDULING_MILLISECONDS;
373 /* initial fill */
374 initial_border=O_STEEL;
375 initial_fill=O_DIRT;
376 random_fill_1=O_DIRT;
377 random_fill_probability_1=0;
378 random_fill_2=O_DIRT;
379 random_fill_probability_2=0;
380 random_fill_3=O_DIRT;
381 random_fill_probability_3=0;
382 random_fill_4=O_DIRT;
383 random_fill_probability_4=0;
385 /* PLAYER */
386 diagonal_movements=false;
387 active_is_first_found=true;
388 snap_element=O_SPACE;
389 pushing_stone_prob=250000;
390 pushing_stone_prob_sweet=1000000;
391 mega_stones_pushable_with_sweet=false;
392 pneumatic_hammer_frame=5;
393 hammered_walls_reappear=false;
394 hammered_wall_reappear_frame=100;
395 voodoo_collects_diamonds=false;
396 voodoo_disappear_in_explosion=true;
397 voodoo_dies_by_stone=false;
398 voodoo_any_hurt_kills_player=false;
399 for (unsigned i=0; i<5; i++) {
400 level_bonus_time[i]=30;
401 level_penalty_time[i]=30;
404 /* magic wall */
405 for (unsigned i=0; i<5; i++)
406 level_magic_wall_time[i]=999;
407 magic_diamond_to=O_STONE_F;
408 magic_stone_to=O_DIAMOND_F;
409 magic_mega_stone_to=O_NITRO_PACK_F;
410 magic_nitro_pack_to=O_MEGA_STONE_F;
411 magic_nut_to=O_NUT_F;
412 magic_flying_stone_to=O_FLYING_DIAMOND_F;
413 magic_flying_diamond_to=O_FLYING_STONE_F;
414 magic_wall_stops_amoeba=true;
415 magic_timer_wait_for_hatching=false;
417 /* amoeba */
418 amoeba_timer_started_immediately=true;
419 amoeba_timer_wait_for_hatching=false;
420 for (unsigned i=0; i<5; i++) {
421 level_amoeba_threshold[i]=200;
422 level_amoeba_time[i]=999;
424 amoeba_growth_prob=31250;
425 amoeba_fast_growth_prob=250000;
426 amoeba_timer_started_immediately=true;
427 amoeba_timer_wait_for_hatching=false;
428 amoeba_too_big_effect=O_STONE;
429 amoeba_enclosed_effect=O_DIAMOND;
431 /* amoeba 2 */
432 for (unsigned i=0; i<5; i++) {
433 level_amoeba_2_threshold[i]=200;
434 level_amoeba_2_time[i]=999;
436 amoeba_2_growth_prob=31250;
437 amoeba_2_fast_growth_prob=250000;
438 amoeba_2_too_big_effect=O_STONE;
439 amoeba_2_enclosed_effect=O_DIAMOND;
440 amoeba_2_explodes_by_amoeba=true;
441 amoeba_2_looks_like=O_AMOEBA_2;
442 amoeba_2_explosion_effect=O_SPACE;
444 /* water */
445 water_does_not_flow_down=false;
447 /* nut */
448 nut_turns_to_when_crushed=O_NUT_CRACK_1;
450 /* expanding */
451 expanding_wall_changed=false;
453 /* replicator */
454 replicator_delay_frame=4;
455 replicators_active=true;
457 /* conveyor belt */
458 conveyor_belts_active=true;
459 conveyor_belts_direction_changed=false;
461 /* slime */
462 slime_predictable=true;
463 for (unsigned i=0; i<5; i++) {
464 level_slime_seed_c64[i]=-1;
465 level_slime_permeability_c64[i]=0;
466 level_slime_permeability[i]=1000000;
468 slime_eats_1=O_DIAMOND;
469 slime_converts_1=O_DIAMOND_F;
470 slime_eats_2=O_STONE;
471 slime_converts_2=O_STONE_F;
472 slime_eats_3=O_NUT;
473 slime_converts_3=O_NUT_F;
475 /* acid */
476 acid_eats_this=O_DIRT;
477 acid_spread_ratio=31250;
478 acid_turns_to=O_EXPLODE_3;
480 /* biter */
481 biter_delay_frame=0;
482 biter_eat=O_DIAMOND;
484 /* bladder */
485 bladder_converts_by=O_VOODOO;
487 /* SOUND */
488 amoeba_sound=true;
489 magic_wall_sound=true;
490 slime_sound=true;
491 lava_sound=true;
492 replicator_sound=true;
493 acid_spread_sound=true;
494 biter_sound=true;
495 bladder_sound=true;
496 water_sound=true;
497 stone_sound=true;
498 nut_sound=true;
499 diamond_sound=true;
500 falling_wall_sound=true;
501 expanding_wall_sound=true;
502 nitro_sound=true;
503 pneumatic_hammer_sound=true;
504 bladder_spender_sound=true;
505 bladder_convert_sound=true;
506 gravity_change_sound=true;
507 creature_direction_auto_change_sound=true;
509 /* creature effects */
510 creatures_backwards=false;
511 creatures_direction_auto_change_time=0;
512 creatures_direction_auto_change_on_start=false;
513 /* cave effects */
514 explosion_effect=O_SPACE;
515 explosion_3_effect=O_EXPLODE_4;
516 diamond_birth_effect=O_DIAMOND;
517 bomb_explosion_effect=O_BRICK;
518 nitro_explosion_effect=O_SPACE;
519 firefly_explode_to=O_EXPLODE_1;
520 alt_firefly_explode_to=O_EXPLODE_1;
521 butterfly_explode_to=O_PRE_DIA_1;
522 alt_butterfly_explode_to=O_PRE_DIA_1;
523 stonefly_explode_to=O_PRE_STONE_1;
524 dragonfly_explode_to=O_EXPLODE_1;
526 stone_falling_effect=O_STONE_F;
527 stone_bouncing_effect=O_STONE;
528 diamond_falling_effect=O_DIAMOND_F;
529 diamond_bouncing_effect=O_DIAMOND;
530 /* visual effects */
531 expanding_wall_looks_like=O_BRICK;
532 dirt_looks_like=O_DIRT;
533 /* gravity */
534 gravity=MV_DOWN;
535 gravity_switch_active=false;
536 skeletons_needed_for_pot=5;
537 gravity_change_time=10;
539 /* COMPATIBILITY */
540 border_scan_first_and_last=true;
541 lineshift=false;
542 wraparound_objects=false;
543 short_explosions=true;
544 skeletons_worth_diamonds=0;
545 gravity_affects_all=true;
547 level_speed[0]=180;
548 level_speed[1]=160;
549 level_speed[2]=140;
550 level_speed[3]=120;
551 level_speed[4]=120;
554 /// Creates a new CaveStored.
555 /// Sets GDash defaults for all cave properties. GDash defaults are the same as BDCFF defaults.
556 CaveStored::CaveStored() {
557 set_gdash_defaults();