]> git.mxchange.org Git - flightgear.git/commitdiff
MacOS changes contributed by Darrell Walisser (12/13/2000)
authorcurt <curt>
Wed, 13 Dec 2000 23:02:02 +0000 (23:02 +0000)
committercurt <curt>
Wed, 13 Dec 2000 23:02:02 +0000 (23:02 +0000)
15 files changed:
src/FDM/10520d.hxx
src/FDM/ADA.hxx
src/FDM/LaRCsim/c172_gear.c
src/FDM/LaRCsim/uiuc_aero.c
src/FDM/LaRCsimIC.cxx
src/FDM/UIUCModel/uiuc_1DdataFileReader.h
src/FDM/UIUCModel/uiuc_2DdataFileReader.h
src/FDM/UIUCModel/uiuc_menu.cpp
src/FDM/UIUCModel/uiuc_recorder.cpp
src/FDM/UIUCModel/uiuc_warnings_errors.cpp
src/Joystick/joystick.cxx
src/Main/main.cxx
src/Scenery/newcache.hxx
src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx

index 954c6e4364a1ee923565c499b5520cd1100bb88c..2b2c2388913b45c604bbc000e9779ac8f1b10692 100644 (file)
@@ -139,4 +139,4 @@ public:
 };
 
 
-#endif _10520D_HXX_
+#endif // _10520D_HXX_
index 7ba2e9f0f5b9b10e70e57e9e28608cd64cb95f10..2ca68464ba0d637a2b66eb3cac2bfabb45ef7305 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <simgear/io/sg_socket.hxx>
 
