Minor tweaks to aid Win32 port.
This commit is contained in:
parent
bf40d877a1
commit
68681f730f
7 changed files with 68 additions and 33 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
|
||||
/* C pass through */
|
||||
%{
|
||||
#ifndef __CYGWIN32__
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
**************************************************************************/
|
||||
|
||||
|
||||
#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.
|
||||
|
|
|
@ -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)
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Windows 95/NT with the GLUT toolkit
|
||||
#
|
||||
# INTERFACE_FLAGS = -DGLUT
|
||||
# INTERFACE_LIBS = -lglut
|
||||
# INTERFACE_FILES = GLUTkey.c
|
||||
# GRAPHICS_LIBS = -lGLU -lGL
|
||||
# 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)
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Cygnus Win32 (gcc based) with the GLUT toolkit
|
||||
#
|
||||
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.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue