+ if (isbrick(pplayer->base.x+ 31, pplayer->base.y) ||
+ isfullbox(pplayer->base.x+ 31, pplayer->base.y))
+ {
+ trygrabdistro(pplayer->base.x+ 31, pplayer->base.y - 32,BOUNCE);
+ trybumpbadguy(pplayer->base.x+ 31, pplayer->base.y - 64);
+
+ if(pplayer->size == BIG)
+ trybreakbrick(pplayer->base.x+ 31, pplayer->base.y);
+
+ bumpbrick(pplayer->base.x+ 31, pplayer->base.y);
+ tryemptybox(pplayer->base.x+ 31, pplayer->base.y);
+ }
+
+
+ if(pplayer->size == SMALL)
+ {
+ /* Get a distro from a brick? */
+
+ if (shape(pplayer->base.x, pplayer->base.y) == 'x' ||
+ shape(pplayer->base.x, pplayer->base.y) == 'y')
+ {
+ add_bouncy_distro((((int)pplayer->base.x)
+ / 32) * 32,
+ ((int)pplayer->base.y / 32) * 32);
+ if (counting_distros == NO)
+ {
+ counting_distros = YES;
+ distro_counter = 100;
+ }
+
+ if (distro_counter <= 0)
+ level_change(¤t_level,pplayer->base.x,pplayer->base.y - 1, 'a');
+
+ play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
+ score = score + SCORE_DISTRO;
+ distros++;
+ }
+ else if (shape(pplayer->base.x+ 31, pplayer->base.y) == 'x' ||
+ shape(pplayer->base.x+ 31, pplayer->base.y) == 'y')
+ {
+ add_bouncy_distro((((int)pplayer->base.x + 31)
+ / 32) * 32,
+ ((int)pplayer->base.y / 32) * 32);
+ if (counting_distros == NO)
+ {
+ counting_distros = YES;
+ distro_counter = 100;
+ }
+
+ if (distro_counter <= 0)
+ level_change(¤t_level,pplayer->base.x+ 31, pplayer->base.y, 'a');
+
+ play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
+ score = score + SCORE_DISTRO;
+ distros++;
+ }
+ }
+ }
+
+ player_grabdistros(pplayer);
+
+ /* FIXME: this code is COMPLETLY broken!!! */
+ /* if (issolid(pplayer->base.x, pplayer->base.y + 31) &&
+ !issolid(pplayer->base.x- pplayer->base.xm, pplayer->base.y + 31))
+ {
+ while (issolid(pplayer->base.x, pplayer->base.y + 31))
+ {
+ if (pplayer->base.xm < 0)
+ pplayer->base.x++;
+ else if (pplayer->base.xm > 0)
+ pplayer->base.x--;
+ }
+
+ pplayer->base.xm = 0;
+ }*/
+
+ /*if (issolid(pplayer->base.x, pplayer->base.y) &&
+ !issolid(pplayer->base.x- pplayer->base.xm, pplayer->base.y))
+ {
+ while (issolid(pplayer->base.x, (pplayer->base.y)))
+ {
+ if (pplayer->base.xm < 0)
+ pplayer->base.x++;
+ else if (pplayer->base.xm > 0)
+ pplayer->base.x--;
+ }
+
+ pplayer->base.xm = 0;
+ }*/
+
+ /*if (issolid(pplayer->base.x, pplayer->base.y + 31))
+ {
+ /* Set down properly: * /
+
+ int debug_int = 0;
+ while (issolid(pplayer->base.x, pplayer->base.y + 31))
+ {
+ ++debug_int;
+ if(debug_int > 32)
+ {
+ DEBUG_MSG("FIXME - UNDER certain circumstances I'm hanging in a loop here!");
+ /*the circumstances are:
+ issolid() is true and base.ym == 0
+ use of floating point varibles for base stuff* /
+ break;
+ }
+ if (pplayer->base.ym < 0)
+ pplayer->base.y++;
+ else if (pplayer->base.ym > 0)
+ pplayer->base.y--;
+ }