ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-4.22.tar.gz
[xscreensaver] / hacks / glx / hypertorus.c
index 9449c3184212815d7e0b6050bacd3d747fe65890..931d24ccfa9e0610d007d216f91b6658f7a9138e 100644 (file)
@@ -110,18 +110,7 @@ static const char sccsid[] = "@(#)hypertorus.c  1.1 03/05/18 xlockmore";
 # define hypertorus_opts xlockmore_opts
 # define DEFAULTS        "*delay:      25000 \n" \
                          "*showFPS:    False \n" \
-                         "*wireframe:  False \n" \
-                         "*displayMode: "  DEF_DISPLAY_MODE  " \n" \
-                         "*appearance: "   DEF_APPEARANCE    " \n" \
-                         "*colors: "       DEF_COLORS        " \n" \
-                         "*projection3d: " DEF_3D_PROJECTION " \n" \
-                         "*projection4d: " DEF_4D_PROJECTION " \n" \
-                         "speedwx: "       DEF_DALPHA        " \n" \
-                         "speedwy: "       DEF_DBETA         " \n" \
-                         "speedwz: "       DEF_DDELTA        " \n" \
-                         "speedxy: "       DEF_DZETA         " \n" \
-                         "speedxz: "       DEF_DETA          " \n" \
-                         "speedyz: "       DEF_DTHETA        " \n"
+
 # include "xlockmore.h"         /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"             /* from the xlockmore distribution */
