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

Method loadData

src/Ruleset/MapDataSet.cpp:101–244  ·  view source on GitHub ↗

* Loads terrain data in XCom format (MCD & PCK files). * @sa http://www.ufopaedia.org/index.php?title=MCD */

Source from the content-addressed store, hash-verified

99 * @sa http://www.ufopaedia.org/index.php?title=MCD
100 */
101void MapDataSet::loadData()
102{
103 // prevents loading twice
104 if (_loaded) return;
105 _loaded = true;
106
107 int objNumber = 0;
108
109 // the struct below helps to read the xcom file format
110 #pragma pack(push, 1)
111 struct MCD
112 {
113 unsigned char Frame[8];
114 unsigned char LOFT[12];
115 unsigned short ScanG;
116 unsigned char u23;
117 unsigned char u24;
118 unsigned char u25;
119 unsigned char u26;
120 unsigned char u27;
121 unsigned char u28;
122 unsigned char u29;
123 unsigned char u30;
124 unsigned char UFO_Door;
125 unsigned char Stop_LOS;
126 unsigned char No_Floor;
127 unsigned char Big_Wall;
128 unsigned char Gravlift;
129 unsigned char Door;
130 unsigned char Block_Fire;
131 unsigned char Block_Smoke;
132 unsigned char u39;
133 unsigned char TU_Walk;
134 unsigned char TU_Slide;
135 unsigned char TU_Fly;
136 unsigned char Armor;
137 unsigned char HE_Block;
138 unsigned char Die_MCD;
139 unsigned char Flammable;
140 unsigned char Alt_MCD;
141 unsigned char u48;
142 signed char T_Level;
143 unsigned char P_Level;
144 unsigned char u51;
145 unsigned char Light_Block;
146 unsigned char Footstep;
147 unsigned char Tile_Type;
148 unsigned char HE_Type;
149 unsigned char HE_Strength;
150 unsigned char Smoke_Blockage;
151 unsigned char Fuel;
152 unsigned char Light_Source;
153 unsigned char Target_Type;
154 unsigned char Xcom_Base;
155 unsigned char u62;
156 };
157 #pragma pack(pop)
158

Callers 2

loadMapResourcesMethod · 0.80
generateMapMethod · 0.80

Calls 15

getDataFileFunction · 0.85
ExceptionClass · 0.85
setSpriteMethod · 0.80
setYOffsetMethod · 0.80
setSpecialTypeMethod · 0.80
setTUCostsMethod · 0.80
setFlagsMethod · 0.80
setTerrainLevelMethod · 0.80
setFootstepSoundMethod · 0.80
setAltMCDMethod · 0.80
setDieMCDMethod · 0.80
setBlockValueMethod · 0.80

Tested by

no test coverage detected