http://slackware.bholcomb.com/slackware/slackware-11.0/source/xap/xscreensaver/xscree...
[xscreensaver] / hacks / glx / extrusion-taper.c
index 234853ee064bf31ba9479fd7298fe517950dceae..d2d05a153ab259629b3db5043f4b4e65f35f4636 100644 (file)
  *
  */
 
-/* required include files */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "extrusion.h"
 
 #include <math.h>
 #include <stdlib.h>
-#include <GL/gl.h>
-#include <GL/glut.h>
-#ifdef HAVE_GLE3
-#include <GL/gle.h>
-#else
-#include <GL/tube.h>
-#endif
 
 #ifndef NULL
 #define NULL ((void *) 0x0)
@@ -55,8 +45,8 @@
 
 #define NUM_PTS (25)
 
-double contour [NUM_PTS][2];
-double norms [NUM_PTS][2];
+static double contour [NUM_PTS][2];
+static double norms [NUM_PTS][2];
 
 static void init_contour (void)
 {
@@ -94,11 +84,11 @@ static void init_contour (void)
 /* =========================================================== */
 
 #define PSIZE 40
-double path[PSIZE][3];
-double twist[PSIZE];
-double taper[PSIZE];
+static double path[PSIZE][3];
+static double twist[PSIZE];
+static double taper[PSIZE];
 
-void init_taper (void) {
+static void init_taper (void) {
    int j;
    double z, deltaz;
    double ang, dang;
@@ -128,11 +118,9 @@ void init_taper (void) {
 
 /* =========================================================== */
 
+/* controls shape of object */
 extern float lastx;
 extern float lasty;
-extern float rot_x;
-extern float rot_y;
-extern float rot_z;
 
 void InitStuff_taper (void)
 {
@@ -151,7 +139,7 @@ void InitStuff_taper (void)
 
 /* =========================================================== */
 
-void gleTaper (int ncp, 
+static void gleTaper (int ncp, 
                gleDouble contour[][2], 
                gleDouble cont_normal[][2], 
                gleDouble up[3],
@@ -217,13 +205,9 @@ void DrawStuff_taper (void) {
 
    /* set up some matrices so that the object spins with the mouse */
    glPushMatrix ();
-   glTranslatef (0.0, 0.0, -80.0);
-   glRotatef(rot_x, 1, 0, 0);
-   glRotatef(rot_y, 0, 1, 0);
-   glRotatef(rot_z, 0, 0, 1);
-
-/*     glRotatef (130.0, 0.0, 1.0, 0.0); */
-/*     glRotatef (65.0, 1.0, 0.0, 0.0); */
+   /* glTranslatef (0.0, 0.0, -80.0); */
+   /* glRotatef (130.0, 0.0, 1.0, 0.0); */
+   /* glRotatef (65.0, 1.0, 0.0, 0.0); */
 
    /* draw the brand and the handle */
    gleTaper (20, contour, norms,  NULL, 40, path, NULL, taper, twist);