1 /* topblock - openGL based hack */
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);
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 */
19 struct blockNode *next;
23 /* some handy macros and definitions */
24 #define blockHeight 1.49f
25 #define getHeight(a) (a * blockHeight)
27 #define getOrientation(a) (a * 90)
29 #define blockWidth 2.0f
30 #define getLocation(a) (a * blockWidth)
32 #define TOLERANCE 0.1f
34 #define cylSize 0.333334f
36 #define singleThick 0.29 /* defines the thickness of the carpet */