Added a splash screen randomization since we have several nice splash screens.
#include <Math/fg_geodesy.hxx>
#include <Math/mat3.h>
#include <Math/polar3d.hxx>
+#include <Math/fg_random.h>
#include <PUI/pu.h>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
// Another hack
int use_signals = 0;
-// Yet another hack, this time for the panel
-int panel_hist = 0;
-
// Global structures for the Audio library
#ifdef ENABLE_AUDIO_SUPPORT
slEnvelope pitch_envelope ( 1, SL_SAMPLE_ONE_SHOT ) ;
FGView *v = ¤t_view;
double angle;
- static int iteration = 0;
// GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat terrain_color[4] = { 0.54, 0.44, 0.29, 1.0 };
xglDisable( GL_TEXTURE_2D );
xglDisable( GL_FOG );
- if ( (iteration == 0) && (current_options.get_panel_status()) ) {
- // Did we run this loop before ?? ...and do we need the panel ??
- fgPanelReInit(0, 0, 1024, 768);
- }
-
// display HUD && Panel
fgCockpitUpdate();
- iteration = 1; // don't ReInit the panel in the future
// We can do translucent menus, so why not. :-)
xglEnable ( GL_BLEND ) ;
// the system.
current_view.UpdateViewParams();
if ( current_options.get_panel_status() ) {
- fgPanelReInit(0, 0, 1024, 768);
+ FGPanel::OurPanel->ReInit(0, 0, 1024, 768);
}
}
}
_control87(MCW_EM, MCW_EM); /* defined in float.h */
#endif
- // Initialize the [old] debugging output system
- // fgInitDebug();
-
// set default log levels
fglog().setLogLevels( FG_ALL, FG_INFO );
FG_LOG( FG_GENERAL, FG_INFO, "General Initialization" );
FG_LOG( FG_GENERAL, FG_INFO, "======= ==============" );
+ // seed the random number generater
+ fg_srandom();
+
// Attempt to locate and parse a config file
// First check fg_root
string config = current_options.get_fg_root() + "/system.fgfsrc";
// line parsing or maybe the user just requested help ... :-)
current_options.usage();
FG_LOG( FG_GENERAL, FG_ALERT, "\nExiting ...");
- // cout << endl << "Exiting ..." << endl;
exit(-1);
}
// $Log$
+// Revision 1.87 1999/03/08 21:56:37 curt
+// Added panel changes sent in by Friedemann.
+// Added a splash screen randomization since we have several nice splash screens.
+//
// Revision 1.86 1999/02/26 22:09:47 curt
// Added initial support for native SGI compilers.
//
#include <Cockpit/cockpit.hxx>
#include <Joystick/joystick.hxx>
#include <Math/fg_geodesy.hxx>
-#include <Math/fg_random.h>
#include <Math/point3d.hxx>
#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
FG_LOG( FG_GENERAL, FG_INFO, "Initialize Subsystems");
FG_LOG( FG_GENERAL, FG_INFO, "========== ==========");
- // seed the random number generater
- fg_srandom();
-
// allocates structures so must happen before any of the flight
// model or control parameters are set
fgAircraftInit(); // In the future this might not be the case.
// $Log$
+// Revision 1.69 1999/03/08 21:56:39 curt
+// Added panel changes sent in by Friedemann.
+// Added a splash screen randomization since we have several nice splash screens.
+//
// Revision 1.68 1999/03/02 01:03:15 curt
// Tweaks for building with native SGI compilers.
//
#include <Debug/logstream.hxx>
#include <Main/options.hxx>
+#include <Math/fg_random.h>
#include <Objects/texload.h>
#include "splash.hxx"
xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load in the texture data
- tpath = current_options.get_fg_root() + "/Textures/Splash2.rgb";
+ int num = (int)(fg_random() * 4.0 + 1.0);
+ char num_str[256];
+ sprintf(num_str, "%d", num);
+ tpath = current_options.get_fg_root() + "/Textures/Splash";
+ tpath += num_str;
+ tpath += ".rgb";
if ( (splash_texbuf =
read_rgb_texture(tpath.c_str(), &width, &height)) == NULL )
// $Log$
+// Revision 1.10 1999/03/08 21:56:40 curt
+// Added panel changes sent in by Friedemann.
+// Added a splash screen randomization since we have several nice splash screens.
+//
// Revision 1.9 1998/12/09 18:50:26 curt
// Converted "class fgVIEW" to "class FGView" and updated to make data
// members private and make required accessor functions.
winWidth = current_options.get_xsize();
winHeight = current_options.get_ysize();
- win_ratio = (double) winWidth / (double) winHeight;
+
+ if ( ! current_options.get_panel_status() ) {
+ current_view.set_win_ratio( (GLfloat) winWidth / (GLfloat) winHeight );
+ } else {
+ current_view.set_win_ratio( (GLfloat) winWidth /
+ ((GLfloat) (winHeight)*0.4232) );
+ }
+
force_update_fov_math();
}
if ((current_options.get_panel_status() != panel_hist) && (current_options.get_panel_status()))
{
- fgPanelReInit( 0, 0, 1024, 768);
+ FGPanel::OurPanel->ReInit( 0, 0, 1024, 768);
}
if ( ! current_options.get_panel_status() ) {
p.setz( p.radius() + scenery.cur_elev + 0.5 * METER_TO_FEET );
}
-
abs_view_pos = fgPolarToCart3d(p);
view_pos = abs_view_pos - scenery.center;
// $Log$
+// Revision 1.34 1999/03/08 21:56:41 curt
+// Added panel changes sent in by Friedemann.
+// Added a splash screen randomization since we have several nice splash screens.
+//
// Revision 1.33 1999/02/05 21:29:14 curt
// Modifications to incorporate Jon S. Berndts flight model code.
//