static boolean element_dropped[MAX_PLAYERS] = { FALSE,FALSE,FALSE,FALSE };
int pnr;
+ /* initialize unifying snap and drop buttons (EM engine) */
+ game_em.use_single_button = game_em.use_single_button_initial;
+
for (pnr = 0; pnr < MAX_PLAYERS; pnr++)
{
byte key_action = 0;
if (tape.single_step && tape.recording && tape.pausing)
{
+ /* do not unify snap and drop buttons in single-step mode (EM engine) */
+ game_em.use_single_button = FALSE;
+
if (key_status == KEY_PRESSED && key_action & KEY_MOTION)
{
TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
game.use_block_last_field_bug =
(game.engine_version < VERSION_IDENT(3,1,1,0));
+ game_em.use_single_button = game_em.use_single_button_initial =
+ (game.engine_version > VERSION_IDENT(4,0,0,2));
+
/* ---------------------------------------------------------------------- */
/* set maximal allowed number of custom element changes per game frame */
game_em.any_player_moving = FALSE;
game_em.any_player_snapping = FALSE;
+
+ game_em.use_single_button = game_em.use_single_button_initial = TRUE;
+
game_em.last_moving_player = 0; /* default: first player */
for (i = 0; i < MAX_PLAYERS; i++)
{
boolean any_player_moving;
boolean any_player_snapping;
+
+ boolean use_single_button_initial;
+ boolean use_single_button;
+
int last_moving_player;
int last_player_direction[MAX_PLAYERS];
};
struct LEVEL *lev;
struct PLAYER *ply[MAX_PLAYERS];
+
+ /* used for runtime values */
+ struct GameInfo_EM *game_em;
};
struct GraphicInfo_EM
/* ------------------------------------------------------------------------- */
extern struct GlobalInfo_EM global_em_info;
+extern struct GameInfo_EM game_em;
extern struct LevelInfo_EM native_em_level;
extern struct GraphicInfo_EM graphic_info_em_object[TILE_MAX][8];
extern struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][SPR_MAX][8];
int north = 0, east = 0, south = 0, west = 0;
int snap = 0, drop = 0;
+ if (game_em.use_single_button && action & (JOY_BUTTON_1 | JOY_BUTTON_2))
+ action |= JOY_BUTTON_1 | JOY_BUTTON_2;
+
if (action & JOY_LEFT)
west = 1;