/* 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 */
+static int config_improve_stars_rotation = 1; /* set to 1 to improve star rendering */
+static int config_improve_fix_sky_rotation = 0; /* set to 1 to fix sky rotation */
#define CPU_SPEED 7093790.0;
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("Improvement options:\n");
+ print_info(" --extend-roads 1 | 0\n");
+ print_info(" Roads in the distance end in a single point. This was ok for low\n");
+ print_info(" resolution, but for OpenGL we want equal width all the way.\n");
+ print_info(" This requires OpenGL rendering. (default = %d)\n", config_improve_extend_roads);
+ print_info(" --smooth-planets 1 | 0\n");
+ print_info(" Planet's rotation uses integer value, so they judder in the original\n");
+ print_info(" game rendering. This option requires OpenGL rendering. (default = %d)\n", config_improve_smooth_planets);
+ print_info(" --stars-rotation 1 | 0\n");
+ print_info(" Stars are rendered originally by using a fast routine. Use this option\n");
+ print_info(" to make them render on a sphere. They also rotate with the sky then.\n");
+ print_info(" This requires OpenGL rendering and is default with VR. (default = %d)\n", config_improve_stars_rotation);
+ print_info(" --fix-sky-rotation 1 | 0\n");
+ print_info(" Sky rotates in the wrong direction, if flying over planet. 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(" This option requires OpenGL rendering. (default = %d)\n", config_improve_fix_sky_rotation);
print_info("Debug options:\n");
print_info(" -o --debug-opengl\n");
print_info(" Use split screen to display both Amiga and OpenGL rendering.\n");
if (!strcmp(argv[i], "-i") || !strcmp(argv[i], "--skip-intro")) {
config_skip_intro = 1;
} else
+ if (!strcmp(argv[i], "--extend-roads")) {
+ i++;
+ if (argc == i)
+ goto missing_parameter;
+ config_improve_extend_roads = atoi(argv[i]);
+ } else
+ if (!strcmp(argv[i], "--smooth-planets")) {
+ i++;
+ if (argc == i)
+ goto missing_parameter;
+ config_improve_smooth_planets = atoi(argv[i]);
+ } else
+ if (!strcmp(argv[i], "--stars-rotation")) {
+ i++;
+ if (argc == i)
+ goto missing_parameter;
+ config_improve_stars_rotation = atoi(argv[i]);
+ } else
if (!strcmp(argv[i], "--fix-sky-rotation")) {
- config_fix_sky_rotation = 1;
+ i++;
+ if (argc == i)
+ goto missing_parameter;
+ config_improve_fix_sky_rotation = atoi(argv[i]);
} else
if (!strcmp(argv[i], "-o") || !strcmp(argv[i], "--debug-opengl")) {
config_debug_opengl = 1;
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_fix_sky_rotation, config_debug_transparent);
+ render_capture_start(config_fov, config_improve_extend_roads, config_improve_smooth_planets, config_improve_stars_rotation, config_improve_fix_sky_rotation, config_debug_transparent);
/* execute until the rendered image is ready (wait for VBL) */
cycle_count = 0;
/* rendering options */
static int extend_roads; /* extend roads in its original width, rather than just using a single point */
+static int improve_stars; /* stars are rendered spherical */
static int fix_sky_rotation; /* sky will rotate correctly by rotating planets/comet by 180 degrees */
static double fov;
static double debug_opacity;
}
/* rendering starts, initialize variables */
-void render_capture_start(double _fov, int _extend_roads, int _smooth_planets, int _fix_sky_rotation, int debug)
+void render_capture_start(double _fov, int _extend_roads, int _smooth_planets, int _improve_stars, int _fix_sky_rotation, int debug)
{
#if defined(DEBUG_COLOR) || defined(DEBUG_VERTEX)
printf("start rendering a new frame...\n");
fov = _fov;
extend_roads = _extend_roads;
fix_sky_rotation = _fix_sky_rotation;
+ improve_stars = _improve_stars;
/* set some transpareny, if debugging is enabled */
debug_opacity = (debug) ? 0.5 : 1.0;
for (i = 0; i < 16; i++)
color[i] = m68k_read_memory_16(mercenary_palette_stars() + (i << 2));
- if (!vr) {
+ if (!vr && !improve_stars) {
/* render legacy stars (as with the original game) */
/* table offset is 91, so we substract it and add it back with different FOV, so table begins at later