projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added using globally predefined X/Y arrays
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index 315983ac896ca3428199c65171534ab91d923437..7f9821bf0d1f7a2d53adf17a3c8d20fdf1ba01a5 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-138,11
+138,12
@@
static void DrawInitAnim(boolean only_when_loading)
game_status == GAME_MODE_LOADING ?
&init_last.busy :
&init_last.busy_playfield);
game_status == GAME_MODE_LOADING ?
&init_last.busy :
&init_last.busy_playfield);
- static unsigned int action_delay = 0;
- unsigned int action_delay_value = GameFrameDelay;
+ static DelayCounter action_delay = { 0 };
int sync_frame = FrameCounter;
int x, y;
int sync_frame = FrameCounter;
int x, y;
+ action_delay.value = GameFrameDelay;
+
// prevent OS (Windows) from complaining about program not responding
CheckQuitEvent();
// prevent OS (Windows) from complaining about program not responding
CheckQuitEvent();
@@
-152,7
+153,7
@@
static void DrawInitAnim(boolean only_when_loading)
if (image_initial[graphic].bitmap == NULL || window == NULL)
return;
if (image_initial[graphic].bitmap == NULL || window == NULL)
return;
- if (!DelayReached(&action_delay
, action_delay_value
))
+ if (!DelayReached(&action_delay))
return;
if (busy->x == -1)
return;
if (busy->x == -1)
@@
-1966,7
+1967,7
@@
static void InitGraphicCompatibilityInfo(void)
// special compatibility handling for "Jue" graphics sets (2007 and 2019)
boolean supports_score_info = (menu.draw_xoffset[GAME_MODE_SCOREINFO] != 0);
// special compatibility handling for "Jue" graphics sets (2007 and 2019)
boolean supports_score_info = (menu.draw_xoffset[GAME_MODE_SCOREINFO] != 0);
- if (strPrefix(
leveldir_current->graphics_set
, "jue") && !supports_score_info)
+ if (strPrefix(
artwork.gfx_current_identifier
, "jue") && !supports_score_info)
{
int font_title[] =
{
{
int font_title[] =
{
@@
-2002,7
+2003,7
@@
static void InitGraphicCompatibilityInfo(void)
{
for (j = 0; j < 2; j++)
{
{
for (j = 0; j < 2; j++)
{
- boolean jue0 = strEqual(
leveldir_current->graphics_set
, "jue0");
+ boolean jue0 = strEqual(
artwork.gfx_current_identifier
, "jue0");
int font_nr = (j == 0 ? font_text[i] : FONT_ACTIVE(font_text[i]));
int font_bitmap_id = font_info[font_nr].special_bitmap_id[mode_old];
int font_yoffset = (jue0 ? 10 : 5);
int font_nr = (j == 0 ? font_text[i] : FONT_ACTIVE(font_text[i]));
int font_bitmap_id = font_info[font_nr].special_bitmap_id[mode_old];
int font_yoffset = (jue0 ? 10 : 5);
@@
-6260,6
+6261,13
@@
static char *setNewArtworkIdentifier(int type)
return artwork_new_identifier;
}
return artwork_new_identifier;
}
+static void InitArtworkIdentifier(void)
+{
+ setNewArtworkIdentifier(ARTWORK_TYPE_GRAPHICS);
+ setNewArtworkIdentifier(ARTWORK_TYPE_SOUNDS);
+ setNewArtworkIdentifier(ARTWORK_TYPE_MUSIC);
+}
+
void ReloadCustomArtwork(int force_reload)
{
int last_game_status = game_status; // save current game status
void ReloadCustomArtwork(int force_reload)
{
int last_game_status = game_status; // save current game status
@@
-6509,6
+6517,9
@@
void OpenAll(void)
InitOverrideArtwork(); // needs to know current level directory
print_timestamp_time("InitOverrideArtwork");
InitOverrideArtwork(); // needs to know current level directory
print_timestamp_time("InitOverrideArtwork");
+ InitArtworkIdentifier(); // needs to know current level directory
+ print_timestamp_time("InitArtworkIdentifier");
+
InitImages(); // needs to know current level directory
print_timestamp_time("InitImages");
InitImages(); // needs to know current level directory
print_timestamp_time("InitImages");
@@
-6600,8
+6611,7
@@
void OpenAll(void)
static boolean WaitForApiThreads(void)
{
static boolean WaitForApiThreads(void)
{
- unsigned int thread_delay = 0;
- unsigned int thread_delay_value = 10000;
+ DelayCounter thread_delay = { 10000 };
if (program.api_thread_count == 0)
return TRUE;
if (program.api_thread_count == 0)
return TRUE;
@@
-6617,7
+6627,7
@@
static boolean WaitForApiThreads(void)
// wait for threads to finish (and fail on timeout)
while (program.api_thread_count > 0)
{
// wait for threads to finish (and fail on timeout)
while (program.api_thread_count > 0)
{
- if (DelayReached(&thread_delay
, thread_delay_value
))
+ if (DelayReached(&thread_delay))
{
Error("failed waiting for threads - TIMEOUT");
{
Error("failed waiting for threads - TIMEOUT");