1 /* 2 explosion.h - Explosino animations. Completely unnecessary, but fun. 3 Copyright (C) 2006 Mark boyd 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be fun to play, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License along 16 with this program; if not, write to the Free Software Foundation, Inc., 17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 #ifndef EXPLOSION_H 21 #define EXPLOSION_H 22 23 #include <string> 24 #include <map> 25 #include <vector> 26 27 #include "movers.h" 28 29 30 31 class explosion:public mover 32 { 33 public: 34 explosion(std::vector<SDL_Surface *> *); 35 36 private: 37 void do_stuff(float time_interval); 38 SDL_Surface *pic() const; 39 int m_frame_index; 40 std::vector<SDL_Surface *> *m_frames; 41 }; 42 43 44 class explosion_pool 45 { 46 public: 47 explosion *get_explosion(const std::string &, SDL_Surface *); 48 std::map<std::string, std::vector<SDL_Surface *> > m_explosions; 49 ~explosion_pool(); 50 51 }; 52 53 #endif 54 55 56