X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fbumps.h;h=120be96102a2fb322dcc87bd532c6f3ec5e97aba;hb=3f9592851ce4ed76a9979bfdd6ec7dc5c457e183;hp=08d56a5ce5ccda4689c01f78ed820d92f940b223;hpb=5832fe184606766fef23369159306c0a5799aeb0;p=xscreensaver diff --git a/hacks/bumps.h b/hacks/bumps.h index 08d56a5c..120be961 100644 --- a/hacks/bumps.h +++ b/hacks/bumps.h @@ -1,4 +1,4 @@ -/* Bumps, Copyright (c) 1999 Shane Smit +/* Bumps, Copyright (c) 2001 Shane Smit * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -12,11 +12,12 @@ * Tab Size: 4 * * Description: - * Header file for module "Bumps.cpp" + * Header file for module "Bumps.c" * * Modification History: * [10/01/99] - Shane Smit: Creation * [10/08/99] - Shane Smit: Port to C. (Ick) + * [03/08/02] - Shane Smit: New movement code. */ @@ -31,10 +32,9 @@ /* Defines: */ /* #define VERBOSE */ -#define PI 3.141592654 #define RANDOM() ((int) (random() & 0X7FFFFFFFL)) -typedef char int8_; +typedef signed char int8_; typedef unsigned char uint8_; typedef short int16_; typedef unsigned short uint16_; @@ -43,21 +43,24 @@ typedef unsigned long uint32_; typedef unsigned char BOOL; -// Globals: +/* Globals: */ char *progclass = "Bumps"; char *defaults [] = { - "*degrees: 360", + ".background: black", + ".foreground: white", "*color: random", "*colorcount: 64", "*delay: 50000", "*soften: 1", "*invert: FALSE", +#ifdef __sgi /* really, HAVE_READ_DISPLAY_EXTENSION */ + "*visualID: Best", +#endif 0 }; XrmOptionDescRec options [] = { - { "-degrees", ".degrees", XrmoptionSepArg, 0 }, { "-color", ".color", XrmoptionSepArg, 0 }, { "-colorcount", ".colorcount", XrmoptionSepArg, 0 }, { "-delay", ".delay", XrmoptionSepArg, 0 }, @@ -71,20 +74,18 @@ XrmOptionDescRec options [] = { * a member of TBumps. */ typedef struct { - uint16_ nDegreeCount; - double *aSinTable; - uint8_ *aLightMap; uint16_ nDiameter, nRadius; - float nAngleX, nAngleY; /* Spotlight's movement direction. */ + float nAccelX, nAccelY; + float nAccelMax; float nVelocityX, nVelocityY; - uint16_ iWinXCenter, iWinYCenter; + float nVelocityMax; + float nXPos, nYPos; } SSpotLight; void CreateSpotLight( SSpotLight *, uint16_, uint16_ ); void CreateTables( SSpotLight * ); -void CalcLightPos( SSpotLight *, uint16_ *, uint16_ * ); -void DestroySpotLight( SSpotLight *pSpotLight ) { free( pSpotLight->aLightMap ); free( pSpotLight->aSinTable ); } +void DestroySpotLight( SSpotLight *pSpotLight ) { free( pSpotLight->aLightMap ); } /* The entire program's operation is contained within this structure. */ @@ -116,9 +117,5 @@ void SoftenBumpMap( SBumps * ); #endif /* _BUMPS_H */ -/* - * End of Module: "Bumps.h" - */ - /* vim: ts=4 */