OpenXcom
1.0
Open-source clone of the original X-Com
|
A utility class that generates the initial battlescape data. More...
#include <BattlescapeGenerator.h>
Public Member Functions | |
BattlescapeGenerator (Game *game) | |
Creates a new BattlescapeGenerator class. More... | |
~BattlescapeGenerator () | |
Cleans up the BattlescapeGenerator. More... | |
void | setCraft (Craft *craft) |
Sets the XCom craft. More... | |
void | setUfo (Ufo *ufo) |
Sets the ufo. More... | |
void | setWorldTexture (int texture) |
Sets the polygon texture. More... | |
void | setWorldShade (int shade) |
Sets the polygon shade. More... | |
void | setAlienRace (const std::string &alienRace) |
Sets the alien race. More... | |
void | setAlienItemlevel (int alienItemLevel) |
Sets the alien item level. More... | |
void | setBase (Base *base) |
Sets the XCom base. More... | |
void | setTerrorSite (TerrorSite *site) |
Sets the terror site. More... | |
void | setAlienBase (AlienBase *base) |
Sets the alien base. More... | |
void | run () |
Runs the generator. More... | |
void | nextStage () |
Sets up the next stage (for cydonia/tftd terror missions). More... | |
bool | placeUnitNearFriend (BattleUnit *unit) |
Finds a spot near a friend to spawn at. More... | |
void | runInventory (Craft *craft) |
Generates an inventory battlescape. More... | |
void | loadWeapons () |
Load all Xcom weapons. More... | |
A utility class that generates the initial battlescape data.
Taking into account mission type, craft and ufo involved, terrain type,...
OpenXcom::BattlescapeGenerator::BattlescapeGenerator | ( | Game * | game | ) |
Creates a new BattlescapeGenerator class.
Sets up a BattlescapeGenerator.
game | pointer to Game object. |
OpenXcom::BattlescapeGenerator::~BattlescapeGenerator | ( | ) |
Cleans up the BattlescapeGenerator.
Deletes the BattlescapeGenerator.
void OpenXcom::BattlescapeGenerator::loadWeapons | ( | ) |
Load all Xcom weapons.
Loads all XCom weaponry before anything else is distributed.
void OpenXcom::BattlescapeGenerator::nextStage | ( | ) |
Sets up the next stage (for cydonia/tftd terror missions).
Switches an existing battlescapesavegame to a new stage.
bool OpenXcom::BattlescapeGenerator::placeUnitNearFriend | ( | BattleUnit * | unit | ) |
Finds a spot near a friend to spawn at.
Places a unit near a friendly unit.
unit | Pointer to the unit in question. |
void OpenXcom::BattlescapeGenerator::run | ( | ) |
Runs the generator.
Starts the generator; it fills up the battlescapesavegame with data.
void OpenXcom::BattlescapeGenerator::runInventory | ( | Craft * | craft | ) |
Generates an inventory battlescape.
Creates a mini-battle-save for managing inventory from the Geoscape.
Kids, don't try this at home!
craft | Pointer to craft to manage. |
void OpenXcom::BattlescapeGenerator::setAlienBase | ( | AlienBase * | base | ) |
Sets the alien base.
Sets the alien base involved in the battle.
base | Pointer to alien base. |
void OpenXcom::BattlescapeGenerator::setAlienItemlevel | ( | int | alienItemLevel | ) |
Sets the alien item level.
This is used to determine how advanced the equipment of the aliens will be. note: this only applies to "New Battle" type games. we intentionally don't alter the month for those, because we're using monthsPassed -1 for new battle in other sections of code.
alienItemLevel | AlienItemLevel. |
void OpenXcom::BattlescapeGenerator::setAlienRace | ( | const std::string & | alienRace | ) |
Sets the alien race.
Sets the alien race on the mission.
This is used to determine the various alien types to spawn.
alienRace | Alien (main) race. |
void OpenXcom::BattlescapeGenerator::setBase | ( | Base * | base | ) |
Sets the XCom base.
Sets the XCom base involved in the battle.
base | Pointer to XCom base. |
void OpenXcom::BattlescapeGenerator::setCraft | ( | Craft * | craft | ) |
Sets the XCom craft.
Sets the XCom craft involved in the battle.
craft | Pointer to XCom craft. |
void OpenXcom::BattlescapeGenerator::setTerrorSite | ( | TerrorSite * | terror | ) |
Sets the terror site.
Sets the terror site involved in the battle.
terror | Pointer to terror site. |
void OpenXcom::BattlescapeGenerator::setUfo | ( | Ufo * | ufo | ) |
Sets the ufo.
Sets the ufo involved in the battle.
ufo | Pointer to UFO. |
void OpenXcom::BattlescapeGenerator::setWorldShade | ( | int | shade | ) |
Sets the polygon shade.
Sets the world shade where a ufo crashed.
This is used to determine the battlescape light level.
shade | Shade of the polygon on the globe. |
void OpenXcom::BattlescapeGenerator::setWorldTexture | ( | int | texture | ) |
Sets the polygon texture.
Sets the world texture where a ufo crashed.
This is used to determine the terrain.
texture | Texture id of the polygon on the globe. |