X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=9bd812373723cef124767d39028f4419dcfbbbdc;hb=8b04d496646e102dd15710ba091e2f37cadcec5e;hp=c0bfafa156abe3914bc2363e6e8e9ec00b0c1ed2;hpb=90c3a49422dd88de77ffc7b8dd1d4f1d73d0d9a3;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index c0bfafa1..9bd81237 100644 --- a/src/events.c +++ b/src/events.c @@ -1,7 +1,7 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* (c) 1995-2002 Artsoft Entertainment * +* (c) 1995-2006 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -245,7 +245,11 @@ void ClearEventQueue() break; case EVENT_KEYRELEASE: +#if 1 + ClearPlayerAction(); +#else key_joystick_mapping = 0; +#endif break; default: @@ -663,8 +667,18 @@ void HandleKey(Key key, int key_status) element_dropped[pnr] = FALSE; } } +#if 1 + else if (tape.recording && tape.pausing) + { + /* prevent key release events from un-pausing a paused game */ + if (key_status == KEY_PRESSED && + (key_action & KEY_ACTION)) + TapeTogglePause(TAPE_TOGGLE_MANUAL); + } +#else else if (tape.recording && tape.pausing && (key_action & KEY_ACTION)) TapeTogglePause(TAPE_TOGGLE_MANUAL); +#endif } } else @@ -700,8 +714,14 @@ void HandleKey(Key key, int key_status) return; } +#if 1 + if (game_status == GAME_MODE_PLAYING && + local_player->LevelSolved_GameEnd && + (key == KSYM_Return || key == setup.shortcut.toggle_pause)) +#else if (game_status == GAME_MODE_PLAYING && AllPlayersGone && (key == KSYM_Return || key == setup.shortcut.toggle_pause)) +#endif { GameEnd(); @@ -1045,7 +1065,11 @@ void HandleJoystick() if (tape.playing || keyboard) newbutton = ((joy & JOY_BUTTON) != 0); +#if 1 + if (local_player->LevelSolved_GameEnd && newbutton) +#else if (AllPlayersGone && newbutton) +#endif { GameEnd();