X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fatlantis.c;h=e0a90ae897fe630734516ced4e9addf4668d8aa1;hb=96a411663168b0ba5432b407a83be55f3df0c802;hp=d37998954977d62cd442aab77f5209bf329ea5c8;hpb=c28aecf9fc41e3a03494bacf7279745425e2fa18;p=xscreensaver diff --git a/hacks/glx/atlantis.c b/hacks/glx/atlantis.c index d3799895..e0a90ae8 100644 --- a/hacks/glx/atlantis.c +++ b/hacks/glx/atlantis.c @@ -1,8 +1,7 @@ /* atlantis --- Shows moving 3D sea animals */ -#if !defined( lint ) && !defined( SABER ) -static const char sccsid[] = "@(#)atlantis.c 1.3 98/06/18 xlockmore"; - +#if 0 +static const char sccsid[] = "@(#)atlantis.c 5.08 2003/04/09 xlockmore"; #endif /* Copyright (c) E. Lassauge, 1998. */ @@ -30,7 +29,7 @@ static const char sccsid[] = "@(#)atlantis.c 1.3 98/06/18 xlockmore"; * Thanks goes also to Brian Paul for making it possible and inexpensive * to use OpenGL at home. * - * My e-mail address is lassauge@sagem.fr + * My e-mail address is lassauge@mail.dotcom.fr * * Eric Lassauge (May-13-1998) * @@ -201,7 +200,7 @@ InitFishs(atlantisstruct * ap) ap->sharks[i].v = 1.0; } - /* Random whae direction */ + /* Random whale direction */ ap->whaledir = LRAND() & 1; ap->dolph.x = 30000.0; @@ -249,6 +248,7 @@ Init(ModeInfo *mi) {0.4, 0.4, 0.4, 1.0}; static float lmodel_localviewer[] = {0.0}; + float fblue = 0.0, fgreen; glFrontFace(GL_CCW); @@ -325,7 +325,10 @@ Init(ModeInfo *mi) InitFishs(ap); - glClearColor(0.0, 0.39, 0.7, 0.0); + /* Add a little randomness */ + fblue = ((float) (NRAND(30)) / 100.0) + 0.70; + fgreen = fblue * 0.56; + glClearColor(0.0, fgreen, fblue, 0.0); } void @@ -360,10 +363,10 @@ clear_tank (atlantisstruct * ap) if (do_gradient && !ap->wire) { - static GLint gradient_list = -1; - static GLint gradient_tex = -1; + static GLuint gradient_list = 0; + static GLuint gradient_tex = 0; - if (gradient_list == -1) + if (gradient_list == 0) { unsigned char *pixels = 0; int start = 64;