projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20030312-1-src
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 66e5ec642fd6fa4c88453257e7a22fd5fbe4f430..332dcca21ea8adcc1dacc6a92a2b4fd69976a7cd 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-1,7
+1,7
@@
/***********************************************************
* Rocks'n'Diamonds -- McDuffin Strikes Back! *
*----------------------------------------------------------*
/***********************************************************
* Rocks'n'Diamonds -- McDuffin Strikes Back! *
*----------------------------------------------------------*
-* (c) 1995-200
1
Artsoft Entertainment *
+* (c) 1995-200
2
Artsoft Entertainment *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
@@
-126,7
+126,11
@@
void HandleOtherEvents(Event *event)
break;
case EVENT_UNMAPNOTIFY:
break;
case EVENT_UNMAPNOTIFY:
+#if 0
+ /* This causes the game to stop not only when iconified, but also
+ when on another virtual desktop, which might be not desired. */
SleepWhileUnmapped();
SleepWhileUnmapped();
+#endif
break;
case EVENT_FOCUSIN:
break;
case EVENT_FOCUSIN:
@@
-542,14
+546,14
@@
void HandleKey(Key key, int key_status)
TapeTogglePause(TAPE_TOGGLE_MANUAL);
}
TapeTogglePause(TAPE_TOGGLE_MANUAL);
}
-
+#if 0
#ifndef DEBUG
if (game_status == PLAYING && (tape.playing || tape.pausing))
return;
#endif
#ifndef DEBUG
if (game_status == PLAYING && (tape.playing || tape.pausing))
return;
#endif
-
+#endif
HandleGadgetsKeyInput(key);
HandleGadgetsKeyInput(key);
@@
-584,11
+588,15
@@
void HandleKey(Key key, int key_status)
case KSYM_Page_Up:
if (game_status == CHOOSELEVEL)
HandleChooseLevel(0,0, 0,-SCR_FIELDY, MB_MENU_MARK);
case KSYM_Page_Up:
if (game_status == CHOOSELEVEL)
HandleChooseLevel(0,0, 0,-SCR_FIELDY, MB_MENU_MARK);
+ else if (game_status == SETUP)
+ HandleSetupScreen(0,0, 0,-SCR_FIELDY, MB_MENU_MARK);
break;
case KSYM_Page_Down:
if (game_status == CHOOSELEVEL)
HandleChooseLevel(0,0, 0,SCR_FIELDY, MB_MENU_MARK);
break;
case KSYM_Page_Down:
if (game_status == CHOOSELEVEL)
HandleChooseLevel(0,0, 0,SCR_FIELDY, MB_MENU_MARK);
+ else if (game_status == SETUP)
+ HandleSetupScreen(0,0, 0,SCR_FIELDY, MB_MENU_MARK);
break;
#ifdef DEBUG
break;
#ifdef DEBUG
@@
-850,11
+858,11
@@
void HandleJoystick()
!DelayReached(&joystickmove_delay, GADGET_FRAME_DELAY))
newbutton = dx = dy = 0;
!DelayReached(&joystickmove_delay, GADGET_FRAME_DELAY))
newbutton = dx = dy = 0;
- if (game_status
==
MAINMENU)
+ if (game_status
==
MAINMENU)
HandleMainMenu(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
HandleMainMenu(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
- else if (game_status
==
CHOOSELEVEL)
+ else if (game_status
==
CHOOSELEVEL)
HandleChooseLevel(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
HandleChooseLevel(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
- else if (game_status
==
SETUP)
+ else if (game_status
==
SETUP)
HandleSetupScreen(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
break;
}
HandleSetupScreen(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
break;
}
@@
-867,6
+875,10
@@
void HandleJoystick()
HandleHelpScreen(!newbutton);
break;
HandleHelpScreen(!newbutton);
break;
+ case LEVELED:
+ HandleLevelEditorIdle();
+ break;
+
case PLAYING:
if (tape.playing || keyboard)
newbutton = ((joy & JOY_BUTTON) != 0);
case PLAYING:
if (tape.playing || keyboard)
newbutton = ((joy & JOY_BUTTON) != 0);