supertux
worldmap_state.hpp
1 // SuperTux
2 // Copyright (C) 2004-2018 Ingo Ruhnke <grumbel@gmail.com>
3 // 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
4 // 2023 Vankata453
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (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, see <http://www.gnu.org/licenses/>.
18 
19 #ifndef HEADER_SUPERTUX_WORLDMAP_WORLDMAP_STATE_HPP
20 #define HEADER_SUPERTUX_WORLDMAP_WORLDMAP_STATE_HPP
21 
22 namespace ssq {
23 class Table;
24 } // namespace ssq
25 
26 namespace worldmap {
27 
28 class WorldMap;
29 
30 class WorldMapState final
31 {
32 public:
34 
35  void load_state();
36  void save_state() const;
37 
38 private:
39  void load_tux(const ssq::Table& table);
40  void load_levels(const ssq::Table& table);
41  void load_tilemap_visibility(const ssq::Table& table);
42  void load_sprite_change_objects(const ssq::Table& table);
43 
44 private:
45  WorldMap& m_worldmap;
46 
48  bool m_position_was_reset;
49 
50 private:
51  WorldMapState(const WorldMapState&) = delete;
52  WorldMapState& operator=(const WorldMapState&) = delete;
53 };
54 
55 } // namespace worldmap
56 
57 #endif
58 
59 /* EOF */
Definition: worldmap_state.hpp:30
Definition: path_object.hpp:28
Definition: object_settings.hpp:32
Definition: worldmap.hpp:33