static void InitGlobal()
{
global.autoplay_leveldir = NULL;
+ global.convert_leveldir = NULL;
global.frames_per_second = 0;
global.fps_slowdown = FALSE;
global.autoplay_level_nr = atoi(str_ptr); /* get level_nr value */
}
}
+ else if (strncmp(command, "convert ", 8) == 0)
+ {
+ char *str_copy = getStringCopy(&command[8]);
+ char *str_ptr = strchr(str_copy, ' ');
+
+ global.convert_leveldir = str_copy;
+ global.convert_level_nr = -1;
+
+ if (str_ptr != NULL)
+ {
+ *str_ptr++ = '\0'; /* terminate leveldir string */
+ global.convert_level_nr = atoi(str_ptr); /* get level_nr value */
+ }
+ }
else
{
Error(ERR_EXIT_HELP, "unrecognized command '%s'", command);
AutoPlayTape();
return;
}
+ else if (global.convert_leveldir)
+ {
+ ConvertLevels();
+ return;
+ }
game_status = GAME_MODE_MAIN;