]> git.mxchange.org Git - flightgear.git/commitdiff
Minor tweaks to aid Win32 port.
authorcurt <curt>
Wed, 16 Jul 1997 20:04:42 +0000 (20:04 +0000)
committercurt <curt>
Wed, 16 Jul 1997 20:04:42 +0000 (20:04 +0000)
Main/GLUTkey.c
Main/GLmain.c
Main/mesh2GL.c
Scenery/mesh.c
Scenery/parser.y
Scenery/scenery.c
Simulator/make.inc

index 27afa61761bc6fa2baa5dc0c127d8997b34a6455..1ff5048a0bd2258524276bcbe8ae28e44714317f 100644 (file)
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 #ifdef __CYGWIN32__                                                  
-#  include <Windows32/Base.h>                     
+#  include <windows.h>                     
 #endif
 
 #include <GL/glut.h>
@@ -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 <Windows32/Base.h> 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 <Windows32/Base.h> to help compiling for Win32
+ *
  * Revision 1.13  1997/06/25 15:39:46  curt
  * Minor changes to compile with rsxnt/win32.
  *
index 10d5d40da77b663cbc506f5dd695c231b351d1b0..fc985e2304db0e560a570a9c62337f369b75dc10 100644 (file)
@@ -29,7 +29,7 @@
 #include <stdlib.h>
 
 #ifdef __CYGWIN32__                                                  
-#  include <Windows32/Base.h>                     
+#  include <windows.h>                     
 #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 <Windows32/Base.h> 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 <Windows32/Base.h> 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.
index a671816d9c136a5930ee231afb36bcaa749afd27..fd4d91f73adc15afd2e764c0926d47ee95f809f9 100644 (file)
@@ -25,7 +25,7 @@
 
 
 #ifdef __CYGWIN32__                                                  
-#  include <Windows32/Base.h>                     
+#  include <windows.h>                     
 #endif
 
 #include <GL/glut.h>
@@ -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 <Windows32/Base.h> to help compiling for Win32
  *
index 0e3d93f79d6b82b61459676bba34434d824ce98f..07429f62438688ee21f069620fbec332bbfb9d7d 100644 (file)
@@ -29,7 +29,7 @@
 #endif
 
 #ifdef __CYGWIN32__
-#  include <Windows32/Base.h>
+#  include <windows.h>
 #endif
 
 #include <stdio.h>
@@ -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 <Windows32/Base.h> to help Win32 compiling.
  *
index 0088067c919e16e423b801c992711a110922eeeb..462239c285a6fe74fc83ee1882b2d4a6698e2f1c 100644 (file)
 
 /* C pass through */
 %{
-#include <malloc.h>
+#ifndef __CYGWIN32__
+#  include <malloc.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index c474910abec717c754012368a8db5622fd8f97ca..f8a8188cf7e8ff384f754b700882269e34ec3c7e 100644 (file)
  **************************************************************************/
 
 
+#ifdef __CYGWIN32__
+#  include <windows.h>
+#endif
+
 #include <GL/glut.h>
 
 #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.
index 7fe13310c6526c165310392f2dd0e4f50d84f870..a5695573cda4f0edeee5d2810034e7ab249a1389 100644 (file)
@@ -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.
 #