if (!DelayReached(&action_delay, action_delay_value))
return;
+ if (init_last.busy.x == -1)
+ init_last.busy.x = WIN_XSIZE / 2;
+ if (init_last.busy.y == -1)
+ init_last.busy.y = WIN_YSIZE / 2;
+
x = ALIGNED_TEXT_XPOS(&init_last.busy);
y = ALIGNED_TEXT_YPOS(&init_last.busy);
gadgets_initialized = TRUE;
}
-inline void InitElementSmallImagesScaledUp(int graphic)
+inline static void InitElementSmallImagesScaledUp(int graphic)
{
struct GraphicInfo *g = &graphic_info[graphic];
exit(0);
}
- else if (strPrefix(command, "autoplay "))
+ else if (strPrefix(command, "autotest ") ||
+ strPrefix(command, "autoplay ") ||
+ strPrefix(command, "autoffwd "))
{
char *str_ptr = getStringCopy(&command[9]); /* read command parameters */
+ global.autoplay_mode = (strPrefix(command, "autotest") ? AUTOPLAY_TEST :
+ strPrefix(command, "autoplay") ? AUTOPLAY_PLAY :
+ strPrefix(command, "autoffwd") ? AUTOPLAY_FFWD : 0);
+
while (*str_ptr != '\0') /* continue parsing string */
{
/* cut leading whitespace from string, replace it by string terminator */
LoadLevelInfo(); /* global level info */
LoadLevelSetup_LastSeries(); /* last played series info */
LoadLevelSetup_SeriesInfo(); /* last played level info */
+
+ if (global.autoplay_leveldir &&
+ global.autoplay_mode != AUTOPLAY_TEST)
+ {
+ leveldir_current = getTreeInfoFromIdentifier(leveldir_first,
+ global.autoplay_leveldir);
+ if (leveldir_current == NULL)
+ leveldir_current = getFirstValidTreeInfoEntry(leveldir_first);
+ }
}
static void InitLevelArtworkInfo()