void
BouncyDistro::draw()
{
- texture_draw(&img_distro[0],
- base.x - scroll_x,
- base.y);
+ img_distro[0]->draw(base.x - scroll_x,
+ base.y);
}
base.xm = xm;
base.ym = ym;
- timer_init(&timer, true);
- timer_start(&timer,200);
+ timer.init(true);
+ timer.start(200);
}
void
base.x = base.x + base.xm * frame_ratio;
base.y = base.y + base.ym * frame_ratio;
- if (!timer_check(&timer))
+ if (!timer.check())
World::current()->broken_bricks.erase(static_cast<std::vector<BrokenBrick>::iterator>(this));
}
dest.h = 16;
if (tile->images.size() > 0)
- texture_draw_part(&tile->images[0],
- src.x,src.y,dest.x,dest.y,dest.w,dest.h);
+ tile->images[0]->draw_part(src.x,src.y,dest.x,dest.y,dest.w,dest.h);
}
void
{
fillrect(base.x - scroll_x, base.y,
32,32,
- plevel->bkgd_red, plevel->bkgd_green, plevel->bkgd_blue, 0);
+ plevel->bkgd_top.red, plevel->bkgd_top.green, plevel->bkgd_top.blue, 0);
+// FIXME: doesn't respect the gradient, futhermore is this necessary at all??
}
else
{
s = (int)scroll_x / 30;
- texture_draw_part(&plevel->img_bkgd, dest.x + s, dest.y,
- dest.x, dest.y,dest.w,dest.h);
+ plevel->img_bkgd->draw_part(dest.x + s, dest.y,
+ dest.x, dest.y,dest.w,dest.h);
}
Tile::draw(base.x - scroll_x,
{
base.x = x;
base.y = y - 16;
- timer_init(&timer,true);
- timer_start(&timer,1000);
+ timer.init(true);
+ timer.start(1000);
value = s;
}
{
base.y = base.y - 2 * frame_ratio;
- if(!timer_check(&timer))
+ if(!timer.check())
World::current()->floating_scores.erase(static_cast<std::vector<FloatingScore>::iterator>(this));
}
{
char str[10];
sprintf(str, "%d", value);
- text_draw(&gold_text, str, (int)base.x + 16 - strlen(str) * 8, (int)base.y, 1);
+ gold_text->draw(str, (int)base.x + 16 - strlen(str) * 8, (int)base.y, 1);
}
/* EOF */