X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fmoebius.c;h=66560fca5448766521580b0374ef620a02ed3657;hb=f54438ea00f152166e68073e98000fd3a00f65cd;hp=3fd933c7a3523b00bacffdbe3584c984d71fe454;hpb=6bb727f03bff0389fbb1349d7df4c9d8d7532959;p=xscreensaver diff --git a/hacks/glx/moebius.c b/hacks/glx/moebius.c index 3fd933c7..66560fca 100644 --- a/hacks/glx/moebius.c +++ b/hacks/glx/moebius.c @@ -38,9 +38,7 @@ static const char sccsid[] = "@(#)moebius.c 4.08 97/01/04 xlockmore"; * Since I'm not a native English speaker, my apologies for any grammatical * mistake. * - * My e-mail addresses are - * vianna@cat.cbpf.br - * and + * My e-mail address is * m-vianna@usa.net * * Marcelo F. Vianna (Jun-01-1997) @@ -108,8 +106,8 @@ static int noants; static XrmOptionDescRec opts[] = { - {"-solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "on"}, - {"+solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "off"}, + {"-solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "on"}, + {"+solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "off"}, {"-noants", ".moebius.noants", XrmoptionNoArg, (caddr_t) "on"}, {"+noants", ".moebius.noants", XrmoptionNoArg, (caddr_t) "off"} }; @@ -125,13 +123,13 @@ static OptionStruct desc[] = }; ModeSpecOpt moebius_opts = -{4, opts, 2, vars, desc}; +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; #ifdef USE_MODULES ModStruct moebius_description = {"moebius", "init_moebius", "draw_moebius", "release_moebius", "draw_moebius", "change_moebius", NULL, &moebius_opts, - 1000, 1, 1, 1, 1.0, "", + 1000, 1, 1, 1, 4, 1.0, "", "Shows Moebius Strip II, an Escher-like GL scene with ants", 0, NULL}; #endif @@ -424,7 +422,7 @@ draw_moebius_strip(ModeInfo * mi) GLfloat cPhi, sPhi; moebiusstruct *mp = &moebius[MI_SCREEN(mi)]; int i, j; - int mono = MI_WIN_IS_MONO(mi); + int mono = MI_IS_MONO(mi); float Cx, Cy, Cz; @@ -624,7 +622,7 @@ init_moebius(ModeInfo * mi) if (moebius == NULL) { if ((moebius = (moebiusstruct *) calloc(MI_NUM_SCREENS(mi), - sizeof (moebiusstruct))) == NULL) + sizeof (moebiusstruct))) == NULL) return; } mp = &moebius[screen]; @@ -633,13 +631,13 @@ init_moebius(ModeInfo * mi) if ((mp->glx_context = init_GL(mi)) != NULL) { - reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); glDrawBuffer(GL_BACK); if (!glIsList(objects)) objects = glGenLists(3); pinit(); } else { - MI_CLEARWINDOW(mi); + MI_CLEARWINDOW(mi); } } @@ -662,13 +660,13 @@ draw_moebius(ModeInfo * mi) glTranslatef(0.0, 0.0, -10.0); - if (!MI_WIN_IS_ICONIC(mi)) { + if (!MI_IS_ICONIC(mi)) { glScalef(Scale4Window * mp->WindH / mp->WindW, Scale4Window, Scale4Window); } else { glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic); } - /* moebius */ + /* moebius */ glRotatef(mp->step * 100, 1, 0, 0); glRotatef(mp->step * 95, 0, 1, 0); glRotatef(mp->step * 90, 0, 0, 1);