+2015-06-21
+ * extended automatic tape playing modes:
+ - "autotest" to automatically test tapes (this was "autoplay" before)
+ - "autoplay" to automatically play tapes (visibly)
+ - "autoffwd" to automatically play tapes (visibly, with maximum speed)
+
2015-06-16
* fixed and enhanced screen fading and background/border handling
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()
" \"print helptext.conf\" print default helptext config\n"
" \"dump level FILE\" dump level data from FILE\n"
" \"dump tape FILE\" dump tape data from FILE\n"
+ " \"autotest LEVELDIR [NR ...]\" test level tapes for LEVELDIR\n"
" \"autoplay LEVELDIR [NR ...]\" play level tapes for LEVELDIR\n"
+ " \"autoffwd LEVELDIR [NR ...]\" ffwd level tapes for LEVELDIR\n"
" \"convert LEVELDIR [NR]\" convert levels in LEVELDIR\n"
" \"create images DIRECTORY\" write BMP images to DIRECTORY\n"
" \"create CE image DIRECTORY\" write BMP image to DIRECTORY\n"
printf("playing tape ... ");
TapeStartGamePlaying();
- TapeStartWarpForward();
+
+ if (global.autoplay_mode == AUTOPLAY_FFWD)
+ tape.fast_forward = TRUE;
+
+ if (global.autoplay_mode != AUTOPLAY_PLAY)
+ TapeStartWarpForward();
return;
}