From acfd549ea77efed25f14c6a8954a3d29fbff6079 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 28 Oct 1997 21:00:20 +0000 Subject: [PATCH] Changing to new terrain format. --- Scenery/Makefile | 29 ++++++++--------------------- Scenery/depend | 24 ++++++++++++------------ Scenery/mesh.c | 11 +++++++---- Scenery/moon.c | 9 ++++++--- Scenery/scenery.c | 17 ++++++++++------- Scenery/stars.c | 11 +++++++---- 6 files changed, 50 insertions(+), 51 deletions(-) diff --git a/Scenery/Makefile b/Scenery/Makefile index 2ea0e869e..604e63c5f 100644 --- a/Scenery/Makefile +++ b/Scenery/Makefile @@ -26,8 +26,8 @@ TARGET = libScenery.a -CFILES = chunkmgr.c common.c geometry.c mesh.c moon.c orbits.c parser.c \ - planets.c scanner.c scenery.c stars.c sun.c +CFILES = common.c geometry.c mesh.c moon.c obj.c orbits.c planets.c \ + scenery.c stars.c sun.c OFILES = $(CFILES:.c=.o) @@ -52,7 +52,6 @@ clean: rm -f *.o $(TARGET) lib*.a *.os2 *~ core realclean: clean - rm -f scanner.c parser.c parser.h parser.output #--------------------------------------------------------------------------- @@ -61,24 +60,6 @@ realclean: clean include depend -scanner.c: scanner.l parser.h - $(FLEX) -oscanner.c scanner.l - -parser.h: parser.y - $(BISON) -o parser.c -d parser.y - -parser.c: parser.y - $(BISON) -o parser.c parser.y - -scanner.o: scanner.c - $(CC) $(CFLAGS) -c scanner.c -o $@ - -parser.o: parser.c - $(CC) $(CFLAGS) -c parser.c -o $@ - -chunkmgr.o: - $(CC) $(CFLAGS) -c chunkmgr.c -o $@ - common.o: $(CC) $(CFLAGS) -c common.c -o $@ @@ -91,6 +72,9 @@ mesh2GL.o: moon.o: $(CC) $(CFLAGS) -c moon.c -o $@ +obj.o: + $(CC) $(CFLAGS) -c obj.c -o $@ + orbits.o: $(CC) $(CFLAGS) -c orbits.c -o $@ @@ -112,6 +96,9 @@ geometry.o: #--------------------------------------------------------------------------- # $Log$ +# Revision 1.23 1997/10/28 21:00:20 curt +# Changing to new terrain format. +# # Revision 1.22 1997/10/25 03:30:07 curt # Misc. tweaks. # diff --git a/Scenery/depend b/Scenery/depend index 8d0fe8a8d..0feaa8bc9 100644 --- a/Scenery/depend +++ b/Scenery/depend @@ -1,4 +1,3 @@ -chunkmgr.o: chunkmgr.c chunkmgr.h mesh.h common.o: common.c common.h geometry.o: geometry.c geometry.h mesh.h mesh.o: mesh.c ../constants.h ../types.h ../Math/fg_geodesy.h \ @@ -7,31 +6,32 @@ mesh.o: mesh.c ../constants.h ../types.h ../Math/fg_geodesy.h \ moon.o: moon.c orbits.h ../Time/fg_time.h ../Time/../types.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/LaRCsim/ls_interface.h \ - ../Time/../Flight/LaRCsim/../flight.h moon.h ../GLUT/views.h \ - ../GLUT/../types.h ../GLUT/../Flight/flight.h ../GLUT/../Math/mat3.h \ + ../Time/../Flight/LaRCsim/../flight.h moon.h ../Main/views.h \ + ../Main/../types.h ../Main/../Flight/flight.h ../Main/../Math/mat3.h \ ../general.h +obj.o: obj.c obj.h orbits.o: orbits.c orbits.h ../Time/fg_time.h ../Time/../types.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/../flight.h ../general.h -parser.o: parser.c parsevrml.h geometry.h common.h mesh.h scenery.h \ - ../types.h planets.o: planets.c ../Time/fg_time.h ../Time/../types.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/../flight.h orbits.h planets.h sun.h -scanner.o: scanner.c parser.h -scenery.o: scenery.c ../general.h scenery.h ../types.h parsevrml.h \ +scenery.o: scenery.c ../general.h moon.h orbits.h ../Time/fg_time.h \ + ../Time/../types.h ../Time/../Flight/flight.h \ + ../Time/../Flight/Slew/slew.h \ + ../Time/../Flight/LaRCsim/ls_interface.h \ + ../Time/../Flight/LaRCsim/../flight.h obj.h scenery.h ../types.h \ stars.h stars.o: stars.c orbits.h ../Time/fg_time.h ../Time/../types.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/../flight.h planets.h stars.h \ - ../constants.h ../general.h ../GLUT/views.h ../GLUT/../types.h \ - ../GLUT/../Flight/flight.h ../GLUT/../Math/mat3.h \ - ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \ - ../Aircraft/../Controls/controls.h \ - ../Aircraft/../Controls/../limits.h + ../constants.h ../general.h ../Aircraft/aircraft.h \ + ../Aircraft/../Flight/flight.h ../Aircraft/../Controls/controls.h \ + ../Aircraft/../Controls/../limits.h ../Main/views.h \ + ../Main/../types.h ../Main/../Flight/flight.h ../Main/../Math/mat3.h sun.o: sun.c ../Time/fg_time.h ../Time/../types.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/LaRCsim/ls_interface.h \ diff --git a/Scenery/mesh.c b/Scenery/mesh.c index 6ff71031e..6b36d36d9 100644 --- a/Scenery/mesh.c +++ b/Scenery/mesh.c @@ -51,7 +51,7 @@ /* Temporary hack until we get the scenery management system running */ -extern GLint mesh_hack; +extern GLint area_terrain; extern struct MESH eg; /* initialize the non-array mesh values */ @@ -161,7 +161,7 @@ void mesh_set_option_value(struct MESH *m, char *value) { /* do whatever needs to be done with the mesh now that it's been loaded, such as generating the OpenGL call list. */ void mesh_do_it(struct MESH *m) { - mesh_hack = mesh_to_OpenGL(m); + area_terrain = mesh_to_OpenGL(m); } @@ -395,9 +395,12 @@ GLint mesh_to_OpenGL(struct MESH *m) { /* $Log$ -/* Revision 1.21 1997/08/27 03:30:27 curt -/* Changed naming scheme of basic shared structures. +/* Revision 1.22 1997/10/28 21:00:21 curt +/* Changing to new terrain format. /* + * Revision 1.21 1997/08/27 03:30:27 curt + * Changed naming scheme of basic shared structures. + * * Revision 1.20 1997/08/19 23:55:08 curt * Worked on better simulating real lighting. * diff --git a/Scenery/moon.c b/Scenery/moon.c index 9b10b3c18..859563a56 100644 --- a/Scenery/moon.c +++ b/Scenery/moon.c @@ -26,8 +26,8 @@ #include "orbits.h" #include "moon.h" +#include "../Main/views.h" #include "../Time/fg_time.h" -#include "../GLUT/views.h" /* #include "../Aircraft/aircraft.h"*/ #include "../general.h" @@ -165,7 +165,10 @@ void fgMoonRender() /* $Log$ -/* Revision 1.1 1997/10/25 03:16:08 curt -/* Initial revision of code contributed by Durk Talsma. +/* Revision 1.2 1997/10/28 21:00:21 curt +/* Changing to new terrain format. /* + * Revision 1.1 1997/10/25 03:16:08 curt + * Initial revision of code contributed by Durk Talsma. + * */ diff --git a/Scenery/scenery.c b/Scenery/scenery.c index c5a354f2b..86a3faf17 100644 --- a/Scenery/scenery.c +++ b/Scenery/scenery.c @@ -35,13 +35,13 @@ #include "../general.h" #include "moon.h" -#include "parsevrml.h" +#include "obj.h" #include "scenery.h" #include "stars.h" /* Temporary hack until we get the scenery management system running */ -GLint mesh_hack; +GLint area_terrain; /* Shared structure to hold current scenery parameters */ @@ -70,18 +70,18 @@ void fgSceneryUpdate(double lon, double lat, double elev) { path[0] = '\0'; strcat(path, g->root_dir); strcat(path, "/Scenery/"); - strcat(path, "mesa-e.wrl"); + strcat(path, "mesa-e.obj"); printf("Loading Scenery: %s\n", path); - fgParseVRML(path); + area_terrain = fgObjLoad(path); } /* Render out the current scene */ void fgSceneryRender() { glPushMatrix(); - glCallList(mesh_hack); + glCallList(area_terrain); glPopMatrix(); fgStarsRender(); @@ -90,9 +90,12 @@ void fgSceneryRender() { /* $Log$ -/* Revision 1.21 1997/10/25 03:24:24 curt -/* Incorporated sun, moon, and star positioning code contributed by Durk Talsma. +/* Revision 1.22 1997/10/28 21:00:22 curt +/* Changing to new terrain format. /* + * Revision 1.21 1997/10/25 03:24:24 curt + * Incorporated sun, moon, and star positioning code contributed by Durk Talsma. + * * Revision 1.20 1997/10/25 03:18:27 curt * Incorporated sun, moon, and planet position and rendering code contributed * by Durk Talsma. diff --git a/Scenery/stars.c b/Scenery/stars.c index a330b068a..a645500c3 100644 --- a/Scenery/stars.c +++ b/Scenery/stars.c @@ -42,8 +42,8 @@ #include "../constants.h" #include "../general.h" -#include "../GLUT/views.h" #include "../Aircraft/aircraft.h" +#include "../Main/views.h" #include "../Time/fg_time.h" @@ -271,10 +271,13 @@ void fgStarsRender() { /* $Log$ -/* Revision 1.13 1997/10/25 03:18:28 curt -/* Incorporated sun, moon, and planet position and rendering code contributed -/* by Durk Talsma. +/* Revision 1.14 1997/10/28 21:00:22 curt +/* Changing to new terrain format. /* + * Revision 1.13 1997/10/25 03:18:28 curt + * Incorporated sun, moon, and planet position and rendering code contributed + * by Durk Talsma. + * * Revision 1.12 1997/09/23 00:29:43 curt * Tweaks to get things to compile with gcc-win32. * -- 2.39.2