- tux.action(frame_ratio);
- scrolling(frame_ratio);
-
- /* Handle bouncy distros: */
- for (unsigned int i = 0; i < bouncy_distros.size(); i++)
- bouncy_distros[i]->action(frame_ratio);
-
- /* Handle broken bricks: */
- for (unsigned int i = 0; i < broken_bricks.size(); i++)
- broken_bricks[i]->action(frame_ratio);
-
- // Handle all kinds of game objects
- for (unsigned int i = 0; i < bouncy_bricks.size(); i++)
- bouncy_bricks[i]->action(frame_ratio);
-
- for (unsigned int i = 0; i < floating_scores.size(); i++)
- floating_scores[i]->action(frame_ratio);
-
- for (unsigned int i = 0; i < bullets.size(); ++i)
- bullets[i].action(frame_ratio);
-
- for (unsigned int i = 0; i < upgrades.size(); i++)
- upgrades[i].action(frame_ratio);
-
- for (BadGuys::iterator i = bad_guys.begin(); i != bad_guys.end(); ++i)
- (*i)->action(frame_ratio);
-
- /* update particle systems */
- std::vector<ParticleSystem*>::iterator p;
- for(p = particle_systems.begin(); p != particle_systems.end(); ++p)
- {
- (*p)->simulate(frame_ratio);
- }
-
- /* Handle all possible collisions. */
- collision_handler();
-
- // Cleanup marked badguys
- for (BadGuys::iterator i = bad_guys.begin(); i != bad_guys.end();
- /* ++i handled at end of the loop */) {
- if ((*i)->is_removable()) {
- delete *i;
- i = bad_guys.erase(i);
- } else {
- ++i;
- }
- }
-}
-
-// the space that it takes for the screen to start scrolling, regarding
-// screen bounds (in pixels)
-#define X_SPACE (400-16)
-// the time it takes to move the camera (in ms)
-#define CHANGE_DIR_SCROLL_SPEED 2000