From: curt Date: Wed, 16 Jul 1997 20:04:42 +0000 (+0000) Subject: Minor tweaks to aid Win32 port. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=68681f730f80ee951d9d7b6dcb46c431537f36cf;p=flightgear.git Minor tweaks to aid Win32 port. --- diff --git a/Main/GLUTkey.c b/Main/GLUTkey.c index 27afa6176..1ff5048a0 100644 --- a/Main/GLUTkey.c +++ b/Main/GLUTkey.c @@ -28,7 +28,7 @@ #include #ifdef __CYGWIN32__ -# include +# include #endif #include @@ -160,9 +160,12 @@ void GLUTspecialkey(int k, int x, int y) { /* $Log$ -/* Revision 1.14 1997/07/12 03:50:20 curt -/* Added an #include to help compiling for Win32 +/* Revision 1.15 1997/07/16 20:04:47 curt +/* Minor tweaks to aid Win32 port. /* + * Revision 1.14 1997/07/12 03:50:20 curt + * Added an #include to help compiling for Win32 + * * Revision 1.13 1997/06/25 15:39:46 curt * Minor changes to compile with rsxnt/win32. * diff --git a/Main/GLmain.c b/Main/GLmain.c index 10d5d40da..fc985e230 100644 --- a/Main/GLmain.c +++ b/Main/GLmain.c @@ -29,7 +29,7 @@ #include #ifdef __CYGWIN32__ -# include +# include #endif #ifdef GLUT @@ -615,9 +615,12 @@ int main( int argc, char *argv[] ) { /* $Log$ -/* Revision 1.33 1997/07/12 03:50:20 curt -/* Added an #include to help compiling for Win32 +/* Revision 1.34 1997/07/16 20:04:48 curt +/* Minor tweaks to aid Win32 port. /* + * Revision 1.33 1997/07/12 03:50:20 curt + * Added an #include to help compiling for Win32 + * * Revision 1.32 1997/07/11 03:23:18 curt * Solved some scenery display/orientation problems. Still have a positioning * (or transformation?) problem. diff --git a/Main/mesh2GL.c b/Main/mesh2GL.c index a671816d9..fd4d91f73 100644 --- a/Main/mesh2GL.c +++ b/Main/mesh2GL.c @@ -25,7 +25,7 @@ #ifdef __CYGWIN32__ -# include +# include #endif #include @@ -85,6 +85,7 @@ GLint mesh2GL(struct mesh *m) { GLint mesh; /* static GLfloat color[4] = { 0.5, 0.4, 0.25, 1.0 }; */ /* dark desert */ static GLfloat color[4] = { 0.5, 0.5, 0.25, 1.0 }; + double randx, randy; float x1, y1, x2, y2, z11, z12, z21, z22; struct fgCartesianPoint p11, p12, p21, p22; @@ -185,9 +186,16 @@ GLint mesh2GL(struct mesh *m) { } */ - for ( i = 0; i < 800; i++ ) { - mesh_make_test_object(m->originx + (random() * 3600.0 / RAND_MAX) , - m->originy + (random() * 3600.0 / RAND_MAX) ); + for ( i = 0; i < 200; i++ ) { +#ifdef USE_RAND + randx = rand() * 3600.0 / RAND_MAX; + randy = rand() * 3600.0 / RAND_MAX; +#else + randx = random() * 3600.0 / RAND_MAX; + randy = random() * 3600.0 / RAND_MAX; +#endif + + mesh_make_test_object(m->originx + randx, m->originy + randy); } glEndList(); @@ -198,9 +206,12 @@ GLint mesh2GL(struct mesh *m) { /* $Log$ -/* Revision 1.33 1997/07/14 16:26:04 curt -/* Testing/playing -- placed objects randomly across the entire terrain. +/* Revision 1.34 1997/07/16 20:04:50 curt +/* Minor tweaks to aid Win32 port. /* + * Revision 1.33 1997/07/14 16:26:04 curt + * Testing/playing -- placed objects randomly across the entire terrain. + * * Revision 1.32 1997/07/12 03:50:21 curt * Added an #include to help compiling for Win32 * diff --git a/Scenery/mesh.c b/Scenery/mesh.c index 0e3d93f79..07429f624 100644 --- a/Scenery/mesh.c +++ b/Scenery/mesh.c @@ -29,7 +29,7 @@ #endif #ifdef __CYGWIN32__ -# include +# include #endif #include @@ -265,9 +265,12 @@ double mesh_altitude(double lon, double lat) { /* $Log$ -/* Revision 1.15 1997/07/14 16:26:04 curt -/* Testing/playing -- placed objects randomly across the entire terrain. +/* Revision 1.16 1997/07/16 20:04:51 curt +/* Minor tweaks to aid Win32 port. /* + * Revision 1.15 1997/07/14 16:26:04 curt + * Testing/playing -- placed objects randomly across the entire terrain. + * * Revision 1.14 1997/07/12 04:01:14 curt * Added #include to help Win32 compiling. * diff --git a/Scenery/parser.y b/Scenery/parser.y index 0088067c9..462239c28 100644 --- a/Scenery/parser.y +++ b/Scenery/parser.y @@ -25,7 +25,10 @@ /* C pass through */ %{ -#include +#ifndef __CYGWIN32__ +# include +#endif + #include #include #include diff --git a/Scenery/scenery.c b/Scenery/scenery.c index c474910ab..f8a8188cf 100644 --- a/Scenery/scenery.c +++ b/Scenery/scenery.c @@ -24,6 +24,10 @@ **************************************************************************/ +#ifdef __CYGWIN32__ +# include +#endif + #include #include "scenery.h" @@ -41,7 +45,7 @@ struct scenery_params cur_scenery_params; /* Initialize the Scenery Management system */ void fgSceneryInit() { /* set the default terrain detail level */ - cur_scenery_params.terrain_skip = 5; + cur_scenery_params.terrain_skip = 20; } @@ -65,9 +69,12 @@ void fgSceneryRender() { /* $Log$ -/* Revision 1.6 1997/07/14 16:26:05 curt -/* Testing/playing -- placed objects randomly across the entire terrain. +/* Revision 1.7 1997/07/16 20:04:52 curt +/* Minor tweaks to aid Win32 port. /* + * Revision 1.6 1997/07/14 16:26:05 curt + * Testing/playing -- placed objects randomly across the entire terrain. + * * Revision 1.5 1997/07/11 03:23:19 curt * Solved some scenery display/orientation problems. Still have a positioning * (or transformation?) problem. diff --git a/Simulator/make.inc b/Simulator/make.inc index 7fe13310c..a5695573c 100644 --- a/Simulator/make.inc +++ b/Simulator/make.inc @@ -33,7 +33,7 @@ CC = gcc FLEX = flex -f -L BISON = bison -v --no-lines AR = ar -RANLIB = echo +RANLIB = ranlib #--------------------------------------------------------------------------- @@ -57,9 +57,11 @@ RANLIB = echo # -DUSE_FTIME - Use ftime() to get an accurate current time instead of # gettimeofday() # +# -DUSE_RAND - Use rand() instead of random() +# #--------------------------------------------------------------------------- -FG_CFLAGS = -g -Wall +FG_CFLAGS = -g -Wall -DUSE_RAND #--------------------------------------------------------------------------- @@ -83,26 +85,29 @@ FG_CFLAGS = -g -Wall #--------------------------------------------------------------------------- # Linux/Mesa with the GLUT toolkit # -INTERFACE_FLAGS = -DGLUT -INTERFACE_LIBS = -lglut -INTERFACE_FILES = GLUTkey.c -MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL -X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS) +# INTERFACE_FLAGS = -DGLUT +# INTERFACE_LIBS = -lglut +# INTERFACE_FILES = GLUTkey.c +# MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL +# X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 +# GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS) #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- -# Windows 95/NT with the GLUT toolkit +# Cygnus Win32 (gcc based) with the GLUT toolkit # -# INTERFACE_FLAGS = -DGLUT -# INTERFACE_LIBS = -lglut -# INTERFACE_FILES = GLUTkey.c -# GRAPHICS_LIBS = -lGLU -lGL +INTERFACE_FLAGS = -DGLUT +INTERFACE_LIBS = -Wl,--subsystem,windows -L. -lglut +INTERFACE_FILES = GLUTkey.c +GRAPHICS_LIBS = -lglu32 -lopengl32 #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # $Log$ +# Revision 1.6 1997/07/16 20:04:42 curt +# Minor tweaks to aid Win32 port. +# # Revision 1.5 1997/07/12 02:25:53 curt # Added ranlib. #