-/* 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.
*/
/* Defines: */
/* #define VERBOSE */
-#define PI 3.141592654
#define RANDOM() ((int) (random() & 0X7FFFFFFFL))
typedef signed char int8_;
char *defaults [] = {
".background: black",
".foreground: white",
- "*degrees: 360",
"*color: random",
"*colorcount: 64",
"*delay: 50000",
};
XrmOptionDescRec options [] = {
- { "-degrees", ".degrees", XrmoptionSepArg, 0 },
{ "-color", ".color", XrmoptionSepArg, 0 },
{ "-colorcount", ".colorcount", XrmoptionSepArg, 0 },
{ "-delay", ".delay", XrmoptionSepArg, 0 },
* 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. */
#endif /* _BUMPS_H */
-/*
- * End of Module: "Bumps.h"
- */
-
/* vim: ts=4
*/