Changing to new terrain format.
This commit is contained in:
parent
9c896fd77a
commit
acfd549ea7
6 changed files with 50 additions and 51 deletions
|
@ -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.
|
||||
#
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue