C++-ifying.

This commit is contained in:
curt
2009-09-15 18:31:31 +02:00
committed by Tim Moore
parent dea5eec440
commit c0e1031a4a
5 changed files with 226 additions and 226 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
* $Id$ * $Id$
* (Log is kept at end of this file) * (Log is kept at end of this file)
**************************************************************************/ **************************************************************************/
#include <Flight/flight.h> #include <Flight/flight.hxx>
#include <string.h> #include <string.h>
#include "moon.hxx" #include "moon.hxx"
+1 -1
View File
@@ -25,7 +25,7 @@
#ifndef _MOON_HXX_ #ifndef _MOON_HXX_
#define _MOON_HXX_ #define _MOON_HXX_
#include <Aircraft/aircraft.h> #include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h> #include <Debug/fg_debug.h>
#include <Include/fg_constants.h> #include <Include/fg_constants.h>
#include <Include/general.h> #include <Include/general.h>
+167 -170
View File
@@ -1,27 +1,25 @@
/************************************************************************** // sky.cxx -- model sky with an upside down "bowl"
* sky.c -- model sky with an upside down "bowl" //
* // Written by Curtis Olson, started December 1997.
* Written by Curtis Olson, started December 1997. //
* // Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
* Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com //
* // This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as
* modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of the
* published by the Free Software Foundation; either version 2 of the // License, or (at your option) any later version.
* License, or (at your option) any later version. //
* // This program is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details.
* General Public License for more details. //
* // You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software
* along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
* // $Id$
* $Id$ // (Log is kept at end of this file)
* (Log is kept at end of this file)
**************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
@@ -37,9 +35,9 @@
#include <GL/glut.h> #include <GL/glut.h>
#include <XGL/xgl.h> #include <XGL/xgl.h>
#include <Aircraft/aircraft.h> #include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h> #include <Debug/fg_debug.h>
#include <Flight/flight.h> #include <Flight/flight.hxx>
#include <Include/fg_constants.h> #include <Include/fg_constants.h>
#include <Main/views.hxx> #include <Main/views.hxx>
#include <Math/fg_random.h> #include <Math/fg_random.h>
@@ -49,11 +47,7 @@
#include "sky.hxx" #include "sky.hxx"
/* // in meters of course
#include <Include/general.h>
*/
/* in meters of course */
#define CENTER_ELEV 25000.0 #define CENTER_ELEV 25000.0
#define INNER_RADIUS 50000.0 #define INNER_RADIUS 50000.0
@@ -79,7 +73,7 @@ static float middle_color[12][4];
static float outer_color[12][4]; static float outer_color[12][4];
/* Calculate the sky structure vertices */ // Calculate the sky structure vertices
void fgSkyVerticesInit( void ) { void fgSkyVerticesInit( void ) {
float theta; float theta;
int i; int i;
@@ -93,8 +87,8 @@ void fgSkyVerticesInit( void ) {
inner_vertex[i][1] = sin(theta) * INNER_RADIUS; inner_vertex[i][1] = sin(theta) * INNER_RADIUS;
inner_vertex[i][2] = INNER_ELEV; inner_vertex[i][2] = INNER_ELEV;
/* printf(" %.2f %.2f\n", cos(theta) * INNER_RADIUS, // printf(" %.2f %.2f\n", cos(theta) * INNER_RADIUS,
sin(theta) * INNER_RADIUS); */ // sin(theta) * INNER_RADIUS);
middle_vertex[i][0] = cos((double)theta) * MIDDLE_RADIUS; middle_vertex[i][0] = cos((double)theta) * MIDDLE_RADIUS;
middle_vertex[i][1] = sin((double)theta) * MIDDLE_RADIUS; middle_vertex[i][1] = sin((double)theta) * MIDDLE_RADIUS;
@@ -111,7 +105,7 @@ void fgSkyVerticesInit( void ) {
} }
/* (Re)calculate the sky colors at each vertex */ // (Re)calculate the sky colors at each vertex
void fgSkyColorsInit( void ) { void fgSkyColorsInit( void ) {
fgLIGHT *l; fgLIGHT *l;
double sun_angle, diff; double sun_angle, diff;
@@ -124,13 +118,13 @@ void fgSkyColorsInit( void ) {
fgPrintf( FG_ASTRO, FG_INFO, fgPrintf( FG_ASTRO, FG_INFO,
" Generating the sky colors for each vertex.\n" ); " Generating the sky colors for each vertex.\n" );
/* setup for the possibility of sunset effects */ // setup for the possibility of sunset effects
sun_angle = l->sun_angle * RAD_TO_DEG; sun_angle = l->sun_angle * RAD_TO_DEG;
// fgPrintf( FG_ASTRO, FG_INFO, // fgPrintf( FG_ASTRO, FG_INFO,
// " Sun angle in degrees = %.2f\n", sun_angle); // " Sun angle in degrees = %.2f\n", sun_angle);
if ( (sun_angle > 80.0) && (sun_angle < 100.0) ) { if ( (sun_angle > 80.0) && (sun_angle < 100.0) ) {
/* 0.0 - 0.4 */ // 0.0 - 0.4
outer_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 25.0; outer_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 25.0;
outer_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 35.0; outer_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 35.0;
outer_param[2] = 0.0; outer_param[2] = 0.0;
@@ -153,10 +147,10 @@ void fgSkyColorsInit( void ) {
outer_diff[0] = outer_diff[1] = outer_diff[2] = 0.0; outer_diff[0] = outer_diff[1] = outer_diff[2] = 0.0;
middle_diff[0] = middle_diff[1] = middle_diff[2] = 0.0; middle_diff[0] = middle_diff[1] = middle_diff[2] = 0.0;
} }
/* printf(" outer_red_param = %.2f outer_red_diff = %.2f\n", // printf(" outer_red_param = %.2f outer_red_diff = %.2f\n",
outer_red_param, outer_red_diff); */ // outer_red_param, outer_red_diff);
/* calculate transition colors between sky and fog */ // calculate transition colors between sky and fog
for ( j = 0; j < 3; j++ ) { for ( j = 0; j < 3; j++ ) {
outer_amt[j] = outer_param[j]; outer_amt[j] = outer_param[j];
middle_amt[j] = middle_param[j]; middle_amt[j] = middle_param[j];
@@ -166,8 +160,8 @@ void fgSkyColorsInit( void ) {
for ( j = 0; j < 3; j++ ) { for ( j = 0; j < 3; j++ ) {
diff = l->sky_color[j] - l->fog_color[j]; diff = l->sky_color[j] - l->fog_color[j];
/* printf("sky = %.2f fog = %.2f diff = %.2f\n", // printf("sky = %.2f fog = %.2f diff = %.2f\n",
l->sky_color[j], l->fog_color[j], diff); */ // l->sky_color[j], l->fog_color[j], diff);
inner_color[i][j] = l->sky_color[j] - diff * 0.3; inner_color[i][j] = l->sky_color[j] - diff * 0.3;
middle_color[i][j] = l->sky_color[j] - diff * 0.9 + middle_amt[j]; middle_color[i][j] = l->sky_color[j] - diff * 0.9 + middle_amt[j];
@@ -210,8 +204,8 @@ void fgSkyColorsInit( void ) {
for ( j = 0; j < 3; j++ ) { for ( j = 0; j < 3; j++ ) {
diff = l->sky_color[j] - l->fog_color[j]; diff = l->sky_color[j] - l->fog_color[j];
/* printf("sky = %.2f fog = %.2f diff = %.2f\n", // printf("sky = %.2f fog = %.2f diff = %.2f\n",
l->sky_color[j], l->fog_color[j], diff); */ // l->sky_color[j], l->fog_color[j], diff);
inner_color[i][j] = l->sky_color[j] - diff * 0.3; inner_color[i][j] = l->sky_color[j] - diff * 0.3;
middle_color[i][j] = l->sky_color[j] - diff * 0.9 + middle_amt[j]; middle_color[i][j] = l->sky_color[j] - diff * 0.9 + middle_amt[j];
@@ -246,19 +240,19 @@ void fgSkyColorsInit( void ) {
} }
/* Initialize the sky structure and colors */ // Initialize the sky structure and colors
void fgSkyInit( void ) { void fgSkyInit( void ) {
fgPrintf(FG_ASTRO, FG_INFO, "Initializing the sky\n"); fgPrintf(FG_ASTRO, FG_INFO, "Initializing the sky\n");
fgSkyVerticesInit(); fgSkyVerticesInit();
/* regester fgSkyColorsInit() as an event to be run periodically */ // regester fgSkyColorsInit() as an event to be run periodically
global_events.Register( "fgSkyColorsInit()", fgSkyColorsInit, global_events.Register( "fgSkyColorsInit()", fgSkyColorsInit,
fgEVENT::FG_EVENT_READY, 30000); fgEVENT::FG_EVENT_READY, 30000);
} }
/* Draw the Sky */ // Draw the Sky
void fgSkyRender( void ) { void fgSkyRender( void ) {
fgFLIGHT *f; fgFLIGHT *f;
fgLIGHT *l; fgLIGHT *l;
@@ -273,14 +267,14 @@ void fgSkyRender( void ) {
l = &cur_light_params; l = &cur_light_params;
v = &current_view; v = &current_view;
/* printf("Rendering the sky.\n"); */ // printf("Rendering the sky.\n");
// calculate the proper colors // calculate the proper colors
for ( i = 0; i < 3; i++ ) { for ( i = 0; i < 3; i++ ) {
diff = l->sky_color[i] - l->adj_fog_color[i]; diff = l->sky_color[i] - l->adj_fog_color[i];
/* printf("sky = %.2f fog = %.2f diff = %.2f\n", // printf("sky = %.2f fog = %.2f diff = %.2f\n",
l->sky_color[j], l->adj_fog_color[j], diff); */ // l->sky_color[j], l->adj_fog_color[j], diff);
inner_color[i] = l->sky_color[i] - diff * 0.3; inner_color[i] = l->sky_color[i] - diff * 0.3;
middle_color[i] = l->sky_color[i] - diff * 0.9; middle_color[i] = l->sky_color[i] - diff * 0.9;
@@ -290,21 +284,21 @@ void fgSkyRender( void ) {
xglPushMatrix(); xglPushMatrix();
/* Translate to view position */ // Translate to view position
xglTranslatef( v->cur_zero_elev.x(), xglTranslatef( v->cur_zero_elev.x(),
v->cur_zero_elev.y(), v->cur_zero_elev.y(),
v->cur_zero_elev.z() ); v->cur_zero_elev.z() );
/* printf(" Translated to %.2f %.2f %.2f\n", // printf(" Translated to %.2f %.2f %.2f\n",
v->cur_zero_elev.x, v->cur_zero_elev.y, v->cur_zero_elev.z ); */ // v->cur_zero_elev.x, v->cur_zero_elev.y, v->cur_zero_elev.z );
/* Rotate to proper orientation */ // Rotate to proper orientation
/* printf(" lon = %.2f lat = %.2f\n", FG_Longitude * RAD_TO_DEG, // printf(" lon = %.2f lat = %.2f\n", FG_Longitude * RAD_TO_DEG,
FG_Latitude * RAD_TO_DEG); */ // FG_Latitude * RAD_TO_DEG);
xglRotatef( FG_Longitude * RAD_TO_DEG, 0.0, 0.0, 1.0 ); xglRotatef( FG_Longitude * RAD_TO_DEG, 0.0, 0.0, 1.0 );
xglRotatef( 90.0 - FG_Latitude * RAD_TO_DEG, 0.0, 1.0, 0.0 ); xglRotatef( 90.0 - FG_Latitude * RAD_TO_DEG, 0.0, 1.0, 0.0 );
xglRotatef( l->sun_rotation * RAD_TO_DEG, 0.0, 0.0, 1.0 ); xglRotatef( l->sun_rotation * RAD_TO_DEG, 0.0, 0.0, 1.0 );
/* Draw inner/center section of sky*/ // Draw inner/center section of sky*/
xglBegin( GL_TRIANGLE_FAN ); xglBegin( GL_TRIANGLE_FAN );
xglColor4fv(l->sky_color); xglColor4fv(l->sky_color);
xglVertex3f(0.0, 0.0, CENTER_ELEV); xglVertex3f(0.0, 0.0, CENTER_ELEV);
@@ -320,15 +314,15 @@ void fgSkyRender( void ) {
xglBegin( GL_TRIANGLE_STRIP ); xglBegin( GL_TRIANGLE_STRIP );
for ( i = 0; i < 12; i++ ) { for ( i = 0; i < 12; i++ ) {
xglColor4fv( middle_color ); xglColor4fv( middle_color );
/* printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i, // printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i,
middle_color[i][0], middle_color[i][1], middle_color[i][2], // middle_color[i][0], middle_color[i][1], middle_color[i][2],
middle_color[i][3]); */ // middle_color[i][3]);
// xglColor4f(1.0, 0.0, 0.0, 1.0); // xglColor4f(1.0, 0.0, 0.0, 1.0);
xglVertex3fv( middle_vertex[i] ); xglVertex3fv( middle_vertex[i] );
xglColor4fv( inner_color ); xglColor4fv( inner_color );
/* printf("inner_color[%d] = %.2f %.2f %.2f %.2f\n", i, // printf("inner_color[%d] = %.2f %.2f %.2f %.2f\n", i,
inner_color[i][0], inner_color[i][1], inner_color[i][2], // inner_color[i][0], inner_color[i][1], inner_color[i][2],
inner_color[i][3]); */ // inner_color[i][3]);
// xglColor4f(0.0, 0.0, 1.0, 1.0); // xglColor4f(0.0, 0.0, 1.0, 1.0);
xglVertex3fv( inner_vertex[i] ); xglVertex3fv( inner_vertex[i] );
} }
@@ -340,7 +334,7 @@ void fgSkyRender( void ) {
xglVertex3fv( inner_vertex[0] ); xglVertex3fv( inner_vertex[0] );
xglEnd(); xglEnd();
/* Draw the outer ring */ // Draw the outer ring
xglBegin( GL_TRIANGLE_STRIP ); xglBegin( GL_TRIANGLE_STRIP );
for ( i = 0; i < 12; i++ ) { for ( i = 0; i < 12; i++ ) {
xglColor4fv( outer_color ); xglColor4fv( outer_color );
@@ -354,7 +348,7 @@ void fgSkyRender( void ) {
xglVertex3fv( middle_vertex[0] ); xglVertex3fv( middle_vertex[0] );
xglEnd(); xglEnd();
/* Draw the bottom skirt */ // Draw the bottom skirt
xglBegin( GL_TRIANGLE_STRIP ); xglBegin( GL_TRIANGLE_STRIP );
xglColor4fv( outer_color ); xglColor4fv( outer_color );
for ( i = 0; i < 12; i++ ) { for ( i = 0; i < 12; i++ ) {
@@ -369,108 +363,111 @@ void fgSkyRender( void ) {
} }
/* $Log$ // $Log$
/* Revision 1.11 1998/10/16 00:52:19 curt // Revision 1.12 1998/10/16 23:27:18 curt
/* Converted to Point3D class. // C++-ifying.
/* //
* Revision 1.10 1998/08/29 13:07:16 curt // Revision 1.11 1998/10/16 00:52:19 curt
* Rewrite of event manager thanks to Bernie Bright. // Converted to Point3D class.
* //
* Revision 1.9 1998/08/22 01:18:59 curt // Revision 1.10 1998/08/29 13:07:16 curt
* Minor tweaks to avoid using unitialized memory. // Rewrite of event manager thanks to Bernie Bright.
* //
* Revision 1.8 1998/08/12 21:40:44 curt // Revision 1.9 1998/08/22 01:18:59 curt
* Sky now tracks adjusted fog color so it blends well with terrain. // Minor tweaks to avoid using unitialized memory.
* //
* Revision 1.7 1998/07/22 21:39:21 curt // Revision 1.8 1998/08/12 21:40:44 curt
* Lower skirt tracks adjusted fog color, not fog color. // Sky now tracks adjusted fog color so it blends well with terrain.
* //
* Revision 1.6 1998/05/23 14:07:14 curt // Revision 1.7 1998/07/22 21:39:21 curt
* Use new C++ events class. // Lower skirt tracks adjusted fog color, not fog color.
* //
* Revision 1.5 1998/04/28 01:19:02 curt // Revision 1.6 1998/05/23 14:07:14 curt
* Type-ified fgTIME and fgVIEW // Use new C++ events class.
* //
* Revision 1.4 1998/04/26 05:10:01 curt // Revision 1.5 1998/04/28 01:19:02 curt
* "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd. // Type-ified fgTIME and fgVIEW
* //
* Revision 1.3 1998/04/25 22:06:25 curt // Revision 1.4 1998/04/26 05:10:01 curt
* Edited cvs log messages in source files ... bad bad bad! // "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
* //
* Revision 1.2 1998/04/24 00:45:03 curt // Revision 1.3 1998/04/25 22:06:25 curt
* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H" // Edited cvs log messages in source files ... bad bad bad!
* Fixed a bug when generating sky colors. //
* // Revision 1.2 1998/04/24 00:45:03 curt
* Revision 1.1 1998/04/22 13:21:32 curt // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
* C++ - ifing the code a bit. // Fixed a bug when generating sky colors.
* //
* Revision 1.9 1998/04/03 21:52:50 curt // Revision 1.1 1998/04/22 13:21:32 curt
* Converting to Gnu autoconf system. // C++ - ifing the code a bit.
* //
* Revision 1.8 1998/03/09 22:47:25 curt // Revision 1.9 1998/04/03 21:52:50 curt
* Incorporated Durk's updates. // Converting to Gnu autoconf system.
* //
* Revision 1.7 1998/02/19 13:05:49 curt // Revision 1.8 1998/03/09 22:47:25 curt
* Incorporated some HUD tweaks from Michelle America. // Incorporated Durk's updates.
* Tweaked the sky's sunset/rise colors. //
* Other misc. tweaks. // Revision 1.7 1998/02/19 13:05:49 curt
* // Incorporated some HUD tweaks from Michelle America.
* Revision 1.6 1998/02/07 15:29:32 curt // Tweaked the sky's sunset/rise colors.
* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss // Other misc. tweaks.
* <chotchkiss@namg.us.anritsu.com> //
* // Revision 1.6 1998/02/07 15:29:32 curt
* Revision 1.5 1998/01/27 00:47:48 curt // Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
* Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message // <chotchkiss@namg.us.anritsu.com>
* system and commandline/config file processing code. //
* // Revision 1.5 1998/01/27 00:47:48 curt
* Revision 1.4 1998/01/26 15:54:28 curt // Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
* Added a "skirt" to try to help hide gaps between scenery and sky. This will // system and commandline/config file processing code.
* have to be revisited in the future. //
* // Revision 1.4 1998/01/26 15:54:28 curt
* Revision 1.3 1998/01/19 19:26:59 curt // Added a "skirt" to try to help hide gaps between scenery and sky. This will
* Merged in make system changes from Bob Kuehne <rpk@sgi.com> // have to be revisited in the future.
* This should simplify things tremendously. //
* // Revision 1.3 1998/01/19 19:26:59 curt
* Revision 1.2 1998/01/19 18:40:17 curt // Merged in make system changes from Bob Kuehne <rpk@sgi.com>
* Tons of little changes to clean up the code and to remove fatal errors // This should simplify things tremendously.
* when building with the c++ compiler. //
* // Revision 1.2 1998/01/19 18:40:17 curt
* Revision 1.1 1998/01/07 03:16:19 curt // Tons of little changes to clean up the code and to remove fatal errors
* Moved from .../Src/Scenery/ to .../Src/Astro/ // when building with the c++ compiler.
* //
* Revision 1.11 1997/12/30 22:22:38 curt // Revision 1.1 1998/01/07 03:16:19 curt
* Further integration of event manager. // Moved from .../Src/Scenery/ to .../Src/Astro/
* //
* Revision 1.10 1997/12/30 20:47:53 curt // Revision 1.11 1997/12/30 22:22:38 curt
* Integrated new event manager with subsystem initializations. // Further integration of event manager.
* //
* Revision 1.9 1997/12/30 13:06:57 curt // Revision 1.10 1997/12/30 20:47:53 curt
* A couple lighting tweaks ... // Integrated new event manager with subsystem initializations.
* //
* Revision 1.8 1997/12/23 04:58:38 curt // Revision 1.9 1997/12/30 13:06:57 curt
* Tweaked the sky coloring a bit to build in structures to allow finer rgb // A couple lighting tweaks ...
* control. //
* // Revision 1.8 1997/12/23 04:58:38 curt
* Revision 1.7 1997/12/22 23:45:48 curt // Tweaked the sky coloring a bit to build in structures to allow finer rgb
* First stab at sunset/sunrise sky glow effects. // control.
* //
* Revision 1.6 1997/12/22 04:14:34 curt // Revision 1.7 1997/12/22 23:45:48 curt
* Aligned sky with sun so dusk/dawn effects can be correct relative to the sun. // First stab at sunset/sunrise sky glow effects.
* //
* Revision 1.5 1997/12/19 23:34:59 curt // Revision 1.6 1997/12/22 04:14:34 curt
* Lot's of tweaking with sky rendering and lighting. // Aligned sky with sun so dusk/dawn effects can be correct relative to the sun.
* //
* Revision 1.4 1997/12/19 16:45:02 curt // Revision 1.5 1997/12/19 23:34:59 curt
* Working on scene rendering order and options. // Lot's of tweaking with sky rendering and lighting.
* //
* Revision 1.3 1997/12/18 23:32:36 curt // Revision 1.4 1997/12/19 16:45:02 curt
* First stab at sky dome actually starting to look reasonable. :-) // Working on scene rendering order and options.
* //
* Revision 1.2 1997/12/18 04:07:03 curt // Revision 1.3 1997/12/18 23:32:36 curt
* Worked on properly translating and positioning the sky dome. // First stab at sky dome actually starting to look reasonable. :-)
* //
* Revision 1.1 1997/12/17 23:14:30 curt // Revision 1.2 1997/12/18 04:07:03 curt
* Initial revision. // Worked on properly translating and positioning the sky dome.
* Begin work on rendering the sky. (Rather than just using a clear screen.) //
* // Revision 1.1 1997/12/17 23:14:30 curt
*/ // Initial revision.
// Begin work on rendering the sky. (Rather than just using a clear screen.)
//
+53 -53
View File
@@ -1,27 +1,25 @@
/************************************************************************** // sky.hxx -- model sky with an upside down "bowl"
* sky.hxx -- model sky with an upside down "bowl" //
* // Written by Curtis Olson, started December 1997.
* Written by Curtis Olson, started December 1997. //
* // Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
* Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com //
* // This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as
* modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of the
* published by the Free Software Foundation; either version 2 of the // License, or (at your option) any later version.
* License, or (at your option) any later version. //
* // This program is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details.
* General Public License for more details. //
* // You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software
* along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
* // $Id$
* $Id$ // (Log is kept at end of this file)
* (Log is kept at end of this file)
**************************************************************************/
#ifndef _SKY_HXX #ifndef _SKY_HXX
@@ -33,41 +31,43 @@
#endif #endif
/* (Re)generate the display list */ // (Re)generate the display list
void fgSkyInit( void ); void fgSkyInit( void );
/* (Re)calculate the sky colors at each vertex */ // (Re)calculate the sky colors at each vertex
void fgSkyColorsInit( void ); void fgSkyColorsInit( void );
/* Draw the Sky */ // Draw the Sky
void fgSkyRender( void ); void fgSkyRender( void );
#endif /* _SKY_HXX */ #endif // _SKY_HXX
/* $Log$ // $Log$
/* Revision 1.1 1998/04/22 13:21:33 curt // Revision 1.2 1998/10/16 23:27:19 curt
/* C++ - ifing the code a bit. // C++-ifying.
/* //
* Revision 1.4 1998/04/21 17:02:32 curt // Revision 1.1 1998/04/22 13:21:33 curt
* Prepairing for C++ integration. // C++ - ifing the code a bit.
* //
* Revision 1.3 1998/01/22 02:59:28 curt // Revision 1.4 1998/04/21 17:02:32 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H // Prepairing for C++ integration.
* //
* Revision 1.2 1998/01/19 18:40:17 curt // Revision 1.3 1998/01/22 02:59:28 curt
* Tons of little changes to clean up the code and to remove fatal errors // Changed #ifdef FILE_H to #ifdef _FILE_H
* when building with the c++ compiler. //
* // Revision 1.2 1998/01/19 18:40:17 curt
* Revision 1.1 1998/01/07 03:16:19 curt // Tons of little changes to clean up the code and to remove fatal errors
* Moved from .../Src/Scenery/ to .../Src/Astro/ // when building with the c++ compiler.
* //
* Revision 1.2 1997/12/22 23:45:49 curt // Revision 1.1 1998/01/07 03:16:19 curt
* First stab at sunset/sunrise sky glow effects. // Moved from .../Src/Scenery/ to .../Src/Astro/
* //
* Revision 1.1 1997/12/17 23:14:31 curt // Revision 1.2 1997/12/22 23:45:49 curt
* Initial revision. // First stab at sunset/sunrise sky glow effects.
* Begin work on rendering the sky. (Rather than just using a clear screen.) //
* // Revision 1.1 1997/12/17 23:14:31 curt
*/ // Initial revision.
// Begin work on rendering the sky. (Rather than just using a clear screen.)
//
+4 -1
View File
@@ -40,7 +40,7 @@
#include <GL/glut.h> #include <GL/glut.h>
#include <XGL/xgl.h> #include <XGL/xgl.h>
#include <Aircraft/aircraft.h> #include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h> #include <Debug/fg_debug.h>
#include <Include/fg_constants.h> #include <Include/fg_constants.h>
#include <Misc/fgstream.hxx> #include <Misc/fgstream.hxx>
@@ -252,6 +252,9 @@ void fgStarsRender( void ) {
// $Log$ // $Log$
// Revision 1.19 1998/10/16 23:27:21 curt
// C++-ifying.
//
// Revision 1.18 1998/10/16 00:52:20 curt // Revision 1.18 1998/10/16 00:52:20 curt
// Converted to Point3D class. // Converted to Point3D class.
// //