Add option to fix the wrong sky rotation when flying over the planet
[mercenary-reloaded.git] / src / mercenary / main.c
index b6aba1f..e1515e6 100644 (file)
@@ -76,6 +76,7 @@ static int config_debug_opengl = 0;
 /* render improvements */
 static int config_improve_extend_roads = 1;    /* set to 1 to extend roads */
 static int config_improve_smooth_planets = 1;  /* set to 1 to rotate planets smoothly */
+static int config_fix_sky_rotation = 0;                /* set to 1 to fix sky rotation */
 
 #define CPU_SPEED      7093790.0;
 
@@ -142,6 +143,7 @@ int parse_args(int argc, char *argv[])
 
        while (argc > i) {
                if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
+                       /*          |                                                                             | */
                        print_info("Usage: %s\n", argv[0]);
                        print_info(" -s --render-speed original | fast\n");
                        print_info("        Set speed of rendering to original Amiga or fast speed.\n");
@@ -161,6 +163,11 @@ int parse_args(int argc, char *argv[])
                        print_info("        Set field-of-view. Default is %.0f.\n", FOV_NOVAGEN);
                        print_info(" -i --skip-intro\n");
                        print_info("        Skip intro sequence approaching to Eris space port.\n");
+                       print_info("    --fix-sky-rotation\n");
+                       print_info("        Sky rotates in the wrong direction, if flying over surface. This is\n");
+                       print_info("        fixed by rotating all sky object by 180 degrees. The original (wrong)\n");
+                       print_info("        rotation is default, because it preserves the game's spirit!\n");
+                       print_info("        This requires OpenGL rendering\n");
                        print_info("Debug options:\n");
                        print_info(" -o --debug-opengl\n");
                        print_info("        Use split screen to display both Amiga and OpenGL rendering.\n");
@@ -263,6 +270,9 @@ illegal_parameter:
                if (!strcmp(argv[i], "-i") || !strcmp(argv[i], "--skip-intro")) {
                        config_skip_intro = 1;
                } else
+               if (!strcmp(argv[i], "--fix-sky-rotation")) {
+                       config_fix_sky_rotation = 1;
+               } else
                if (!strcmp(argv[i], "-o") || !strcmp(argv[i], "--debug-opengl")) {
                        config_debug_opengl = 1;
                } else
@@ -597,7 +607,7 @@ static void main_loop(void)
                        frame_render = 0;
                        /* start capturing for improved graphics */
                        if (render_improved)
-                               render_capture_start(config_fov, config_improve_extend_roads, config_improve_smooth_planets, config_debug_transparent);
+                               render_capture_start(config_fov, config_improve_extend_roads, config_improve_smooth_planets, config_fix_sky_rotation, config_debug_transparent);
 
                        /* execute until the rendered image is ready (wait for VBL) */
                        cycle_count = 0;