![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a specific funding country. More...
#include <RuleCountry.h>
Public Member Functions | |
| RuleCountry (const std::string &type) | |
| Creates a blank country ruleset. More... | |
| ~RuleCountry () | |
| Cleans up the country ruleset. | |
| void | load (const YAML::Node &node) |
| Loads the country from YAML. More... | |
| std::string | getType () const |
| Gets the country's type. More... | |
| int | generateFunding () const |
| Generates the country's starting funding. More... | |
| int | getFundingCap () const |
| Gets the country's funding cap. More... | |
| double | getLabelLongitude () const |
| Gets the country's label X position. More... | |
| double | getLabelLatitude () const |
| Gets the country's label Y position. More... | |
| bool | insideCountry (double lon, double lat) const |
| Checks if a point is inside the country. More... | |
Represents a specific funding country.
Contains constant info like its location in the world and starting funding range.
| OpenXcom::RuleCountry::RuleCountry | ( | const std::string & | type | ) |
Creates a blank country ruleset.
Creates a blank ruleset for a certain type of country.
| type | String defining the type. |
| int OpenXcom::RuleCountry::generateFunding | ( | ) | const |
Generates the country's starting funding.
Generates the random starting funding for the country.
| int OpenXcom::RuleCountry::getFundingCap | ( | ) | const |
Gets the country's funding cap.
Country funding can never exceed this.
| double OpenXcom::RuleCountry::getLabelLatitude | ( | ) | const |
Gets the country's label Y position.
Gets the latitude of the country's label on the globe.
| double OpenXcom::RuleCountry::getLabelLongitude | ( | ) | const |
Gets the country's label X position.
Gets the longitude of the country's label on the globe.
| std::string OpenXcom::RuleCountry::getType | ( | ) | const |
Gets the country's type.
Gets the language string that names this country.
Each country type has a unique name.
| bool OpenXcom::RuleCountry::insideCountry | ( | double | lon, |
| double | lat | ||
| ) | const |
Checks if a point is inside the country.
Checks if a point is inside this country.
| lon | Longitude in radians. |
| lat | Latitude in radians. |
| void OpenXcom::RuleCountry::load | ( | const YAML::Node & | node | ) |
Loads the country from YAML.
Loads the country type from a YAML file.
| node | YAML node. |
1.8.14