projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed screen update function name to be explicit regarding build-in delay
[rocksndiamonds.git]
/
src
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index c6e3c645c87796d4690ea98663725436cdbfbd8d..c69b78fb4fcd4e22bd1f2e12a742ba23b4756479 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-235,9
+235,6
@@
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;
@@
-1666,9
+1663,9
@@
void HandleTitleScreen(int mx, int my, int dx, int dy, int button)
sound = getTitleSound(tci);
music = getTitleMusic(tci);
sound = getTitleSound(tci);
music = getTitleMusic(tci);
- if (
sound == SND_UNDEFINED ||
sound != last_sound)
- FadeSound
s(
);
- if (
music == MUS_UNDEFINED ||
music != last_music)
+ if (
last_sound != SND_UNDEFINED &&
sound != last_sound)
+ FadeSound
(last_sound
);
+ if (
last_music != MUS_UNDEFINED &&
music != last_music)
FadeMusic();
fading = getTitleFading(tci);
FadeMusic();
fading = getTitleFading(tci);
@@
-5595,8
+5592,6
@@
static Key getSetupKey()
DoAnimation();
BackToFront();
DoAnimation();
BackToFront();
-
- WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
return key;
}
return key;
@@
-5641,7
+5636,7
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
int ypos = MENU_SCREEN_START_YPOS + screen_pos;
int startx = mSX + xpos * 32;
int starty = mSY + ypos * 32;
int ypos = MENU_SCREEN_START_YPOS + screen_pos;
int startx = mSX + xpos * 32;
int starty = mSY + ypos * 32;
- int font_nr, font_
width
;
+ int font_nr, font_
nr_default, font_width_default
;
int type = si->type;
void *value = si->value;
char *value_string = getSetupValue(type, value);
int type = si->type;
void *value = si->value;
char *value_string = getSetupValue(type, value);
@@
-5673,8
+5668,10
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
startx = mSX + xpos * 32;
starty = mSY + ypos * 32;
startx = mSX + xpos * 32;
starty = mSY + ypos * 32;
- font_nr = getSetupValueFont(type, value);
- font_width = getFontWidth(font_nr);
+ font_nr_default = getSetupValueFont(type, value);
+ font_width_default = getFontWidth(font_nr_default);
+
+ font_nr = font_nr_default;
// special check if right-side setup values moved left due to scrollbar
if (scrollbar_needed && xpos > MENU_SCREEN_START_XPOS)
// special check if right-side setup values moved left due to scrollbar
if (scrollbar_needed && xpos > MENU_SCREEN_START_XPOS)
@@
-5692,7
+5689,6
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
startx = mSX + xpos * 32;
font_nr = getSetupValueFontNarrow(type, font_nr);
startx = mSX + xpos * 32;
font_nr = getSetupValueFontNarrow(type, font_nr);
- font_width = getFontWidth(font_nr);
}
}
}
}
@@
-5735,7
+5731,7
@@
static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
}
for (i = 0; i <= menu_screen_max_xpos - xpos; i++)
}
for (i = 0; i <= menu_screen_max_xpos - xpos; i++)
- DrawText(startx + i * font_width
, starty, " ", font_nr
);
+ DrawText(startx + i * font_width
_default, starty, " ", font_nr_default
);
DrawText(startx, starty, value_string, font_nr);
DrawText(startx, starty, value_string, font_nr);
@@
-6310,8
+6306,6
@@
void CustomizeKeyboard(int player_nr)
DoAnimation();
BackToFront();
DoAnimation();
BackToFront();
-
- WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
/* write new key bindings back to player setup */
}
/* write new key bindings back to player setup */
@@
-6465,8
+6459,6
@@
static boolean CalibrateJoystickMain(int player_nr)
DoAnimation();
BackToFront();
DoAnimation();
BackToFront();
-
- WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value);
}
/* calibrated center position (joystick should now be centered) */
}
/* calibrated center position (joystick should now be centered) */
@@
-6488,7
+6480,7
@@
static boolean CalibrateJoystickMain(int player_nr)
NextEvent(&event);
HandleOtherEvents(&event);
NextEvent(&event);
HandleOtherEvents(&event);
-
WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value
);
+
BackToFront(
);
}
}
}
}