Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
Simulator/Cockpit/hud.cxx: Added Standard headers
Simulator/Cockpit/panel.cxx: Redefinition of default parameter
Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
Simulator/Main/fg_init.cxx:
Simulator/Main/GLUTmain.cxx:
Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
Simulator/Objects/material.hxx:
Simulator/Time/timestamp.hxx: VC++ friend kludge
Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
Simulator/Main/views.hxx: Added a constant
xglBegin( GL_TRIANGLE_FAN );
xglColor4fv(l->sky_color);
xglVertex3f(0.0, 0.0, CENTER_ELEV);
- for ( i = 11; i >= 0; i++ ) {
+ for ( i = 11; i >= 0; i-- ) {
xglColor4fv( inner_color );
xglVertex3fv( inner_vertex[i] );
}
// $Log$
+// Revision 1.20 1999/02/02 20:13:29 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.19 1999/02/01 21:33:26 curt
// Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
// Jon accepted my offer to do this and thought it was a good idea.
# include <windows.h>
#endif
+#include "Include/compiler.h"
+#ifdef FG_HAVE_STD_INCLUDES
+# include <cmath>
+# include <cstdio>
+# include <cstring>
+# include <ctime>
+#else
+# include <math.h>
+# include <stdio.h>
+# include <string.h>
+# include <time.h>
+#endif
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
#include <string>
-#include <time.h>
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <Main/views.hxx>
#include <Misc/stopwatch.hxx>
#include <Time/fg_time.hxx>
+#include "Misc/stopwatch.hxx"
#include "stars.hxx"
+FG_USING_STD(getline);
#define EpochStart (631065600)
#define DaysSinceEpoch(secs) (((secs)-EpochStart)*(1.0/(24*3600)))
// $Log$
+// Revision 1.26 1999/02/02 20:13:30 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.25 1998/12/09 18:50:15 curt
// Converted "class fgVIEW" to "class FGView" and updated to make data
// members private and make required accessor functions.
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_VALUES_H
-# include <values.h> // for MAXINT
-#endif
-
#include <Aircraft/aircraft.hxx>
#include <Debug/logstream.hxx>
#include <Include/fg_constants.h>
// They should eventually be member functions of the aircraft.
//
-deque< instr_item * > HUD_deque;
+typedef deque< instr_item * > HudContainerType;
+typedef HudContainerType::iterator HudIterator;
+
+HudContainerType HUD_deque;
class locRECT {
public:
int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
{
- instr_item *HIptr;
int index;
FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
glLineWidth(1);
- deque < instr_item * > :: iterator current = HUD_deque.begin();
- deque < instr_item * > :: iterator last = HUD_deque.end();
+ HudIterator current = HUD_deque.begin();
+ HudIterator last = HUD_deque.end();
for ( ; current != last; ++current ) {
pHUDInstr = *current;
}
// $Log$
+// Revision 1.31 1999/02/02 20:13:31 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.30 1999/01/27 04:47:52 curt
// Make lower end of altitude = -500 so the altimeter is guaged below zero (such
// as in death valley.)
#include <GL/glut.h>
#include <XGL/xgl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#include "Include/compiler.h"
+#ifdef FG_HAVE_STD_INCLUDES
+# include <cstdlib>
+# include <cstdio>
+# include <cstring>
+# include <cmath>
+#else
+# include <stdlib.h>
+# include <stdio.h>
+# include <string.h>
+# include <math.h>
+#endif
+
#include <string>
-#include <math.h>
+FG_USING_STD(string);
#include <Aircraft/aircraft.hxx>
#include <Debug/logstream.hxx>
exit(-1);
}
- ImageGetRawData(image, final->data);
+ ImageGetRawData(image, (char*)final->data);
ImageClose(image);
return final;
}
// fgEraseArea - 'Erases' a drawn Polygon by overlaying it with a textured
// area. Shall be a method of a panel class once.
-void fgEraseArea(GLfloat *array, int NumVerti, GLfloat texXPos, GLfloat texYPos, GLfloat XPos, GLfloat YPos, int Texid, float ScaleFactor = 1){
+void fgEraseArea(GLfloat *array, int NumVerti, GLfloat texXPos,
+ GLfloat texYPos, GLfloat XPos, GLfloat YPos,
+ int Texid, float ScaleFactor)
+{
int i, j;
int n;
float a;
}
// $Log$
+// Revision 1.14 1999/02/02 20:13:33 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.13 1999/01/07 19:25:53 curt
// Updates from Friedemann Reinhard.
//
// Incorporated Friedemann Reinhard's <mpt218@faupt212.physik.uni-erlangen.de>
// first pass at an isntrument panel.
//
-
#include "options.hxx"
#include "splash.hxx"
#include "views.hxx"
+#include "fg_serial.hxx"
// This is a record containing a bit of global housekeeping information
audio_sched = new slScheduler ( 8000 );
audio_mixer = new smMixer;
- audio_mixer -> setMasterVolume ( 50 ) ; /* 80% of max volume. */
+ audio_mixer -> setMasterVolume ( 80 ) ; /* 80% of max volume. */
audio_sched -> setSafetyMargin ( 1.0 ) ;
string slfile = current_options.get_fg_root() + "/Sounds/wasp.wav";
// Something must have gone horribly wrong with the command
// line parsing or maybe the user just requested help ... :-)
current_options.usage();
- // FG_LOG( FG_GENERAL, FG_ALERT, "\nExiting ...");
- cout << endl << "Exiting ..." << endl;
+ FG_LOG( FG_GENERAL, FG_ALERT, "\nExiting ...");
+ // cout << endl << "Exiting ..." << endl;
exit(-1);
}
// $Log$
+// Revision 1.84 1999/02/02 20:13:34 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// 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
#include "fg_init.hxx"
#include "options.hxx"
#include "views.hxx"
+#include "fg_serial.hxx"
extern const char *default_root;
// $Log$
+// Revision 1.65 1999/02/02 20:13:36 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.64 1999/02/01 21:15:43 curt
// Removed unused variables.
//
#include STL_STRING
FG_USING_STD(string);
-#include <vector>
-#include "Include/fg_stl_config.h"
-
-FG_USING_NAMESPACE(std);
-
-#include "fg_serial.hxx"
+#include <vector>
+#include "Include/compiler.h"
+FG_USING_STD(vector);
+FG_USING_STD(string);
+// #include "fg_serial.hxx"
typedef vector < string > str_container;
// $Log$
+// Revision 1.26 1999/02/02 20:13:37 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.25 1999/01/19 20:57:06 curt
// MacOS portability changes contributed by "Robert Puyol" <puyol@abvent.fr>
//
// Define a structure containing view information
class FGView {
+public:
+
// the current offset from forward for viewing
double view_offset;
inline double *get_surface_south() { return surface_south; }
inline double *get_surface_east() { return surface_east; }
inline double *get_local_up() { return local_up; }
- inline MAT3mat *get_WORLD_TO_EYE() const { return &WORLD_TO_EYE; }
+ inline const MAT3mat *get_WORLD_TO_EYE() const { return &WORLD_TO_EYE; }
inline GLdouble *get_MODEL_VIEW() { return MODEL_VIEW; }
};
// $Log$
+// Revision 1.20 1999/02/02 20:13:38 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.19 1999/02/01 21:33:36 curt
// Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
// Jon accepted my offer to do this and thought it was a good idea.
#include <GL/glut.h>
#include <XGL/xgl.h>
-#if defined ( __sun__ )
-extern "C" void *memmove(void *, const void *, size_t);
-extern "C" void *memset(void *, int, size_t);
-#endif
-
#include <string> // Standard C++ string library
#include <map> // STL associative "array"
#include <vector> // STL "array"
-#ifdef NEEDNAMESPACESTD
-using namespace std;
-#endif
+#include "Include/compiler.h"
+FG_USING_STD(string);
+FG_USING_STD(map);
+FG_USING_STD(vector);
+FG_USING_STD(less);
// forward decl.
class fgFRAGMENT;
// #define FG_MAX_MATERIAL_FRAGS 800
+// MSVC++ 6.0 kuldge - Need forward declaration of friends.
+class fgMATERIAL;
+istream& operator >> ( istream& in, fgMATERIAL& m );
// Material property class
class fgMATERIAL {
friend istream& operator >> ( istream& in, fgMATERIAL& m );
};
-istream& operator >> ( istream& in, fgMATERIAL& m );
// Material management class
class fgMATERIAL_MGR {
// $Log$
+// Revision 1.6 1999/02/02 20:13:39 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.5 1998/10/12 23:49:18 curt
// Changes from NHV to make the code more dynamic with fewer hard coded limits.
//
// (Log is kept at end of this file)
-// #include <Include/fg_constants.h>
-// #include <Math/mat3.h>
+#include "Include/compiler.h"
+#include STL_FUNCTIONAL
+#include STL_ALGORITHM
+FG_USING_STD(for_each);
+FG_USING_STD(mem_fun_ref);
+
#include <Debug/logstream.hxx>
#include <Scenery/tile.hxx>
#include "Bucket/bucketutils.hxx"
// $Log$
+// Revision 1.14 1999/02/02 20:13:40 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.13 1998/11/09 23:40:46 curt
// Bernie Bright <bbright@c031.aone.net.au> writes:
// I've made some changes to the Scenery handling. Basically just tidy ups.
#include <string>
#include "Include/compiler.h"
-#include STL_FUNCTIONAL
-#include STL_ALGORITHM
-FG_USING_NAMESPACE(std);
-// FG_USING_STD(string);
-// FG_USING_STD(vector);
+FG_USING_STD(string);
+FG_USING_STD(vector);
#include <Bucket/bucketutils.h>
#include <Math/mat3.h>
// $Log$
+// Revision 1.23 1999/02/02 20:13:41 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.22 1998/12/03 01:18:16 curt
// Converted fgFLIGHT to a class.
// Tweaks for Sun Portability.
# include <mmsystem.h>
#endif
+// MSVC++ 6.0 kuldge - Need forward declaration of friends.
+class FGTimeStamp;
+FGTimeStamp operator + (const FGTimeStamp& t, const long& m);
+long operator - (const FGTimeStamp& a, const FGTimeStamp& b);
class FGTimeStamp {
// $Log$
+// Revision 1.5 1999/02/02 20:13:43 curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG. Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
// Revision 1.4 1999/01/09 13:37:46 curt
// Convert fgTIMESTAMP to FGTimeStamp which holds usec instead of ms.
//