Introduced FileSystem and Out classes
[openstranded.git] / src / map.hh
blob0a2382c475917acbed672644b6c5e710b4312000
1 /*
2 *This file includes the basic classes for map/savegame loading
4 * Copyright (C) 2008 Mathias Gottschlag
6 * This file is part of OpenStranded
8 * OpenStranded is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * OpenStranded is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with OpenStranded. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef STRANDED_MAP_HH
23 #define STRANDED_MAP_HH
25 #include "entity.hh"
26 #include "eal/environment.hh"
27 #include <string>
28 #include <list>
30 class Map
32 protected:
33 std::list<Entity*> entities;
34 eal::Environment *environment;
35 public:
36 Map ();
37 ~Map ();
39 /**
40 * Loads a map from the given path.
41 * @return true if the map was loaded successfully
43 bool
44 load (std::string path);
45 /**
46 * Saves a map to the given path, including all entities currently on the
47 * map.
48 * @return true if the map was saved successfully
50 bool
51 save (std::string path);
52 /**
53 * Destroys all loaded entities and additional data.
55 void
56 destroy ();
59 #endif