projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19990604-1-src
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index b0022c351eb70247a9683d6d4ca48080ad513b9b..a34c1ab9a762e501abbbd947f643497601d67dfd 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-68,7
+68,8
@@
void EventLoop(void)
if (game_status != PLAYING)
{
XSync(display, FALSE);
if (game_status != PLAYING)
{
XSync(display, FALSE);
- Delay(10);
+ if (!XPending(display)) /* delay only if no pending events */
+ Delay(10);
}
/* refresh window contents from drawing buffer, if needed */
}
/* refresh window contents from drawing buffer, if needed */
@@
-487,16
+488,6
@@
void HandleKey(KeySym key, int key_status)
/* allow quick escape to the main menu with the Escape key */
if (key == XK_Escape && game_status != MAINMENU)
{
/* allow quick escape to the main menu with the Escape key */
if (key == XK_Escape && game_status != MAINMENU)
{
- if (game_status == LEVELED)
- {
- /* draw smaller door */
- XCopyArea(display, pix[PIX_DOOR], drawto, gc,
- DOOR_GFX_PAGEX7, 64,
- 108, 64,
- EX - 4, EY - 12);
- redraw_mask |= REDRAW_ALL;
- }
-
CloseDoor(DOOR_CLOSE_1 | DOOR_OPEN_2 | DOOR_NO_DELAY);
game_status = MAINMENU;
DrawMainMenu();
CloseDoor(DOOR_CLOSE_1 | DOOR_OPEN_2 | DOOR_NO_DELAY);
game_status = MAINMENU;
DrawMainMenu();
@@
-539,6
+530,16
@@
void HandleKey(KeySym key, int key_status)
HandleSetupInputScreen(0,0, 0,0, MB_MENU_CHOICE);
break;
HandleSetupInputScreen(0,0, 0,0, MB_MENU_CHOICE);
break;
+ case XK_Page_Up:
+ if (game_status == CHOOSELEVEL)
+ HandleChooseLevel(0,0, 0,-SCR_FIELDY, MB_MENU_MARK);
+ break;
+
+ case XK_Page_Down:
+ if (game_status == CHOOSELEVEL)
+ HandleChooseLevel(0,0, 0,SCR_FIELDY, MB_MENU_MARK);
+ break;
+
default:
break;
}
default:
break;
}