ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-5.01.tar.gz
[xscreensaver] / hacks / glx / topblock.h
1 /* topblock - openGL based hack  */
2
3 static void buildCarpet(ModeInfo *);
4 static void polygonPlane(int, int, int, int, int ,int);
5 static void buildBlock(ModeInfo *);
6 static void generateNewBlock(ModeInfo *);
7 static void followBlock(ModeInfo *);
8 static void buildBlobBlock(ModeInfo *);
9 static double quadrantCorrection(double,int,int,int,int);
10
11 /* this structure holds all the attributes about a block */
12 typedef struct blockNode {
13         int color;              /* indexed */
14         int rotation;           /* indexed: 0=S-N, 1=W-E, 2=N-S, 3=E-W */
15         GLfloat height;
16         GLfloat x;
17         GLfloat y;
18         int falling;            
19         struct blockNode *next;
20 } NODE;
21
22
23 /* some handy macros and definitions */
24 #define blockHeight 1.49f
25 #define getHeight(a) (a * blockHeight)
26
27 #define getOrientation(a) (a * 90)
28
29 #define blockWidth 2.0f
30 #define getLocation(a) (a * blockWidth)
31
32 #define TOLERANCE 0.1f
33
34 #define cylSize 0.333334f
35 #define uddSize 0.4f
36 #define singleThick 0.29        /* defines the thickness of the carpet */
37
38
39
40
41
42
43
44
45