@@ -170,71 +159,65 @@ static const float offset3d[4] = {
 
 static XrmOptionDescRec opts[] =
 {
-  {"-mesh",            ".hypertorus.displayMode",  XrmoptionNoArg,
-                       (caddr_t)DISP_WIREFRAME_STR },
+  {"-wireframe",       ".hypertorus.displayMode",  XrmoptionNoArg,
+                       DISP_WIREFRAME_STR },
   {"-surface",         ".hypertorus.displayMode",  XrmoptionNoArg,
-                       (caddr_t)DISP_SURFACE_STR },
+                       DISP_SURFACE_STR },
   {"-transparent",     ".hypertorus.displayMode",  XrmoptionNoArg,
-                       (caddr_t)DISP_TRANSPARENT_STR },
+                       DISP_TRANSPARENT_STR },
   {"-solid",           ".hypertorus.appearance",   XrmoptionNoArg,
-                       (caddr_t)APPEARANCE_SOLID_STR },
+                       APPEARANCE_SOLID_STR },
   {"-bands",           ".hypertorus.appearance",   XrmoptionNoArg,
-                       (caddr_t)APPEARANCE_BANDS_STR },
+                       APPEARANCE_BANDS_STR },
   {"-twosided",        ".hypertorus.colors",       XrmoptionNoArg,
-                       (caddr_t)COLORS_TWOSIDED_STR },
+                       COLORS_TWOSIDED_STR },
   {"-colorwheel",      ".hypertorus.colors",       XrmoptionNoArg,
-                       (caddr_t)COLORS_COLORWHEEL_STR },
+                       COLORS_COLORWHEEL_STR },
   {"-perspective-3d",  ".hypertorus.projection3d", XrmoptionNoArg,
-                       (caddr_t)DISP_3D_PERSPECTIVE_STR },
+                       DISP_3D_PERSPECTIVE_STR },
   {"-orthographic-3d", ".hypertorus.projection3d", XrmoptionNoArg,
-                       (caddr_t)DISP_3D_ORTHOGRAPHIC_STR },
+                       DISP_3D_ORTHOGRAPHIC_STR },
   {"-perspective-4d",  ".hypertorus.projection4d", XrmoptionNoArg,
-                       (caddr_t)DISP_4D_PERSPECTIVE_STR },
+                       DISP_4D_PERSPECTIVE_STR },
   {"-orthographic-4d", ".hypertorus.projection4d", XrmoptionNoArg,
-                       (caddr_t)DISP_4D_ORTHOGRAPHIC_STR },
-  {"-speed-wx",        ".hypertorus.speedwx",      XrmoptionSepArg,
-                       (caddr_t)NULL },
-  {"-speed-wy",        ".hypertorus.speedwy",      XrmoptionSepArg,
-                       (caddr_t)NULL },
-  {"-speed-wz",        ".hypertorus.speedwz",      XrmoptionSepArg,
-                       (caddr_t)NULL },
-  {"-speed-xy",        ".hypertorus.speedxy",      XrmoptionSepArg,
-                       (caddr_t)NULL },
-  {"-speed-xz",        ".hypertorus.speedxz",      XrmoptionSepArg,
-                       (caddr_t)NULL },
-  {"-speed-yz",        ".hypertorus.speedyz",      XrmoptionSepArg,
-                       (caddr_t)NULL }
+                       DISP_4D_ORTHOGRAPHIC_STR },
+  {"-speed-wx",        ".hypertorus.speedwx",      XrmoptionSepArg, 0 },
+  {"-speed-wy",        ".hypertorus.speedwy",      XrmoptionSepArg, 0 },
+  {"-speed-wz",        ".hypertorus.speedwz",      XrmoptionSepArg, 0 },
+  {"-speed-xy",        ".hypertorus.speedxy",      XrmoptionSepArg, 0 },
+  {"-speed-xz",        ".hypertorus.speedxz",      XrmoptionSepArg, 0 },
+  {"-speed-yz",        ".hypertorus.speedyz",      XrmoptionSepArg, 0 }
 };
 
 static argtype vars[] =
 {
-  { (caddr_t *) &display_mode,  "displayMode",  "DisplayMode",
+  { &display_mode,  "displayMode",  "DisplayMode",
     DEF_DISPLAY_MODE,  t_Int },
-  { (caddr_t *) &appearance,    "appearance",   "Appearance",
+  { &appearance,    "appearance",   "Appearance",
     DEF_APPEARANCE,    t_Int },
-  { (caddr_t *) &colors,        "colors",       "Colors",
+  { &colors,        "colors",       "Colors",
     DEF_COLORS,        t_Int },
-  { (caddr_t *) &projection_3d, "projection3d", "Projection3d",
+  { &projection_3d, "projection3d", "Projection3d",
     DEF_3D_PROJECTION, t_Int },
-  { (caddr_t *) &projection_4d, "projection4d", "Projection4d",
+  { &projection_4d, "projection4d", "Projection4d",
     DEF_4D_PROJECTION, t_Int },
-  { (caddr_t *) &speed_wx,      "speedwx",      "Speedwx",
+  { &speed_wx,      "speedwx",      "Speedwx",
     DEF_DALPHA,        t_Float},
-  { (caddr_t *) &speed_wy,      "speedwy",      "Speedwy",
+  { &speed_wy,      "speedwy",      "Speedwy",
     DEF_DBETA,         t_Float},
-  { (caddr_t *) &speed_wz,      "speedwz",      "Speedwz",
+  { &speed_wz,      "speedwz",      "Speedwz",
     DEF_DDELTA,        t_Float},
-  { (caddr_t *) &speed_xy,      "speedxy",      "Speedxy",
+  { &speed_xy,      "speedxy",      "Speedxy",
     DEF_DZETA,         t_Float},
-  { (caddr_t *) &speed_xz,      "speedxz",      "Speedxz",
+  { &speed_xz,      "speedxz",      "Speedxz",
     DEF_DETA,          t_Float},
-  { (caddr_t *) &speed_yz,      "speedyz",      "Speedyz",
+  { &speed_yz,      "speedyz",      "Speedyz",
     DEF_DTHETA,        t_Float}
 };
 
 static OptionStruct desc[] =
 {
-  { "-mesh",            "display the torus as a wireframe mesh" },
+  { "-wireframe",       "display the torus as a wireframe mesh" },
   { "-surface",         "display the torus as a solid surface" },
   { "-transparent",     "display the torus as a transparent surface" },
   { "-solid",           "display the torus as a solid object" },