Skip intro on Damocles
authorAndreas Eversberg <jolly@eversberg.eu>
Sat, 24 Mar 2018 15:21:39 +0000 (16:21 +0100)
committerAndreas Eversberg <jolly@eversberg.eu>
Sun, 25 Mar 2018 12:25:15 +0000 (14:25 +0200)
src/mercenary/main.c

index ef7ce5d..f6a640e 100644 (file)
@@ -40,6 +40,7 @@ static const char *config_gamesave_dir = ".mercenary";
 static int config_video_filter = 1;
 static int config_audio_filter = 1;
 static int config_render = 0;
+static int config_skip_intro = 0;
 static int config_debug_opengl = 0;
 
 #define CPU_SPEED      7093790.0;
@@ -100,6 +101,9 @@ int parse_args(int argc, char *argv[])
                        print_info("        Set audio filter.\n");
                        print_info(" -r --render original | opegl\n");
                        print_info("        Set speed of rendering to original Amiga or full speed.\n");
+                       print_info(" -i --skip-intro\n");
+                       print_info("        Skip intro sequence approaching to Eris space port.\n");
+                       print_info("Debug options:\n");
                        print_info(" -o --debug-opengl\n");
                        print_info("        Use split screen to debug opengl rendering vs. amiga rendering.\n");
                        return -1;
@@ -158,6 +162,9 @@ illegal_parameter:
                        else
                                goto illegal_parameter;
                } else
+               if (!strcmp(argv[i], "-i") || !strcmp(argv[i], "--skip-intro")) {
+                       config_skip_intro = 1;
+               } else
                if (!strcmp(argv[i], "-o") || !strcmp(argv[i], "--debug-opengl")) {
                        config_debug_opengl = 1;
                } else {
@@ -703,6 +710,18 @@ int main(int argc, char *argv[])
        /* start cpu */
        reset_cpu();
 
+       if (config_skip_intro) {
+               int event;
+
+               print_info("*** Skipping intro, fast forwarding... ***\n\n");
+               do {
+                       execute_cpu(0, &event);
+               } while (event != STOP_AT_CLEAR_SCREEN1);
+               do {
+                       execute_cpu(0, &event);
+               } while (event != STOP_AT_WAIT_VBL);
+       }
+
        print_info("**********************************\n");
        print_info("* Welcome to Mercenary Reloaded! *\n");
        print_info("**********************************\n\n");