X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=80917b02007916c1b8957cc440b046b75bd32b3b;hp=6671041620077893cc02078bc6a72725057c0f64;hb=b86e1c575b39198b1bc5a6038afec5d8d6fe26c3;hpb=d870b82d2c53def1ed6da9fdc46ce6bf3dd1bfae diff --git a/src/events.c b/src/events.c index 66710416..80917b02 100644 --- a/src/events.c +++ b/src/events.c @@ -378,6 +378,8 @@ void ClearPlayerAction() key_joystick_mapping = 0; for (i = 0; i < MAX_PLAYERS; i++) stored_player[i].action = 0; + + ClearJoystickState(); } void SleepWhileUnmapped() @@ -1558,6 +1560,9 @@ void HandleKey(Key key, int key_status) 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; @@ -1604,6 +1609,9 @@ void HandleKey(Key key, int key_status) 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); @@ -1621,7 +1629,6 @@ void HandleKey(Key key, int key_status) if (level.game_engine_type == GAME_ENGINE_TYPE_EM || level.game_engine_type == GAME_ENGINE_TYPE_SP) { - if (level.game_engine_type == GAME_ENGINE_TYPE_SP && getRedDiskReleaseFlag_SP() == 0) stored_player[pnr].action &= ~KEY_BUTTON_DROP;