X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Ftopblock.h;h=1a66c5d27e63d33727406aee6e31204214433253;hp=51b3d442e72e48e92c152c50f9852cee34d43aff;hb=07faf451b99879183ed7e909e43a0e065be1ee7f;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439 diff --git a/hacks/glx/topblock.h b/hacks/glx/topblock.h index 51b3d442..1a66c5d2 100644 --- a/hacks/glx/topblock.h +++ b/hacks/glx/topblock.h @@ -1,45 +1,45 @@ -/* topblock - openGL based hack */ - -static void buildCarpet(ModeInfo *); -static void polygonPlane(int, int, int, int, int ,int); -static void buildBlock(ModeInfo *); -static void generateNewBlock(ModeInfo *); -static void followBlock(ModeInfo *); -static void buildBlobBlock(ModeInfo *); -static double quadrantCorrection(double,int,int,int,int); - -/* this structure holds all the attributes about a block */ -typedef struct blockNode { - int color; /* indexed */ - int rotation; /* indexed: 0=S-N, 1=W-E, 2=N-S, 3=E-W */ - GLfloat height; - GLfloat x; - GLfloat y; - int falling; - struct blockNode *next; -} NODE; - - -/* some handy macros and definitions */ -#define blockHeight 1.49f -#define getHeight(a) (a * blockHeight) - -#define getOrientation(a) (a * 90) - -#define blockWidth 2.0f -#define getLocation(a) (a * blockWidth) - -#define TOLLERANCE 0.1 - -#define cylSize 0.333334f -#define uddSize 0.4f -#define singleThick 0.29 /* defines the thickness of the carpet */ - - - - - - - - - +/* topblock - openGL based hack */ + +static void buildCarpet(ModeInfo *); +static void polygonPlane(int, int, int, int, int ,int); +static void buildBlock(ModeInfo *); +static void generateNewBlock(ModeInfo *); +static void followBlock(ModeInfo *); +static void buildBlobBlock(ModeInfo *); +static double quadrantCorrection(double,int,int,int,int); + +/* this structure holds all the attributes about a block */ +typedef struct blockNode { + int color; /* indexed */ + int rotation; /* indexed: 0=S-N, 1=W-E, 2=N-S, 3=E-W */ + GLfloat height; + GLfloat x; + GLfloat y; + int falling; + struct blockNode *next; +} NODE; + + +/* some handy macros and definitions */ +#define blockHeight 1.49f +#define getHeight(a) (a * blockHeight) + +#define getOrientation(a) (a * 90) + +#define blockWidth 2.0f +#define getLocation(a) (a * blockWidth) + +#define TOLERANCE 0.1f + +#define cylSize 0.333334f +#define uddSize 0.4f +#define singleThick 0.29 /* defines the thickness of the carpet */ + + + + + + + + +