MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / SavedBattleGame

Method SavedBattleGame

src/Savegame/SavedBattleGame.cpp:54–70  ·  view source on GitHub ↗

* Initializes a brand new battlescape saved game. */

Source from the content-addressed store, hash-verified

52 * Initializes a brand new battlescape saved game.
53 */
54SavedBattleGame::SavedBattleGame() : _battleState(0), _mapsize_x(0), _mapsize_y(0),
55 _mapsize_z(0), _tiles(), _selectedUnit(0),
56 _lastSelectedUnit(0), _nodes(), _units(),
57 _items(), _pathfinding(0), _tileEngine(0),
58 _missionType(""), _globalShade(0), _side(FACTION_PLAYER),
59 _turn(1), _debugMode(false), _aborted(false),
60 _itemId(0), _objectiveDestroyed(false), _fallingUnits(),
61 _unitsFalling(false), _cheating(false),
62 _tuReserved(BA_NONE), _kneelReserved(false)
63{
64 _tileSearch.resize(11*11);
65 for (int i = 0; i < 121; ++i)
66 {
67 _tileSearch[i].x = ((i%11) - 5);
68 _tileSearch[i].y = ((i/11) - 5);
69 }
70}
71
72/**
73 * Deletes the game content from memory.

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected