GLuint bottle_list;
GLuint ball_list;
- Bool spin_x, spin_y, spin_z; /* spin of the scene overall */
-
int bottle_poly_count; /* polygons in the bottle only */
} lavalite_configuration;
static GLfloat
bottle_radius_at (lavalite_configuration *bp, GLfloat z)
{
- GLfloat topz = -999, botz = -999, topr, botr;
+ GLfloat topz = -999, botz = -999, topr = 0, botr = 0;
lamp_geometry *slice;
GLfloat ratio;
mi->polygon_count = 0;
{
- double s = 1.0/bp->grid_size;
+ double s;
+ if (bp->grid_size == 0) bp->grid_size = 1; /* first time through */
+ s = 1.0/bp->grid_size;
+
glPushMatrix();
glTranslatef (-0.5, -0.5, 0);
glScalef (s, s, s);
reshape_lavalite (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
{
- char *s = do_spin;
- while (*s)
- {
- if (*s == ' ' || *s == '\t') ;
- else if (*s == 'x' || *s == 'X') bp->spin_x = 1;
- else if (*s == 'y' || *s == 'Y') bp->spin_y = 1;
- else if (*s == 'z' || *s == 'Z') bp->spin_z = 1;
- else
- {
- fprintf (stderr,
- "%s: spin must contain only the characters X, Y, or Z (not \"%s\")\n",
- progname, do_spin);
- exit (1);
- }
- s++;
- }
-
- s = do_style;
+ char *s = do_style;
if (!s || !*s || !strcasecmp (s, "classic")) bp->style = CLASSIC;
else if (!strcasecmp (s, "giant")) bp->style = GIANT;
else if (!strcasecmp (s, "cone")) bp->style = CONE;