/***********************************************************
* Rocks'n'Diamonds -- McDuffin Strikes Back! *
*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
+* (c) 1995-2006 Artsoft Entertainment *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
while (NextValidEvent(&event))
{
- switch(event.type)
+ switch (event.type)
{
case EVENT_BUTTONPRESS:
case EVENT_BUTTONRELEASE:
void HandleOtherEvents(Event *event)
{
- switch(event->type)
+ switch (event->type)
{
case EVENT_EXPOSE:
HandleExposeEvent((ExposeEvent *) event);
NextEvent(&event);
- switch(event.type)
+ switch (event.type)
{
case EVENT_BUTTONRELEASE:
button_status = MB_RELEASED;
break;
case EVENT_KEYRELEASE:
+#if 1
+ ClearPlayerAction();
+#else
key_joystick_mapping = 0;
+#endif
break;
default:
NextEvent(&event);
- switch(event.type)
+ switch (event.type)
{
case EVENT_BUTTONRELEASE:
button_status = MB_RELEASED;
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
ToggleFullscreenIfNeeded();
+ if (game_status == GAME_MODE_SETUP)
+ RedrawSetupScreenAfterFullscreenToggle();
+
return;
}
+#if 0
+ 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();
key = KSYM_UNDEFINED;
}
- switch(game_status)
+ switch (game_status)
{
case GAME_MODE_PSEUDO_TYPENAME:
HandleTypeName(0, key);
case GAME_MODE_SETUP:
case GAME_MODE_INFO:
case GAME_MODE_SCORES:
- switch(key)
+ switch (key)
{
case KSYM_space:
case KSYM_Return:
break;
case KSYM_Escape:
+ if (game_status != GAME_MODE_MAIN)
+ FadeSkipNextFadeIn();
+
if (game_status == GAME_MODE_TITLE)
HandleTitleScreen(0, 0, 0, 0, MB_MENU_LEAVE);
else if (game_status == GAME_MODE_LEVELS)
case GAME_MODE_PLAYING:
{
- switch(key)
+ switch (key)
{
case KSYM_Escape:
RequestQuitGame(setup.ask_on_escape);
int dx = (left ? -1 : right ? 1 : 0);
int dy = (up ? -1 : down ? 1 : 0);
- switch(game_status)
+ switch (game_status)
{
case GAME_MODE_TITLE:
case GAME_MODE_MAIN:
if (tape.playing || keyboard)
newbutton = ((joy & JOY_BUTTON) != 0);
+#if 0
+ if (local_player->LevelSolved_GameEnd && newbutton)
+#else
if (AllPlayersGone && newbutton)
+#endif
{
GameEnd();