http://ftp.ussg.iu.edu/linux/slackware/slackware-9.0/source/xap/xscreensaver/xscreens...
[xscreensaver] / hacks / glx / chessmodels.c
index 0dd9b0cfa867ead1871f30dcd299a5b3d5921294..903d2790f846226bb2dc5ea62556b6485d4217ca 100644 (file)
@@ -1,4 +1,7 @@
 /*
+ * models for the xss chess screensavers
+ * hacked from:
+ *
  * glChess - A 3D chess interface
  *
  * Copyright (C) 2002  Robert  Ancell <bob27@users.sourceforge.net>
@@ -28,8 +31,6 @@
 
 #include "chessmodels.h"
 
-double piece_size = 0.1;
-
 #define ROT 16
 
 #define piece_size 0.095
@@ -68,7 +69,7 @@ void revolve_line(double *trace_r, double *trace_h, double max_ih, int rot) {
     pradius = trace_r[0] * piece_size;
     pheight = trace_h[0] * piece_size;
     
-    for(p = 0; p < npoints; ++p) {
+    for(p = 1; p < npoints; ++p) {
       radius = trace_r[p] * piece_size;
       height = trace_h[p] * piece_size;
 
@@ -131,27 +132,27 @@ void revolve_line(double *trace_r, double *trace_h, double max_ih, int rot) {
 }
 
 void gen_model_lists(void) {
-  glNewList(1, GL_COMPILE);
+  glNewList(KING, GL_COMPILE);
   draw_king();
   glEndList();
   
-  glNewList(2, GL_COMPILE);
+  glNewList(QUEEN, GL_COMPILE);
   draw_queen();
   glEndList();
 
-  glNewList(3, GL_COMPILE);
+  glNewList(BISHOP, GL_COMPILE);
   draw_bishop();
   glEndList();
 
-  glNewList(4, GL_COMPILE);
+  glNewList(KNIGHT, GL_COMPILE);
   draw_knight();
   glEndList();
 
-  glNewList(5, GL_COMPILE);
+  glNewList(ROOK, GL_COMPILE);
   draw_rook();
   glEndList();
 
-  glNewList(6, GL_COMPILE);
+  glNewList(PAWN, GL_COMPILE);
   draw_pawn();
   glEndList();
 }