X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Astro%2Fmoon.cxx;h=445774cd646e10446630cef6e1d36049ef9530a2;hb=c74350c4fe126328ced5e080a4d262d0bcba5369;hp=bc7425ce4357fc64c4c929f3d77c3afe815079cf;hpb=ad3ae513488acc0364815218dbfd22dc13bf9eab;p=flightgear.git diff --git a/Astro/moon.cxx b/Astro/moon.cxx index bc7425ce4..445774cd6 100644 --- a/Astro/moon.cxx +++ b/Astro/moon.cxx @@ -26,7 +26,7 @@ #include #include "moon.hxx" -#include +#include #include static GLuint moon_texid; @@ -51,7 +51,7 @@ Moon::Moon(fgTIME *t) : string tpath, fg_tpath; int width, height; - fgPrintf( FG_GENERAL, FG_INFO, "Initializing Moon Texture\n"); + FG_LOG( FG_GENERAL, FG_INFO, "Initializing Moon Texture"); #ifdef GL_VERSION_1_1 xglGenTextures(1, &moon_texid); xglBindTexture(GL_TEXTURE_2D, moon_texid); @@ -77,9 +77,9 @@ Moon::Moon(fgTIME *t) : if ( (moon_texbuf = read_rgb_texture(fg_tpath.c_str(), &width, &height)) == NULL ) { - fgPrintf( FG_GENERAL, FG_EXIT, - "Error in loading moon texture %s\n", tpath.c_str() ); - exit(1); + FG_LOG( FG_GENERAL, FG_ALERT, + "Error in loading moon texture " << tpath ); + exit(-1); } } @@ -162,7 +162,7 @@ void Moon::updatePosition(fgTIME *t, Star *ourSun) r += (-0.58 * cos(M - 2*D) -0.46 * cos(2*D) ); - fgPrintf(FG_GENERAL, FG_INFO, "Running moon update\n"); + FG_LOG(FG_GENERAL, FG_INFO, "Running moon update"); xg = r * cos(lonecl) * cos(latecl); yg = r * sin(lonecl) * cos(latecl); zg = r * sin(latecl); @@ -213,8 +213,9 @@ void Moon::newImage(float ra, float dec) xglRotatef(((RAD_TO_DEG * ra)- 90.0), 0.0, 0.0, 1.0); xglRotatef((RAD_TO_DEG * dec), 1.0, 0.0, 0.0); - fgPrintf( FG_GENERAL, FG_INFO, - "Ra = (%f), Dec= (%f)", (RAD_TO_DEG *ra), (RAD_TO_DEG *dec) ); + FG_LOG( FG_GENERAL, FG_INFO, + "Ra = (" << (RAD_TO_DEG *ra) + << "), Dec= (" << (RAD_TO_DEG *dec) << ")" ); xglTranslatef(0.0, 58600.0, 0.0); Object = gluNewQuadric(); gluQuadricTexture( Object, GL_TRUE );