projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added using headless mode (no window) when converting levels
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index 169d0582f3a359f9482bd15107c1e850fd498b00..97eaf2bf17ddfbb20f4f3d76c932626cf9a18978 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-1710,6
+1710,9
@@
static void InitGraphicInfo()
src_x = graphic_info[i].src_x;
src_y = graphic_info[i].src_y;
src_x = graphic_info[i].src_x;
src_y = graphic_info[i].src_y;
+ if (program.headless)
+ continue;
+
if (src_x < 0 || src_y < 0 ||
src_x + width > src_bitmap_width ||
src_y + height > src_bitmap_height)
if (src_x < 0 || src_y < 0 ||
src_x + width > src_bitmap_width ||
src_y + height > src_bitmap_height)
@@
-4961,6
+4964,9
@@
void Execute_Command(char *command)
while (*str_ptr != ' ' && *str_ptr != '\t' && *str_ptr != '\0')
str_ptr++;
}
while (*str_ptr != ' ' && *str_ptr != '\t' && *str_ptr != '\0')
str_ptr++;
}
+
+ if (global.autoplay_mode == AUTOPLAY_MODE_TEST)
+ program.headless = TRUE;
}
else if (strPrefix(command, "convert "))
{
}
else if (strPrefix(command, "convert "))
{
@@
-4975,6
+4981,8
@@
void Execute_Command(char *command)
*str_ptr++ = '\0'; /* terminate leveldir string */
global.convert_level_nr = atoi(str_ptr); /* get level_nr value */
}
*str_ptr++ = '\0'; /* terminate leveldir string */
global.convert_level_nr = atoi(str_ptr); /* get level_nr value */
}
+
+ program.headless = TRUE;
}
else if (strPrefix(command, "create images "))
{
}
else if (strPrefix(command, "create images "))
{
@@
-5517,6
+5525,9
@@
static void InitMusic(char *identifier)
static void InitArtworkDone()
{
static void InitArtworkDone()
{
+ if (program.headless)
+ return;
+
InitGlobalAnimations();
}
InitGlobalAnimations();
}