1
0
Fork 0

Incorporated Durk's changes.

This commit is contained in:
curt 1998-02-02 20:53:58 +00:00
parent cff17bc840
commit c62427f6af
3 changed files with 30 additions and 9 deletions

View file

@ -42,6 +42,7 @@
#include <Aircraft/aircraft.h>
#include <Astro/moon.h>
#include <Astro/planets.h>
#include <Astro/sky.h>
#include <Astro/stars.h>
#include <Astro/sun.h>
@ -257,13 +258,14 @@ static void fgRenderFrame( void ) {
xglPushMatrix();
/* Translate to view position */
xglTranslatef( v->view_pos.x, v->view_pos.y, v->view_pos.z );
/* Rotate based on gst (side real time) */
/* Rotate based on gst (sidereal time) */
angle = t->gst * 15.041085; /* should be 15.041085, Curt thought it was 15*/
/* printf("Rotating astro objects by %.2f degrees\n",angle); */
xglRotatef( angle, 0.0, 0.0, -1.0 );
/* draw stars and planets */
fgStarsRender();
fgPlanetsRender();
/* draw the sun */
fgSunRender();
@ -274,7 +276,12 @@ static void fgRenderFrame( void ) {
xglLightfv(GL_LIGHT0, GL_AMBIENT, white );
xglLightfv(GL_LIGHT0, GL_DIFFUSE, white );
xglEnable( GL_CULL_FACE );
/* Let's try some blending technique's (Durk)*/
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
fgMoonRender();
glDisable(GL_BLEND);
xglPopMatrix();
@ -633,9 +640,12 @@ int main( int argc, char *argv[] ) {
/* $Log$
/* Revision 1.54 1998/01/31 00:43:10 curt
/* Added MetroWorks patches from Carmen Volpe.
/* Revision 1.55 1998/02/02 20:53:58 curt
/* Incorporated Durk's changes.
/*
* Revision 1.54 1998/01/31 00:43:10 curt
* Added MetroWorks patches from Carmen Volpe.
*
* Revision 1.53 1998/01/27 18:35:54 curt
* Minor tweaks.
*

View file

@ -35,6 +35,7 @@
#include <Aircraft/aircraft.h>
#include <Astro/moon.h>
#include <Astro/planets.h>
#include <Astro/sky.h>
#include <Astro/stars.h>
#include <Astro/sun.h>
@ -254,8 +255,11 @@ void fgInitSubsystems( void ) {
/* Initialize the Stars subsystem */
fgStarsInit();
/* Initialize the planetary subsystem */
fgEventRegister("fgPlanetsInit()", fgPlanetsInit, FG_EVENT_READY, 600000);
/* Initialize the sun's position */
fgEventRegister( "fgSunInit()", fgSunInit, FG_EVENT_READY, 600000 );
fgEventRegister( "fgSunInit()", fgSunInit, FG_EVENT_READY, 60000 );
/* Intialize the moon's position */
fgEventRegister( "fgMoonInit()", fgMoonInit, FG_EVENT_READY, 600000 );
@ -314,9 +318,12 @@ void fgInitSubsystems( void ) {
/* $Log$
/* Revision 1.37 1998/02/01 03:39:54 curt
/* Minor tweaks.
/* Revision 1.38 1998/02/02 20:53:58 curt
/* Incorporated Durk's changes.
/*
* Revision 1.37 1998/02/01 03:39:54 curt
* Minor tweaks.
*
* Revision 1.36 1998/01/31 00:43:13 curt
* Added MetroWorks patches from Carmen Volpe.
*

View file

@ -211,7 +211,8 @@ double sidereal_course(struct tm *gmt, time_t now, double lng) {
if ( daylight > 0 ) {
daylight = 1;
} else if ( daylight < 0 ) {
fgPrintf( FG_EVENT, FG_WARN, "OOOPS, big time problem in fg_time.c, no daylight savings info.\n");
fgPrintf( FG_EVENT, FG_WARN,
"OOOPS, big time problem in fg_time.c, no daylight savings info.\n");
}
offset = -(timezone / 3600 - daylight);
@ -310,9 +311,12 @@ void fgTimeUpdate(struct fgFLIGHT *f, struct fgTIME *t) {
/* $Log$
/* Revision 1.32 1998/02/01 03:39:56 curt
/* Minor tweaks.
/* Revision 1.33 1998/02/02 20:54:04 curt
/* Incorporated Durk's changes.
/*
* Revision 1.32 1998/02/01 03:39:56 curt
* Minor tweaks.
*
* Revision 1.31 1998/01/27 00:48:06 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code.