#include <stdio.h>
#ifdef __CYGWIN32__
-# include <Windows32/Base.h>
+# include <windows.h>
#endif
#include <GL/glut.h>
/* $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.
*
#include <stdlib.h>
#ifdef __CYGWIN32__
-# include <Windows32/Base.h>
+# include <windows.h>
#endif
#ifdef GLUT
/* $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.
#ifdef __CYGWIN32__
-# include <Windows32/Base.h>
+# include <windows.h>
#endif
#include <GL/glut.h>
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;
}
*/
- 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();
/* $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
*
#endif
#ifdef __CYGWIN32__
-# include <Windows32/Base.h>
+# include <windows.h>
#endif
#include <stdio.h>
/* $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.
*
/* C pass through */
%{
-#include <malloc.h>
+#ifndef __CYGWIN32__
+# include <malloc.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
**************************************************************************/
+#ifdef __CYGWIN32__
+# include <windows.h>
+#endif
+
#include <GL/glut.h>
#include "scenery.h"
/* 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;
}
/* $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.
FLEX = flex -f -L
BISON = bison -v --no-lines
AR = ar
-RANLIB = echo
+RANLIB = ranlib
#---------------------------------------------------------------------------
# -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
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# 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.
#