From 80713ee20581fe2026b9cc4c96558c19056e8bcc Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 25 Jun 1997 15:39:44 +0000 Subject: [PATCH] Minor changes to compile with rsxnt/win32. --- Aircraft/Makefile | 5 ++++- Aircraft/aircraft.c | 11 +++++++++-- Controls/Makefile | 5 ++++- FDM/Makefile | 5 ++++- Main/GLUTkey.c | 11 +++++++++-- Main/GLmain.c | 16 ++++++++++++++-- Main/Makefile | 13 ++++++++----- Scenery/Makefile | 5 ++++- Slew/Makefile | 5 ++++- Time/fg_timer.c | 14 ++++++++++---- 10 files changed, 70 insertions(+), 20 deletions(-) diff --git a/Aircraft/Makefile b/Aircraft/Makefile index dbe37f3b1..2ba423b7c 100644 --- a/Aircraft/Makefile +++ b/Aircraft/Makefile @@ -51,7 +51,7 @@ $(TARGET): $(OFILES) $(HFILES) all: $(TARGET) clean: - rm -f *.o $(TARGET) *~ core + rm -f *.o $(TARGET) lib*.a *~ core #--------------------------------------------------------------------------- @@ -67,6 +67,9 @@ aircraft.h: ../Flight/flight.h ../Controls/controls.h #--------------------------------------------------------------------------- # $Log$ +# Revision 1.4 1997/06/25 15:39:44 curt +# Minor changes to compile with rsxnt/win32. +# # Revision 1.3 1997/06/21 17:12:42 curt # Capitalized subdirectory names. # diff --git a/Aircraft/aircraft.c b/Aircraft/aircraft.c index af285f13c..7ba67ad2a 100644 --- a/Aircraft/aircraft.c +++ b/Aircraft/aircraft.c @@ -29,6 +29,10 @@ #include "aircraft.h" +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + #define FG_RAD_2_DEG(RAD) ((RAD) * 180.0 / M_PI) /* Display various parameters to stdout */ @@ -49,9 +53,12 @@ void aircraft_debug(int type) { /* $Log$ -/* Revision 1.7 1997/06/02 03:01:39 curt -/* Working on views (side, front, back, transitions, etc.) +/* Revision 1.8 1997/06/25 15:39:45 curt +/* Minor changes to compile with rsxnt/win32. /* + * Revision 1.7 1997/06/02 03:01:39 curt + * Working on views (side, front, back, transitions, etc.) + * * Revision 1.6 1997/05/31 19:16:26 curt * Elevator trim added. * diff --git a/Controls/Makefile b/Controls/Makefile index 5d5b15f4b..baa1e8bfb 100644 --- a/Controls/Makefile +++ b/Controls/Makefile @@ -51,7 +51,7 @@ $(TARGET): $(OFILES) all: $(TARGET) clean: - rm -f *.o $(TARGET) *~ core + rm -f *.o $(TARGET) lib*.a *~ core #--------------------------------------------------------------------------- @@ -67,6 +67,9 @@ controls.o: controls.c controls.h ../Aircraft/aircraft.h #--------------------------------------------------------------------------- # $Log$ +# Revision 1.5 1997/06/25 15:39:46 curt +# Minor changes to compile with rsxnt/win32. +# # Revision 1.4 1997/06/21 17:12:47 curt # Capitalized subdirectory names. # diff --git a/FDM/Makefile b/FDM/Makefile index 4e90b231f..26a9ea058 100644 --- a/FDM/Makefile +++ b/FDM/Makefile @@ -50,7 +50,7 @@ $(TARGET): $(OFILES) all: $(TARGET) clean: - rm -f *.o $(TARGET) *~ core + rm -f *.o $(TARGET) lib*.a *~ core #--------------------------------------------------------------------------- @@ -66,6 +66,9 @@ flight.o: flight.c flight.h #--------------------------------------------------------------------------- # $Log$ +# Revision 1.5 1997/06/25 15:39:46 curt +# Minor changes to compile with rsxnt/win32. +# # Revision 1.4 1997/06/21 17:12:48 curt # Capitalized subdirectory names. # diff --git a/Main/GLUTkey.c b/Main/GLUTkey.c index 4c451f1e6..84c86f36d 100644 --- a/Main/GLUTkey.c +++ b/Main/GLUTkey.c @@ -32,6 +32,10 @@ #include "GLUTkey.h" #include "../Aircraft/aircraft.h" +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + extern double fogDensity; extern double goal_view_offset; @@ -152,9 +156,12 @@ void GLUTspecialkey(int k, int x, int y) { /* $Log$ -/* Revision 1.12 1997/06/21 17:12:52 curt -/* Capitalized subdirectory names. +/* Revision 1.13 1997/06/25 15:39:46 curt +/* Minor changes to compile with rsxnt/win32. /* + * Revision 1.12 1997/06/21 17:12:52 curt + * Capitalized subdirectory names. + * * Revision 1.11 1997/06/18 04:10:31 curt * A couple more runway tweaks ... * diff --git a/Main/GLmain.c b/Main/GLmain.c index 23c5245a6..0b9483a0f 100644 --- a/Main/GLmain.c +++ b/Main/GLmain.c @@ -47,10 +47,19 @@ #define DEG_TO_RAD 0.017453292 #define RAD_TO_DEG 57.29577951 +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + #ifndef PI2 #define PI2 (M_PI + M_PI) #endif + +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#endif + /* This is a record containing all the info for the aircraft currently being operated */ struct aircraft_params current_aircraft; @@ -544,9 +553,12 @@ int main( int argc, char *argv[] ) { /* $Log$ -/* Revision 1.21 1997/06/22 21:44:41 curt -/* Working on intergrating the VRML (subset) parser. +/* Revision 1.22 1997/06/25 15:39:47 curt +/* Minor changes to compile with rsxnt/win32. /* + * Revision 1.21 1997/06/22 21:44:41 curt + * Working on intergrating the VRML (subset) parser. + * * Revision 1.20 1997/06/21 17:12:53 curt * Capitalized subdirectory names. * diff --git a/Main/Makefile b/Main/Makefile index 3b8e0a0bc..f60c695f5 100644 --- a/Main/Makefile +++ b/Main/Makefile @@ -53,12 +53,12 @@ INTERFACE_FILES = GLUTkey.c #--------------------------------------------------------------------------- # For OpenGL -# GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11 +GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11 # For Mesa -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) +# 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) CFLAGS = $(STD_CFLAGS) $(INTERFACE_FLAGS) @@ -83,7 +83,7 @@ $(TARGET): $(OFILES) $(AFILES) all: $(TARGET) clean: - rm -f *.o $(TARGET) *~ core + rm -f *.o $(TARGET) lib*.a *~ core #--------------------------------------------------------------------------- @@ -106,6 +106,9 @@ mesh2GL.o: mesh2GL.c ../Scenery/mesh.h #--------------------------------------------------------------------------- # $Log$ +# Revision 1.15 1997/06/25 15:39:47 curt +# Minor changes to compile with rsxnt/win32. +# # Revision 1.14 1997/06/21 17:52:23 curt # Continue directory shuffling ... everything should be compilable/runnable # again. diff --git a/Scenery/Makefile b/Scenery/Makefile index 081c9ce4c..b0e0e3a87 100644 --- a/Scenery/Makefile +++ b/Scenery/Makefile @@ -49,7 +49,7 @@ $(TARGET): $(OFILES) $(HFILES) $(AR) rv $(TARGET) $(OFILES) clean: - rm -f *.o $(TARGET) *~ core + rm -f *.o $(TARGET) lib*.a *~ core #--------------------------------------------------------------------------- @@ -65,6 +65,9 @@ mesh.o: mesh.c mesh.h common.h #--------------------------------------------------------------------------- # $Log$ +# Revision 1.9 1997/06/25 15:39:48 curt +# Minor changes to compile with rsxnt/win32. +# # Revision 1.8 1997/06/21 17:58:07 curt # directory shuffling ... # diff --git a/Slew/Makefile b/Slew/Makefile index 12f869ec1..6faec02e6 100644 --- a/Slew/Makefile +++ b/Slew/Makefile @@ -50,7 +50,7 @@ $(TARGET): $(OFILES) all: $(TARGET) clean: - rm -f *.o $(TARGET) *~ core + rm -f *.o $(TARGET) lib*.a *~ core #--------------------------------------------------------------------------- @@ -63,6 +63,9 @@ slew.o: slew.c slew.h ../../Aircraft/aircraft.h ../../Controls/controls.h #--------------------------------------------------------------------------- # $Log$ +# Revision 1.3 1997/06/25 15:39:46 curt +# Minor changes to compile with rsxnt/win32. +# # Revision 1.2 1997/06/21 17:12:51 curt # Capitalized subdirectory names. # diff --git a/Time/fg_timer.c b/Time/fg_timer.c index 5e0c7a59a..71a196019 100644 --- a/Time/fg_timer.c +++ b/Time/fg_timer.c @@ -34,8 +34,10 @@ unsigned long int fgSimTime; -static struct itimerval t, ot; -static void (*callbackfunc)(int multi_loop); + +#ifdef HAVE_ITIMER + static struct itimerval t, ot; + static void (*callbackfunc)(int multi_loop); /* This routine catches the SIGALRM */ @@ -78,6 +80,7 @@ void fgTimerInit(float dt, void (*f)()) { } } +#endif HAVE_ITIMER /* This function returns the number of milleseconds since the last time it was called. */ @@ -106,9 +109,12 @@ int fgGetTimeInterval() { /* $Log$ -/* Revision 1.3 1997/06/17 16:52:04 curt -/* Timer interval stuff now uses gettimeofday() instead of ftime() +/* Revision 1.4 1997/06/25 15:39:49 curt +/* Minor changes to compile with rsxnt/win32. /* + * Revision 1.3 1997/06/17 16:52:04 curt + * Timer interval stuff now uses gettimeofday() instead of ftime() + * * Revision 1.2 1997/06/17 03:41:10 curt * Nonsignal based interval timing is now working. * This would be a good time to look at cleaning up the code structure a bit. -- 2.39.2