+ if (thisSproingie->direction == JUMP_LEFT) {
+ /* When the sproingie jumps to the left, the frames must be */
+ /* rotated and translated */
+ glTranslatef((GLfloat) (thisSproingie->x ),
+ (GLfloat) (thisSproingie->y ),
+ (GLfloat) (thisSproingie->z - 1));
+ glRotatef((GLfloat) - 90.0, 0.0, 1.0, 0.0);
+ if (thisSproingie->frame == LAST_FRAME) {
+ thisSproingie->x -= 0;
+ thisSproingie->y -= 1;
+ thisSproingie->z += 1;
+ }
+ } else {
+ glTranslatef((GLfloat) (thisSproingie->x),
+ (GLfloat) (thisSproingie->y),
+ (GLfloat) (thisSproingie->z));
+ glRotatef((GLfloat) - 0.0, 0.0, 1.0, 0.0);
+ if (thisSproingie->frame == LAST_FRAME) {
+ thisSproingie->x += 1;
+ thisSproingie->y -= 1;
+ thisSproingie->z -= 0;
+ }
+ }
+/* } */
+/** glCallList(si->sproingies[thisSproingie->frame]);*/
+/**/ renderList(si->sproingies[thisSproingie->frame], si->wireframe);
+
+ /* Every 6 frame cycle... */
+ if (thisSproingie->frame == LAST_FRAME) {
+ /* ...check if the sproingies have gone out of the bricks */
+ if (((thisSproingie->x - thisSproingie->z == 6) &&
+ (2*thisSproingie->x + thisSproingie->y == 6)) ||
+ ((thisSproingie->z - thisSproingie->x == 5) &&
+ (2*thisSproingie->x + thisSproingie->y == -5))) {
+ /* If they have, then they die */
+ if (thisSproingie->life > 0 && thisSproingie->frame < BOOM_FRAME && thisSproingie->frame > FIRST_FRAME) {
+ thisSproingie->frame = BOOM_FRAME;
+ }
+ } else {
+ /* If not, they choose a direction for the next hop */
+ if (smart_sproingies) {
+ if ((thisSproingie->x - thisSproingie->z == 5) &&
+ (2*thisSproingie->x + thisSproingie->y == 5)) {
+ thisSproingie->direction = JUMP_LEFT;
+ } else if ((thisSproingie->z - thisSproingie->x == 4) &&
+ (2*thisSproingie->x + thisSproingie->y == -4)) {
+ thisSproingie->direction = JUMP_RIGHT;
+ } else {
+ thisSproingie->direction = myrand(2);
+ }
+ } else {
+ thisSproingie->direction = myrand(2);
+ }
+ }
+ }