X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fchessmodels.c;h=903d2790f846226bb2dc5ea62556b6485d4217ca;hb=2c902d6065f9856adf31e8540a94f1e42e68e905;hp=0dd9b0cfa867ead1871f30dcd299a5b3d5921294;hpb=723c9eeee862766a1534b2ce17b78adbfac1c3be;p=xscreensaver diff --git a/hacks/glx/chessmodels.c b/hacks/glx/chessmodels.c index 0dd9b0cf..903d2790 100644 --- a/hacks/glx/chessmodels.c +++ b/hacks/glx/chessmodels.c @@ -1,4 +1,7 @@ /* + * models for the xss chess screensavers + * hacked from: + * * glChess - A 3D chess interface * * Copyright (C) 2002 Robert Ancell @@ -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(); }