]> git.mxchange.org Git - flightgear.git/commitdiff
Changing to new terrain format.
authorcurt <curt>
Tue, 28 Oct 1997 21:00:20 +0000 (21:00 +0000)
committercurt <curt>
Tue, 28 Oct 1997 21:00:20 +0000 (21:00 +0000)
Scenery/Makefile
Scenery/depend
Scenery/mesh.c
Scenery/moon.c
Scenery/scenery.c
Scenery/stars.c

index 2ea0e869e77d46e1c16a35be531c3ae6eb6a5dfd..604e63c5f1858f8f86bc5ddca4a66d93e8b5584e 100644 (file)
@@ -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.
 #
index 8d0fe8a8d512a54a86232002271c3d046f7d2685..0feaa8bc9485e3d6dfa5d8ed0b2a64aded4e6c1c 100644 (file)
@@ -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 \
index 6ff71031ef14a5656789339668e0970a40154263..6b36d36d92314746fb7bfdc7932d6a7f8b7dd64f 100644 (file)
@@ -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.
  *
index 9b10b3c184cb062f8d0b98a0ecdabac8d22e743e..859563a561c2e2040a825d7173bcdca55ac30f4e 100644 (file)
@@ -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.
+ *
  */
index c5a354f2b639c17bb9dbbef4dd62a3fbbdd43b24..86a3faf175a9104b170ef705050ee2be71cb819a 100644 (file)
 #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.
index a330b068a9e64d4546e83ac919ce7c55ffad6a93..a645500c397c0de0a01d215ac724a61163616910 100644 (file)
@@ -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.
  *