&li.num_ball_contents, 4, MAX_ELEMENT_CONTENTS
},
+ {
+ EL_SOKOBAN_FIELD_EMPTY, -1,
+ TYPE_BOOLEAN, CONF_VALUE_8_BIT(1),
+ &li.sb_fields_needed, TRUE
+ },
+
+ {
+ EL_SOKOBAN_OBJECT, -1,
+ TYPE_BOOLEAN, CONF_VALUE_8_BIT(1),
+ &li.sb_objects_needed, TRUE
+ },
+
{
EL_MM_MCDUFFIN, -1,
TYPE_BOOLEAN, CONF_VALUE_8_BIT(1),
}
}
- /* Currently there is no special action needed to activate the template
- data, because 'element_info' property settings overwrite the original
- level data, while all other variables do not change. */
+ // Currently there is no special action needed to activate the template
+ // data, because 'element_info' property settings overwrite the original
+ // level data, while all other variables do not change.
- /* Exception: 'from_level_template' elements in the original level playfield
- are overwritten with the corresponding elements at the same position in
- playfield from the level template. */
+ // Exception: 'from_level_template' elements in the original level playfield
+ // are overwritten with the corresponding elements at the same position in
+ // playfield from the level template.
for (x = 0; x < level.fieldx; x++)
for (y = 0; y < level.fieldy; y++)
static boolean checkForPackageFromBasename(char *basename)
{
- /* !!! WON'T WORK ANYMORE IF getFileTypeFromBasename() ALSO DETECTS !!!
- !!! SINGLE LEVELS (CURRENTLY ONLY DETECTS LEVEL PACKAGES !!! */
+ // !!! WON'T WORK ANYMORE IF getFileTypeFromBasename() ALSO DETECTS !!!
+ // !!! SINGLE LEVELS (CURRENTLY ONLY DETECTS LEVEL PACKAGES !!!
return (getFileTypeFromBasename(basename) != LEVEL_FILE_TYPE_UNKNOWN);
}
else
Error(ERR_WARN, "invalid custom element number %d", element);
- /* older game versions that wrote level files with CUS1 chunks used
- different default push delay values (not yet stored in level file) */
+ // older game versions that wrote level files with CUS1 chunks used
+ // different default push delay values (not yet stored in level file)
element_info[element].push_delay_fixed = 2;
element_info[element].push_delay_random = 8;
}
int chunk_size_expected =
(chunk_info[i].loader)(file, chunk_size, level);
- /* the size of some chunks cannot be checked before reading other
- chunks first (like "HEAD" and "BODY") that contain some header
- information, so check them here */
+ // the size of some chunks cannot be checked before reading other
+ // chunks first (like "HEAD" and "BODY") that contain some header
+ // information, so check them here
if (chunk_size_expected != chunk_size)
{
Error(ERR_WARN, "wrong size (%d) of chunk '%s' in level file '%s'",
else if (element >= EL_SP_GRAVITY_PORT_RIGHT &&
element <= EL_SP_GRAVITY_PORT_UP)
{
- /* change R'n'D style gravity inverting special port to normal port
- (there are no gravity inverting ports in native Supaplex engine) */
+ // change R'n'D style gravity inverting special port to normal port
+ // (there are no gravity inverting ports in native Supaplex engine)
gravity_port_found = TRUE;
gravity_port_valid = FALSE;
continue;
}
- /* change previous (wrong) gravity inverting special port to either
- gravity enabling special port or gravity disabling special port */
+ // change previous (wrong) gravity inverting special port to either
+ // gravity enabling special port or gravity disabling special port
level->field[port_x][port_y] +=
(gravity == 1 ? EL_SP_GRAVITY_ON_PORT_RIGHT :
EL_SP_GRAVITY_OFF_PORT_RIGHT) - EL_SP_GRAVITY_PORT_RIGHT;
level->extra_time = header[56] | (header[57] << 8);
level->shield_normal_time = header[58] | (header[59] << 8);
- /* Diamond Caves has the same (strange) behaviour as Emerald Mine that gems
- can slip down from flat walls, like normal walls and steel walls */
+ // Diamond Caves has the same (strange) behaviour as Emerald Mine that gems
+ // can slip down from flat walls, like normal walls and steel walls
level->em_slippery_gems = TRUE;
}
level->extra_time_score = level->score[SC_TIME_BONUS];
}
- // game logic of "game of life" and "biomaze" was buggy before 4.1.1.1
- if (level->game_version < VERSION_IDENT(4,1,1,1))
- level->use_life_bugs = TRUE;
-
if (level->game_version < VERSION_IDENT(3,2,0,7))
{
// default behaviour for snapping was "not continuous" before 3.2.0-7
// levels were solved by the first player entering an exit up to 4.1.0.0
if (level->game_version <= VERSION_IDENT(4,1,0,0))
level->solved_by_one_player = TRUE;
+
+ // game logic of "game of life" and "biomaze" was buggy before 4.1.1.1
+ if (level->game_version < VERSION_IDENT(4,1,1,1))
+ level->use_life_bugs = TRUE;
+
+ // only Sokoban fields (but not objects) had to be solved before 4.1.1.1
+ if (level->game_version < VERSION_IDENT(4,1,1,1))
+ level->sb_objects_needed = FALSE;
}
static void LoadLevel_InitStandardElements(struct LevelInfo *level)
{
int i, j;
- /* map custom element change events that have changed in newer versions
- (these following values were accidentally changed in version 3.0.1)
- (this seems to be needed only for 'ab_levelset3' and 'ab_levelset4') */
+ // map custom element change events that have changed in newer versions
+ // (these following values were accidentally changed in version 3.0.1)
+ // (this seems to be needed only for 'ab_levelset3' and 'ab_levelset4')
if (level->game_version <= VERSION_IDENT(3,0,0,0))
{
for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++)
int chunk_size_expected =
(chunk_info[i].loader)(file, chunk_size, &tape);
- /* the size of some chunks cannot be checked before reading other
- chunks first (like "HEAD" and "BODY") that contain some header
- information, so check them here */
+ // the size of some chunks cannot be checked before reading other
+ // chunks first (like "HEAD" and "BODY") that contain some header
+ // information, so check them here
if (chunk_size_expected != chunk_size)
{
Error(ERR_WARN, "wrong size (%d) of chunk '%s' in tape file '%s'",
void CreateLevelSketchImages(void)
{
-#if defined(TARGET_SDL)
Bitmap *bitmap1;
Bitmap *bitmap2;
int i;
Error(ERR_INFO, "%d normal and small images created", NUM_FILE_ELEMENTS);
CloseAllAndExit(0);
-#endif
}
void CreateCustomElementImages(char *directory)
{
-#if defined(TARGET_SDL)
char *src_basename = "RocksCE-template.ilbm";
char *dst_basename = "RocksCE.bmp";
char *src_filename = getPath2(directory, src_basename);
FreeBitmap(bitmap);
CloseAllAndExit(0);
-#endif
}