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>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef __CYGWIN32__
|
#ifdef __CYGWIN32__
|
||||||
# include <Windows32/Base.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
@ -160,9 +160,12 @@ void GLUTspecialkey(int k, int x, int y) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.14 1997/07/12 03:50:20 curt
|
/* Revision 1.15 1997/07/16 20:04:47 curt
|
||||||
/* Added an #include <Windows32/Base.h> to help compiling for Win32
|
/* 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
|
* Revision 1.13 1997/06/25 15:39:46 curt
|
||||||
* Minor changes to compile with rsxnt/win32.
|
* Minor changes to compile with rsxnt/win32.
|
||||||
*
|
*
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef __CYGWIN32__
|
#ifdef __CYGWIN32__
|
||||||
# include <Windows32/Base.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLUT
|
#ifdef GLUT
|
||||||
|
@ -615,9 +615,12 @@ int main( int argc, char *argv[] ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.33 1997/07/12 03:50:20 curt
|
/* Revision 1.34 1997/07/16 20:04:48 curt
|
||||||
/* Added an #include <Windows32/Base.h> to help compiling for Win32
|
/* 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
|
* Revision 1.32 1997/07/11 03:23:18 curt
|
||||||
* Solved some scenery display/orientation problems. Still have a positioning
|
* Solved some scenery display/orientation problems. Still have a positioning
|
||||||
* (or transformation?) problem.
|
* (or transformation?) problem.
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
|
|
||||||
#ifdef __CYGWIN32__
|
#ifdef __CYGWIN32__
|
||||||
# include <Windows32/Base.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
@ -85,6 +85,7 @@ GLint mesh2GL(struct mesh *m) {
|
||||||
GLint mesh;
|
GLint mesh;
|
||||||
/* static GLfloat color[4] = { 0.5, 0.4, 0.25, 1.0 }; */ /* dark desert */
|
/* 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 };
|
static GLfloat color[4] = { 0.5, 0.5, 0.25, 1.0 };
|
||||||
|
double randx, randy;
|
||||||
|
|
||||||
float x1, y1, x2, y2, z11, z12, z21, z22;
|
float x1, y1, x2, y2, z11, z12, z21, z22;
|
||||||
struct fgCartesianPoint p11, p12, p21, p22;
|
struct fgCartesianPoint p11, p12, p21, p22;
|
||||||
|
@ -185,9 +186,16 @@ GLint mesh2GL(struct mesh *m) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for ( i = 0; i < 800; i++ ) {
|
for ( i = 0; i < 200; i++ ) {
|
||||||
mesh_make_test_object(m->originx + (random() * 3600.0 / RAND_MAX) ,
|
#ifdef USE_RAND
|
||||||
m->originy + (random() * 3600.0 / RAND_MAX) );
|
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();
|
glEndList();
|
||||||
|
@ -198,9 +206,12 @@ GLint mesh2GL(struct mesh *m) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.33 1997/07/14 16:26:04 curt
|
/* Revision 1.34 1997/07/16 20:04:50 curt
|
||||||
/* Testing/playing -- placed objects randomly across the entire terrain.
|
/* 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
|
* Revision 1.32 1997/07/12 03:50:21 curt
|
||||||
* Added an #include <Windows32/Base.h> to help compiling for Win32
|
* Added an #include <Windows32/Base.h> to help compiling for Win32
|
||||||
*
|
*
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN32__
|
#ifdef __CYGWIN32__
|
||||||
# include <Windows32/Base.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -265,9 +265,12 @@ double mesh_altitude(double lon, double lat) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.15 1997/07/14 16:26:04 curt
|
/* Revision 1.16 1997/07/16 20:04:51 curt
|
||||||
/* Testing/playing -- placed objects randomly across the entire terrain.
|
/* 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
|
* Revision 1.14 1997/07/12 04:01:14 curt
|
||||||
* Added #include <Windows32/Base.h> to help Win32 compiling.
|
* Added #include <Windows32/Base.h> to help Win32 compiling.
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,7 +25,10 @@
|
||||||
|
|
||||||
/* C pass through */
|
/* C pass through */
|
||||||
%{
|
%{
|
||||||
|
#ifndef __CYGWIN32__
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __CYGWIN32__
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
#include "scenery.h"
|
#include "scenery.h"
|
||||||
|
@ -41,7 +45,7 @@ struct scenery_params cur_scenery_params;
|
||||||
/* Initialize the Scenery Management system */
|
/* Initialize the Scenery Management system */
|
||||||
void fgSceneryInit() {
|
void fgSceneryInit() {
|
||||||
/* set the default terrain detail level */
|
/* 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$
|
/* $Log$
|
||||||
/* Revision 1.6 1997/07/14 16:26:05 curt
|
/* Revision 1.7 1997/07/16 20:04:52 curt
|
||||||
/* Testing/playing -- placed objects randomly across the entire terrain.
|
/* 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
|
* Revision 1.5 1997/07/11 03:23:19 curt
|
||||||
* Solved some scenery display/orientation problems. Still have a positioning
|
* Solved some scenery display/orientation problems. Still have a positioning
|
||||||
* (or transformation?) problem.
|
* (or transformation?) problem.
|
||||||
|
|
|
@ -33,7 +33,7 @@ CC = gcc
|
||||||
FLEX = flex -f -L
|
FLEX = flex -f -L
|
||||||
BISON = bison -v --no-lines
|
BISON = bison -v --no-lines
|
||||||
AR = ar
|
AR = ar
|
||||||
RANLIB = echo
|
RANLIB = ranlib
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
@ -57,9 +57,11 @@ RANLIB = echo
|
||||||
# -DUSE_FTIME - Use ftime() to get an accurate current time instead of
|
# -DUSE_FTIME - Use ftime() to get an accurate current time instead of
|
||||||
# gettimeofday()
|
# 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
|
# 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_FLAGS = -DGLUT
|
||||||
# INTERFACE_LIBS = -lglut
|
# INTERFACE_LIBS = -lglut
|
||||||
# INTERFACE_FILES = GLUTkey.c
|
# 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$
|
# $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
|
# Revision 1.5 1997/07/12 02:25:53 curt
|
||||||
# Added ranlib.
|
# Added ranlib.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue