#include "main_bd.h"
-// for compatibility with old game engine
-static boolean use_old_game_engine = TRUE;
-
// for gravity and other routines.
// these arrays contain the rotated directions.
// ccw eighth: counter-clockwise, 1/8 turn (45 degrees)
// returns true if the element has a certain property
static inline boolean has_property(int element, const int property)
{
- if (use_old_game_engine)
+ if (game_bd.game->use_old_engine)
element = non_scanned_pair(element);
return (gd_element_properties[element].properties & property) != 0;
int replay_no_more_movements;
boolean show_story; // to remember that story for a particular cave was already shown.
+
+ boolean use_old_engine; // for game engine compatibility with old replays
} GdGame;
typedef enum _gd_game_state
boolean TapeIsPlaying_ReplayBD(void);
boolean isLevelEditorFastStart(void);
+boolean useOldEngine_BD(void);
#endif // IMPORT_BD_H
game_bd.game->itermax2[0] = game_bd.game->itermax;
game_bd.game->itermax2[1] = game_bd.game->itermax;
+ game_bd.game->use_old_engine = useOldEngine_BD();
+
game_bd.player_moving = FALSE;
game_bd.player_snapping = FALSE;
#define LEVELINFO_TOKEN_SKIP_LEVELS 33
#define LEVELINFO_TOKEN_USE_EMC_TILES 34
#define LEVELINFO_TOKEN_INFO_SCREENS_FROM_MAIN 35
+#define LEVELINFO_TOKEN_REPLAY_WITH_OLD_ENGINE 36
-#define NUM_LEVELINFO_TOKENS 36
+#define NUM_LEVELINFO_TOKENS 37
static LevelDirTree ldi;
{ TYPE_BOOLEAN, &ldi.time_limit, "time_limit" },
{ TYPE_BOOLEAN, &ldi.skip_levels, "skip_levels" },
{ TYPE_BOOLEAN, &ldi.use_emc_tiles, "use_emc_tiles" },
- { TYPE_BOOLEAN, &ldi.info_screens_from_main, "info_screens_from_main" }
+ { TYPE_BOOLEAN, &ldi.info_screens_from_main, "info_screens_from_main" },
+ { TYPE_BOOLEAN, &ldi.replay_with_old_engine, "replay_with_old_engine" },
};
static struct TokenInfo artworkinfo_tokens[] =
ti->use_emc_tiles = FALSE;
ti->info_screens_from_main = FALSE;
+ ti->replay_with_old_engine = FALSE;
}
}
ti->use_emc_tiles = parent->use_emc_tiles;
ti->info_screens_from_main = parent->info_screens_from_main;
+ ti->replay_with_old_engine = parent->replay_with_old_engine;
}
}
ti_copy->use_emc_tiles = ti->use_emc_tiles;
ti_copy->info_screens_from_main = ti->info_screens_from_main;
+ ti_copy->replay_with_old_engine = ti->replay_with_old_engine;
ti_copy->color = ti->color;
ti_copy->class_desc = getStringCopy(ti->class_desc);
boolean use_emc_tiles; // use (swapped) V5/V6 EMC tiles when set to "true"
boolean info_screens_from_main; // can invoke info screens from main menu
+ boolean replay_with_old_engine; // use the old BD engine for playing BDCFF replays
int color; // color to use on selection screen for this level
char *class_desc; // description of level series class
return getBeltSwitchElementFromBeltNrAndBeltDirNr(belt_nr, belt_dir_nr);
}
+boolean useOldEngine_BD(void)
+{
+ return (tape.playing &&
+ tape.bd_replay &&
+ leveldir_current->replay_with_old_engine);
+}
+
boolean swapTiles_EM(boolean is_pre_emc_cave)
{
return is_pre_emc_cave && leveldir_current->use_emc_tiles;