From 00ccbd1f25551980a3def8d78540e6804c7bf983 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 26 Feb 1999 22:08:34 +0000 Subject: [PATCH] Added initial support for native SGI compilers. --- Airports/genapt.cxx | 22 ++++++++++++++-------- Airports/simple.cxx | 15 +++++++++------ Airports/simple.hxx | 14 ++++++++------ Astro/moon.cxx | 8 ++++---- Cockpit/hud.hxx | 7 ++++--- Cockpit/panel.cxx | 7 +++++-- Cockpit/panel.hxx | 5 ++++- Main/GLUTkey.cxx | 5 ++++- Main/GLUTmain.cxx | 5 ++++- Main/fg_init.cxx | 13 +++++++++++-- Main/fg_serial.cxx | 9 +++++---- Main/options.cxx | 5 ++++- Main/options.hxx | 11 +++++++---- Objects/fragment.cxx | 4 +++- Objects/fragment.hxx | 14 ++++++++++---- Objects/material.cxx | 16 +++++++++++++--- Objects/obj.cxx | 26 +++++++++++++++----------- Scenery/tile.hxx | 18 +++++++++++++----- Scenery/tilecache.cxx | 5 ++++- Scenery/tilemgr.cxx | 5 ++++- Time/event.hxx | 18 ++++++++++++------ Time/fg_time.cxx | 7 +++++-- Time/sunpos.cxx | 10 ++++++---- 23 files changed, 168 insertions(+), 81 deletions(-) diff --git a/Airports/genapt.cxx b/Airports/genapt.cxx index 22ad16736..e1f26bb7f 100644 --- a/Airports/genapt.cxx +++ b/Airports/genapt.cxx @@ -23,19 +23,20 @@ // (Log is kept at end of this file) -#include // Standard C++ string library -#include -#include "Include/fg_stl_config.h" +#include -#ifdef NEEDNAMESPACESTD -using namespace std; -#endif +#include STL_STRING +#include #ifdef __BORLANDC__ # define exception c_exception #endif #include +#ifdef FG_HAVE_NATIVE_SGI_COMPILERS +# include +#endif + #include // #include #include @@ -49,6 +50,8 @@ using namespace std; #include "genapt.hxx" +FG_USING_NAMESPACE(std); + typedef vector < Point3D > container; typedef container::iterator iterator; @@ -235,7 +238,7 @@ fgAptGenerate(const string& path, fgTILE *tile) if ( token == "a" ) { // airport info record (start of airport) - if ( apt_id != "" ) { + if ( apt_id.length() > 0 ) { // we have just finished reading and airport record. // process the info gen_base(average, perimeter, tile); @@ -274,7 +277,7 @@ fgAptGenerate(const string& path, fgTILE *tile) in >> skipcomment; } - if ( apt_id != "" ) { + if ( apt_id.length() > 0 ) { // we have just finished reading and airport record. // process the info size = perimeter.size(); @@ -290,6 +293,9 @@ fgAptGenerate(const string& path, fgTILE *tile) // $Log$ +// Revision 1.13 1999/02/26 22:08:34 curt +// Added initial support for native SGI compilers. +// // Revision 1.12 1999/02/01 21:08:33 curt // Optimizations from Norman Vine. // diff --git a/Airports/simple.cxx b/Airports/simple.cxx index bbe93f4c5..eddc1c4ec 100644 --- a/Airports/simple.cxx +++ b/Airports/simple.cxx @@ -1,5 +1,5 @@ // -// airports.cxx -- a really simplistic class to manage airport ID, +// simple.cxx -- a really simplistic class to manage airport ID, // lat, lon of the center of one of it's runways, and // elevation in feet. // @@ -25,18 +25,18 @@ // (Log is kept at end of this file) -#include +#include #include -#include
#include +#include
-#include "simple.hxx" - -#include "Include/fg_stl_config.h" +#include STL_STRING #include STL_FUNCTIONAL #include STL_ALGORITHM +#include "simple.hxx" + fgAIRPORTS::fgAIRPORTS() { } @@ -110,6 +110,9 @@ fgAIRPORTS::~fgAIRPORTS( void ) { // $Log$ +// Revision 1.10 1999/02/26 22:08:35 curt +// Added initial support for native SGI compilers. +// // Revision 1.9 1998/11/06 21:17:34 curt // Converted to new logstream debugging facility. This allows release // builds with no messages at all (and no performance impact) by using diff --git a/Airports/simple.hxx b/Airports/simple.hxx index 96faba2c2..eae237ad2 100644 --- a/Airports/simple.hxx +++ b/Airports/simple.hxx @@ -1,5 +1,5 @@ // -// airports.hxx -- a really simplistic class to manage airport ID, +// simple.hxx -- a really simplistic class to manage airport ID, // lat, lon of the center of one of it's runways, and // elevation in feet. // @@ -34,13 +34,12 @@ #endif -#include // Standard C++ string library +#include + +#include STL_STRING #include -#include "Include/fg_stl_config.h" -#ifdef NEEDNAMESPACESTD -using namespace std; -#endif +FG_USING_NAMESPACE(std); class fgAIRPORT { @@ -105,6 +104,9 @@ public: // $Log$ +// Revision 1.6 1999/02/26 22:08:36 curt +// Added initial support for native SGI compilers. +// // Revision 1.5 1998/11/02 18:25:34 curt // Check for __CYGWIN__ (b20) as well as __CYGWIN32__ (pre b20 compilers) // Other misc. tweaks. diff --git a/Astro/moon.cxx b/Astro/moon.cxx index 1c358dcf6..9b0883ff2 100644 --- a/Astro/moon.cxx +++ b/Astro/moon.cxx @@ -23,19 +23,19 @@ * (Log is kept at end of this file) **************************************************************************/ -#include - #include -#include "moon.hxx" + #include #include - +#include #ifdef __BORLANDC__ # define exception c_exception #endif #include +#include "moon.hxx" + static GLuint moon_texid; static GLubyte *moon_texbuf; diff --git a/Cockpit/hud.hxx b/Cockpit/hud.hxx index f25358c4d..6992c3556 100644 --- a/Cockpit/hud.hxx +++ b/Cockpit/hud.hxx @@ -53,9 +53,7 @@ #include // STL double ended queue -#ifdef NEEDNAMESPACESTD -using namespace std; -#endif +FG_USING_NAMESPACE(std); #ifndef WIN32 typedef struct { @@ -524,6 +522,9 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day ); #endif // _HUD_H // $Log$ +// Revision 1.18 1999/02/26 22:08:45 curt +// Added initial support for native SGI compilers. +// // Revision 1.17 1999/02/01 21:33:28 curt // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since // Jon accepted my offer to do this and thought it was a good idea. diff --git a/Cockpit/panel.cxx b/Cockpit/panel.cxx index 0456f1e2e..c4ad13451 100644 --- a/Cockpit/panel.cxx +++ b/Cockpit/panel.cxx @@ -557,7 +557,7 @@ void fgPanelUpdate ( void ) { var[0] = get_speed() * 1.4; // We have to multiply the airspeed by a // factor, to simulate flying a Bonanza var[1] = get_altitude(); - var[2] = get_climb_rate(); + var[2] = get_climb_rate() / 1000.0; var[3] = get_throttleval(); // v = ¤t_view; xglMatrixMode(GL_PROJECTION); @@ -580,7 +580,7 @@ void fgPanelUpdate ( void ) { xglLoadIdentity(); xglTranslatef(pointer[i].XPos, pointer[i].YPos, 0.0); xglRotatef(-pointer[i].tape[0], 0.0, 0.0, 1.0); - fgEraseArea(pointer[i].vertices, 20, (GLfloat)(pointer[i].teXpos), (GLfloat)(pointer[i].texYpos), (GLfloat)(pointer[i].XPos), (GLfloat)(pointer[i].YPos), 0); + fgEraseArea(pointer[i].vertices, 20, (GLfloat)(pointer[i].teXpos), (GLfloat)(pointer[i].texYpos), (GLfloat)(pointer[i].XPos), (GLfloat)(pointer[i].YPos), 0, 1); xglLoadIdentity(); } @@ -1112,6 +1112,9 @@ printf(" %f %f %f %f \n", mvmatrix[12], mvmatrix[13], mvmatrix[14], mvma } // $Log$ +// Revision 1.16 1999/02/26 22:08:46 curt +// Added initial support for native SGI compilers. +// // Revision 1.15 1999/02/12 01:46:29 curt // Updates and fixes from Friedemann. // diff --git a/Cockpit/panel.hxx b/Cockpit/panel.hxx index 91e785aca..1d1baa6b6 100644 --- a/Cockpit/panel.hxx +++ b/Cockpit/panel.hxx @@ -106,7 +106,7 @@ void CreatePointer(Pointer *pointer); void UpdatePointer(Pointer *pointer); void fgEraseArea(GLfloat *array, int NumVerti, GLfloat texXPos, GLfloat texYPos, GLfloat XPos, GLfloat YPos, - int Texid, float ScaleFactor = 1); + int Texid, float ScaleFactor); void fgUpdateTurnCoordinator(TurnCoordinator *turn); void fgInitTurnCoordinator(TurnCoordinator *turn); void DrawScale(float XPos, float YPos, float InnerRadius, float OuterRadius, @@ -120,6 +120,9 @@ void PrintMatrix( void); // $Log$ +// Revision 1.7 1999/02/26 22:08:47 curt +// Added initial support for native SGI compilers. +// // Revision 1.6 1999/02/12 01:46:30 curt // Updates and fixes from Friedemann. // diff --git a/Main/GLUTkey.cxx b/Main/GLUTkey.cxx index e04a1db54..ab092198d 100644 --- a/Main/GLUTkey.cxx +++ b/Main/GLUTkey.cxx @@ -35,12 +35,12 @@ #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -434,6 +434,9 @@ void GLUTspecialkey(int k, int x, int y) { // $Log$ +// Revision 1.42 1999/02/26 22:09:46 curt +// Added initial support for native SGI compilers. +// // Revision 1.41 1999/02/12 23:22:43 curt // Allow auto-throttle adjustment while active. // diff --git a/Main/GLUTmain.cxx b/Main/GLUTmain.cxx index d8d24ac9b..bfa7c4a7c 100644 --- a/Main/GLUTmain.cxx +++ b/Main/GLUTmain.cxx @@ -53,6 +53,7 @@ #include // for VERSION #include +#include #include #include #include @@ -65,7 +66,6 @@ #include #include -#include #include #include #include @@ -1007,6 +1007,9 @@ int main( int argc, char **argv ) { // $Log$ +// Revision 1.86 1999/02/26 22:09:47 curt +// Added initial support for native SGI compilers. +// // Revision 1.85 1999/02/05 21:29:08 curt // Modifications to incorporate Jon S. Berndts flight model code. // diff --git a/Main/fg_init.cxx b/Main/fg_init.cxx index 012db04f7..db93c6c09 100644 --- a/Main/fg_init.cxx +++ b/Main/fg_init.cxx @@ -37,10 +37,13 @@ # define _G_NO_EXTERN_TEMPLATES #endif -#include +#include + +#include STL_STRING #include +#include #include #include #include @@ -48,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -67,6 +69,10 @@ #include "views.hxx" #include "fg_serial.hxx" +FG_USING_STD(string); +#ifdef FG_HAVE_NATIVE_SGI_COMPILERS +FG_USING_NAMESPACE(std); +#endif extern const char *default_root; @@ -392,6 +398,9 @@ int fgInitSubsystems( void ) // $Log$ +// Revision 1.67 1999/02/26 22:09:48 curt +// Added initial support for native SGI compilers. +// // Revision 1.66 1999/02/05 21:29:10 curt // Modifications to incorporate Jon S. Berndts flight model code. // diff --git a/Main/fg_serial.cxx b/Main/fg_serial.cxx index 86f1586e8..d146b5b8e 100644 --- a/Main/fg_serial.cxx +++ b/Main/fg_serial.cxx @@ -33,12 +33,9 @@ #include STL_STRING #include STL_IOSTREAM #include -#include "Include/fg_stl_config.h" -FG_USING_NAMESPACE(std); - -#include #include +#include #include #include #include