OpenXcom  1.0
Open-source clone of the original X-Com
RuleGlobe.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include <list>
21 #include <string>
22 #include <yaml-cpp/yaml.h>
23 
24 namespace OpenXcom
25 {
26 
27 class Polygon;
28 class Polyline;
29 class Texture;
30 
36 class RuleGlobe
37 {
38 private:
39  std::list<Polygon*> _polygons;
40  std::list<Polyline*> _polylines;
41  std::map<int, Texture*> _textures;
42 public:
44  RuleGlobe();
46  ~RuleGlobe();
48  void load(const YAML::Node& node);
50  std::list<Polygon*> *getPolygons();
52  std::list<Polyline*> *getPolylines();
54  void loadDat(const std::string &filename);
56  Texture *getTexture(int id) const;
58  std::vector<std::string> getTerrains(const std::string &deployment) const;
59 };
60 
61 }
std::vector< std::string > getTerrains(const std::string &deployment) const
Gets all the terrains for a specific deployment.
Definition: RuleGlobe.cpp:236
void load(const YAML::Node &node)
Loads the globe from YAML.
Definition: RuleGlobe.cpp:64
Texture * getTexture(int id) const
Gets a specific world texture.
Definition: RuleGlobe.cpp:225
Represents the contents of the Geoscape globe, such as world polygons, polylines, etc...
Definition: RuleGlobe.h:36
std::list< Polyline * > * getPolylines()
Gets the list of world polylines.
Definition: RuleGlobe.cpp:156
std::list< Polygon * > * getPolygons()
Gets the list of world polygons.
Definition: RuleGlobe.cpp:147
Represents the relations between a Geoscape texture and the corresponding Battlescape mission attribu...
Definition: Texture.h:42
void loadDat(const std::string &filename)
Loads a set of polygons from a DAT file.
Definition: RuleGlobe.cpp:167
~RuleGlobe()
Cleans up the globe ruleset.
Definition: RuleGlobe.cpp:44
RuleGlobe()
Creates a blank globe ruleset.
Definition: RuleGlobe.cpp:37
Definition: BaseInfoState.cpp:40