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
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index a9448442cefcc3ffb3e47c695885da6624a46849..5327c458ccd65b57e31a499b6e9e8c311300d306 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-235,6
+235,9
@@
static TreeInfo *drop_distance_current = NULL;
static TreeInfo *level_number = NULL;
static TreeInfo *level_number_current = NULL;
static TreeInfo *level_number = NULL;
static TreeInfo *level_number_current = NULL;
+static unsigned int sync_frame_delay = 0;
+static unsigned int sync_frame_delay_value = GAME_FRAME_DELAY;
+
static struct
{
int value;
static struct
{
int value;
@@
-1566,6
+1569,9
@@
void HandleTitleScreen(int mx, int my, int dx, int dy, int button)
{
if (num_title_screens == 0)
{
{
if (num_title_screens == 0)
{
+ /* switch game mode from title screen mode back to info screen mode */
+ game_status = GAME_MODE_INFO;
+
DrawInfoScreen_NotAvailable("Title screen information:",
"No title screen for this level set.");
DrawInfoScreen_NotAvailable("Title screen information:",
"No title screen for this level set.");
@@
-5595,8
+5601,7
@@
static Key getSetupKey()
DoAnimation();
BackToFront();
DoAnimation();
BackToFront();
- /* don't eat all CPU time */
- Delay(10);
+ WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
return key;
}
return key;
@@
-6283,8
+6288,7
@@
void CustomizeKeyboard(int player_nr)
DoAnimation();
BackToFront();
DoAnimation();
BackToFront();
- /* don't eat all CPU time */
- Delay(10);
+ WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
/* write new key bindings back to player setup */
}
/* write new key bindings back to player setup */
@@
-6439,8
+6443,7
@@
static boolean CalibrateJoystickMain(int player_nr)
DoAnimation();
BackToFront();
DoAnimation();
BackToFront();
- /* don't eat all CPU time */
- Delay(10);
+ WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
/* calibrated center position (joystick should now be centered) */
}
/* calibrated center position (joystick should now be centered) */
@@
-6462,7
+6465,7
@@
static boolean CalibrateJoystickMain(int player_nr)
NextEvent(&event);
HandleOtherEvents(&event);
NextEvent(&event);
HandleOtherEvents(&event);
-
Delay(10
);
+
WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value
);
}
}
}
}