X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fpolytopes.c;h=f4043dcaa78cef7e110f8025cc092082bb790a99;hb=3f438031d610c7e15fd33876a879b97e290e05fb;hp=d4a9eaa53669d14ced50e3e78ebd8b397ad529cf;hpb=6a1da724858673ac40aa13a9612340d8bed8c7b9;p=xscreensaver diff --git a/hacks/glx/polytopes.c b/hacks/glx/polytopes.c index d4a9eaa5..f4043dca 100644 --- a/hacks/glx/polytopes.c +++ b/hacks/glx/polytopes.c @@ -1,8 +1,7 @@ /* polytopes --- Shows one of the six regular polytopes rotating in 4d */ -#if !defined( lint ) && !defined( SABER ) +#if 0 static const char sccsid[] = "@(#)polytopes.c 1.1 03/05/18 xlockmore"; - #endif /* Copyright (c) 2003 Carsten Steger . */ @@ -120,19 +119,8 @@ static const char sccsid[] = "@(#)polytopes.c 1.1 03/05/18 xlockmore"; # define HACK_RESHAPE reshape_polytopes # define polytopes_opts xlockmore_opts # define DEFAULTS "*delay: 25000 \n" \ - "*showFPS: False \n" \ - "*wireframe: False \n" \ - "*displayMode: " DEF_DISPLAY_MODE " \n" \ - "*polytope: " DEF_POLYTOPE " \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" + "*showFPS: False \n" + # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ # include "xlock.h" /* from the xlockmore distribution */ @@ -176,81 +164,64 @@ static const float offset3d[4] = { 0.0, 0.0, -2.0, 0.0 }; static XrmOptionDescRec opts[] = { - {"-mesh", ".polytopes.displayMode", XrmoptionNoArg, - (caddr_t)DISP_WIREFRAME_STR }, + {"-wireframe", ".polytopes.displayMode", XrmoptionNoArg, + DISP_WIREFRAME_STR }, {"-surface", ".polytopes.displayMode", XrmoptionNoArg, - (caddr_t)DISP_SURFACE_STR }, + DISP_SURFACE_STR }, {"-transparent", ".polytopes.displayMode", XrmoptionNoArg, - (caddr_t)DISP_TRANSPARENT_STR }, + DISP_TRANSPARENT_STR }, {"-random", ".polytopes.polytope", XrmoptionNoArg, - (caddr_t)POLYTOPE_RANDOM_STR }, + POLYTOPE_RANDOM_STR }, {"-5-cell", ".polytopes.polytope", XrmoptionNoArg, - (caddr_t)POLYTOPE_5_CELL_STR }, + POLYTOPE_5_CELL_STR }, {"-8-cell", ".polytopes.polytope", XrmoptionNoArg, - (caddr_t)POLYTOPE_8_CELL_STR }, + POLYTOPE_8_CELL_STR }, {"-16-cell", ".polytopes.polytope", XrmoptionNoArg, - (caddr_t)POLYTOPE_16_CELL_STR }, + POLYTOPE_16_CELL_STR }, {"-24-cell", ".polytopes.polytope", XrmoptionNoArg, - (caddr_t)POLYTOPE_24_CELL_STR }, + POLYTOPE_24_CELL_STR }, {"-120-cell", ".polytopes.polytope", XrmoptionNoArg, - (caddr_t)POLYTOPE_120_CELL_STR }, + POLYTOPE_120_CELL_STR }, {"-600-cell", ".polytopes.polytope", XrmoptionNoArg, - (caddr_t)POLYTOPE_600_CELL_STR }, + POLYTOPE_600_CELL_STR }, {"-single-color", ".polytopes.colors", XrmoptionNoArg, - (caddr_t)COLORS_SINGLE_STR }, + COLORS_SINGLE_STR }, {"-depth-colors", ".polytopes.colors", XrmoptionNoArg, - (caddr_t)COLORS_DEPTH_STR }, + COLORS_DEPTH_STR }, {"-perspective-3d", ".polytopes.projection3d", XrmoptionNoArg, - (caddr_t)DISP_3D_PERSPECTIVE_STR }, + DISP_3D_PERSPECTIVE_STR }, {"-orthographic-3d", ".polytopes.projection3d", XrmoptionNoArg, - (caddr_t)DISP_3D_ORTHOGRAPHIC_STR }, + DISP_3D_ORTHOGRAPHIC_STR }, {"-perspective-4d", ".polytopes.projection4d", XrmoptionNoArg, - (caddr_t)DISP_4D_PERSPECTIVE_STR }, + DISP_4D_PERSPECTIVE_STR }, {"-orthographic-4d", ".polytopes.projection4d", XrmoptionNoArg, - (caddr_t)DISP_4D_ORTHOGRAPHIC_STR }, - {"-speed-wx", ".polytopes.speedwx", XrmoptionSepArg, - (caddr_t)NULL }, - {"-speed-wy", ".polytopes.speedwy", XrmoptionSepArg, - (caddr_t)NULL }, - {"-speed-wz", ".polytopes.speedwz", XrmoptionSepArg, - (caddr_t)NULL }, - {"-speed-xy", ".polytopes.speedxy", XrmoptionSepArg, - (caddr_t)NULL }, - {"-speed-xz", ".polytopes.speedxz", XrmoptionSepArg, - (caddr_t)NULL }, - {"-speed-yz", ".polytopes.speedyz", XrmoptionSepArg, - (caddr_t)NULL } + DISP_4D_ORTHOGRAPHIC_STR }, + {"-speed-wx", ".polytopes.speedwx", XrmoptionSepArg, 0 }, + {"-speed-wy", ".polytopes.speedwy", XrmoptionSepArg, 0 }, + {"-speed-wz", ".polytopes.speedwz", XrmoptionSepArg, 0 }, + {"-speed-xy", ".polytopes.speedxy", XrmoptionSepArg, 0 }, + {"-speed-xz", ".polytopes.speedxz", XrmoptionSepArg, 0 }, + {"-speed-yz", ".polytopes.speedyz", XrmoptionSepArg, 0 } }; static argtype vars[] = { - { (caddr_t *) &display_mode, "displayMode", "DisplayMode", - DEF_DISPLAY_MODE, t_Int }, - { (caddr_t *) &polytope, "polytope", "Polytope", - DEF_POLYTOPE, t_Int }, - { (caddr_t *) &color_mode, "colors", "Colors", - DEF_COLORS, t_Int }, - { (caddr_t *) &projection_3d, "projection3d", "Projection3d", - DEF_3D_PROJECTION, t_Int }, - { (caddr_t *) &projection_4d, "projection4d", "Projection4d", - DEF_4D_PROJECTION, t_Int }, - { (caddr_t *) &speed_wx, "speedwx", "Speedwx", - DEF_DALPHA, t_Float}, - { (caddr_t *) &speed_wy, "speedwy", "Speedwy", - DEF_DBETA, t_Float}, - { (caddr_t *) &speed_wz, "speedwz", "Speedwz", - DEF_DDELTA, t_Float}, - { (caddr_t *) &speed_xy, "speedxy", "Speedxy", - DEF_DZETA, t_Float}, - { (caddr_t *) &speed_xz, "speedxz", "Speedxz", - DEF_DETA, t_Float}, - { (caddr_t *) &speed_yz, "speedyz", "Speedyz", - DEF_DTHETA, t_Float} + { &display_mode, "displayMode", "DisplayMode", DEF_DISPLAY_MODE, t_Int }, + { &polytope, "polytope", "Polytope", DEF_POLYTOPE, t_Int }, + { &color_mode, "colors", "Colors", DEF_COLORS, t_Int }, + { &projection_3d, "projection3d", "Projection3d",DEF_3D_PROJECTION, t_Int }, + { &projection_4d, "projection4d", "Projection4d",DEF_4D_PROJECTION, t_Int }, + { &speed_wx, "speedwx", "Speedwx", DEF_DALPHA, t_Float}, + { &speed_wy, "speedwy", "Speedwy", DEF_DBETA, t_Float}, + { &speed_wz, "speedwz", "Speedwz", DEF_DDELTA, t_Float}, + { &speed_xy, "speedxy", "Speedxy", DEF_DZETA, t_Float}, + { &speed_xz, "speedxz", "Speedxz", DEF_DETA, t_Float}, + { &speed_yz, "speedyz", "Speedyz", DEF_DTHETA, t_Float} }; static OptionStruct desc[] = { - { "-mesh", "display the polytope as a wireframe mesh" }, + { "-wireframe", "display the polytope as a wireframe mesh" }, { "-surface", "display the polytope as a solid surface" }, { "-transparent", "display the polytope as a transparent surface" }, { "-solid", "display the polytope as a solid object" },