projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
separated graphic and control definitions for global animations
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 4d8222e023cf196310b65e0a25d3fba33b84814c..e2352d185703d22585a66931c5e3a5ab07b199ac 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-173,6
+173,9
@@
static int el_act2crm(int, int);
static struct GadgetInfo *tool_gadget[NUM_TOOL_BUTTONS];
static int request_gadget_id = -1;
static struct GadgetInfo *tool_gadget[NUM_TOOL_BUTTONS];
static int request_gadget_id = -1;
+static unsigned int sync_frame_delay = 0;
+static unsigned int sync_frame_delay_value = GAME_FRAME_DELAY;
+
static char *print_if_not_empty(int element)
{
static char *s = NULL;
static char *print_if_not_empty(int element)
{
static char *s = NULL;
@@
-3396,8
+3399,7
@@
void WaitForEventToContinue()
DoAnimation();
DoAnimation();
- /* don't eat all CPU time */
- Delay(10);
+ WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
}
}
}
@@
-3568,12
+3570,11
@@
static int RequestHandleEvents(unsigned int req_state)
else
{
DoAnimation();
else
{
DoAnimation();
-
- if (!PendingEvent()) /* delay only if no pending events */
- Delay(10);
}
BackToFront();
}
BackToFront();
+
+ WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
return result;
}
return result;