#define DEF_SEVEN "False"
#define DEF_PARTS "10"
-
-#define DEFAULTS "*parts: " DEF_PARTS " \n" \
- "*spin: " DEF_SPIN "\n" \
- "*delay: 20000 \n" \
- "*showFPS: False \n" \
- "*seven: " DEF_SEVEN "\n" \
- "*light: True \n" \
- "*rotate: False\n" \
- "*font: fixed\n" \
- "*rotatespeed: 1\n" \
+#define DEFAULTS "*delay: 20000 \n" \
+ "*showFPS: False \n"
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
{"-parts", ".circuit.parts", XrmoptionSepArg, "10" },
{"-font", ".circuit.font", XrmoptionSepArg, "fixed" },
{"-rotate-speed", ".circuit.rotatespeed", XrmoptionSepArg, "1" },
- {"+spin", ".circuit.spin", XrmoptionNoArg, (caddr_t) "false" },
- {"-spin", ".circuit.spin", XrmoptionNoArg, (caddr_t) "true" },
- {"+light", ".circuit.light", XrmoptionNoArg, (caddr_t) "false" },
- {"-light", ".circuit.light", XrmoptionNoArg, (caddr_t) "true" },
- {"+seven", ".circuit.seven", XrmoptionNoArg, (caddr_t) "false" },
- {"-seven", ".circuit.seven", XrmoptionNoArg, (caddr_t) "true" },
- {"+rotate", ".circuit.rotate", XrmoptionNoArg, (caddr_t) "false" },
- {"-rotate", ".circuit.rotate", XrmoptionNoArg, (caddr_t) "true" },
+ {"+spin", ".circuit.spin", XrmoptionNoArg, "false" },
+ {"-spin", ".circuit.spin", XrmoptionNoArg, "true" },
+ {"+light", ".circuit.light", XrmoptionNoArg, "false" },
+ {"-light", ".circuit.light", XrmoptionNoArg, "true" },
+ {"+seven", ".circuit.seven", XrmoptionNoArg, "false" },
+ {"-seven", ".circuit.seven", XrmoptionNoArg, "true" },
+ {"+rotate", ".circuit.rotate", XrmoptionNoArg, "false" },
+ {"-rotate", ".circuit.rotate", XrmoptionNoArg, "true" },
};
static argtype vars[] = {
- {(caddr_t *) &maxparts, "parts", "Parts", DEF_PARTS, t_Int},
- {(caddr_t *) &font, "font", "Font", "fixed", t_String},
- {(caddr_t *) &rotatespeed, "rotatespeed", "Rotatespeed", "1", t_Int},
- {(caddr_t *) &spin, "spin", "Spin", DEF_SPIN, t_Bool},
- {(caddr_t *) &rotate, "rotate", "Rotate", "False", t_Bool},
- {(caddr_t *) &uselight, "light", "Light", "True", t_Bool},
- {(caddr_t *) &seven, "seven", "Seven", DEF_SEVEN, t_Bool},
+ {&maxparts, "parts", "Parts", DEF_PARTS, t_Int},
+ {&font, "font", "Font", "fixed", t_String},
+ {&rotatespeed, "rotatespeed", "Rotatespeed", "1", t_Int},
+ {&spin, "spin", "Spin", DEF_SPIN, t_Bool},
+ {&rotate, "rotate", "Rotate", "False", t_Bool},
+ {&uselight, "light", "Light", "True", t_Bool},
+ {&seven, "seven", "Seven", DEF_SEVEN, t_Bool},
};
ModeSpecOpt circuit_opts = {countof(opts), opts, countof(vars), vars, NULL};
#define MAX_COMPONENTS 30
-#define MOVE_MULT 0.05
+#define MOVE_MULT 0.02
static float f_rand(void) {
return ((float)RAND(10000)/(float)10000);
typedef struct {
int type; /* package type. 0 = to-92, 1 = to-220 */
GLfloat tw, th; /* texture dimensions */
- int tnum; /* texture binding */
+ GLuint tnum; /* texture binding */
} Transistor;
typedef struct {
void DrawThreeFive(ThreeFive *);
void DrawSwitch(Switch *);
-void freetexture(int);
+void freetexture(GLuint);
void reorder(Component *[]);
void circle(float, int,int);
void bandedCylinder(float, float , GLfloat, GLfloat , GLfloat, Band **, int);
c->rotx = f_rand();
c->roty = f_rand();
c->rotz = f_rand();
- c->drot = f_rand() * 7;
+ c->drot = f_rand() * 3;
c->rdeg = 0;
c->dz = f_rand()*2 - 1;
c->norm = 0;
glFlush();
}
-void freetexture (int texture) {
+void freetexture (GLuint texture) {
s_refs[texture]--;
if (s_refs[texture] < 1) {
glDeleteTextures(1, &texture);
GL_RGBA, GL_UNSIGNED_BYTE, ximage->data);
if (status)
{
- const char *s = gluErrorString (status);
+ const char *s = (char *) gluErrorString (status);
fprintf (stderr, "%s: error mipmapping %dx%d texture: %s\n",
progname, ximage->width, ximage->height,
(s ? s : "(unknown)"));