1
0
Fork 0

Added i/I to toggle full vs. minimal HUD.

Added a --hud-tris vs --hud-culled option.
Moved options accessor funtions to options.hxx.
This commit is contained in:
curt 1998-08-24 20:11:12 +00:00
parent 11b977dee8
commit ac2c904dc6
4 changed files with 89 additions and 5 deletions

View file

@ -119,6 +119,10 @@ void GLUTkey(unsigned char k, int x, int y) {
// current_options.set_hud_status(!status);
HUD_brightkey( true );
return;
case 73: /* i key */
// Minimal Hud
fgHUDInit2(&current_aircraft);
return;
case 77: /* M key */
t->warp -= 60;
local_update_sky_and_lighting_params();
@ -201,6 +205,9 @@ void GLUTkey(unsigned char k, int x, int y) {
case 104: /* h key */
HUD_brightkey( false );
return;
case 105: /* i key */
fgHUDInit(&current_aircraft); // normal HUD
return;
case 109: /* m key */
t->warp += 60;
local_update_sky_and_lighting_params();
@ -338,10 +345,15 @@ void GLUTspecialkey(int k, int x, int y) {
/* $Log$
/* Revision 1.19 1998/08/05 00:19:33 curt
/* Added a local routine to update lighting params every frame when time is
/* accelerated.
/* Revision 1.20 1998/08/24 20:11:12 curt
/* Added i/I to toggle full vs. minimal HUD.
/* Added a --hud-tris vs --hud-culled option.
/* Moved options accessor funtions to options.hxx.
/*
* Revision 1.19 1998/08/05 00:19:33 curt
* Added a local routine to update lighting params every frame when time is
* accelerated.
*
* Revision 1.18 1998/07/30 23:48:24 curt
* Output position & orientation when pausing.
* Eliminated libtool use.

View file

@ -159,6 +159,9 @@ fgOPTIONS::fgOPTIONS( void ) {
// Scenery options
tile_diameter = 5;
// HUD options
tris_or_culled = 0;
// Time options
time_offset = 0;
}
@ -481,6 +484,10 @@ int fgOPTIONS::parse_option( char *arg ) {
tile_diameter = tile_radius * 2 + 1;
} else if ( strncmp(arg, "--time-offset=", 14) == 0 ) {
time_offset = parse_time_offset(arg);
} else if ( strcmp(arg, "--hud-tris") == 0 ) {
tris_or_culled = 0;
} else if ( strcmp(arg, "--hud-culled") == 0 ) {
tris_or_culled = 1;
} else {
fgPrintf( FG_GENERAL, FG_EXIT, "Unknown option '%s'\n", arg);
return(FG_OPTIONS_ERROR);
@ -617,11 +624,16 @@ void fgOPTIONS::usage ( void ) {
printf("\t--tile-radius=n: specify tile radius, must be 1 - 4\n");
printf("\n");
printf("Hud Options:\n");
printf("\t--hud-tris: Hud displays number of triangles rendered\n");
printf("\t--hud-culled: Hud displays percentage of triangles culled\n");
printf("Time Options:\n");
printf("\t--time-offset=[+-]hh:mm:ss: offset local time by this amount\n");
}
#if 0
// Query functions
void fgOPTIONS::get_fg_root(char *root) { strcpy(root, fg_root); }
void fgOPTIONS::get_airport_id(char *id) { strcpy(id, airport_id); }
@ -655,13 +667,18 @@ int fgOPTIONS::get_time_offset( void ) { return(time_offset); }
// Update functions
void fgOPTIONS::set_hud_status( int status ) { hud_status = status; }
void fgOPTIONS::set_fov( double amount ) { fov = amount; }
#endif
// Destructor
fgOPTIONS::~fgOPTIONS( void ) {
}
// $Log$
// Revision 1.22 1998/08/24 20:11:13 curt
// Added i/I to toggle full vs. minimal HUD.
// Added a --hud-tris vs --hud-culled option.
// Moved options accessor funtions to options.hxx.
//
// Revision 1.21 1998/08/20 15:10:34 curt
// Added GameGLUT support.
//

View file

@ -43,7 +43,10 @@ class fgOPTIONS {
char fg_root[256];
// Starting position and orientation
char airport_id[5]; // ID of initial starting airport
// ID of initial starting airport, only need 5 bytes but I guess
// 16 is good for memory alignment.
char airport_id[16];
double lon; // starting longitude in degrees (west = -)
double lat; // starting latitude in degrees (south = -)
double altitude; // starting altitude in meters
@ -83,6 +86,9 @@ class fgOPTIONS {
// be drawn. Increase this to see terrain that is
// further away.
// HUD options
int tris_or_culled;
// Time options
int time_offset; // Offset true time by this many seconds
@ -104,6 +110,40 @@ public:
void usage ( void );
// Query functions
void get_fg_root(char *root) { strcpy(root, fg_root); }
void get_airport_id(char *id) { strcpy(id, airport_id); }
double get_lon( void ) { return(lon); }
double get_lat( void ) { return(lat); }
double get_altitude( void ) { return(altitude); }
double get_heading( void ) { return(heading); }
double get_roll( void ) { return(roll); }
double get_pitch( void ) { return(pitch); }
int get_game_mode( void ) { return(game_mode); }
int get_splash_screen( void ) { return(splash_screen); }
int get_intro_music( void ) { return(intro_music); }
int get_mouse_pointer( void ) { return(mouse_pointer); }
int get_pause( void ) { return(pause); }
int get_hud_status( void ) { return(hud_status); }
int get_panel_status( void ) { return(panel_status); }
int get_sound( void ) { return(sound); }
int get_flight_model( void ) { return(flight_model); }
int get_fog( void ) { return(fog); }
double get_fov( void ) { return(fov); }
int get_fullscreen( void ) { return(fullscreen); }
int get_shading( void ) { return(shading); }
int get_skyblend( void ) { return(skyblend); }
int get_textures( void ) { return(textures); }
int get_wireframe( void ) { return(wireframe); }
int get_tile_radius( void ) { return(tile_radius); }
int get_tile_diameter( void ) { return(tile_diameter); }
int get_time_offset( void ) { return(time_offset); }
int get_tris_or_culled( void ) { return(tris_or_culled); }
// Update functions
void set_hud_status( int status ) { hud_status = status; }
void set_fov( double amount ) { fov = amount; }
#if 0
void get_fg_root(char *root);
void get_airport_id(char *id);
double get_lon( void );
@ -131,10 +171,12 @@ public:
int get_tile_radius( void );
int get_tile_diameter( void );
int get_time_offset( void );
int get_tris_or_culled( void ) { return(tris_or_culled); }
// Update functions
void set_hud_status( int status );
void set_fov( double amount );
#endif
// Destructor
~fgOPTIONS( void );
@ -149,6 +191,11 @@ extern fgOPTIONS current_options;
// $Log$
// Revision 1.15 1998/08/24 20:11:15 curt
// Added i/I to toggle full vs. minimal HUD.
// Added a --hud-tris vs --hud-culled option.
// Moved options accessor funtions to options.hxx.
//
// Revision 1.14 1998/08/20 15:10:35 curt
// Added GameGLUT support.
//

View file

@ -87,6 +87,9 @@ public:
// reporting purposes)
double vfc_ratio;
// Number of triangles rendered;
int tris_rendered;
// absolute view position
fgPoint3d abs_view_pos;
@ -178,6 +181,11 @@ extern fgVIEW current_view;
// $Log$
// 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.
// Moved options accessor funtions to options.hxx.
//
// Revision 1.11 1998/08/20 20:32:35 curt
// Reshuffled some of the code in and around views.[ch]xx
//