#include <math.h>
#include "math/random_generator.hpp"
-#include "supertux/main.hpp"
+#include "supertux/globals.hpp"
#include "video/drawing_context.hpp"
//FIXME: Sometimes both ghosts have the same image
// Ghosts don't change their movement pattern - not random
GhostParticleSystem::GhostParticleSystem()
{
- ghosts[0] = new Surface("images/objects/particles/ghost0.png");
- ghosts[1] = new Surface("images/objects/particles/ghost1.png");
+ ghosts[0] = Surface::create("images/objects/particles/ghost0.png");
+ ghosts[1] = Surface::create("images/objects/particles/ghost1.png");
virtual_width = SCREEN_WIDTH * 2;
GhostParticleSystem::~GhostParticleSystem()
{
- for(int i=0;i<2;++i)
- delete ghosts[i];
}
void GhostParticleSystem::update(float elapsed_time)