1
0
Fork 0

Game mode fixes from Norman Vine.

Initial altitude setting tweaks and fixes (especially for when starting
below sea level.)
This commit is contained in:
curt 1999-01-27 04:49:17 +00:00
parent 5faef1c9d6
commit 3e918d1df1
2 changed files with 35 additions and 11 deletions

View file

@ -839,11 +839,14 @@ int fgGlutInit( int *argc, char **argv ) {
xglutCreateWindow("Flight Gear");
} else {
// Open the cool new 'game mode' window
string game_mode_params = "width=" + current_options.get_xsize();
game_mode_params += "height=" + current_options.get_ysize();
game_mode_params += " bpp=16";
cout << "game mode params = " << game_mode_params;
glutGameModeString( game_mode_params.c_str() );
char game_mode_str[256];
sprintf( game_mode_str, "width=%d height=%d bpp=16",
current_options.get_xsize(),
current_options.get_ysize() );
FG_LOG( FG_GENERAL, FG_INFO,
"game mode params = " << game_mode_str );
glutGameModeString( game_mode_str );
glutEnterGameMode();
}
@ -1003,6 +1006,11 @@ int main( int argc, char **argv ) {
// $Log$
// Revision 1.83 1999/01/27 04:49:17 curt
// Game mode fixes from Norman Vine.
// Initial altitude setting tweaks and fixes (especially for when starting
// below sea level.)
//
// Revision 1.82 1999/01/20 13:42:24 curt
// Tweaked FDM interface.
// Testing check sum support for NMEA serial output.

View file

@ -189,30 +189,41 @@ int fgInitSubsystems( void )
exit(-1);
}
FG_LOG( FG_GENERAL, FG_DEBUG,
"Current terrain elevation after tile mgr init " <<
scenery.cur_elev );
// Calculate ground elevation at starting point (we didn't have
// tmp_abs_view_pos calculated when fgTileMgrUpdate() was called above
//
// calculalate a cartesian point somewhere along the line between
// the center of the earth and our view position. Doesn't have to
// be the exact elevation (this is good because we don't know it
// yet :-)
// now handled inside of the fgTileMgrUpdate()
/*
geod_pos = Point3D( f->get_Longitude(), f->get_Latitude(), 0.0);
tmp_abs_view_pos = fgGeodToCart(geod_pos);
FG_LOG( FG_GENERAL, FG_DEBUG,
"Altitude before update " << scenery.cur_elev );
FG_LOG( FG_GENERAL, FG_DEBUG,
"Initial abs_view_pos = " << tmp_abs_view_pos );
scenery.cur_elev =
fgTileMgrCurElevOLD( f->get_Longitude(),
f->get_Latitude(),
tmp_abs_view_pos );
fgTileMgrCurElev( f->get_Longitude(), f->get_Latitude(),
tmp_abs_view_pos );
FG_LOG( FG_GENERAL, FG_DEBUG,
"Altitude after update " << scenery.cur_elev );
*/
fgFDMSetGroundElevation( current_options.get_flight_model(),
scenery.cur_elev );
// Reset our altitude if we are below ground
FG_LOG( FG_GENERAL, FG_DEBUG, "Current altitude = " << f->get_Altitude() );
FG_LOG( FG_GENERAL, FG_DEBUG, "Current runway altitude = " <<
f->get_Runway_altitude() );
if ( f->get_Altitude() < f->get_Runway_altitude() + 3.758099) {
f->set_Altitude( f->get_Runway_altitude() + 3.758099 );
}
@ -381,6 +392,11 @@ int fgInitSubsystems( void )
// $Log$
// Revision 1.63 1999/01/27 04:49:19 curt
// Game mode fixes from Norman Vine.
// Initial altitude setting tweaks and fixes (especially for when starting
// below sea level.)
//
// Revision 1.62 1999/01/20 13:42:25 curt
// Tweaked FDM interface.
// Testing check sum support for NMEA serial output.