]> git.mxchange.org Git - flightgear.git/commitdiff
Continue working on basic features.
authorcurt <curt>
Thu, 8 Jan 1998 02:22:26 +0000 (02:22 +0000)
committercurt <curt>
Thu, 8 Jan 1998 02:22:26 +0000 (02:22 +0000)
Scenery/Makefile
Scenery/depend
Scenery/tilemgr.c
Scenery/tileutils.c
Scenery/tileutils.h

index b5ca96bfe32785ace6e384cffe7633d8fadc5890..84681fb784ac47dcb3c00bc7e87645ee07f174a2 100644 (file)
@@ -26,7 +26,7 @@
 
 TARGET = libScenery.a
 
-CFILES = common.c geometry.c mesh.c obj.c scenery.c
+CFILES = common.c geometry.c mesh.c obj.c scenery.c tilemgr.c tileutils.c
 
 OFILES = $(CFILES:.c=.o)
 
@@ -59,45 +59,33 @@ realclean: clean
 
 include depend
 
-astro.o:
-       $(CC) $(CFLAGS) -c astro.c -o $@
-
 common.o:
        $(CC) $(CFLAGS) -c common.c -o $@
 
+geometry.o:
+       $(CC) $(CFLAGS) -c geometry.c -o $@
+
 mesh.o:
        $(CC) $(CFLAGS) -c mesh.c -o $@
 
-mesh2GL.o:
-       $(CC) $(CFLAGS) -c mesh2GL.c -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 $@
-
-planets.o:
-       $(CC) $(CFLAGS) -c planets.c -o $@
-
 scenery.o:
        $(CC) $(CFLAGS) -c scenery.c -o $@
 
-stars.c:
-       $(CC) $(CFLAGS) -c stars.c -o $@
-
-sun.o:
-       $(CC) $(CFLAGS) -c sun.c -o $@
+tilemgr.o:
+       $(CC) $(CFLAGS) -c tilemgr.c -o $@
 
-geometry.o:
-       $(CC) $(CFLAGS) -c geometry.c -o $@
+tileutils.o:
+       $(CC) $(CFLAGS) -c tileutils.c -o $@
 
 
 #---------------------------------------------------------------------------
 # $Log$
+# Revision 1.28  1998/01/08 02:22:26  curt
+# Continue working on basic features.
+#
 # Revision 1.27  1998/01/07 03:22:28  curt
 # Moved astro stuff to .../Src/Astro/
 #
index f07a0043fb2c42470735d1f7661eb58ec645dc45..8a3a00bb7685acefd83929568a68023c604511b3 100644 (file)
@@ -1,5 +1,3 @@
-areamgr.o: areamgr.c ../XGL/xgl.h ../Include/constants.h \
- ../Math/fg_random.h
 common.o: common.c common.h
 geometry.o: geometry.c geometry.h mesh.h
 mesh.o: mesh.c ../Include/constants.h ../Include/types.h \
@@ -9,3 +7,10 @@ obj.o: obj.c ../XGL/xgl.h obj.h scenery.h ../Include/types.h \
  ../Math/mat3.h
 scenery.o: scenery.c ../XGL/xgl.h ../Include/general.h obj.h scenery.h \
  ../Include/types.h
+tilemgr.o: tilemgr.c ../XGL/xgl.h tileutils.h ../Aircraft/aircraft.h \
+ ../Aircraft/../Flight/flight.h ../Aircraft/../Flight/Slew/slew.h \
+ ../Aircraft/../Flight/LaRCsim/ls_interface.h \
+ ../Aircraft/../Flight/LaRCsim/../flight.h \
+ ../Aircraft/../Controls/controls.h \
+ ../Aircraft/../Controls/../Include/limits.h
+tileutils.o: tileutils.c tileutils.h ../Include/constants.h
index d2ce0b3593d830f350add650383a0a6612219361..ab5ce1fb9b5d6bf6f389d08c14d30fa9e3e03e29 100644 (file)
@@ -34,6 +34,7 @@
 #include "tileutils.h"
 
 #include "../Aircraft/aircraft.h"
