21 #include "../Mod/RuleTerrain.h" 22 #include "../Mod/MapScript.h" 27 class SavedBattleGame;
39 class AlienDeployment;
62 int _mapsize_x, _mapsize_y, _mapsize_z;
66 Tile *_craftInventoryTile;
67 std::string _alienRace;
69 bool _allowAutoLoadout, _baseInventory, _generateFuel, _craftDeployed;
72 std::vector<SDL_Rect> _ufoPos;
74 std::vector< std::vector<MapBlock*> > _blocks;
75 std::vector< std::vector<bool> > _landingzone;
76 std::vector< std::vector<int> > _segments, _drillMap;
80 void init(
bool resetTerrain);
82 void generateMap(
const std::vector<MapScript*> *script);
96 int loadMAP(
MapBlock *mapblock,
int xoff,
int yoff,
RuleTerrain *terrain,
int objectIDOffset,
bool discovered =
false,
bool craft =
false);
98 void loadRMP(
MapBlock *mapblock,
int xoff,
int yoff,
int segment);
100 void fuelPowerSources();
102 void explodePowerSources();
106 bool canPlaceXCOMUnit(
Tile *tile);
110 void deployCivilians(
int max);
118 bool addLine(MapDirection lineType,
const std::vector<SDL_Rect*> *rects);
120 bool addBlock(
int x,
int y,
MapBlock *block);
124 void attachNodeLinks();
126 bool selectPosition(
const std::vector<SDL_Rect *> *rects,
int &X,
int &Y,
int sizeX,
int sizeY);
128 void generateBaseMap();
130 void clearModule(
int x,
int y,
int sizeX,
int sizeY);
132 void drillModules(
TunnelData* data,
const std::vector<SDL_Rect *> *rects, MapDirection dir);
173 static void autoEquip(std::vector<BattleUnit*> units,
Mod *mod,
SavedBattleGame *addToSave, std::vector<BattleItem*> *craftInv,
174 RuleInventory *groundRuleInv,
int worldShade,
bool allowAutoLoadout,
bool overrideEquipmentLayout);
~BattlescapeGenerator()
Cleans up the BattlescapeGenerator.
Definition: BattlescapeGenerator.cpp:81
void setMissionSite(MissionSite *mission)
Sets the mission site.
Definition: BattlescapeGenerator.cpp:183
Represents a craft stored in a base.
Definition: Craft.h:45
Represents a vehicle (tanks etc.) kept in a craft.
Definition: Vehicle.h:32
Represents an alien base on the world.
Definition: AlienBase.h:31
void runInventory(Craft *craft)
Generates an inventory battlescape.
Definition: BattlescapeGenerator.cpp:1943
void run()
Runs the generator.
Definition: BattlescapeGenerator.cpp:544
void setupObjectives(AlienDeployment *ruleDeploy)
Sets up the objectives for the map.
Definition: BattlescapeGenerator.cpp:2995
Represents an alien mission site on the world.
Definition: MissionSite.h:33
Represents a Terrain Map Block.
Definition: MapBlock.h:37
Contains all the game-specific static data that never changes throughout the game, like rulesets and resources.
Definition: Mod.h:87
void setWorldShade(int shade)
Sets the polygon shade.
Definition: BattlescapeGenerator.cpp:140
void setUfo(Ufo *ufo)
Sets the ufo.
Definition: BattlescapeGenerator.cpp:121
void setAlienItemlevel(int alienItemLevel)
Sets the alien item level.
Definition: BattlescapeGenerator.cpp:164
BattlescapeGenerator(Game *game)
Creates a new BattlescapeGenerator class.
Definition: BattlescapeGenerator.cpp:72
Represents a single item in the battlescape.
Definition: BattleItem.h:37
void nextStage()
Sets up the next stage (for Cydonia/TFTD missions).
Definition: BattlescapeGenerator.cpp:193
void setAlienBase(AlienBase *base)
Sets the alien base.
Definition: BattlescapeGenerator.cpp:1897
void setTerrain(RuleTerrain *terrain)
Sets the terrain.
Definition: BattlescapeGenerator.cpp:2985
A utility class that generates the initial battlescape data.
Definition: BattlescapeGenerator.h:50
Represents a player base on the globe.
Definition: Base.h:45
Definition: MapScript.h:31
Basic element of which a battle map is build.
Definition: Tile.h:42
void setWorldTexture(Texture *texture)
Sets the polygon texture.
Definition: BattlescapeGenerator.cpp:131
Represents the relations between a Geoscape texture and the corresponding Battlescape mission attribu...
Definition: Texture.h:42
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:47
Definition: MapScript.h:50
Represents an alien UFO on the map.
Definition: Ufo.h:40
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:41
Represents a specific type of Alien Deployment.
Definition: AlienDeployment.h:63
void setBase(Base *base)
Sets the XCom base.
Definition: BattlescapeGenerator.cpp:173
Represents a specific type of Battlescape Terrain.
Definition: RuleTerrain.h:39
void setAlienRace(const std::string &alienRace)
Sets the alien race.
Definition: BattlescapeGenerator.cpp:151
void setCraft(Craft *craft)
Sets the XCom craft.
Definition: BattlescapeGenerator.cpp:111
Represents a moving unit in the battlescape, player controlled or AI controlled it holds info about i...
Definition: BattleUnit.h:59
Definition: BaseInfoState.cpp:40
Represents the static data for a unit that is generated on the battlescape, this includes: HWPs...
Definition: Unit.h:57
Represents a specific section of the inventory, containing information like available slots and scree...
Definition: RuleInventory.h:42