]> git.mxchange.org Git - flightgear.git/blob - Scenery/tilemgr.c
"area" renamed to "tile"
[flightgear.git] / Scenery / tilemgr.c
1 /**************************************************************************
2  * tilemgr.c -- routines to handle dynamic management of scenery tiles
3  *
4  * Written by Curtis Olson, started January 1998.
5  *
6  * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  * $Id$
23  * (Log is kept at end of this file)
24  **************************************************************************/
25
26
27 #ifdef WIN32
28 #  include <windows.h>
29 #endif
30
31 #include <GL/glut.h>
32 #include "../XGL/xgl.h"
33
34 #include "tileutils.h"
35
36 #include "../Aircraft/aircraft.h"
37
38
39 /* here's where we keep the array of closest (potentially viewable) tiles */
40 static long int tile[49];
41
42
43 /* Initialize the Tile Manager subsystem */
44 void fgTileMgrInit() {
45     printf("Initializing Tile Manager subsystem.\n");
46     /* fgTileCacheInit(); */
47 }
48
49
50 /* given the current lon/lat, fill in the array of local chunks.  If
51  * the chunk isn't already in the cache, then read it from disk. */
52 void fgTileMgrUpdate() {
53     struct fgFLIGHT *f;
54     struct bucket p;
55
56     f = &current_aircraft.flight;
57
58     find_bucket(FG_Longitude, FG_Latitude, &p);
59     gen_idx_array(&p, tile, 7, 7);
60 }
61
62
63 /* $Log$
64 /* Revision 1.1  1998/01/07 23:50:51  curt
65 /* "area" renamed to "tile"
66 /*
67  * Revision 1.2  1998/01/07 03:29:29  curt
68  * Given an arbitrary lat/lon, we can now:
69  *   generate a unique index for the chunk containing the lat/lon
70  *   generate a path name to the chunk file
71  *   build a list of the indexes of all the nearby areas.
72  *
73  * Revision 1.1  1998/01/07 02:05:48  curt
74  * Initial revision.
75  * */
76
77