1 // views.cxx -- data structures and routines for managing and view
4 // Written by Curtis Olson, started August 1997.
6 // Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
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.
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.
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.
23 // (Log is kept at end of this file)
30 #include <Debug/fg_debug.h>
31 #include <Flight/flight.h>
32 #include <Include/fg_constants.h>
33 #include <Math/mat3.h>
34 #include <Math/polar3d.hxx>
35 #include <Math/vector.hxx>
36 #include <Scenery/scenery.hxx>
37 #include <Time/fg_time.hxx>
39 #include "options.hxx"
43 // This is a record containing current view parameters
48 fgVIEW::fgVIEW( void ) {
52 // Initialize a view structure
53 void fgVIEW::Init( void ) {
54 fgPrintf( FG_VIEW, FG_INFO, "Initializing View parameters\n");
57 goal_view_offset = 0.0;
59 winWidth = 640; // FG_DEFAULT_WIN_WIDTH
60 winHeight = 480; // FG_DEFAULT_WIN_HEIGHT
61 win_ratio = (double) winWidth / (double) winHeight;
66 // Update the field of view parameters
67 void fgVIEW::UpdateFOV( fgOPTIONS *o ) {
68 double theta_x, theta_y;
70 // printf("win_ratio = %.2f\n", win_ratio);
71 // calculate sin() and cos() of fov / 2 in X direction;
72 theta_x = (o->fov * win_ratio * DEG_TO_RAD) / 2.0;
73 // printf("theta_x = %.2f\n", theta_x);
74 sin_fov_x = sin(theta_x);
75 cos_fov_x = cos(theta_x);
76 slope_x = - cos_fov_x / sin_fov_x;
77 // printf("slope_x = %.2f\n", slope_x);
79 // calculate sin() and cos() of fov / 2 in Y direction;
80 theta_y = (o->fov * DEG_TO_RAD) / 2.0;
81 // printf("theta_y = %.2f\n", theta_y);
82 sin_fov_y = sin(theta_y);
83 cos_fov_y = cos(theta_y);
84 slope_y = cos_fov_y / sin_fov_y;
85 // printf("slope_y = %.2f\n", slope_y);
89 // Update the view parameters
90 void fgVIEW::Update( fgFLIGHT *f ) {
93 MAT3vec vec, forward, v0, minus_z;
94 MAT3mat R, TMP, UP, LOCAL, VIEW;
99 if(update_fov == TRUE) {
100 // printf("Updating fov\n");
105 scenery.center.x = scenery.next_center.x;
106 scenery.center.y = scenery.next_center.y;
107 scenery.center.z = scenery.next_center.z;
109 // printf("scenery center = %.2f %.2f %.2f\n", scenery.center.x,
110 // scenery.center.y, scenery.center.z);
112 // calculate the cartesion coords of the current lat/lon/0 elev
113 p.lon = FG_Longitude;
114 p.lat = FG_Lat_geocentric;
115 p.radius = FG_Sea_level_radius * FEET_TO_METER;
117 cur_zero_elev = fgPolarToCart3d(p);
119 cur_zero_elev.x -= scenery.center.x;
120 cur_zero_elev.y -= scenery.center.y;
121 cur_zero_elev.z -= scenery.center.z;
123 // calculate view position in current FG view coordinate system
124 // p.lon & p.lat are already defined earlier, p.radius was set to
125 // the sea level radius, so now we add in our altitude.
126 if ( FG_Altitude * FEET_TO_METER >
127 (scenery.cur_elev + 3.758099 * METER_TO_FEET) ) {
128 p.radius += FG_Altitude * FEET_TO_METER;
130 p.radius += scenery.cur_elev + 3.758099 * METER_TO_FEET;
133 abs_view_pos = fgPolarToCart3d(p);
135 view_pos.x = abs_view_pos.x - scenery.center.x;
136 view_pos.y = abs_view_pos.y - scenery.center.y;
137 view_pos.z = abs_view_pos.z - scenery.center.z;
139 fgPrintf( FG_VIEW, FG_DEBUG, "Absolute view pos = %.4f, %.4f, %.4f\n",
140 abs_view_pos.x, abs_view_pos.y, abs_view_pos.z);
141 fgPrintf( FG_VIEW, FG_DEBUG, "Relative view pos = %.4f, %.4f, %.4f\n",
142 view_pos.x, view_pos.y, view_pos.z);
144 // Derive the LOCAL aircraft rotation matrix (roll, pitch, yaw)
145 // from FG_T_local_to_body[3][3]
147 // Question: Why is the LaRCsim matrix arranged so differently
148 // than the one we need???
149 LOCAL[0][0] = FG_T_local_to_body_33;
150 LOCAL[0][1] = -FG_T_local_to_body_32;
151 LOCAL[0][2] = -FG_T_local_to_body_31;
153 LOCAL[1][0] = -FG_T_local_to_body_23;
154 LOCAL[1][1] = FG_T_local_to_body_22;
155 LOCAL[1][2] = FG_T_local_to_body_21;
157 LOCAL[2][0] = -FG_T_local_to_body_13;
158 LOCAL[2][1] = FG_T_local_to_body_12;
159 LOCAL[2][2] = FG_T_local_to_body_11;
161 LOCAL[3][0] = LOCAL[3][1] = LOCAL[3][2] = LOCAL[3][3] = 0.0;
163 // printf("LaRCsim LOCAL matrix\n");
164 // MAT3print(LOCAL, stdout);
166 #ifdef OLD_LOCAL_TO_BODY_CODE
167 // old code to calculate LOCAL matrix calculated from Phi,
168 // Theta, and Psi (roll, pitch, yaw)
170 MAT3_SET_VEC(vec, 0.0, 0.0, 1.0);
171 MAT3rotate(R, vec, FG_Phi);
172 /* printf("Roll matrix\n"); */
173 /* MAT3print(R, stdout); */
175 MAT3_SET_VEC(vec, 0.0, 1.0, 0.0);
176 /* MAT3mult_vec(vec, vec, R); */
177 MAT3rotate(TMP, vec, FG_Theta);
178 /* printf("Pitch matrix\n"); */
179 /* MAT3print(TMP, stdout); */
182 MAT3_SET_VEC(vec, 1.0, 0.0, 0.0);
183 /* MAT3mult_vec(vec, vec, R); */
184 /* MAT3rotate(TMP, vec, FG_Psi - FG_PI_2); */
185 MAT3rotate(TMP, vec, -FG_Psi);
186 /* printf("Yaw matrix\n");
187 MAT3print(TMP, stdout); */
188 MAT3mult(LOCAL, R, TMP);
189 // printf("FG derived LOCAL matrix\n");
190 // MAT3print(LOCAL, stdout);
191 #endif // OLD_LOCAL_TO_BODY_CODE
193 // Derive the local UP transformation matrix based on *geodetic*
195 MAT3_SET_VEC(vec, 0.0, 0.0, 1.0);
196 MAT3rotate(R, vec, FG_Longitude); // R = rotate about Z axis
197 // printf("Longitude matrix\n");
198 // MAT3print(R, stdout);
200 MAT3_SET_VEC(vec, 0.0, 1.0, 0.0);
201 MAT3mult_vec(vec, vec, R);
202 MAT3rotate(TMP, vec, -FG_Latitude); // TMP = rotate about X axis
203 // printf("Latitude matrix\n");
204 // MAT3print(TMP, stdout);
206 MAT3mult(UP, R, TMP);
207 // printf("Local up matrix\n");
208 // MAT3print(UP, stdout);
210 MAT3_SET_VEC(local_up, 1.0, 0.0, 0.0);
211 MAT3mult_vec(local_up, local_up, UP);
213 // printf( "Local Up = (%.4f, %.4f, %.4f)\n",
214 // local_up[0], local_up[1], local_up[2]);
216 // Alternative method to Derive local up vector based on
217 // *geodetic* coordinates
218 // alt_up = fgPolarToCart(FG_Longitude, FG_Latitude, 1.0);
219 // printf( " Alt Up = (%.4f, %.4f, %.4f)\n",
220 // alt_up.x, alt_up.y, alt_up.z);
222 // Calculate the VIEW matrix
223 MAT3mult(VIEW, LOCAL, UP);
224 // printf("VIEW matrix\n");
225 // MAT3print(VIEW, stdout);
227 // generate the current up, forward, and fwrd-view vectors
228 MAT3_SET_VEC(vec, 1.0, 0.0, 0.0);
229 MAT3mult_vec(view_up, vec, VIEW);
231 MAT3_SET_VEC(vec, 0.0, 0.0, 1.0);
232 MAT3mult_vec(forward, vec, VIEW);
233 // printf( "Forward vector is (%.2f,%.2f,%.2f)\n", forward[0], forward[1],
236 MAT3rotate(TMP, view_up, view_offset);
237 MAT3mult_vec(view_forward, forward, TMP);
239 // make a vector to the current view position
240 MAT3_SET_VEC(v0, view_pos.x, view_pos.y, view_pos.z);
242 // Given a vector pointing straight down (-Z), map into onto the
243 // local plane representing "horizontal". This should give us the
244 // local direction for moving "south".
245 MAT3_SET_VEC(minus_z, 0.0, 0.0, -1.0);
246 map_vec_onto_cur_surface_plane(local_up, v0, minus_z, surface_south);
247 MAT3_NORMALIZE_VEC(surface_south, ntmp);
248 // printf( "Surface direction directly south %.2f %.2f %.2f\n",
249 // surface_south[0], surface_south[1], surface_south[2]);
251 // now calculate the surface east vector
252 MAT3rotate(TMP, view_up, FG_PI_2);
253 MAT3mult_vec(surface_east, surface_south, TMP);
254 // printf( "Surface direction directly east %.2f %.2f %.2f\n",
255 // surface_east[0], surface_east[1], surface_east[2]);
256 // printf( "Should be close to zero = %.2f\n",
257 // MAT3_DOT_PRODUCT(surface_south, surface_east));
261 // Update the "World to Eye" transformation matrix
262 // This is most useful for view frustum culling
263 void fgVIEW::UpdateWorldToEye( fgFLIGHT *f ) {
264 MAT3mat R_Phi, R_Theta, R_Psi, R_Lat, R_Lon, T_view;
268 // if we have a view offset use slow way for now
269 if(fabs(view_offset)>FG_EPSILON){
271 MAT3_SET_HVEC(vec, 0.0, 0.0, -1.0, 1.0);
272 MAT3rotate(R_Phi, vec, FG_Phi);
273 // printf("Roll matrix (Phi)\n");
274 // MAT3print(R_Phi, stdout);
277 MAT3_SET_HVEC(vec, 1.0, 0.0, 0.0, 1.0);
278 MAT3rotate(R_Theta, vec, FG_Theta);
279 // printf("\nPitch matrix (Theta)\n");
280 // MAT3print(R_Theta, stdout);
283 MAT3_SET_HVEC(vec, 0.0, -1.0, 0.0, 1.0);
284 MAT3rotate(R_Psi, vec, FG_Psi + FG_PI - view_offset );
285 // printf("\nYaw matrix (Psi)\n");
286 // MAT3print(R_Psi, stdout);
288 // aircraft roll/pitch/yaw
289 MAT3mult(TMP, R_Phi, R_Theta);
290 MAT3mult(AIRCRAFT, TMP, R_Psi);
292 } else { // JUST USE LOCAL_TO_BODY NHV 5/25/98
293 // hey this is even different then LOCAL[][] above ??
295 AIRCRAFT[0][0] = -FG_T_local_to_body_22;
296 AIRCRAFT[0][1] = -FG_T_local_to_body_23;
297 AIRCRAFT[0][2] = FG_T_local_to_body_21;
298 AIRCRAFT[0][3] = 0.0;
299 AIRCRAFT[1][0] = FG_T_local_to_body_32;
300 AIRCRAFT[1][1] = FG_T_local_to_body_33;
301 AIRCRAFT[1][2] = -FG_T_local_to_body_31;
302 AIRCRAFT[1][3] = 0.0;
303 AIRCRAFT[2][0] = FG_T_local_to_body_12;
304 AIRCRAFT[2][1] = FG_T_local_to_body_13;
305 AIRCRAFT[2][2] = -FG_T_local_to_body_11;
306 AIRCRAFT[2][3] = 0.0;
307 AIRCRAFT[3][0] = AIRCRAFT[3][1] = AIRCRAFT[3][2] = AIRCRAFT[3][3] = 0.0;
308 AIRCRAFT[3][3] = 1.0;
310 // ??? SOMETHING LIKE THIS SHOULD WORK NHV
311 // Rotate about LOCAL_UP (AIRCRAFT[2][])
312 // MAT3_SET_HVEC(vec, AIRCRAFT[2][0], AIRCRAFT[2][1],
313 // AIRCRAFT[2][2], AIRCRAFT[2][3]);
314 // MAT3rotate(TMP, vec, FG_PI - view_offset );
315 // MAT3mult(AIRCRAFT, AIRCRAFT, TMP);
317 // printf("\naircraft roll pitch yaw\n");
318 // MAT3print(AIRCRAFT, stdout);
320 // View position in scenery centered coordinates
321 MAT3_SET_HVEC(vec, view_pos.x, view_pos.y, view_pos.z, 1.0);
322 MAT3translate(T_view, vec);
323 // printf("\nTranslation matrix\n");
324 // MAT3print(T_view, stdout);
327 MAT3_SET_HVEC(vec, 1.0, 0.0, 0.0, 1.0);
328 // R_Lat = rotate about X axis
329 MAT3rotate(R_Lat, vec, FG_Latitude);
330 // printf("\nLatitude matrix\n");
331 // MAT3print(R_Lat, stdout);
334 MAT3_SET_HVEC(vec, 0.0, 0.0, 1.0, 1.0);
335 // R_Lon = rotate about Z axis
336 MAT3rotate(R_Lon, vec, FG_Longitude - FG_PI_2 );
337 // printf("\nLongitude matrix\n");
338 // MAT3print(R_Lon, stdout);
340 #ifdef THIS_IS_OLD_CODE
341 // View position in scenery centered coordinates
342 MAT3_SET_HVEC(vec, view_pos.x, view_pos.y, view_pos.z, 1.0);
343 MAT3translate(T_view, vec);
344 // printf("\nTranslation matrix\n");
345 // MAT3print(T_view, stdout);
347 // aircraft roll/pitch/yaw
348 MAT3mult(TMP, R_Phi, R_Theta);
349 MAT3mult(AIRCRAFT, TMP, R_Psi);
350 // printf("\naircraft roll pitch yaw\n");
351 // MAT3print(AIRCRAFT, stdout);
352 #endif THIS_IS_OLD_CODE
355 MAT3mult(WORLD, R_Lat, R_Lon);
356 // printf("\nworld\n");
357 // MAT3print(WORLD, stdout);
359 MAT3mult(EYE_TO_WORLD, AIRCRAFT, WORLD);
360 MAT3mult(EYE_TO_WORLD, EYE_TO_WORLD, T_view);
361 // printf("\nEye to world\n");
362 // MAT3print(EYE_TO_WORLD, stdout);
364 MAT3invert(WORLD_TO_EYE, EYE_TO_WORLD);
365 // printf("\nWorld to eye\n");
366 // MAT3print(WORLD_TO_EYE, stdout);
368 // printf( "\nview_pos = %.2f %.2f %.2f\n",
369 // view_pos.x, view_pos.y, view_pos.z );
371 // MAT3_SET_HVEC(eye, 0.0, 0.0, 0.0, 1.0);
372 // MAT3mult_vec(vec, eye, EYE_TO_WORLD);
373 // printf("\neye -> world = %.2f %.2f %.2f\n", vec[0], vec[1], vec[2]);
375 // MAT3_SET_HVEC(vec1, view_pos.x, view_pos.y, view_pos.z, 1.0);
376 // MAT3mult_vec(vec, vec1, WORLD_TO_EYE);
377 // printf( "\nabs_view_pos -> eye = %.2f %.2f %.2f\n",
378 // vec[0], vec[1], vec[2]);
383 fgVIEW::~fgVIEW( void ) {
387 // Basically, this is a modified version of the Mesa gluLookAt()
388 // function that's been modified slightly so we can capture the result
389 // before sending it off to OpenGL land.
390 void fg_gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
391 GLdouble centerx, GLdouble centery, GLdouble centerz,
392 GLdouble upx, GLdouble upy, GLdouble upz )
395 GLdouble x[3], y[3], z[3];
398 m = current_view.MODEL_VIEW;
400 /* Make rotation matrix */
403 z[0] = eyex - centerx;
404 z[1] = eyey - centery;
405 z[2] = eyez - centerz;
406 mag = sqrt( z[0]*z[0] + z[1]*z[1] + z[2]*z[2] );
407 if (mag) { /* mpichler, 19950515 */
418 /* X vector = Y cross Z */
419 x[0] = y[1]*z[2] - y[2]*z[1];
420 x[1] = -y[0]*z[2] + y[2]*z[0];
421 x[2] = y[0]*z[1] - y[1]*z[0];
423 /* Recompute Y = Z cross X */
424 y[0] = z[1]*x[2] - z[2]*x[1];
425 y[1] = -z[0]*x[2] + z[2]*x[0];
426 y[2] = z[0]*x[1] - z[1]*x[0];
428 /* mpichler, 19950515 */
429 /* cross product gives area of parallelogram, which is < 1.0 for
430 * non-perpendicular unit-length vectors; so normalize x, y here
433 mag = sqrt( x[0]*x[0] + x[1]*x[1] + x[2]*x[2] );
440 mag = sqrt( y[0]*y[0] + y[1]*y[1] + y[2]*y[2] );
447 #define M(row,col) m[col*4+row]
448 M(0,0) = x[0]; M(0,1) = x[1]; M(0,2) = x[2]; M(0,3) = 0.0;
449 M(1,0) = y[0]; M(1,1) = y[1]; M(1,2) = y[2]; M(1,3) = 0.0;
450 M(2,0) = z[0]; M(2,1) = z[1]; M(2,2) = z[2]; M(2,3) = 0.0;
451 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;
454 // Translate Eye to Origin
455 // replaces: glTranslated( -eyex, -eyey, -eyez );
456 m[12] = m[0] * -eyex + m[4] * -eyey + m[8] * -eyez + m[12];
457 m[13] = m[1] * -eyex + m[5] * -eyey + m[9] * -eyez + m[13];
458 m[14] = m[2] * -eyex + m[6] * -eyey + m[10] * -eyez + m[14];
459 m[15] = m[3] * -eyex + m[7] * -eyey + m[11] * -eyez + m[15];
461 // xglMultMatrixd( m );
467 // Revision 1.15 1998/07/12 03:14:43 curt
468 // Added ground collision detection.
469 // Did some serious horsing around to be able to "hug" the ground properly
470 // and still be able to take off.
471 // Set the near clip plane to 1.0 meters when less than 10 meters above the
473 // Did some serious horsing around getting the initial airplane position to be
474 // correct based on rendered terrain elevation.
475 // Added a little cheat/hack that will prevent the view position from ever
476 // dropping below the terrain, even when the flight model doesn't quite
477 // put you as high as you'd like.
479 // Revision 1.14 1998/07/08 14:45:08 curt
480 // polar3d.h renamed to polar3d.hxx
481 // vector.h renamed to vector.hxx
482 // updated audio support so it waits to create audio classes (and tie up
483 // /dev/dsp) until the mpg123 player is finished.
485 // Revision 1.13 1998/07/04 00:52:27 curt
486 // Add my own version of gluLookAt() (which is nearly identical to the
487 // Mesa/glu version.) But, by calculating the Model View matrix our selves
488 // we can save this matrix without having to read it back in from the video
489 // card. This hopefully allows us to save a few cpu cycles when rendering
490 // out the fragments because we can just use glLoadMatrixd() with the
491 // precalculated matrix for each tile rather than doing a push(), translate(),
492 // pop() for every fragment.
494 // Panel status defaults to off for now until it gets a bit more developed.
496 // Extract OpenGL driver info on initialization.
498 // Revision 1.12 1998/06/03 00:47:15 curt
499 // Updated to compile in audio support if OSS available.
500 // Updated for new version of Steve's audio library.
501 // STL includes don't use .h
502 // Small view optimizations.
504 // Revision 1.11 1998/05/27 02:24:05 curt
505 // View optimizations by Norman Vine.
507 // Revision 1.10 1998/05/17 16:59:03 curt
508 // First pass at view frustum culling now operational.
510 // Revision 1.9 1998/05/16 13:08:37 curt
511 // C++ - ified views.[ch]xx
512 // Shuffled some additional view parameters into the fgVIEW class.
513 // Changed tile-radius to tile-diameter because it is a much better
515 // Added a WORLD_TO_EYE transformation to views.cxx. This allows us
516 // to transform world space to eye space for view frustum culling.
518 // Revision 1.8 1998/05/02 01:51:01 curt
519 // Updated polartocart conversion routine.
521 // Revision 1.7 1998/04/30 12:34:20 curt
522 // Added command line rendering options:
523 // enable/disable fog/haze
524 // specify smooth/flat shading
525 // disable sky blending and just use a solid color
526 // enable wireframe drawing mode
528 // Revision 1.6 1998/04/28 01:20:23 curt
529 // Type-ified fgTIME and fgVIEW.
530 // Added a command line option to disable textures.
532 // Revision 1.5 1998/04/26 05:10:04 curt
533 // "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
535 // Revision 1.4 1998/04/25 22:04:53 curt
536 // Use already calculated LaRCsim values to create the roll/pitch/yaw
537 // transformation matrix (we call it LOCAL)
539 // Revision 1.3 1998/04/25 20:24:02 curt
540 // Cleaned up initialization sequence to eliminate interdependencies
541 // between sun position, lighting, and view position. This creates a
542 // valid single pass initialization path.
544 // Revision 1.2 1998/04/24 00:49:22 curt
545 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
546 // Trying out some different option parsing code.
547 // Some code reorganization.
549 // Revision 1.1 1998/04/22 13:25:45 curt
550 // C++ - ifing the code.
551 // Starting a bit of reorganization of lighting code.
553 // Revision 1.16 1998/04/18 04:11:29 curt
554 // Moved fg_debug to it's own library, added zlib support.
556 // Revision 1.15 1998/02/20 00:16:24 curt
557 // Thursday's tweaks.
559 // Revision 1.14 1998/02/09 15:07:50 curt
562 // Revision 1.13 1998/02/07 15:29:45 curt
563 // Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
564 // <chotchkiss@namg.us.anritsu.com>
566 // Revision 1.12 1998/01/29 00:50:28 curt
567 // Added a view record field for absolute x, y, z position.
569 // Revision 1.11 1998/01/27 00:47:58 curt
570 // Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
571 // system and commandline/config file processing code.
573 // Revision 1.10 1998/01/19 19:27:09 curt
574 // Merged in make system changes from Bob Kuehne <rpk@sgi.com>
575 // This should simplify things tremendously.
577 // Revision 1.9 1998/01/13 00:23:09 curt
578 // Initial changes to support loading and management of scenery tiles. Note,
579 // there's still a fair amount of work left to be done.
581 // Revision 1.8 1997/12/30 22:22:33 curt
582 // Further integration of event manager.
584 // Revision 1.7 1997/12/30 20:47:45 curt
585 // Integrated new event manager with subsystem initializations.
587 // Revision 1.6 1997/12/22 04:14:32 curt
588 // Aligned sky with sun so dusk/dawn effects can be correct relative to the sun.
590 // Revision 1.5 1997/12/18 04:07:02 curt
591 // Worked on properly translating and positioning the sky dome.
593 // Revision 1.4 1997/12/17 23:13:36 curt
594 // Began working on rendering a sky.
596 // Revision 1.3 1997/12/15 23:54:50 curt
597 // Add xgl wrappers for debugging.
598 // Generate terrain normals on the fly.
600 // Revision 1.2 1997/12/10 22:37:48 curt
601 // Prepended "fg" on the name of all global structures that didn't have it yet.
602 // i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
604 // Revision 1.1 1997/08/27 21:31:17 curt