-// $Id: particlesystem.cpp 2470 2005-05-11 14:49:28Z wansti $
-//
+// $Id$
+//
// SuperTux
-// Copyright (C) 2004 Matthias Braun <matze@braunis.de>
+// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
#include <config.h>
#include <iostream>
{
virtual_width = SCREEN_WIDTH;
virtual_height = SCREEN_HEIGHT;
- layer = LAYER_TILES;
+ z_pos = 0;
}
ParticleSystem_Interactive::~ParticleSystem_Interactive()
std::vector<Particle*>::iterator i;
for(i = particles.begin(); i != particles.end(); ++i) {
Particle* particle = *i;
- context.draw_surface(particle->texture, particle->pos, layer);
+ context.draw_surface(particle->texture, particle->pos, z_pos);
}
context.pop_transform();
void
RainParticleSystem::parse(const lisp::Lisp& reader)
{
- reader.get("layer", layer);
+ reader.get("z-pos", z_pos);
}
void
RainParticleSystem::write(lisp::Writer& writer)
{
writer.start_list("particles-rain");
- writer.write_int("layer", layer);
+ writer.write_int("z-pos", z_pos);
writer.end_list("particles-rain");
}
void
CometParticleSystem::parse(const lisp::Lisp& reader)
{
- reader.get("layer", layer);
+ reader.get("z-pos", z_pos);
}
void
CometParticleSystem::write(lisp::Writer& writer)
{
writer.start_list("particles-comets");
- writer.write_int("layer", layer);
+ writer.write_int("z-pos", z_pos);
writer.end_list("particles-comets");
}