*/
if ( _UpdatesPending > 999999 )
the_DG_err = FGBFI::getMagVar();
- the_DG_degps = 0.0; /* HACK! */
+ the_DG_degps = 0.01; /* HACK! */
if (dt<1.0) the_DG_err += dt * the_DG_degps;
the_DG_deg = FGBFI::getHeading () - the_DG_err;
FG_PUSH_PUI_DIALOG( dialogBox );
}
-// Repair any damage done to the Panel by other Gui Items
-void guiFixPanel( void )
-{
-#if 0 // this function does nothing anyway
- bool freeze = globals->get_freeze();
-
- if ( current_options.get_panel_status() ) {
- // FGView *v = ¤t_view;
- if( !freeze )
- globals->set_freeze( true );
-
- // we must have some something here at some point but this
- // function does nothing now.
-
- if( !freeze )
- globals->set_freeze( false );
- }
-#endif
-}
-
// Toggle the Menu and Mouse display state
void guiToggleMenu(void)
{
extern void guiToggleMenu(void);
extern void mkDialog(const char *txt);
extern void ConfirmExitDialog(void);
-extern void guiFixPanel( void );
extern void fgDumpSnapShot();
#define FG_POP_PUI_DIALOG( X ) \
(X)->hide(); \
puPopLiveInterface(); \
- guiFixPanel(); \
maybeToggleMouse();
// Finalize Dialog Box Construction
// glMatrixMode( GL_PROJECTION );
// glLoadIdentity();
float fov = current_options.get_fov();
- ssgSetFOV(fov * current_view.get_win_ratio(), fov);
+ // ssgSetFOV(fov * current_view.get_win_ratio(), fov);
+ ssgSetFOV(fov, fov * current_view.get_win_ratio());
double agl = current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER
- scenery.cur_elev;
// options.cxx needs to see this for toggle_panel()
// Handle new window size or exposure
void fgReshape( int width, int height ) {
- if ( ! current_options.get_panel_status() ) {
- current_view.set_win_ratio( (GLfloat) width / (GLfloat) height );
+ if ( ! current_options.get_panel_status() || idle_state != 1000 ) {
+ current_view.set_win_ratio( height / width );
glViewport(0, 0 , (GLint)(width), (GLint)(height) );
} else {
- current_view.set_win_ratio( (GLfloat) width /
- ((GLfloat) (height)*0.4232) );
+ current_view.set_win_ratio( (height*0.4232) / width );
glViewport(0, (GLint)((height)*0.5768),
(GLint)(width), (GLint)((height)*0.4232) );
}
// glViewport ( 0, 0, width, height );
float fov = current_options.get_fov();
- ssgSetFOV(fov * current_view.get_win_ratio(), fov);
+ // ssgSetFOV(fov * current_view.get_win_ratio(), fov);
+ ssgSetFOV(fov, fov * current_view.get_win_ratio());
fgHUDReshape();
auto_coordination(FG_AUTO_COORD_NOT_SPECIFIED),
// Features
- hud_status(1),
- panel_status(0),
+ hud_status(0),
+ panel_status(1),
sound(1),
anti_alias_hud(0),
skyblend(1),
textures(1),
wireframe(0),
- xsize(640),
- ysize(480),
+ xsize(800),
+ ysize(600),
bpp(16),
view_mode(FG_VIEW_PILOT),
if ( current_panel != NULL )
current_panel->setVisibility(true);
}
- if ( panel_status ) {
+
+ // new rule .. "fov" shouldn't get messed with like this.
+ /* if ( panel_status ) {
fov *= 0.4232;
} else {
fov *= (1.0 / 0.4232);
- }
+ } */
+
// fgReshape( xsize, ysize);
fgReshape( current_view.get_winWidth(), current_view.get_winHeight() );
} else if ( arg == "--enable-panel" ) {
panel_status = true;
if ( current_panel != NULL )
- current_panel->setVisibility(true);
- fov *= 0.4232;
+ current_panel->setVisibility(true);
+ // fov *= 0.4232; /* NO!!! */
} else if ( arg == "--disable-sound" ) {
sound = false;
} else if ( arg == "--enable-sound" ) {
#include "views.hxx"
-// temporary (hopefully) hack
-static int panel_hist = 0;
-
-
// This is a record containing current view parameters for the current
// aircraft position
FGView pilot_view;
winHeight = current_options.get_ysize();
if ( ! current_options.get_panel_status() ) {
- set_win_ratio( (GLfloat) winWidth / (GLfloat) winHeight );
+ set_win_ratio( winHeight / winWidth );
} else {
- set_win_ratio( (GLfloat) winWidth /
- ((GLfloat) (winHeight)*0.4232) );
+ set_win_ratio( (winHeight*0.4232) / winWidth );
}
// This never changes -- NHV
}
#endif
+
// Update the view volume, position, and orientation
void FGView::UpdateViewParams( const FGInterface& f ) {
UpdateViewMath(f);
xglViewport(0, (GLint)((winHeight)*0.5768), (GLint)(winWidth),
(GLint)((winHeight)*0.4232) );
}
-
- panel_hist = current_options.get_panel_status();
}
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
+ // calculate the fov in the X direction = width / height
double win_ratio;
// width & height of window