- /* Stop bouncing? */
-
- if (pbouncy_brick->offset >= 0)
- world.bouncy_bricks.erase(static_cast<std::vector<bouncy_brick_type>::iterator>(pbouncy_brick));
-}
-
-void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick)
-{
- int s;
- SDL_Rect dest;
-
- if (pbouncy_brick->base.x >= scroll_x - 32 &&
- pbouncy_brick->base.x <= scroll_x + screen->w)
- {
- dest.x = (int)(pbouncy_brick->base.x - scroll_x);
- dest.y = (int)pbouncy_brick->base.y;
- dest.w = 32;
- dest.h = 32;
-
- Level* plevel = GameSession::current()->get_level();
-
- // FIXME: overdrawing hack to clean the tile from the screen to
- // paint it later at on offseted position
- if(plevel->bkgd_image[0] == '\0')
- {
- fillrect(pbouncy_brick->base.x - scroll_x, pbouncy_brick->base.y,
- 32,32,
- plevel->bkgd_red, plevel->bkgd_green, plevel->bkgd_blue, 0);
- }
- else
- {
- s = (int)scroll_x / 30;
- texture_draw_part(&img_bkgd,dest.x + s,dest.y,dest.x,dest.y,dest.w,dest.h);
- }
-
- drawshape(pbouncy_brick->base.x - scroll_x,
- pbouncy_brick->base.y + pbouncy_brick->offset,
- pbouncy_brick->shape);
- }
-}
-
-void floating_score_init(floating_score_type* pfloating_score, float x, float y, int s)
-{
- pfloating_score->base.x = x;
- pfloating_score->base.y = y - 16;
- timer_init(&pfloating_score->timer,true);
- timer_start(&pfloating_score->timer,1000);
- pfloating_score->value = s;
-}