printf("General Options:\n");
printf("\t--help -h: print usage\n");
printf("\t--fg-root=path: specify the root path for all the data files\n");
- printf("\t--disable-gamemode: disable full-screen game mode\n");
- printf("\t--enable-gamemode: enable full-screen game mode\n");
+ printf("\t--disable-game-mode: disable full-screen game mode\n");
+ printf("\t--enable-game-mode: enable full-screen game mode\n");
printf("\t--disable-splash-screen: disable splash screen\n");
printf("\t--enable-splash-screen: enable splash screen\n");
printf("\t--disable-intro-music: disable introduction music\n");
// $Log$
+// Revision 1.24 1998/09/08 15:04:33 curt
+// Optimizations by Norman Vine.
+//
// Revision 1.23 1998/08/27 17:02:07 curt
// Contributions from Bernie Bright <bbright@c031.aone.net.au>
// - use strings for fg_root and airport_id and added methods to return
winWidth = 640; // FG_DEFAULT_WIN_WIDTH
winHeight = 480; // FG_DEFAULT_WIN_HEIGHT
win_ratio = (double) winWidth / (double) winHeight;
- update_fov = TRUE;
+ update_fov = true;
}
// printf("theta_x = %.2f\n", theta_x);
sin_fov_x = sin(theta_x);
cos_fov_x = cos(theta_x);
- slope_x = - cos_fov_x / sin_fov_x;
- // (HUH?) sin_fov_x /= slope_x;
+ slope_x = -cos_fov_x / sin_fov_x;
// printf("slope_x = %.2f\n", slope_x);
+#if defined( USE_FAST_FOV_CLIP )
+ fov_x_clip = slope_x*cos_fov_x - sin_fov_x;
+#endif // defined( USE_FAST_FOV_CLIP )
+
// calculate sin() and cos() of fov / 2 in Y direction;
theta_y = (fov * DEG_TO_RAD) / 2.0;
// printf("theta_y = %.2f\n", theta_y);
sin_fov_y = sin(theta_y);
cos_fov_y = cos(theta_y);
slope_y = cos_fov_y / sin_fov_y;
- // (HUH?) sin_fov_y /= slope_y;
// printf("slope_y = %.2f\n", slope_y);
+
+#if defined( USE_FAST_FOV_CLIP )
+ fov_y_clip = -(slope_y*cos_fov_y + sin_fov_y);
+#endif // defined( USE_FAST_FOV_CLIP )
}
MAT3mat R, TMP, UP, LOCAL, VIEW;
double ntmp;
- if(update_fov == TRUE) {
+ if(update_fov == true) {
// printf("Updating fov\n");
UpdateFOV(¤t_options);
- update_fov = FALSE;
+ update_fov = false;
}
scenery.center.x = scenery.next_center.x;
// $Log$
+// Revision 1.20 1998/09/08 15:04:35 curt
+// Optimizations by Norman Vine.
+//
// Revision 1.19 1998/08/20 20:32:34 curt
// Reshuffled some of the code in and around views.[ch]xx
//
#include "options.hxx"
-#ifndef BOOL
-#define BOOL int
-#endif
-#ifndef TRUE
-#define FALSE 0
-#define TRUE 1
-#endif
+// used in views.cxx and tilemgr.cxx
+#define USE_FAST_FOV_CLIP
+
// Define a structure containing view information
class fgVIEW {
double goal_view_offset;
// flag forcing update of fov related stuff
- BOOL update_fov;
+ bool update_fov;
// fov of view is specified in the y direction, win_ratio is used to
// calculate the fov in the X direction = width/height
// slope of view frustum edge in eye space X axis
double slope_x;
+#if defined( USE_FAST_FOV_CLIP )
+ double fov_x_clip, fov_y_clip;
+#endif // USE_FAST_FOV_CLIP
+
// View frustum cull ratio (% of tiles culled ... used for
// reporting purposes)
double vfc_ratio;
// $Log$
+// Revision 1.13 1998/09/08 15:04:36 curt
+// Optimizations by Norman Vine.
+//
// Revision 1.12 1998/08/24 20:11:15 curt
// Added i/I to toggle full vs. minimal HUD.
// Added a --hud-tris vs --hud-culled option.