-#include "flight.hxx"
+#include <FDM/flight.hxx>
 
 
 class FGADA: public FGInterface {
index 39c7164ae5598f936405306a2b31be2d59a7ecfc..353a5683c17e92cc30a62d89edcd837be50db49f 100644 (file)
@@ -36,6 +36,9 @@
 
 $Header$
 $Log$
+Revision 1.18  2000/12/13 22:02:02  curt
+MacOS changes contributed by Darrell Walisser (12/13/2000)
+
 Revision 1.17  2000/09/14 15:36:25  curt
 Tweaks to ground steering sensitivity.
 
@@ -95,47 +98,47 @@ Updates from Tony.
 #define HEIGHT_AGL_WHEEL d_wheel_rwy_local_v[2]
 
 
-static sub3( DATA v1[],  DATA v2[], DATA result[] )
+static void sub3( DATA v1[],  DATA v2[], DATA result[] )
 {
     result[0] = v1[0] - v2[0];
     result[1] = v1[1] - v2[1];
     result[2] = v1[2] - v2[2];
 }
 
-static add3( DATA v1[],  DATA v2[], DATA result[] )
+static void add3( DATA v1[],  DATA v2[], DATA result[] )
 {
     result[0] = v1[0] + v2[0];
     result[1] = v1[1] + v2[1];
     result[2] = v1[2] + v2[2];
 }
 
-static cross3( DATA v1[],  DATA v2[], DATA result[] )
+static void cross3( DATA v1[],  DATA v2[], DATA result[] )
 {
     result[0] = v1[1]*v2[2] - v1[2]*v2[1];
     result[1] = v1[2]*v2[0] - v1[0]*v2[2];
     result[2] = v1[0]*v2[1] - v1[1]*v2[0];
 }
 
-static multtrans3x3by3( DATA m[][3], DATA v[], DATA result[] )
+static void multtrans3x3by3( DATA m[][3], DATA v[], DATA result[] )
 {
     result[0] = m[0][0]*v[0] + m[1][0]*v[1] + m[2][0]*v[2];
     result[1] = m[0][1]*v[0] + m[1][1]*v[1] + m[2][1]*v[2];
     result[2] = m[0][2]*v[0] + m[1][2]*v[1] + m[2][2]*v[2];
 }
 
-static mult3x3by3( DATA m[][3], DATA v[], DATA result[] )
+static void mult3x3by3( DATA m[][3], DATA v[], DATA result[] )
 {
     result[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2];
     result[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2];
     result[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2];
 }
 
-static clear3( DATA v[] )
+static void clear3( DATA v[] )
 {
     v[0] = 0.; v[1] = 0.; v[2] = 0.;
 }
 
-c172_gear()
+void c172_gear()
 {
 char rcsid[] = "$Id$";
 #define NUM_WHEELS 4
index e33c3b8c1ec67b209791cfa4f457c04474aee895..2aec73867fac70a85fe7d3ddd66dcd34920d9beb 100644 (file)
@@ -81,47 +81,47 @@ void uiuc_engine( SCALAR dt, int Initialize )
  * added later and the choice of the gear model could be specified at
  * runtime.
  * ***********************************************************************/
-static sub3( DATA v1[],  DATA v2[], DATA result[] )
+static void sub3( DATA v1[],  DATA v2[], DATA result[] )
 {
     result[0] = v1[0] - v2[0];
     result[1] = v1[1] - v2[1];
     result[2] = v1[2] - v2[2];
 }
 
-static add3( DATA v1[],  DATA v2[], DATA result[] )
+static void add3( DATA v1[],  DATA v2[], DATA result[] )
 {
     result[0] = v1[0] + v2[0];
     result[1] = v1[1] + v2[1];
     result[2] = v1[2] + v2[2];
 }
 
-static cross3( DATA v1[],  DATA v2[], DATA result[] )
+static void cross3( DATA v1[],  DATA v2[], DATA result[] )
 {
     result[0] = v1[1]*v2[2] - v1[2]*v2[1];
     result[1] = v1[2]*v2[0] - v1[0]*v2[2];
     result[2] = v1[0]*v2[1] - v1[1]*v2[0];
 }
 
-static multtrans3x3by3( DATA m[][3], DATA v[], DATA result[] )
+static void multtrans3x3by3( DATA m[][3], DATA v[], DATA result[] )
 {
     result[0] = m[0][0]*v[0] + m[1][0]*v[1] + m[2][0]*v[2];
     result[1] = m[0][1]*v[0] + m[1][1]*v[1] + m[2][1]*v[2];
     result[2] = m[0][2]*v[0] + m[1][2]*v[1] + m[2][2]*v[2];
 }
 
-static mult3x3by3( DATA m[][3], DATA v[], DATA result[] )
+static void mult3x3by3( DATA m[][3], DATA v[], DATA result[] )
 {
     result[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2];
     result[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2];
     result[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2];
 }
 
-static clear3( DATA v[] )
+static void clear3( DATA v[] )
 {
     v[0] = 0.; v[1] = 0.; v[2] = 0.;
 }
 
-uiuc_gear()
+void uiuc_gear()
 {
 char rcsid[] = "$Id$";
 
index 872106d07459c6762a4797a0b8d5963d1bae66fd..e525b43332d28f6f2a0ebfe4b4da54312a538495 100644 (file)
@@ -25,6 +25,8 @@
 */ 
  
 
+#include <simgear/compiler.h>
+
 #include <math.h>
 #include <iostream>
 
 #include <FDM/LaRCsim/ls_constants.h>
 #include <FDM/LaRCsim/ls_geodesy.h>
 
+FG_USING_STD(cout);
+FG_USING_STD(endl);
+
+
 LaRCsimIC::LaRCsimIC(void) {
   vt=vtg=vw=vc=ve=0;
   mach=0;
index 09973ce74705c8859a83f1347892b80e026e63e2..f566933a896ff1080eabd40c66deda6c4f1ca2cd 100644 (file)
@@ -8,6 +8,8 @@
 #include "uiuc_parsefile.h"
 #include "uiuc_aircraft.h"
 
+FG_USING_STD(istrstream);
+
 int uiuc_1DdataFileReader( string file_name, 
                             double x[100], 
                             double y[100], 
index 86a2324df992b2fc9df7abe5c4ee8a33b7e49126..dea205d92adffe0e8bb2d967cbb6590fc6ddf808 100644 (file)
@@ -8,6 +8,8 @@
 #include "uiuc_parsefile.h"
 #include "uiuc_aircraft.h"
 
+FG_USING_STD(istrstream);
+
 void uiuc_2DdataFileReader( string file_name, 
                             double x[100][100], 
                             double y[100], 
index 016321056e2641c0f6dd07740703a9815cb2d7eb..a59cd3f4b9a2607fe4a98c9172239404c1b02b67 100644 (file)
 
 #include <simgear/compiler.h>
 
-#include "uiuc_menu.h"
+#if defined( __MWERKS__ )
+// -dw- optimizer chokes (big-time) trying to optimize humongous
+// loop/switch statements
+#pragma optimization_level 0
+#endif
+
+#include <stdlib.h>
 #include <iostream>
 
+#include "uiuc_menu.h"
+
 FG_USING_STD(cerr);
 FG_USING_STD(cout);
 FG_USING_STD(endl);
+FG_USING_STD(exit);
 
 bool check_float(string  &token)
 {
index f5a5998cfe48ac00df8a259abf72e284394ebdc9..91329fa4e0da0c32937ff1110b2286bbaf8bf94c 100644 (file)
@@ -72,6 +72,8 @@
 
 #include "uiuc_recorder.h"
 
+FG_USING_STD(endl);            // -dw
+
 void uiuc_recorder( double dt )
 {
   stack command_list;
index e6b015ebf792fc2087899adf99364b1101fde87c..516bd769811be24f7743b7b688c3d351ef1730f9 100644 (file)
@@ -74,8 +74,14 @@ for information.
  USA or view http://www.gnu.org/copyleft/gpl.html.
 
 **********************************************************************/
+#include <stdlib.h>
+
 #include "uiuc_warnings_errors.h"
 
+FG_USING_STD (cerr);
+FG_USING_STD (endl);
+FG_USING_STD (exit);
+
 void uiuc_warnings_errors(int errorCode, string line)
 {
   switch (errorCode)
index 37e451fa3ea1645270061ce7938bc68fae767dcf..17f0b203e8bd6a311db54589fab72844e16439c8 100644 (file)
@@ -113,8 +113,13 @@ struct button {
 struct joystick {
     virtual ~joystick () {
        delete js;
+#ifndef macintosh
        delete axes;
        delete buttons;
+#else
+       delete[] axes;
+       delete[] buttons;
+#endif
     }
     int naxes;
     int nbuttons;
index 52584307e9dc987acbea414e46e46d1c9adfdc09..899a574998370246ed273cdec1118b82cbc7a2ff 100644 (file)
@@ -123,12 +123,8 @@ int objc=0;
 #include "keyboard.hxx"
 #include "splash.hxx"
 
-// -dw- use custom sioux settings so I can see output window
 #ifdef macintosh
-#  ifndef FG_NDEBUG
-#    include <sioux.h> // settings for output window
-#  endif
-#  include <console.h>
+#  include <console.h>         // -dw- for command line dialog
 #endif
 
 
@@ -452,7 +448,7 @@ void fgRenderFrame( void ) {
        // ssg does to set up the model view matrix
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
-       ssgSetCamera( (sgMat4)globals->get_current_view()->get_VIEW() );
+       ssgSetCamera( (sgVec4 *)globals->get_current_view()->get_VIEW() );
 
        // set the opengl state to known default values
        default_state->force();
@@ -1274,7 +1270,7 @@ int fgGlutInit( int *argc, char **argv ) {
     general.set_glVersion( (char *)glGetString ( GL_VERSION ) );
     FG_LOG( FG_GENERAL, FG_INFO, general.get_glRenderer() );
 
-    int tmp;
+    GLint tmp;
     glGetIntegerv( GL_MAX_TEXTURE_SIZE, &tmp );
     general.set_glMaxTexSize( tmp );
     FG_LOG ( FG_GENERAL, FG_INFO, "Max texture size = " << tmp );
@@ -1685,7 +1681,7 @@ void fgLoadDCS(void) {
     char c;
     while ( ! in.eof() ) 
     {
-       in >> skipws;
+       in >> ::skipws;
        if ( in.get( c ) && c == '#' )
        { 
             in >> skipeol;
index 20272b9832f0b60d49b16f3c48615a399b07eee4..68632a2371ca1bbababb5e7f43aba959cdadad4f 100644 (file)
@@ -68,7 +68,7 @@ class FGNewCache {
     tile_map_iterator current;
 
     // Free a tile cache entry
-    void FGNewCache::entry_free( long cache_index );
+    void entry_free( long cache_index );
 
 public:
 
@@ -85,7 +85,7 @@ public:
     bool exists( const SGBucket& b );
 
     // Ensure at least one entry is free in the cache
-    void FGNewCache::make_space();
+    void make_space();
 
     // Fill in a tile cache entry with real data for the specified bucket 
     void fill_in( const SGBucket& b );
index 5bc82ddbcc18ccc03229cd80a10539ce8fb34081..08a6c0e3772777746d17f43c6f19a336a4d95528 100644 (file)
@@ -313,7 +313,7 @@ int FGTileMgr::update( double lon, double lat ) {
     }
 
     if ( state == Running ) {
-       if( current_bucket != previous_bucket) {
+       if ( !(current_bucket == previous_bucket) ) {
            // We've moved to a new bucket, we need to schedule any
            // needed tiles for loading.
            schedule_needed();
index 97b4bf3fc19ac8a1271adf5aedc2ea3e64a956be..05d6748a8d889e0889d6d6c9ba171abebc286b3b 100644 (file)
@@ -84,7 +84,7 @@ private:
     void load_tile( const SGBucket& b );
 
     // schedule a needed buckets for loading
-    void FGTileMgr::schedule_needed();
+    void schedule_needed();
 
     // see comment at prep_ssg_nodes()
     void prep_ssg_node( int idx );