00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef WIN32
00028 #define stricmp strcasecmp
00029 #define strnicmp strncasecmp
00030
00031 #ifdef HAVE_CONFIG_H
00032 #include <config.h>
00033 #endif
00034 #endif
00035
00036 #ifdef WIN32
00037
00038 #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information
00039 #pragma warning(disable : 4514) // unreferenced inline function has been removed
00040 #pragma warning(disable : 4710) // function '' not inlined
00041 #pragma warning(disable : 4512) // assignment operator could not be generated
00042
00043
00044 #ifdef _DEBUG
00045 #include <crtdbg.h>
00046 #define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__)
00047 #else
00048 #define DEBUG_NEW new
00049 #endif
00050 #endif // WIN32
00051
00052
00053 #ifdef WIN32 // stuff for windows
00054 #pragma warning(push, 3)
00055 #endif // WIN32
00056
00057
00058
00059 #include <iostream>
00060 #include <deque>
00061 #include <string>
00062 #include <algorithm>
00063 #include <numeric>
00064 using namespace std;
00065
00066
00067 #include "math.h"
00068 #include "assert.h"
00069
00070
00071 #if !defined TIXML_USE_STL
00072 #define TIXML_USE_STL
00073 #endif
00074 #include "../tinyxml/tinyxml.h"
00075
00076 #ifdef WIN32 // stuff for windows
00077 #pragma warning(pop)
00078 #endif // WIN32
00079 #include "TinyXmlPlus.h"
00080
00081 extern "C" {
00082
00083 #include "../MersenneTwister/mt19937ar.h"
00084 }
00085
00086 #if defined(_MIN)
00087
00088 #undef min
00089 #define min _MIN
00090 #undef max
00091 #define max _MAX
00092 #endif
00093
00094 #ifdef WIN32 // stuff for windows
00095 #pragma warning (disable : 4018) // signed/unsigned mismatch
00096 #endif
00097
00098
00099 inline long Random(long lmax) { return genrand_int32() % lmax; }
00100 inline long Random(long lmin, long lmax) { return genrand_int32() % (lmax - lmin) + lmin; }
00101 inline bool Randodd(double odds) { return genrand_real2() < odds; }
00102
00103
00104 #include "FSTypes.h"
00105
00106 #include "Rules.h"
00107 #include "BattlePlan.h"
00108 #include "Ship.h"
00109 #include "Component.h"
00110 #include "Slot.h"
00111 #include "WayOrder.h"
00112 #include "Race.h"
00113 #include "Player.h"
00114 #include "Location.h"
00115 #include "CargoHolder.h"
00116 #include "Fleet.h"
00117 #include "Invasion.h"
00118 #include "ProdOrder.h"
00119 #include "Planet.h"
00120 #include "Salvage.h"
00121 #include "Galaxy.h"
00122 #include "Game.h"
00123 #include "Message.h"
00124 #include "MineField.h"
00125