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)
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/
#
-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 \
../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
#include "tileutils.h"
#include "../Aircraft/aircraft.h"
+#include "../Include/constants.h"
/* here's where we keep the array of closest (potentially viewable) tiles */
f = ¤t_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
/* 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;
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]);
}
}
}
/* $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.
*
/* 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.
*