{
/* Get a distro from it: */
- add_bouncy_distro(((x + 1) / 32) * 32,
+ add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32);
if (counting_distros == NO)
/* Box with a distro! */
- add_bouncy_distro(((x + 1) / 32) * 32,
+ add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32 - 32);
play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
if (bounciness == BOUNCE)
{
- add_bouncy_distro(((x + 1) / 32) * 32,
+ add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32);
}
void trybreakbrick(float x, float y);
void tryemptybox(float x, float y);
void trybumpbadguy(float x, float y);
-void add_bouncy_distro(float x, float y);
-void add_broken_brick(float x, float y);
-void add_broken_brick_piece(float x, float y, float xm, float ym);
-void add_bouncy_brick(float x, float y);
-void add_bad_guy(float x, float y, int kind);
-void add_upgrade(float x, float y, int kind);
-void add_bullet(float x, float y, float xm, int dir);
#endif /*SUPERTUX_GAMELOOP_H*/
if (shape(pplayer->base.x, pplayer->base.y - 1) == 'x' ||
shape(pplayer->base.x, pplayer->base.y - 1) == 'y')
{
- add_bouncy_distro(((pplayer->base.x+ 1)
+ add_bouncy_distro((((int)pplayer->base.x)
/ 32) * 32,
- (int)(pplayer->base.y - 1 / 32) * 32);
-
+ ((int)pplayer->base.y - 1 / 32) * 32);
+DEBUG_MSG("should work");
if (counting_distros == NO)
{
counting_distros = YES;
else if (shape(pplayer->base.x+ 31, pplayer->base.y - 1) == 'x' ||
shape(pplayer->base.x+ 31, pplayer->base.y - 1) == 'y')
{
- add_bouncy_distro(((pplayer->base.x+ 1 + 31)
+ add_bouncy_distro((((int)pplayer->base.x + 31)
/ 32) * 32,
- (int)(pplayer->base.y - 1 / 32) * 32);
-
+ ((int)pplayer->base.y - 1 / 32) * 32);
+DEBUG_MSG("+31?");
if (counting_distros == NO)
{
counting_distros = YES;
{
player_handle_horizontal_input(pplayer,LEFT);
}
- else
+ else
{
- if(pplayer->base.xm > 0)
- pplayer->base.xm = (int)(pplayer->base.xm - frame_ratio);
- else if(pplayer->base.xm < 0)
- pplayer->base.xm = (int)(pplayer->base.xm + frame_ratio);
+ if(pplayer->base.xm > 0)
+ pplayer->base.xm = (int)(pplayer->base.xm - frame_ratio);
+ else if(pplayer->base.xm < 0)
+ pplayer->base.xm = (int)(pplayer->base.xm + frame_ratio);
}
/* Jump/jumping? */
trygrabdistro(pplayer->base.x, pplayer->base.y, NO_BOUNCE);
trygrabdistro(pplayer->base.x+ 31, pplayer->base.y, NO_BOUNCE);
- if (pplayer->size == BIG && !pplayer->duck)
+ trygrabdistro(pplayer->base.x, pplayer->base.y + pplayer->base.height, NO_BOUNCE);
+ trygrabdistro(pplayer->base.x+ 31, pplayer->base.y + pplayer->base.height, NO_BOUNCE);
+
+ if(pplayer->size == BIG)
{
- trygrabdistro(pplayer->base.x, pplayer->base.y - 32, NO_BOUNCE);
- trygrabdistro(pplayer->base.x+ 31, pplayer->base.y - 32, NO_BOUNCE);
+ trygrabdistro(pplayer->base.x, pplayer->base.y + pplayer->base.height / 2, NO_BOUNCE);
+ trygrabdistro(pplayer->base.x+ 31, pplayer->base.y + pplayer->base.height / 2, NO_BOUNCE);
}
+
}
void add_bouncy_distro(float x, float y)
{
+
+
+printf("X _--- %f Y-- isdojf %f\n",x,y);
+
int i, found;
found = -1;
void arrays_init(void);
void arrays_free(void);
+void add_bouncy_distro(float x, float y);
+void add_broken_brick(float x, float y);
+void add_broken_brick_piece(float x, float y, float xm, float ym);
+void add_bouncy_brick(float x, float y);
+void add_bad_guy(float x, float y, int kind);
+void add_upgrade(float x, float y, int kind);
+void add_bullet(float x, float y, float xm, int dir);
+
#endif /*SUPERTUX_SCENE_H*/
pbouncy_distro->base.alive = YES;
pbouncy_distro->base.x = x;
pbouncy_distro->base.y = y;
- pbouncy_distro->base.ym = -6;
+ pbouncy_distro->base.ym = -2;
}
void bouncy_distro_action(bouncy_distro_type* pbouncy_distro)
{
pbouncy_distro->base.y = pbouncy_distro->base.y + pbouncy_distro->base.ym * frame_ratio;
- pbouncy_distro->base.ym += 1. * frame_ratio;
+ pbouncy_distro->base.ym += 0.1 * frame_ratio;
if (pbouncy_distro->base.ym >= 0)
pbouncy_distro->base.alive = NO;