1 /* topblock - openGL based hack */
\r
3 static void buildCarpet(ModeInfo *);
\r
4 static void polygonPlane(int, int, int, int, int ,int);
\r
5 static void buildBlock(ModeInfo *);
\r
6 static void generateNewBlock(ModeInfo *);
\r
7 static void followBlock(ModeInfo *);
\r
8 static void buildBlobBlock(ModeInfo *);
\r
9 static double quadrantCorrection(double,int,int,int,int);
\r
11 /* this structure holds all the attributes about a block */
\r
12 typedef struct blockNode {
\r
13 int color; /* indexed */
\r
14 int rotation; /* indexed: 0=S-N, 1=W-E, 2=N-S, 3=E-W */
\r
19 struct blockNode *next;
\r
23 /* some handy macros and definitions */
\r
24 #define blockHeight 1.49f
\r
25 #define getHeight(a) (a * blockHeight)
\r
27 #define getOrientation(a) (a * 90)
\r
29 #define blockWidth 2.0f
\r
30 #define getLocation(a) (a * blockWidth)
\r
32 #define TOLLERANCE 0.1
\r
34 #define cylSize 0.333334f
\r
35 #define uddSize 0.4f
\r
36 #define singleThick 0.29 /* defines the thickness of the carpet */
\r