00001 // SuperTux 00002 // Copyright (C) 2006 Matthias Braun <matze@braunis.de> 00003 // 00004 // This program is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 00017 #ifndef HEADER_SUPERTUX_OBJECT_PARTICLESYSTEM_INTERACTIVE_HPP 00018 #define HEADER_SUPERTUX_OBJECT_PARTICLESYSTEM_INTERACTIVE_HPP 00019 00020 #include "math/vector.hpp" 00021 #include "supertux/game_object.hpp" 00022 #include "supertux/sector.hpp" 00023 #include "video/surface_ptr.hpp" 00024 00025 class DisplayManager; 00026 00038 class ParticleSystem_Interactive : public GameObject 00039 { 00040 public: 00041 ParticleSystem_Interactive(); 00042 virtual ~ParticleSystem_Interactive(); 00043 00044 virtual void draw(DrawingContext& context); 00045 00046 protected: 00047 class Particle 00048 { 00049 public: 00050 Particle() : 00051 pos(), 00052 texture() 00053 {} 00054 00055 virtual ~Particle() 00056 {} 00057 00058 Vector pos; 00059 SurfacePtr texture; 00060 00061 private: 00062 Particle(const Particle&); 00063 Particle& operator=(const Particle&); 00064 }; 00065 00066 int collision(Particle* particle, Vector movement); 00067 00068 int z_pos; 00069 std::vector<Particle*> particles; 00070 float virtual_width; 00071 float virtual_height; 00072 }; 00073 00074 #endif 00075 00076 /* EOF */