- cube (sp, wireframe_p, x+1*s, y+1*s, z, 1);
- cube (sp, wireframe_p, x+1*s, y+1*s, z+2*s, 1);
- cube (sp, wireframe_p, x, y+1*s, z+1*s, 1);
- cube (sp, wireframe_p, x+2*s, y+1*s, z+1*s, 1);
- cube (sp, wireframe_p, x+1*s, y, z+1*s, 1);
- cube (sp, wireframe_p, x+1*s, y+2*s, z+1*s, 1);
-
- if (!descend_p) return;
+ glBegin (wireframe ? GL_LINE_LOOP : GL_POLYGON);
+ glNormal3f (-1.0, 0.0, 0.0);
+ glVertex3f (x0, y1, z0);
+ glVertex3f (x0, y0, z0);
+ glVertex3f (x0, y0, z1);
+ glVertex3f (x0, y1, z1);
+ glEnd ();
+ n++;
+ }
+ if (faces & X1)
+ {
+ glBegin (wireframe ? GL_LINE_LOOP : GL_POLYGON);
+ glNormal3f (1.0, 0.0, 0.0);
+ glVertex3f (x1, y1, z1);
+ glVertex3f (x1, y0, z1);
+ glVertex3f (x1, y0, z0);
+ glVertex3f (x1, y1, z0);
+ glEnd ();
+ n++;
+ }
+ if (faces & Y0)
+ {
+ glBegin (wireframe ? GL_LINE_LOOP : GL_POLYGON);
+ glNormal3f (0.0, -1.0, 0.0);
+ glVertex3f (x0, y0, z0);
+ glVertex3f (x0, y0, z1);
+ glVertex3f (x1, y0, z1);
+ glVertex3f (x1, y0, z0);
+ glEnd ();
+ n++;
+ }
+ if (faces & Y1)
+ {
+ glBegin (wireframe ? GL_LINE_LOOP : GL_POLYGON);
+ glNormal3f (0.0, 1.0, 0.0);
+ glVertex3f (x0, y1, z0);
+ glVertex3f (x0, y1, z1);
+ glVertex3f (x1, y1, z1);
+ glVertex3f (x1, y1, z0);
+ glEnd ();
+ n++;
+ }
+ if (faces & Z0)
+ {
+ glBegin (wireframe ? GL_LINE_LOOP : GL_POLYGON);
+ glNormal3f (0.0, 0.0, -1.0);
+ glVertex3f (x1, y1, z0);
+ glVertex3f (x1, y0, z0);
+ glVertex3f (x0, y0, z0);
+ glVertex3f (x0, y1, z0);
+ glEnd ();
+ n++;
+ }
+ if (faces & Z1)
+ {
+ glBegin (wireframe ? GL_LINE_LOOP : GL_POLYGON);
+ glNormal3f (0.0, 0.0, 1.0);
+ glVertex3f (x0, y1, z1);
+ glVertex3f (x0, y0, z1);
+ glVertex3f (x1, y0, z1);
+ glVertex3f (x1, y1, z1);
+ glEnd ();
+ n++;