MSVC++ changes contributed by Geoff McLane.
This commit is contained in:
parent
4bdbe9c8c1
commit
aea664cd15
7 changed files with 108 additions and 72 deletions
|
@ -49,10 +49,16 @@
|
|||
#include STL_STRING
|
||||
#include <vector>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define NDEBUG // she don't work without it.
|
||||
#endif // !_MSC_VER
|
||||
|
||||
#include <mk4.h>
|
||||
#include <mk4str.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#undef NDEBUG
|
||||
#endif // !_MSC_VER
|
||||
|
||||
SG_USING_STD(string);
|
||||
SG_USING_STD(vector);
|
||||
|
|
|
@ -109,7 +109,7 @@ SG_USING_STD(cerr);
|
|||
SG_USING_STD(cout);
|
||||
SG_USING_STD(endl);
|
||||
|
||||
# ifndef _MSC_VR
|
||||
# ifndef _MSC_VER
|
||||
SG_USING_STD(exit);
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -92,6 +92,10 @@ SG_USING_STD(string);
|
|||
SG_USING_STD(cout);
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
// main.cxx hack, should come from an include someplace
|
||||
extern void fgInitVisuals( void );
|
||||
extern void fgReshape( int width, int height );
|
||||
|
|
|
@ -1,59 +1,49 @@
|
|||
/* src/Include/config.h. Generated automatically by configure. */
|
||||
/* src/Include/config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
/* Special single config.h for MSVC6 build - Geoff McLane - 10 May, 2001 */
|
||||
|
||||
/* Define if the X Window System is missing or not being used. */
|
||||
#define X_DISPLAY_MISSING 1
|
||||
|
||||
/* Define to enable audio support */
|
||||
#define ENABLE_AUDIO_SUPPORT 1
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to enable plib joystick support (recommended) */
|
||||
#define ENABLE_PLIB_JOYSTICK 1
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define to eliminate all trace of debugging messages such as for a
|
||||
release build */
|
||||
/* #undef FG_NDEBUG */
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define to include Oliver's networking support */
|
||||
/* #undef FG_NETWORK_OLK */
|
||||
/* Define to package name - not used? */
|
||||
#define PACKAGE "FlightGear"
|
||||
|
||||
/* Define to avoid Christian's new weather code */
|
||||
/* #undef FG_OLD_WEATHER */
|
||||
/* Define to package version - use in main.cxx */
|
||||
#define FLIGHTGEAR_VERSION "MSVC6-FGFS32-0.7.7"
|
||||
|
||||
/* Define if we are building FGFS (should always be defined) */
|
||||
#define FGFS 1
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to enable 3dfx/glide render in a window hack under unix.
|
||||
This probably won't work under windows. */
|
||||
/* #define XMESA 1 */
|
||||
/* #define FX 1 */
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define if you external variables daylight. */
|
||||
/* #define HAVE_DAYLIGHT 1 */
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you external variables timezone. */
|
||||
/* #define HAVE_TIMEZONE 1 */
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* #undef TIME_WITH_SYS_TIME */
|
||||
|
||||
/* Define if you have MetaKit installed system wide. */
|
||||
#define HAVE_MK4 1
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
#define TM_IN_SYS_TIME 1
|
||||
|
||||
/* Define if you have zlib installed system wide. */
|
||||
/* #define HAVE_ZLIB 1 */
|
||||
/* Define to version number */
|
||||
#define VERSION "0.57"
|
||||
#ifndef FG_VERSION /* allow override */
|
||||
#define FG_VERSION 7
|
||||
#endif /* FG_VERSION */
|
||||
|
||||
/* Define if compiling on a Winbloze (95, NT, etc.) platform */
|
||||
#define WIN32 1
|
||||
|
||||
/* Define if you have the bcopy function. */
|
||||
/* #define HAVE_BCOPY 1 */
|
||||
/* Define if you have the GetLocalTime function. */
|
||||
#define HAVE_GETLOCALTIME 1
|
||||
|
||||
/* Define if you have the ftime function. */
|
||||
#define HAVE_FTIME 1
|
||||
|
@ -61,18 +51,12 @@
|
|||
/* Define if you have the getitimer function. */
|
||||
/* #define HAVE_GETITIMER 1 */
|
||||
|
||||
/* Define if you have the GetLocalTime function. */
|
||||
#define HAVE_GETLOCALTIME 1
|
||||
|
||||
/* Define if you have the getrusage function. */
|
||||
/* #define HAVE_GETRUSAGE 1 */
|
||||
|
||||
/* Define if you have the gettimeofday function. */
|
||||
/* #define HAVE_GETTIMEOFDAY 1 */
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define if you have the mktime function. */
|
||||
#define HAVE_MKTIME 1
|
||||
|
||||
|
@ -80,7 +64,7 @@
|
|||
#define HAVE_RAND 1
|
||||
|
||||
/* Define if you have the random function. */
|
||||
/* #define HAVE_RANDOM 1 */
|
||||
#define HAVE_RANDOM 1
|
||||
|
||||
/* Define if you have the rint function. */
|
||||
/* #define HAVE_RINT 1 */
|
||||
|
@ -94,36 +78,24 @@
|
|||
/* Define if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define if you have the timegm function. */
|
||||
/* #define HAVE_TIMEGM 1 */
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
/* #define HAVE_GETOPT_H 1 */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* #define HAVE_SYS_PARAM_H 1 */
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
/* #define HAVE_SYS_TIME_H 1 */
|
||||
|
||||
/* Define if you have the <sys/timeb.h> header file. */
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
/* #define HAVE_SYS_TIME_H 1 */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* #define HAVE_UNISTD_H 1 */
|
||||
|
||||
|
@ -139,17 +111,51 @@
|
|||
/* Define if you have the GL library (-lGL). */
|
||||
#define HAVE_LIBGL 1
|
||||
|
||||
/* Define if you have the GLU library (-lGLU). */
|
||||
#define HAVE_LIBGLU 1
|
||||
|
||||
/* Define if you have the GLcore library (-lGLcore). */
|
||||
/* #undef HAVE_LIBGLCORE */
|
||||
|
||||
/* Define if you have the GLU library (-lGLU). */
|
||||
#define HAVE_LIBGLU 1
|
||||
/* Define if you have the ICE library (-lICE). */
|
||||
/* #define HAVE_LIBICE 1 */
|
||||
|
||||
/* Define if you have the MesaGL library (-lMesaGL). */
|
||||
/* #undef HAVE_LIBMESAGL */
|
||||
|
||||
/* Define if you have the MesaGLU library (-lMesaGLU). */
|
||||
/* #undef HAVE_LIBMESAGLU */
|
||||
|
||||
/* Define if you have the SM library (-lSM). */
|
||||
/* #define HAVE_LIBSM 1 */
|
||||
|
||||
/* Define if you have the X11 library (-lX11). */
|
||||
/* #define HAVE_LIBX11 1 */
|
||||
|
||||
/* Define if you have the Xext library (-lXext). */
|
||||
/* #define HAVE_LIBXEXT 1 */
|
||||
|
||||
/* Define if you have the Xi library (-lXi). */
|
||||
/* #define HAVE_LIBXI 1 */
|
||||
|
||||
/* Define if you have the Xmu library (-lXmu). */
|
||||
/* #define HAVE_LIBXMU 1 */
|
||||
|
||||
/* Define if you have the Xt library (-lXt). */
|
||||
/* #define HAVE_LIBXT 1 */
|
||||
|
||||
/* Define if you have the glut library (-lglut). */
|
||||
#define HAVE_LIBGLUT 1
|
||||
|
||||
/* Define if you have the plibul library (-lplibul). */
|
||||
/* #undef HAVE_LIBPLIBUL */
|
||||
/* Define if you have the m library (-lm). */
|
||||
#define HAVE_LIBM 1
|
||||
|
||||
/* Define if you have the socket library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "FlightGear"
|
||||
|
|
|
@ -1591,6 +1591,14 @@ int main( int argc, char **argv ) {
|
|||
|
||||
ssgTexturePath( (char *)full_model.dir().c_str() );
|
||||
ssgEntity *acmodel_obj = ssgLoad( (char *)full_model.c_str() );
|
||||
if( !acmodel_obj ) {
|
||||
// fall back to default
|
||||
acmodel_obj = ssgLoad( (char *)"glider.ac" );
|
||||
if( !acmodel_obj ) {
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "FAILED to LOAD an AC model! ..." );
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
// find moving parts (if this is an MDL model)
|
||||
flaps_selector = (ssgSelector*)fgFindNode( acmodel_obj, "FLAPS" );
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
|
||||
|
||||
#ifndef _MSC_VER
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
@ -17,3 +21,5 @@ int MSG_PEEK = 0x02; /* Peek at incoming messages. */
|
|||
int MSG_WAITALL = 0x100; /* Wait for a full request. */
|
||||
#define MSG_WAITALL MSG_WAITALL
|
||||
#endif
|
||||
|
||||
#endif /* !_MSC_VER */
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
|
||||
|
||||
#ifndef _MSC_VER
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
@ -15,3 +19,5 @@
|
|||
#ifndef MSG_WAITALL
|
||||
#define MSG_WAITALL 0x100 /* Wait for a full request. */
|
||||
#endif
|
||||
|
||||
#endif /* !_MSC_VER */
|
||||
|
|
Loading…
Add table
Reference in a new issue