1
0
Fork 0

Changing to new terrain format.

This commit is contained in:
curt 1997-10-28 21:00:20 +00:00
parent 9c896fd77a
commit acfd549ea7
6 changed files with 50 additions and 51 deletions

View file

@ -26,8 +26,8 @@
TARGET = libScenery.a TARGET = libScenery.a
CFILES = chunkmgr.c common.c geometry.c mesh.c moon.c orbits.c parser.c \ CFILES = common.c geometry.c mesh.c moon.c obj.c orbits.c planets.c \
planets.c scanner.c scenery.c stars.c sun.c scenery.c stars.c sun.c
OFILES = $(CFILES:.c=.o) OFILES = $(CFILES:.c=.o)
@ -52,7 +52,6 @@ clean:
rm -f *.o $(TARGET) lib*.a *.os2 *~ core rm -f *.o $(TARGET) lib*.a *.os2 *~ core
realclean: clean realclean: clean
rm -f scanner.c parser.c parser.h parser.output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -61,24 +60,6 @@ realclean: clean
include depend 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: common.o:
$(CC) $(CFLAGS) -c common.c -o $@ $(CC) $(CFLAGS) -c common.c -o $@
@ -91,6 +72,9 @@ mesh2GL.o:
moon.o: moon.o:
$(CC) $(CFLAGS) -c moon.c -o $@ $(CC) $(CFLAGS) -c moon.c -o $@
obj.o:
$(CC) $(CFLAGS) -c obj.c -o $@
orbits.o: orbits.o:
$(CC) $(CFLAGS) -c orbits.c -o $@ $(CC) $(CFLAGS) -c orbits.c -o $@
@ -112,6 +96,9 @@ geometry.o:
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# $Log$ # $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 # Revision 1.22 1997/10/25 03:30:07 curt
# Misc. tweaks. # Misc. tweaks.
# #

View file

@ -1,4 +1,3 @@
chunkmgr.o: chunkmgr.c chunkmgr.h mesh.h
common.o: common.c common.h common.o: common.c common.h
geometry.o: geometry.c geometry.h mesh.h geometry.o: geometry.c geometry.h mesh.h
mesh.o: mesh.c ../constants.h ../types.h ../Math/fg_geodesy.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 \ moon.o: moon.c orbits.h ../Time/fg_time.h ../Time/../types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h moon.h ../GLUT/views.h \ ../Time/../Flight/LaRCsim/../flight.h moon.h ../Main/views.h \
../GLUT/../types.h ../GLUT/../Flight/flight.h ../GLUT/../Math/mat3.h \ ../Main/../types.h ../Main/../Flight/flight.h ../Main/../Math/mat3.h \
../general.h ../general.h
obj.o: obj.c obj.h
orbits.o: orbits.c orbits.h ../Time/fg_time.h ../Time/../types.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/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h ../general.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 \ planets.o: planets.c ../Time/fg_time.h ../Time/../types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h orbits.h planets.h sun.h ../Time/../Flight/LaRCsim/../flight.h orbits.h planets.h sun.h
scanner.o: scanner.c parser.h scenery.o: scenery.c ../general.h moon.h orbits.h ../Time/fg_time.h \
scenery.o: scenery.c ../general.h scenery.h ../types.h parsevrml.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.h
stars.o: stars.c orbits.h ../Time/fg_time.h ../Time/../types.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/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h planets.h stars.h \ ../Time/../Flight/LaRCsim/../flight.h planets.h stars.h \
../constants.h ../general.h ../GLUT/views.h ../GLUT/../types.h \ ../constants.h ../general.h ../Aircraft/aircraft.h \
../GLUT/../Flight/flight.h ../GLUT/../Math/mat3.h \ ../Aircraft/../Flight/flight.h ../Aircraft/../Controls/controls.h \
../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \ ../Aircraft/../Controls/../limits.h ../Main/views.h \
../Aircraft/../Controls/controls.h \ ../Main/../types.h ../Main/../Flight/flight.h ../Main/../Math/mat3.h
../Aircraft/../Controls/../limits.h
sun.o: sun.c ../Time/fg_time.h ../Time/../types.h \ sun.o: sun.c ../Time/fg_time.h ../Time/../types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \ ../Time/../Flight/LaRCsim/ls_interface.h \

View file

