New grow and skid sounds from remaxim
[supertux.git] / src / tile_manager.hpp
1 //  $Id$
2 //
3 //  SuperTux
4 //  Copyright (C) 2008 Matthias Braun <matze@braunis.de>
5 //
6 //  This program is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU General Public License
8 //  as published by the Free Software Foundation; either version 2
9 //  of the License, or (at your option) any later version.
10 //
11 //  This program is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //  GNU General Public License for more details.
15 //
16 //  You should have received a copy of the GNU General Public License
17 //  along with this program; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 //  02111-1307, USA.
20 #ifndef HEADER_TILE_MANAGER_HPP
21 #define HEADER_TILE_MANAGER_HPP
22
23 #include <vector>
24 #include <string>
25 #include <map>
26 #include <iostream>
27 #include <stdint.h>
28 #include <assert.h>
29 #include "log.hpp"
30
31 namespace lisp {
32 class Lisp;
33 }
34
35 class TileSet;
36
37 class TileManager
38 {
39 private:
40   typedef std::map<std::string, TileSet*> TileSets;
41   TileSets tilesets;
42
43 public:
44   TileManager();
45   ~TileManager();
46
47   TileSet* get_tileset(const std::string &filename);
48
49   TileSet* parse_tileset_definition(const lisp::Lisp& reader);
50 };
51
52 extern TileManager *tile_manager;
53 /** this is only set while loading a map */
54 extern TileSet     *current_tileset;
55
56 #endif