-# define PROGCLASS "Klein"
-# define HACK_INIT init_klein
-# define HACK_DRAW draw_klein
-# define HACK_RESHAPE reshape_klein
-# define HACK_HANDLE_EVENT klein_handle_event
-# define EVENT_MASK PointerMotionMask
-# define klein_opts xlockmore_opts
-
-
-#define DEF_SPIN "True"
-#define DEF_WANDER "False"
-#define DEF_RANDOM "False"
-#define DEF_SPEED "150"
-
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
- {&rand, "rand", "Random", DEF_RANDOM, t_Bool},
+ {&rand, "rand", "Random", DEF_RAND, t_Bool},
{&do_spin, "spin", "Spin", DEF_SPIN, t_Bool},
{&do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
{&speed, "speed", "Speed", DEF_SPEED, t_Int},
};
{&do_spin, "spin", "Spin", DEF_SPIN, t_Bool},
{&do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
{&speed, "speed", "Speed", DEF_SPEED, t_Int},
};
-ModeSpecOpt klein_opts = {countof(opts), opts, countof(vars), vars, NULL};
+ENTRYPOINT ModeSpecOpt klein_opts = {countof(opts), opts, countof(vars), vars, NULL};
coord[2] = sin(u/2)*sin(v) + cos(u/2)*sin(2*v)/2;
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
coord[2] = sin(u/2)*sin(v) + cos(u/2)*sin(2*v)/2;
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
coord[2] = kp->a*(cos(v) + sin(tan((v/2))))+0.2*u;
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
coord[2] = kp->a*(cos(v) + sin(tan((v/2))))+0.2*u;
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
coord[2] = sin(kp->b+=0.00001)*v/(2*M_PI)+kp->a*(1-v/(2*M_PI))*sin(u);
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
coord[2] = sin(kp->b+=0.00001)*v/(2*M_PI)+kp->a*(1-v/(2*M_PI))*sin(u);
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
coord[2] = sin(u/2)*cos(v) + cos(u/2)*sin(v);
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
coord[2] = sin(u/2)*cos(v) + cos(u/2)*sin(v);
glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
glVertex3fv(coord);
reshape_klein(ModeInfo *mi, int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
reshape_klein(ModeInfo *mi, int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
klein_handle_event (ModeInfo *mi, XEvent *event)
{
kleinstruct *kp = &klein[MI_SCREEN(mi)];
klein_handle_event (ModeInfo *mi, XEvent *event)
{
kleinstruct *kp = &klein[MI_SCREEN(mi)];
gltrackball_mousewheel (kp->trackball, event->xbutton.button, 10,
!!event->xbutton.state);
return True;
gltrackball_mousewheel (kp->trackball, event->xbutton.button, 10,
!!event->xbutton.state);
return True;