MacOS changes contributed by Darrell Walisser (12/13/2000)
This commit is contained in:
parent
95d6d93bed
commit
e333080388
15 changed files with 60 additions and 29 deletions
|
@ -139,4 +139,4 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#endif _10520D_HXX_
|
||||
#endif // _10520D_HXX_
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <simgear/io/sg_socket.hxx>
|
||||
|
||||
#include "flight.hxx"
|
||||
#include <FDM/flight.hxx>
|
||||
|
||||
|
||||
class FGADA: public FGInterface {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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$";
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -36,6 +38,10 @@
|
|||
#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;
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -91,12 +91,21 @@
|
|||
|
||||
#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)
|
||||
{
|
||||
|
|
|
@ -72,6 +72,8 @@
|
|||
|
||||
#include "uiuc_recorder.h"
|
||||
|
||||
FG_USING_STD(endl); // -dw
|
||||
|
||||
void uiuc_recorder( double dt )
|
||||
{
|
||||
stack command_list;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue