# define DEFAULTS "*delay: 10000 \n" \
"*showFPS: False \n" \
-# define refresh_romanboy 0
# define release_romanboy 0
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
ModStruct romanboy_description =
{"romanboy", "init_romanboy", "draw_romanboy",
NULL, "draw_romanboy", "change_romanboy",
- NULL, &romanboy_opts, 25000, 1, 1, 1, 1.0, 4, "",
+ "free_romanboy", &romanboy_opts, 25000, 1, 1, 1, 1.0, 4, "",
"Rotate a 3d immersion of the real projective plane in 3d or walk on it",
0, NULL};
ENTRYPOINT void reshape_romanboy(ModeInfo *mi, int width, int height)
{
romanboystruct *pp = &romanboy[MI_SCREEN(mi)];
+ int y = 0;
+
+ if (width > height * 5) { /* tiny window: show middle */
+ height = width;
+ y = -height/2;
+ }
pp->WindW = (GLint)width;
pp->WindH = (GLint)height;
- glViewport(0,0,width,height);
+ glViewport(0,y,width,height);
pp->aspect = (GLfloat)width/(GLfloat)height;
}
*-----------------------------------------------------------------------------
*/
-static void free_romanboy(ModeInfo *mi);
-
/*
*-----------------------------------------------------------------------------
* Initialize romanboy. Called each time the window changes.
{
romanboystruct *pp;
- MI_INIT (mi, romanboy, free_romanboy);
+ MI_INIT (mi, romanboy);
pp = &romanboy[MI_SCREEN(mi)];
if (surface_order < 2)
*-----------------------------------------------------------------------------
*/
-static void free_romanboy(ModeInfo *mi)
+ENTRYPOINT void free_romanboy(ModeInfo *mi)
{
romanboystruct *pp = &romanboy[MI_SCREEN(mi)];