OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pch.h
1 #ifndef __OXC_PCH_H
2 #define __OXC_PCH_H
3 
4 // uncomment to check memory leaks in VS
5 //#define _CRTDBG_MAP_ALLOC
6 //#include <stdlib.h>
7 //#include <crtdbg.h>
8 
9 #ifndef __NO_OPENGL
10 #ifdef __APPLE__
11 #include <OpenGL/gl.h>
12 #include <OpenGL/glu.h>
13 #include <OpenGL/glext.h>
14 #include <GLUT/glut.h>
15 #endif
16 #include <SDL_opengl.h>
17 #endif
18 #include <algorithm>
19 #include <cassert>
20 #include <cctype>
21 #include <climits>
22 #define _USE_MATH_DEFINES
23 #include <cmath>
24 #include <cstdarg>
25 #include <cstring>
26 #include <cstdio>
27 #include <cstdlib>
28 #include <ctime>
29 #include <errno.h>
30 #include <exception>
31 #include <fstream>
32 #include <functional>
33 #include <iomanip>
34 #include <iostream>
35 #include <limits>
36 #include <list>
37 #include <locale>
38 #ifndef __APPLE__
39 #include <stdlib.h>
40 #endif
41 #include <map>
42 #include <queue>
43 #include <SDL_endian.h>
44 #include <SDL_gfxPrimitives.h>
45 #include <SDL_image.h>
46 #include <SDL_keysym.h>
47 #include <SDL_mixer.h>
48 #include <SDL.h>
49 #include <SDL_syswm.h>
50 #include <SDL_types.h>
51 
52 #include <set>
53 #include <sstream>
54 #include <string>
55 #include <stdint.h>
56 #include <sys/stat.h>
57 #include <sys/types.h>
58 #include <typeinfo>
59 #include <utility>
60 #include <vector>
61 #ifndef _WIN32
62 #include <unistd.h>
63 #include <sys/param.h>
64 #include <pwd.h>
65 #endif
66 
67 #ifdef __MORPHOS__
68 #undef Insert
69 #endif
70 
71 #include <yaml-cpp/yaml.h>
72 
73 #include "./fmath.h"
74 #include "./version.h"
75 
76 // uncomment to check memory leaks in VS
77 //#ifndef DBG_NEW
78 //#define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
79 //#define new DBG_NEW
80 //#endif
81 
82 #include "./Engine/State.h"
83 #include "./Basescape/TransferConfirmState.h"
84 
85 #include "./Engine/ShaderMove.h"
86 #include "./Engine/Flc.h"
87 #include "./Engine/Logger.h"
88 #include "./Engine/Surface.h"
89 #include "./Engine/Exception.h"
90 #include "./Engine/Sound.h"
91 #include "./Engine/GMCat.h"
92 #include "./Engine/GraphSubset.h"
93 #include "./Engine/CrossPlatform.h"
94 #include "./Engine/CatFile.h"
95 #include "./Engine/Screen.h"
96 #include "./Engine/Game.h"
97 #include "./Engine/SurfaceSet.h"
98 #include "./Engine/LocalizedText.h"
99 #include "./Engine/FastLineClip.h"
100 #include "./Engine/Scalers/scalebit.h"
101 #include "./Engine/Scalers/hqx.h"
102 #include "./Engine/Scalers/common.h"
103 #include "./Engine/Scalers/scale2x.h"
104 #include "./Engine/Scalers/scale3x.h"
105 #include "./Engine/ShaderRepeat.h"
106 #include "./Engine/SoundSet.h"
107 #include "./Engine/Action.h"
108 #include "./Engine/OpenGL.h"
109 #include "./Engine/InteractiveSurface.h"
110 #include "./Engine/ShaderDraw.h"
111 #include "./Engine/Options.h"
112 #include "./Engine/Timer.h"
113 #include "./Engine/Zoom.h"
114 #include "./Engine/Font.h"
115 #include "./Engine/RNG.h"
116 #include "./Engine/Palette.h"
117 #include "./Engine/Music.h"
118 #include "./Engine/Language.h"
119 #include "./Engine/ShaderDrawHelper.h"
120 #include "./dirent.h"
121 #include "./Battlescape/PathfindingNode.h"
122 #include "./Battlescape/PrimeGrenadeState.h"
123 #include "./Battlescape/UnitInfoState.h"
124 #include "./Battlescape/MedikitState.h"
125 #include "./Battlescape/UnitDieBState.h"
126 #include "./Battlescape/BattleAIState.h"
127 #include "./Battlescape/CannotReequipState.h"
128 #include "./Battlescape/ActionMenuItem.h"
129 #include "./Battlescape/CivilianBAIState.h"
130 #include "./Battlescape/WarningMessage.h"
131 #include "./Battlescape/PathfindingOpenSet.h"
132 #include "./Battlescape/TileEngine.h"
133 #include "./Battlescape/ScannerView.h"
134 #include "./Battlescape/Inventory.h"
135 #include "./Battlescape/BattlescapeGame.h"
136 #include "./Battlescape/MiniMapState.h"
137 #include "./Battlescape/UnitWalkBState.h"
138 #include "./Battlescape/BriefingState.h"
139 #include "./Battlescape/BattlescapeGenerator.h"
140 #include "./Battlescape/BattlescapeState.h"
141 #include "./Battlescape/NextTurnState.h"
142 #include "./Battlescape/UnitPanicBState.h"
143 #include "./Battlescape/UnitFallBState.h"
144 #include "./Battlescape/UnitSprite.h"
145 #include "./Battlescape/MiniMapView.h"
146 #include "./Battlescape/ProjectileFlyBState.h"
147 #include "./Battlescape/ExplosionBState.h"
148 #include "./Battlescape/MedikitView.h"
149 #include "./Battlescape/InventoryState.h"
150 #include "./Battlescape/PromotionsState.h"
151 #include "./Battlescape/InfoboxOKState.h"
152 #include "./Battlescape/Explosion.h"
153 #include "./Battlescape/ScannerState.h"
154 #include "./Battlescape/AlienBAIState.h"
155 #include "./Battlescape/BattlescapeMessage.h"
156 #include "./Battlescape/Position.h"
157 #include "./Battlescape/Pathfinding.h"
158 #include "./Battlescape/AbortMissionState.h"
159 #include "./Battlescape/Camera.h"
160 #include "./Battlescape/NoContainmentState.h"
161 #include "./Battlescape/DebriefingState.h"
162 #include "./Battlescape/ActionMenuState.h"
163 #include "./Battlescape/BattleState.h"
164 #include "./Battlescape/InfoboxState.h"
165 #include "./Battlescape/Projectile.h"
166 #include "./Battlescape/Map.h"
167 #include "./Battlescape/UnitTurnBState.h"
168 #include "./Ufopaedia/ArticleStateBaseFacility.h"
169 #include "./Ufopaedia/ArticleStateItem.h"
170 #include "./Ufopaedia/ArticleStateCraftWeapon.h"
171 #include "./Ufopaedia/ArticleStateArmor.h"
172 #include "./Ufopaedia/Ufopaedia.h"
173 #include "./Ufopaedia/ArticleStateText.h"
174 #include "./Ufopaedia/ArticleStateTextImage.h"
175 #include "./Ufopaedia/ArticleStateUfo.h"
176 #include "./Ufopaedia/ArticleStateCraft.h"
177 #include "./Ufopaedia/UfopaediaSelectState.h"
178 #include "./Ufopaedia/ArticleState.h"
179 #include "./Ufopaedia/ArticleStateVehicle.h"
180 #include "./Ufopaedia/UfopaediaStartState.h"
181 #include "./Basescape/TransferBaseState.h"
182 #include "./Basescape/BuildFacilitiesState.h"
183 #include "./Basescape/ResearchState.h"
184 #include "./Basescape/BasescapeState.h"
185 #include "./Basescape/SelectStartFacilityState.h"
186 #include "./Basescape/BaseView.h"
187 #include "./Basescape/ManageAlienContainmentState.h"
188 #include "./Basescape/ManufactureState.h"
189 #include "./Basescape/PlaceFacilityState.h"
190 #include "./Basescape/StoresState.h"
191 #include "./Basescape/NewManufactureListState.h"
192 #include "./Basescape/ManufactureInfoState.h"
193 #include "./Basescape/ResearchInfoState.h"
194 #include "./Basescape/CraftEquipmentState.h"
195 #include "./Basescape/SoldiersState.h"
196 #include "./Basescape/PurchaseState.h"
197 #include "./Basescape/CraftsState.h"
198 #include "./Basescape/TransferItemsState.h"
199 #include "./Basescape/SoldierInfoState.h"
200 #include "./Basescape/CraftInfoState.h"
201 #include "./Basescape/DismantleFacilityState.h"
202 #include "./Basescape/SoldierArmorState.h"
203 #include "./Basescape/ManufactureStartState.h"
204 #include "./Basescape/SackSoldierState.h"
205 #include "./Basescape/SellState.h"
206 #include "./Basescape/CraftArmorState.h"
207 #include "./Basescape/CraftWeaponsState.h"
208 #include "./Basescape/MiniBaseView.h"
209 #include "./Basescape/NewResearchListState.h"
210 #include "./Basescape/BaseInfoState.h"
211 #include "./Basescape/TransfersState.h"
212 #include "./Basescape/PlaceLiftState.h"
213 #include "./Basescape/CraftSoldiersState.h"
214 #include "./Basescape/MonthlyCostsState.h"
215 #include "./Basescape/PlaceStartFacilityState.h"
216 #include "./Geoscape/NewPossibleManufactureState.h"
217 #include "./Geoscape/LowFuelState.h"
218 #include "./Geoscape/UfoDetectedState.h"
219 #include "./Geoscape/MultipleTargetsState.h"
220 #include "./Geoscape/GeoscapeCraftState.h"
221 #include "./Geoscape/Polygon.h"
222 #include "./Geoscape/AlienBaseState.h"
223 #include "./Geoscape/BaseNameState.h"
224 #include "./Geoscape/GeoscapeState.h"
225 #include "./Geoscape/BaseDestroyedState.h"
226 #include "./Geoscape/VictoryState.h"
227 #include "./Geoscape/FundingState.h"
228 #include "./Geoscape/Globe.h"
229 #include "./Geoscape/BaseDefenseState.h"
230 #include "./Geoscape/CraftPatrolState.h"
231 #include "./Geoscape/CraftErrorState.h"
232 #include "./Geoscape/Cord.h"
233 #include "./Geoscape/BuildNewBaseState.h"
234 #include "./Geoscape/TargetInfoState.h"
235 #include "./Geoscape/UfoLostState.h"
236 #include "./Geoscape/MonthlyReportState.h"
237 #include "./Geoscape/GraphsState.h"
238 #include "./Geoscape/ResearchCompleteState.h"
239 #include "./Geoscape/AlienTerrorState.h"
240 #include "./Geoscape/NewPossibleResearchState.h"
241 #include "./Geoscape/Polyline.h"
242 #include "./Geoscape/ProductionCompleteState.h"
243 #include "./Geoscape/SelectDestinationState.h"
244 #include "./Geoscape/ConfirmNewBaseState.h"
245 #include "./Geoscape/InterceptState.h"
246 #include "./Geoscape/DefeatState.h"
247 #include "./Geoscape/ConfirmCydoniaState.h"
248 #include "./Geoscape/DogfightState.h"
249 #include "./Geoscape/PsiTrainingState.h"
250 #include "./Geoscape/AllocatePsiTrainingState.h"
251 #include "./Geoscape/ConfirmLandingState.h"
252 #include "./Geoscape/ConfirmDestinationState.h"
253 #include "./Geoscape/ItemsArrivingState.h"
254 #include "./Ruleset/RuleInventory.h"
255 #include "./Ruleset/RuleUfo.h"
256 #include "./Ruleset/RuleResearch.h"
257 #include "./Ruleset/ArticleDefinition.h"
258 #include "./Ruleset/Unit.h"
259 #include "./Ruleset/Ruleset.h"
260 #include "./Ruleset/RuleCraftWeapon.h"
261 #include "./Ruleset/MapData.h"
262 #include "./Ruleset/SoldierNamePool.h"
263 #include "./Ruleset/Armor.h"
264 #include "./Ruleset/RuleSoldier.h"
265 #include "./Ruleset/MapDataSet.h"
266 #include "./Ruleset/RuleAlienMission.h"
267 #include "./Ruleset/UfoTrajectory.h"
268 #include "./Ruleset/RuleCraft.h"
269 #include "./Ruleset/RuleCountry.h"
270 #include "./Ruleset/MapBlock.h"
271 #include "./Ruleset/RuleBaseFacility.h"
272 #include "./Ruleset/RuleRegion.h"
273 #include "./Ruleset/RuleItem.h"
274 #include "./Ruleset/RuleManufacture.h"
275 #include "./Ruleset/AlienRace.h"
276 #include "./Ruleset/City.h"
277 #include "./Ruleset/AlienDeployment.h"
278 #include "./Ruleset/RuleTerrain.h"
279 #include "./Interface/ToggleTextButton.h"
280 #include "./Interface/TextButton.h"
281 #include "./Interface/TextEdit.h"
282 #include "./Interface/Bar.h"
283 #include "./Interface/Cursor.h"
284 #include "./Interface/FpsCounter.h"
285 #include "./Interface/ArrowButton.h"
286 #include "./Interface/Window.h"
287 #include "./Interface/Text.h"
288 #include "./Interface/NumberText.h"
289 #include "./Interface/ImageButton.h"
290 #include "./Interface/TextList.h"
291 #include "./Interface/Slider.h"
292 #include "./Interface/Frame.h"
293 #include "./lodepng.h"
294 #include "./Menu/ListSaveState.h"
295 #include "./Menu/DeleteGameState.h"
296 #include "./Menu/ErrorMessageState.h"
297 #include "./Menu/NewBattleState.h"
298 #include "./Menu/StartState.h"
299 #include "./Menu/IntroState.h"
300 #include "./Menu/TestState.h"
301 #include "./Menu/ConfirmLoadState.h"
302 #include "./Menu/ListLoadState.h"
303 #include "./Menu/ListGamesState.h"
304 #include "./Menu/LoadGameState.h"
305 #include "./Menu/SaveGameState.h"
306 #include "./Menu/NewGameState.h"
307 #include "./Menu/MainMenuState.h"
308 #include "./Menu/AbandonGameState.h"
309 #include "./Menu/PauseState.h"
310 #include "./Menu/OptionsVideoState.h"
311 #include "./Menu/OptionsAudioState.h"
312 #include "./Menu/OptionsAdvancedState.h"
313 #include "./Menu/OptionsControlsState.h"
314 #include "./Menu/OptionsGeoscapeState.h"
315 #include "./Menu/OptionsBattlescapeState.h"
316 #include "./Menu/OptionsModsState.h"
317 #include "./Resource/ResourcePack.h"
318 #include "./Resource/XcomResourcePack.h"
319 #include "./Savegame/MovingTarget.h"
320 #include "./Savegame/SavedBattleGame.h"
321 #include "./Savegame/ResearchProject.h"
322 #include "./Savegame/Ufo.h"
323 #include "./Savegame/Node.h"
324 #include "./Savegame/Tile.h"
325 #include "./Savegame/TerrorSite.h"
326 #include "./Savegame/Waypoint.h"
327 #include "./Savegame/Base.h"
328 #include "./Savegame/AlienBase.h"
329 #include "./Savegame/Transfer.h"
330 #include "./Savegame/GameTime.h"
331 #include "./Savegame/CraftWeapon.h"
332 #include "./Savegame/Craft.h"
333 #include "./Savegame/CraftWeaponProjectile.h"
334 #include "./Savegame/BaseFacility.h"
335 #include "./Savegame/ItemContainer.h"
336 #include "./Savegame/BattleItem.h"
337 #include "./Savegame/AlienMission.h"
338 #include "./Savegame/Vehicle.h"
339 #include "./Savegame/Country.h"
340 #include "./Savegame/BattleUnit.h"
341 #include "./Savegame/Region.h"
342 #include "./Savegame/SavedGame.h"
343 #include "./Savegame/WeightedOptions.h"
344 #include "./Savegame/Production.h"
345 #include "./Savegame/Target.h"
346 #include "./Savegame/SerializationHelper.h"
347 #include "./Savegame/Soldier.h"
348 #include "./Savegame/AlienStrategy.h"
349 #include "./Savegame/EquipmentLayoutItem.h"
350 
351 #endif