#ifdef USE_MODULES
ModStruct providence_description = {
"providence", "init_providence", "draw_providence",
#ifdef USE_MODULES
ModStruct providence_description = {
"providence", "init_providence", "draw_providence",
- "release_providence", "draw_providence", "change_providence",
+ (char *) NULL, "draw_providence", "change_providence",
(char *) NULL, &providence_opts, 1000, 1, 1, 1, 4, 1.0, "",
"draws pyramid with glory", 0, NULL
};
(char *) NULL, &providence_opts, 1000, 1, 1, 1, 4, 1.0, "",
"draws pyramid with glory", 0, NULL
};
/* if(x > EYELENGTH || (x > EYELENGTH/(2/3.0) && random()%7 == 0)) { */
mp->eyeparticles[i][0] = random()%LOOKUPSIZE;
/* if(x > EYELENGTH || (x > EYELENGTH/(2/3.0) && random()%7 == 0)) { */
mp->eyeparticles[i][0] = random()%LOOKUPSIZE;
- glViewport(0, 0, mp->WindW = (GLint) width, mp->WindH = (GLint) height);
+ glViewport(0, y, mp->WindW = (GLint) width, mp->WindH = (GLint) height);
-
- case Button1:
- mp->button_down_p = True;
- gltrackball_start(mp->trackball,
- event->xbutton.x, event->xbutton.y,
- MI_WIDTH (mi), MI_HEIGHT (mi));
- break;
-
-
- break;
-
- case ButtonRelease:
-
- switch(event->xbutton.button) {
- case Button1:
- mp->button_down_p = False;
- break;
- }
-
- break;
-
- case MotionNotify:
- if(mp->button_down_p)
- gltrackball_track(mp->trackball,
- event->xmotion.x, event->xmotion.y,
- MI_WIDTH (mi), MI_HEIGHT (mi));
gltrackball_rotate(mp->trackball);
glRotatef(mp->theta * 180.0 / Pi, 0.0, -1.0, 0.0);
gltrackball_rotate(mp->trackball);
glRotatef(mp->theta * 180.0 / Pi, 0.0, -1.0, 0.0);
+# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */
+ {
+ GLfloat h = MI_HEIGHT(mi) / (GLfloat) MI_WIDTH(mi);
+ int o = (int) current_device_rotation();
+ if (o != 0 && o != 180 && o != -180)
+ glScalef (1/h, 1/h, 1/h);
+ }
+# endif
+