http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.02.tar.gz
[xscreensaver] / hacks / bumps.h
index f5e8c29213c6746cbb059a89a16ff46fdae7771f..120be96102a2fb322dcc87bd532c6f3ec5e97aba 100644 (file)
@@ -1,4 +1,4 @@
-/* Bumps, Copyright (c) 1999 Shane Smit <blackend@inconnect.com>
+/* Bumps, Copyright (c) 2001 Shane Smit <CodeWeaver@DigitalLoom.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
  * 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,7 +32,6 @@
 
 /* Defines: */
 /* #define VERBOSE */
-#define PI             3.141592654
 #define RANDOM() ((int) (random() & 0X7FFFFFFFL))
 
 typedef signed char            int8_;
@@ -49,7 +49,6 @@ char *progclass = "Bumps";
 char *defaults [] = {
   ".background: black",
   ".foreground: white",
-  "*degrees:   360",
   "*color:             random",
   "*colorcount:        64",
   "*delay:             50000",
@@ -62,7 +61,6 @@ char *defaults [] = {
 };
 
 XrmOptionDescRec options [] = {
-  { "-degrees",                ".degrees",             XrmoptionSepArg, 0 },
   { "-color",          ".color",               XrmoptionSepArg, 0 },
   { "-colorcount",     ".colorcount",  XrmoptionSepArg, 0 },
   { "-delay",          ".delay",               XrmoptionSepArg, 0 },
@@ -76,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. */
@@ -121,9 +117,5 @@ void SoftenBumpMap( SBumps * );
 #endif /* _BUMPS_H */
 
 
-/*
- * End of Module: "Bumps.h"
- */
-
 /* vim: ts=4
  */