@ -51,7 +51,7 @@
/* Temporary hack until we get the scenery management system running */ /* Temporary hack until we get the scenery management system running */
extern GLint mesh_hack; extern GLint area_terrain;
extern struct MESH eg; extern struct MESH eg;
/* initialize the non-array mesh values */ /* 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 /* do whatever needs to be done with the mesh now that it's been
loaded, such as generating the OpenGL call list. */ loaded, such as generating the OpenGL call list. */
void mesh_do_it(struct MESH *m) { 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$ /* $Log$
/* Revision 1.21 1997/08/27 03:30:27 curt /* Revision 1.22 1997/10/28 21:00:21 curt
/* Changed naming scheme of basic shared structures. /* 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 * Revision 1.20 1997/08/19 23:55:08 curt
* Worked on better simulating real lighting. * Worked on better simulating real lighting.
* *

View file

@ -26,8 +26,8 @@
#include "orbits.h" #include "orbits.h"
#include "moon.h" #include "moon.h"
#include "../Main/views.h"
#include "../Time/fg_time.h" #include "../Time/fg_time.h"
#include "../GLUT/views.h"
/* #include "../Aircraft/aircraft.h"*/ /* #include "../Aircraft/aircraft.h"*/
#include "../general.h" #include "../general.h"
@ -165,7 +165,10 @@ void fgMoonRender()
/* $Log$ /* $Log$
/* Revision 1.1 1997/10/25 03:16:08 curt /* Revision 1.2 1997/10/28 21:00:21 curt
/* Initial revision of code contributed by Durk Talsma. /* Changing to new terrain format.
/* /*
* Revision 1.1 1997/10/25 03:16:08 curt
* Initial revision of code contributed by Durk Talsma.
*
*/ */

View file

@ -35,13 +35,13 @@
#include "../general.h" #include "../general.h"
#include "moon.h" #include "moon.h"
#include "parsevrml.h" #include "obj.h"
#include "scenery.h" #include "scenery.h"
#include "stars.h" #include "stars.h"
/* Temporary hack until we get the scenery management system running */ /* Temporary hack until we get the scenery management system running */
GLint mesh_hack; GLint area_terrain;
/* Shared structure to hold current scenery parameters */ /* Shared structure to hold current scenery parameters */
@ -70,18 +70,18 @@ void fgSceneryUpdate(double lon, double lat, double elev) {
path[0] = '\0'; path[0] = '\0';
strcat(path, g->root_dir); strcat(path, g->root_dir);
strcat(path, "/Scenery/"); strcat(path, "/Scenery/");
strcat(path, "mesa-e.wrl"); strcat(path, "mesa-e.obj");
printf("Loading Scenery: %s\n", path); printf("Loading Scenery: %s\n", path);
fgParseVRML(path); area_terrain = fgObjLoad(path);
} }
/* Render out the current scene */ /* Render out the current scene */
void fgSceneryRender() { void fgSceneryRender() {
glPushMatrix(); glPushMatrix();
glCallList(mesh_hack); glCallList(area_terrain);
glPopMatrix(); glPopMatrix();
fgStarsRender(); fgStarsRender();
@ -90,9 +90,12 @@ void fgSceneryRender() {
/* $Log$ /* $Log$
/* Revision 1.21 1997/10/25 03:24:24 curt /* Revision 1.22 1997/10/28 21:00:22 curt
/* Incorporated sun, moon, and star positioning code contributed by Durk Talsma. /* 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 * Revision 1.20 1997/10/25 03:18:27 curt
* Incorporated sun, moon, and planet position and rendering code contributed * Incorporated sun, moon, and planet position and rendering code contributed
* by Durk Talsma. * by Durk Talsma.

View file

@ -42,8 +42,8 @@
#include "../constants.h" #include "../constants.h"
#include "../general.h" #include "../general.h"
#include "../GLUT/views.h"
#include "../Aircraft/aircraft.h" #include "../Aircraft/aircraft.h"
#include "../Main/views.h"
#include "../Time/fg_time.h" #include "../Time/fg_time.h"
@ -271,10 +271,13 @@ void fgStarsRender() {
/* $Log$ /* $Log$
/* Revision 1.13 1997/10/25 03:18:28 curt /* Revision 1.14 1997/10/28 21:00:22 curt
/* Incorporated sun, moon, and planet position and rendering code contributed /* Changing to new terrain format.
/* by Durk Talsma.
/* /*
* 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 * Revision 1.12 1997/09/23 00:29:43 curt
* Tweaks to get things to compile with gcc-win32. * Tweaks to get things to compile with gcc-win32.
* *