- int y,x;
-
- /* Draw the real background */
- if(get_level()->bkgd_image[0] != '\0')
- {
- int s = (int)scroll_x / 30;
- texture_draw_part(&level->img_bkgd, s, 0,0,0,level->img_bkgd.w - s, level->img_bkgd.h);
- texture_draw_part(&level->img_bkgd, 0, 0,screen->w - s ,0,s,level->img_bkgd.h);
- }
- else
- {
- clearscreen(level->bkgd_red, level->bkgd_green, level->bkgd_blue);
- }
-
- /* Draw particle systems (background) */
- std::vector<ParticleSystem*>::iterator p;
- for(p = particle_systems.begin(); p != particle_systems.end(); ++p)
- {
- (*p)->draw(scroll_x, 0, 0);
- }
-
- /* Draw background: */
- for (y = 0; y < 15; ++y)
- {
- for (x = 0; x < 21; ++x)
- {
- Tile::draw(32*x - fmodf(scroll_x, 32), y * 32,
- level->bg_tiles[(int)y][(int)x + (int)(scroll_x / 32)]);
- }
- }
-
- /* Draw interactive tiles: */
- for (y = 0; y < 15; ++y)
- {
- for (x = 0; x < 21; ++x)
- {
- Tile::draw(32*x - fmodf(scroll_x, 32), y * 32,
- level->ia_tiles[(int)y][(int)x + (int)(scroll_x / 32)]);
- }
- }
-
- /* (Bouncy bricks): */
- for (unsigned int i = 0; i < bouncy_bricks.size(); ++i)
- bouncy_bricks[i].draw();