--- /dev/null
+/* topblock - openGL based hack */\r
+\r
+static void buildCarpet(ModeInfo *);\r
+static void polygonPlane(int, int, int, int, int ,int);\r
+static void buildBlock(ModeInfo *);\r
+static void generateNewBlock(ModeInfo *);\r
+static void followBlock(ModeInfo *);\r
+static void buildBlobBlock(ModeInfo *);\r
+static double quadrantCorrection(double,int,int,int,int);\r
+\r
+/* this structure holds all the attributes about a block */\r
+typedef struct blockNode {\r
+ int color; /* indexed */\r
+ int rotation; /* indexed: 0=S-N, 1=W-E, 2=N-S, 3=E-W */\r
+ GLfloat height;\r
+ GLfloat x;\r
+ GLfloat y;\r
+ int falling; \r
+ struct blockNode *next;\r
+} NODE;\r
+\r
+\r
+/* some handy macros and definitions */\r
+#define blockHeight 1.49f\r
+#define getHeight(a) (a * blockHeight)\r
+\r
+#define getOrientation(a) (a * 90)\r
+\r
+#define blockWidth 2.0f\r
+#define getLocation(a) (a * blockWidth)\r
+\r
+#define TOLLERANCE 0.1\r
+\r
+#define cylSize 0.333334f\r
+#define uddSize 0.4f\r
+#define singleThick 0.29 /* defines the thickness of the carpet */\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r