projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20000927-1-src
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index d3f8196bac56506101241334fdca3e5a20b564a3..470271cbefe3a68b6de54c4fc79d1a6d9b23cc6c 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-79,13
+79,15
@@
void EventLoop(void)
}
}
}
}
}
}
-
-
HandleNoX
Event();
+ else
+
HandleNo
Event();
/* don't use all CPU time when idle; the main loop while playing
has its own synchronization and is CPU friendly, too */
/* don't use all CPU time when idle; the main loop while playing
has its own synchronization and is CPU friendly, too */
- if (game_status != PLAYING)
+ if (game_status == PLAYING)
+ HandleGameActions();
+ else
{
SyncDisplay();
if (!PendingEvent()) /* delay only if no pending events */
{
SyncDisplay();
if (!PendingEvent()) /* delay only if no pending events */
@@
-258,7
+260,7
@@
void HandleMotionEvent(MotionEvent *event)
if (!PointerInWindow(window))
return; /* window and pointer are on different screens */
if (!PointerInWindow(window))
return; /* window and pointer are on different screens */
-#if
0
+#if
1
if (button_status == MB_RELEASED && game_status != LEVELED)
return;
#endif
if (button_status == MB_RELEASED && game_status != LEVELED)
return;
#endif
@@
-424,6
+426,7
@@
void HandleButton(int mx, int my, int button)
void HandleKey(Key key, int key_status)
{
int joy = 0;
void HandleKey(Key key, int key_status)
{
int joy = 0;
+ boolean anyTextGadgetActiveOrJustFinished = anyTextGadgetActive();
static struct SetupKeyboardInfo custom_key;
static struct
{
static struct SetupKeyboardInfo custom_key;
static struct
{
@@
-587,7
+590,8
@@
void HandleKey(Key key, int key_status)
break;
case LEVELED:
break;
case LEVELED:
- HandleLevelEditorKeyInput(key);
+ if (!anyTextGadgetActiveOrJustFinished)
+ HandleLevelEditorKeyInput(key);
break;
case PLAYING:
break;
case PLAYING:
@@
-738,7
+742,7
@@
void HandleKey(Key key, int key_status)
}
}
}
}
-void HandleNo
X
Event()
+void HandleNoEvent()
{
if (button_status && game_status != PLAYING)
{
{
if (button_status && game_status != PLAYING)
{
@@
-752,9
+756,6
@@
void HandleNoXEvent()
#endif
HandleJoystick();
#endif
HandleJoystick();
-
- if (game_status == PLAYING)
- HandleGameActions();
}
static int HandleJoystickForAllPlayers()
}
static int HandleJoystickForAllPlayers()