+#include "../Include/constants.h"
 
 
 /* here's where we keep the array of closest (potentially viewable) tiles */
@@ -55,15 +56,20 @@ void fgTileMgrUpdate() {
 
     f = &current_aircraft.flight;
 
-    find_bucket(FG_Longitude, FG_Latitude, &p);
+    find_bucket(FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG, &p);
+    printf("Updating Tile list for %d,%d %d,%d\n", p.lon, p.lat, p.x, p.y);
+
     gen_idx_array(&p, tile, 7, 7);
 }
 
 
 /* $Log$
-/* Revision 1.1  1998/01/07 23:50:51  curt
-/* "area" renamed to "tile"
+/* Revision 1.2  1998/01/08 02:22:27  curt
+/* Continue working on basic features.
 /*
+ * Revision 1.1  1998/01/07 23:50:51  curt
+ * "area" renamed to "tile"
+ *
  * Revision 1.2  1998/01/07 03:29:29  curt
  * Given an arbitrary lat/lon, we can now:
  *   generate a unique index for the chunk containing the lat/lon
index c4ac1eee114c2aafc13cbfe2b0908d1f7ed64ea5..358f48c299d66b6be2d98455d99666ff556866ff 100644 (file)
@@ -208,7 +208,7 @@ void find_bucket(double lon, double lat, struct bucket *p) {
 
 
 /* Given a lat/lon, fill in the local tile index array */
-void gen_idx_array(struct bucket *p1, long int *tile, 
+void gen_idx_array(struct bucket *p1, long int *tiles
                          int width, int height) {
     struct bucket p2;
     int dw, dh, i, j;
@@ -218,9 +218,9 @@ void gen_idx_array(struct bucket *p1, long int *tile,
     for ( j = 0; j < height; j++ ) {
        for ( i = 0; i < width; i++ ) {
            offset_bucket(p1, &p2, i - dw, j - dh);
-           tile[(j*width)+i] = gen_index(&p2);
+           tiles[(j*width)+i] = gen_index(&p2);
            printf("  bucket = %d %d %d %d  index = %ld\n", 
-                  p2.lon, p2.lat, p2.x, p2.y, tile[(j*width)+i]);
+                  p2.lon, p2.lat, p2.x, p2.y, tiles[(j*width)+i]);
        }
     }
 }
@@ -268,9 +268,12 @@ int main() {
 
 
 /* $Log$
-/* Revision 1.1  1998/01/07 23:50:52  curt
-/* "area" renamed to "tile"
+/* Revision 1.2  1998/01/08 02:22:28  curt
+/* Continue working on basic features.
 /*
+ * Revision 1.1  1998/01/07 23:50:52  curt
+ * "area" renamed to "tile"
+ *
  * Revision 1.1  1998/01/07 23:23:40  curt
  * Initial revision.
  *
index 14374c5a3f6d24a8697fee3e446bd3575b000cdf..d78fbace1f6896c281c0d697373828621303bfe5 100644 (file)
@@ -65,14 +65,17 @@ void find_bucket(double lon, double lat, struct bucket *p);
 
 
 /* Given a lat/lon, fill in the local tile index array */
-void gen_idx_array(struct bucket *p1, long int *tile, 
+void gen_idx_array(struct bucket *p1, long int *tiles
                          int width, int height);
 
 
 /* $Log$
-/* Revision 1.1  1998/01/07 23:50:52  curt
-/* "area" renamed to "tile"
+/* Revision 1.2  1998/01/08 02:22:28  curt
+/* Continue working on basic features.
 /*
+ * Revision 1.1  1998/01/07 23:50:52  curt
+ * "area" renamed to "tile"
+ *
  * Revision 1.1  1998/01/07 23:23:40  curt
  * Initial revision.
  *