X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fsballs.c;h=25300483e1585eacab093e4c9fe87d0d0d2ff55f;hp=b8c3e74dac2f4774f70dd4c9a023f728aa157bd2;hb=96a411663168b0ba5432b407a83be55f3df0c802;hpb=a94197e76a5dea5cb60542840809d6c20d0abbf3 diff --git a/hacks/glx/sballs.c b/hacks/glx/sballs.c index b8c3e74d..25300483 100644 --- a/hacks/glx/sballs.c +++ b/hacks/glx/sballs.c @@ -1,6 +1,6 @@ /* sballs --- balls spinning like crazy in GL */ -#if !defined( lint ) && !defined( SABER ) +#if 0 static const char sccsid[] = "@(#)sballs.c 5.02 2001/03/10 xlockmore"; #endif @@ -74,16 +74,25 @@ static const char sccsid[] = "@(#)sballs.c 5.02 2001/03/10 xlockmore"; #if defined( USE_XPM ) || defined( USE_XPMINC ) || defined( HAVE_XPM ) /* USE_XPM & USE_XPMINC in xlock mode ; HAVE_XPM in xscreensaver mode */ -#include "xpm-ximage.h" -#define I_HAVE_XPM - -#ifdef STANDALONE -#include "../images/sball.xpm" -#include "../images/sball-bg.xpm" -#else /* !STANDALONE */ -#include "pixmaps/sball.xpm" -#include "pixmaps/sball-bg.xpm" -#endif /* !STANDALONE */ +# include "xpm-ximage.h" +# define I_HAVE_XPM + +# ifdef STANDALONE + +# ifdef __GNUC__ + __extension__ /* don't warn about "string length is greater than the length + ISO C89 compilers are required to support" when including + the following XPM file... */ +# endif +# include "../images/sball.xpm" +# ifdef __GNUC__ + __extension__ +# endif +# include "../images/sball-bg.xpm" +# else /* !STANDALONE */ +# include "pixmaps/sball.xpm" +# include "pixmaps/sball-bg.xpm" +# endif /* !STANDALONE */ #endif /* HAVE_XPM */ /* Manage option vars */ @@ -441,7 +450,10 @@ static void inittextures(ModeInfo * mi) clear_gl_error(); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sb->btexture->width, sb->btexture->height, 0, - GL_RGBA, GL_UNSIGNED_BYTE, sb->btexture->data); + GL_RGBA, + /* GL_UNSIGNED_BYTE, */ + GL_UNSIGNED_INT_8_8_8_8_REV, + sb->btexture->data); check_gl_error("texture"); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); @@ -472,7 +484,10 @@ static void inittextures(ModeInfo * mi) clear_gl_error(); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sb->ftexture->width, sb->ftexture->height, 0, - GL_RGBA, GL_UNSIGNED_BYTE, sb->ftexture->data); + GL_RGBA, + /* GL_UNSIGNED_BYTE, */ + GL_UNSIGNED_INT_8_8_8_8_REV, + sb->ftexture->data); check_gl_error("texture"); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); @@ -707,7 +722,7 @@ static void Init(ModeInfo * mi) MI_NAME(mi), polygons[object].shortname, spheres, - MI_CYCLES(mi), + (int) MI_CYCLES(mi), do_texture ? "on" : "off" ); } @@ -855,7 +870,7 @@ void change_sballs(ModeInfo * mi) MI_NAME(mi), polygons[object].shortname, spheres, - MI_CYCLES(mi), + (int) MI_CYCLES(mi), do_texture ? "on" : "off" ); }