Index: .
===================================================================
--- .	(revision 2878)
+++ .	(working copy)

Property changes on: .
___________________________________________________________________
Modified: svn:ignore
## -5,3 +5,9 ##
 Heroes3.snd
 MP3
 Maps
+bin
+obj
+*.gch
+*.layout
+*.depend
+*_build_log.html
Index: AI
===================================================================
--- AI	(revision 2878)
+++ AI	(working copy)

Property changes on: AI
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,6 ##
+bin
+obj
+*.gch
+*.layout
+*.depend
+*_build_log.html
Index: AI/EmptyAI
===================================================================
--- AI/EmptyAI	(revision 2878)
+++ AI/EmptyAI	(working copy)

Property changes on: AI/EmptyAI
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,6 ##
+bin
+obj
+*.gch
+*.layout
+*.depend
+*_build_log.html
Index: AI/EmptyAI/EmptyAI.cbp
===================================================================
--- AI/EmptyAI/EmptyAI.cbp	(revision 0)
+++ AI/EmptyAI/EmptyAI.cbp	(working copy)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="EmptyAI" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin\Debug\EmptyAI" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Debug\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-ggdb" />
+				</Compiler>
+				<Linker>
+					<Add directory="..\..\bin\Debug" />
+				</Linker>
+			</Target>
+			<Target title="Release">
+				<Option output="bin\Release\EmptyAI" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Release\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O3" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-Wall" />
+			<Add option="-fexceptions" />
+			<Add option="-Wpointer-arith" />
+			<Add option="-Wno-switch" />
+			<Add option="-Wno-sign-compare" />
+			<Add option="-Wno-unused-parameter" />
+			<Add option="-Wno-overloaded-virtual" />
+			<Add option="-fpermissive" />
+		</Compiler>
+		<Linker>
+			<Add option="-lboost_program_options-mgw47-mt-1_51" />
+			<Add option="-lboost_filesystem-mgw47-mt-1_51" />
+			<Add option="-lboost_system-mgw47-mt-1_51" />
+			<Add option="-lboost_thread-mgw47-mt-1_51" />
+			<Add option="-lboost_iostreams-mgw47-mt-1_51" />
+			<Add option="-lboost_chrono-mgw47-mt-1_51" />
+			<Add option="-lVCMI_lib" />
+		</Linker>
+		<Unit filename="CEmptyAI.cpp" />
+		<Unit filename="CEmptyAI.h" />
+		<Unit filename="StdInc.h">
+			<Option compile="1" />
+			<Option weight="0" />
+		</Unit>
+		<Unit filename="exp_funcs.cpp" />
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+			<lib_finder disable_auto="1" />
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
Index: AI/EmptyAI/exp_funcs.cpp
===================================================================
--- AI/EmptyAI/exp_funcs.cpp	(revision 2878)
+++ AI/EmptyAI/exp_funcs.cpp	(working copy)
@@ -3,27 +3,27 @@
 #include "CEmptyAI.h"
 
 std::set<CGlobalAI*> ais;
-extern "C" DLL_LINKAGE int GetGlobalAiVersion()
+extern "C" DLL_EXPORT int GetGlobalAiVersion()
 {
 	return AI_INTERFACE_VER;
 }
 
-extern "C" DLL_LINKAGE void GetAiName(char* name)
+extern "C" DLL_EXPORT void GetAiName(char* name)
 {
 	strcpy(name,NAME);
 }
-extern "C" DLL_LINKAGE char * GetAiNameS()
+extern "C" DLL_EXPORT char * GetAiNameS()
 {
 	char * ret = new char[50];
 	strcpy(ret,NAME);
 	return ret;
 }
-extern "C" DLL_LINKAGE CGlobalAI * GetNewAI()
+extern "C" DLL_EXPORT CGlobalAI * GetNewAI()
 {
 	return new CEmptyAI();
 // return
 }
-extern "C" DLL_LINKAGE void ReleaseAI(CGlobalAI * i)
+extern "C" DLL_EXPORT void ReleaseAI(CGlobalAI * i)
 {
 	delete (CEmptyAI*)i;
 	ais.erase(i);
Index: AI/FuzzyLite
===================================================================
--- AI/FuzzyLite	(revision 2878)
+++ AI/FuzzyLite	(working copy)

Property changes on: AI/FuzzyLite
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,6 ##
+bin
+obj
+*.gch
+*.layout
+*.depend
+*_build_log.html
Index: AI/FuzzyLite/FuzzyLite.cbp
===================================================================
--- AI/FuzzyLite/FuzzyLite.cbp	(revision 0)
+++ AI/FuzzyLite/FuzzyLite.cbp	(working copy)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="FuzzyLite" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin\Debug\FuzzyLite" prefix_auto="1" extension_auto="1" />
+				<Option working_dir="" />
+				<Option object_output="obj\Debug\" />
+				<Option type="2" />
+				<Option compiler="gcc" />
+				<Option createDefFile="1" />
+				<Compiler>
+					<Add option="-Wall" />
+					<Add option="-g" />
+				</Compiler>
+			</Target>
+			<Target title="Release">
+				<Option output="bin\Release\FuzzyLite" prefix_auto="1" extension_auto="1" />
+				<Option working_dir="" />
+				<Option object_output="obj\Release\" />
+				<Option type="2" />
+				<Option compiler="gcc" />
+				<Option createDefFile="1" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O3" />
+					<Add option="-Wall" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+				</Linker>
+			</Target>
+		</Build>
+		<Unit filename="AreaCentroidAlgorithm.cpp" />
+		<Unit filename="AreaCentroidAlgorithm.h" />
+		<Unit filename="CompoundTerm.cpp" />
+		<Unit filename="CompoundTerm.h" />
+		<Unit filename="DescriptiveAntecedent.cpp" />
+		<Unit filename="DescriptiveAntecedent.h" />
+		<Unit filename="DiscreteTerm.cpp" />
+		<Unit filename="DiscreteTerm.h" />
+		<Unit filename="FunctionTerm.cpp" />
+		<Unit filename="FunctionTerm.h" />
+		<Unit filename="FuzzyAnd.cpp" />
+		<Unit filename="FuzzyAnd.h" />
+		<Unit filename="FuzzyAntecedent.cpp" />
+		<Unit filename="FuzzyAntecedent.h" />
+		<Unit filename="FuzzyConsequent.cpp" />
+		<Unit filename="FuzzyConsequent.h" />
+		<Unit filename="FuzzyDefuzzifier.cpp" />
+		<Unit filename="FuzzyDefuzzifier.h" />
+		<Unit filename="FuzzyEngine.cpp" />
+		<Unit filename="FuzzyEngine.h" />
+		<Unit filename="FuzzyException.cpp" />
+		<Unit filename="FuzzyException.h" />
+		<Unit filename="FuzzyExceptions.cpp" />
+		<Unit filename="FuzzyExceptions.h" />
+		<Unit filename="FuzzyLite.h" />
+		<Unit filename="FuzzyModulation.cpp" />
+		<Unit filename="FuzzyModulation.h" />
+		<Unit filename="FuzzyOperation.cpp" />
+		<Unit filename="FuzzyOperation.h" />
+		<Unit filename="FuzzyOperator.cpp" />
+		<Unit filename="FuzzyOperator.h" />
+		<Unit filename="FuzzyOr.cpp" />
+		<Unit filename="FuzzyOr.h" />
+		<Unit filename="FuzzyRule.cpp" />
+		<Unit filename="FuzzyRule.h" />
+		<Unit filename="Hedge.cpp" />
+		<Unit filename="Hedge.h" />
+		<Unit filename="HedgeSet.cpp" />
+		<Unit filename="HedgeSet.h" />
+		<Unit filename="InfixToPostfix.cpp" />
+		<Unit filename="InfixToPostfix.h" />
+		<Unit filename="InputLVar.cpp" />
+		<Unit filename="InputLVar.h" />
+		<Unit filename="LinguisticTerm.cpp" />
+		<Unit filename="LinguisticTerm.h" />
+		<Unit filename="LinguisticVariable.cpp" />
+		<Unit filename="LinguisticVariable.h" />
+		<Unit filename="MamdaniConsequent.cpp" />
+		<Unit filename="MamdaniConsequent.h" />
+		<Unit filename="MamdaniRule.cpp" />
+		<Unit filename="MamdaniRule.h" />
+		<Unit filename="OutputLVar.cpp" />
+		<Unit filename="OutputLVar.h" />
+		<Unit filename="RectangularTerm.cpp" />
+		<Unit filename="RectangularTerm.h" />
+		<Unit filename="RuleBlock.cpp" />
+		<Unit filename="RuleBlock.h" />
+		<Unit filename="ShoulderTerm.cpp" />
+		<Unit filename="ShoulderTerm.h" />
+		<Unit filename="SingletonTerm.cpp" />
+		<Unit filename="SingletonTerm.h" />
+		<Unit filename="StrOp.cpp" />
+		<Unit filename="StrOp.h" />
+		<Unit filename="TakagiSugenoConsequent.cpp" />
+		<Unit filename="TakagiSugenoConsequent.h" />
+		<Unit filename="TakagiSugenoRule.cpp" />
+		<Unit filename="TakagiSugenoRule.h" />
+		<Unit filename="TakagiSugenoTerm.cpp" />
+		<Unit filename="TakagiSugenoTerm.h" />
+		<Unit filename="TrapezoidalTerm.cpp" />
+		<Unit filename="TrapezoidalTerm.h" />
+		<Unit filename="TriangularTerm.cpp" />
+		<Unit filename="TriangularTerm.h" />
+		<Unit filename="defs.h" />
+		<Unit filename="flScalar.h" />
+		<Unit filename="main.cpp" />
+		<Unit filename="test.h" />
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+			<lib_finder disable_auto="1" />
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
Index: AI/StupidAI
===================================================================
--- AI/StupidAI	(revision 2878)
+++ AI/StupidAI	(working copy)

Property changes on: AI/StupidAI
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,6 ##
+bin
+obj
+*.gch
+*.layout
+*.depend
+*_build_log.html
Index: AI/StupidAI/StupidAI.cbp
===================================================================
--- AI/StupidAI/StupidAI.cbp	(revision 0)
+++ AI/StupidAI/StupidAI.cbp	(working copy)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="StupidAI" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin\Debug\StupidAI" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Debug\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-ggdb" />
+				</Compiler>
+				<Linker>
+					<Add directory="..\..\bin\Debug" />
+				</Linker>
+			</Target>
+			<Target title="Release">
+				<Option output="bin\Release\StupidAI" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Release\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O3" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-Wall" />
+			<Add option="-fexceptions" />
+			<Add option="-Wpointer-arith" />
+			<Add option="-Wno-switch" />
+			<Add option="-Wno-sign-compare" />
+			<Add option="-Wno-unused-parameter" />
+			<Add option="-Wno-overloaded-virtual" />
+			<Add option="-DBOOST_THREAD_USE_LIB" />
+			<Add option="-D_WIN32_WINNT=0x0501" />
+		</Compiler>
+		<Linker>
+			<Add option="-lboost_program_options-mgw47-mt-1_51" />
+			<Add option="-lboost_filesystem-mgw47-mt-1_51" />
+			<Add option="-lboost_system-mgw47-mt-1_51" />
+			<Add option="-lboost_thread-mgw47-mt-1_51" />
+			<Add option="-lboost_iostreams-mgw47-mt-1_51" />
+			<Add option="-lboost_chrono-mgw47-mt-1_51" />
+			<Add option="-lVCMI_lib" />
+		</Linker>
+		<Unit filename="StdInc.h">
+			<Option compile="1" />
+			<Option weight="0" />
+		</Unit>
+		<Unit filename="StupidAI.cpp" />
+		<Unit filename="StupidAI.h" />
+		<Unit filename="main.cpp" />
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
Index: AI/VCAI
===================================================================
--- AI/VCAI	(revision 2878)
+++ AI/VCAI	(working copy)

Property changes on: AI/VCAI
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,6 ##
+bin
+obj
+*.gch
+*.layout
+*.depend
+*_build_log.html
Index: AI/VCAI/VCAI.cbp
===================================================================
--- AI/VCAI/VCAI.cbp	(revision 0)
+++ AI/VCAI/VCAI.cbp	(working copy)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="VCAI" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin\Debug\VCAI" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Debug\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-g" />
+				</Compiler>
+				<Linker>
+					<Add directory="..\..\bin\Debug" />
+					<Add directory="..\FuzzyLite\bin\Debug" />
+				</Linker>
+			</Target>
+			<Target title="Release">
+				<Option output="bin\Release\VCAI" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Release\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O3" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+					<Add directory="..\..\bin\Release" />
+					<Add directory="..\FuzzyLite\bin\Release" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-Wall" />
+			<Add option="-fexceptions" />
+			<Add option="-Wpointer-arith" />
+			<Add option="-Wno-switch" />
+			<Add option="-Wno-sign-compare" />
+			<Add option="-Wno-unused-parameter" />
+			<Add option="-Wno-overloaded-virtual" />
+			<Add option="-DBOOST_THREAD_USE_LIB" />
+			<Add option="-D_WIN32_WINNT=0x0501" />
+		</Compiler>
+		<Linker>
+			<Add option="-lFuzzyLite" />
+			<Add option="-lboost_program_options-mgw47-mt-1_51" />
+			<Add option="-lboost_filesystem-mgw47-mt-1_51" />
+			<Add option="-lboost_system-mgw47-mt-1_51" />
+			<Add option="-lboost_thread-mgw47-mt-1_51" />
+			<Add option="-lboost_iostreams-mgw47-mt-1_51" />
+			<Add option="-lboost_chrono-mgw47-mt-1_51" />
+			<Add option="-lVCMI_lib" />
+		</Linker>
+		<Unit filename="Fuzzy.cpp" />
+		<Unit filename="Fuzzy.h" />
+		<Unit filename="StdInc.h">
+			<Option compile="1" />
+			<Option weight="0" />
+		</Unit>
+		<Unit filename="VCAI.cpp" />
+		<Unit filename="VCAI.h" />
+		<Unit filename="main.cpp" />
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+			<lib_finder disable_auto="1" />
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
Index: client
===================================================================
--- client	(revision 2878)
+++ client	(working copy)

Property changes on: client
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+*.gch
Index: client/BattleInterface/CBattleAnimations.cpp
===================================================================
--- client/BattleInterface/CBattleAnimations.cpp	(revision 2878)
+++ client/BattleInterface/CBattleAnimations.cpp	(working copy)
@@ -1,4 +1,4 @@
-#include "StdInc.h"
+#include "../StdInc.h"
 #include "CBattleAnimations.h"
 
 #include <boost/math/constants/constants.hpp>
@@ -17,7 +17,7 @@
 
 
 CBattleAnimation::CBattleAnimation(CBattleInterface * _owner)
-: owner(_owner), ID(_owner->animIDhelper++) 
+: owner(_owner), ID(_owner->animIDhelper++)
 {}
 
 void CBattleAnimation::endAnim()
@@ -60,7 +60,7 @@
 }
 
 CBattleStackAnimation::CBattleStackAnimation(CBattleInterface * _owner, const CStack * _stack)
-: CBattleAnimation(_owner), stack(_stack) 
+: CBattleAnimation(_owner), stack(_stack)
 {}
 
 bool CBattleStackAnimation::isToReverseHlp(BattleHex hexFrom, BattleHex hexTo, bool curDir)
@@ -140,7 +140,7 @@
 {
 
 	assert(attackingStack && "attackingStack is NULL in CBattleAttack::CBattleAttack !\n");
-	bool isCatapultAttack = attackingStack->hasBonusOfType(Bonus::CATAPULT) 
+	bool isCatapultAttack = attackingStack->hasBonusOfType(Bonus::CATAPULT)
 							&& owner->curInt->cb->battleHexToWallPart(_dest) >= 0;
 
 	assert(attackedStack || isCatapultAttack);
@@ -150,7 +150,7 @@
 CDefenceAnimation::CDefenceAnimation(StackAttackedInfo _attackedInfo, CBattleInterface * _owner)
 : CBattleStackAnimation(_owner, _attackedInfo.defender), dmg(_attackedInfo.dmg),
 amountKilled(_attackedInfo.amountKilled), attacker(_attackedInfo.attacker), byShooting(_attackedInfo.byShooting),
-killed(_attackedInfo.killed) 
+killed(_attackedInfo.killed)
 {}
 
 bool CDefenceAnimation::init()
@@ -205,7 +205,7 @@
 	//unit reversed
 
 	if(byShooting) //delay hit animation
-	{		
+	{
 		for(std::list<ProjectileInfo>::const_iterator it = owner->projectiles.begin(); it != owner->projectiles.end(); ++it)
 		{
 			if(it->creID == attacker->getCreature()->idNumber)
@@ -273,8 +273,8 @@
 	delete this;
 }
 
-CDummyAnimation::CDummyAnimation(CBattleInterface * _owner, int howManyFrames) 
-: CBattleAnimation(_owner), counter(0), howMany(howManyFrames) 
+CDummyAnimation::CDummyAnimation(CBattleInterface * _owner, int howManyFrames)
+: CBattleAnimation(_owner), counter(0), howMany(howManyFrames)
 {}
 
 bool CDummyAnimation::init()
@@ -309,7 +309,7 @@
 	if(!attackingStack || myAnim()->getType() == 5)
 	{
 		endAnim();
-		
+
 		return false;
 	}
 
@@ -360,7 +360,7 @@
 }
 
 CMeleeAttackAnimation::CMeleeAttackAnimation(CBattleInterface * _owner, const CStack * attacker, BattleHex _dest, const CStack * _attacked)
-: CAttackAnimation(_owner, attacker, _dest, _attacked) 
+: CAttackAnimation(_owner, attacker, _dest, _attacked)
 {}
 
 void CMeleeAttackAnimation::nextFrame()
@@ -435,7 +435,7 @@
 
 	//step shift calculation
 	posX = myAnim()->pos.x, posY = myAnim()->pos.y; // for precise calculations ;]
-	if(mutPos == -1 && movedStack->hasBonusOfType(Bonus::FLYING)) 
+	if(mutPos == -1 && movedStack->hasBonusOfType(Bonus::FLYING))
 	{
 		steps *= distance;
 		steps /= 2; //to make animation faster
@@ -549,7 +549,7 @@
 }
 
 CMovementEndAnimation::CMovementEndAnimation(CBattleInterface * _owner, const CStack * _stack, BattleHex destTile)
-: CBattleStackAnimation(_owner, _stack), destinationTile(destTile) 
+: CBattleStackAnimation(_owner, _stack), destinationTile(destTile)
 {}
 
 bool CMovementEndAnimation::init()
@@ -592,7 +592,7 @@
 }
 
 CMovementStartAnimation::CMovementStartAnimation(CBattleInterface * _owner, const CStack * _stack)
-: CBattleStackAnimation(_owner, _stack) 
+: CBattleStackAnimation(_owner, _stack)
 {}
 
 bool CMovementStartAnimation::init()
@@ -634,7 +634,7 @@
 }
 
 CReverseAnimation::CReverseAnimation(CBattleInterface * _owner, const CStack * stack, BattleHex dest, bool _priority)
-: CBattleStackAnimation(_owner, stack), partOfAnim(1), secondPartSetup(false), hex(dest), priority(_priority) 
+: CBattleStackAnimation(_owner, stack), partOfAnim(1), secondPartSetup(false), hex(dest), priority(_priority)
 {}
 
 bool CReverseAnimation::init()
@@ -726,7 +726,7 @@
 }
 
 CShootingAnimation::CShootingAnimation(CBattleInterface * _owner, const CStack * attacker, BattleHex _dest, const CStack * _attacked, bool _catapult, int _catapultDmg)
-: CAttackAnimation(_owner, attacker, _dest, _attacked), catapultDamage(_catapultDmg), catapult(_catapult) 
+: CAttackAnimation(_owner, attacker, _dest, _attacked), catapultDamage(_catapultDmg), catapult(_catapult)
 {}
 
 bool CShootingAnimation::init()
@@ -785,7 +785,7 @@
 
 	if (attackedStack)
 	{
-		destcoord = CClickableHex::getXYUnitAnim(dest, false, attackedStack, owner); 
+		destcoord = CClickableHex::getXYUnitAnim(dest, false, attackedStack, owner);
 		destcoord.x += 250; destcoord.y += 210; //TODO: find a better place to shoot
 
 		// Calculate projectile start position. Offsets are read out of the CRANIM.TXT.
@@ -795,13 +795,13 @@
 			spi.x = xycoord.x + projectileOrigin.x + shooterInfo->upperRightMissleOffsetX;
 			spi.y = xycoord.y + projectileOrigin.y + shooterInfo->upperRightMissleOffsetY;
 		}
-		else if (projectileAngle < -straightAngle) 
+		else if (projectileAngle < -straightAngle)
 		{
 			//lower shot
 			spi.x = xycoord.x + projectileOrigin.x + shooterInfo->lowerRightMissleOffsetX;
 			spi.y = xycoord.y + projectileOrigin.y + shooterInfo->lowerRightMissleOffsetY;
 		}
-		else 
+		else
 		{
 			//straight shot
 			spi.x = xycoord.x + projectileOrigin.x + shooterInfo->rightMissleOffsetX;
@@ -816,7 +816,7 @@
 		spi.dy = (destcoord.y - spi.y) / spi.lastStep;
 		spi.catapultInfo = 0;
 	}
-	else 
+	else
 	{
 		// Catapult attack
 		// These are the values for equations of this kind: f(x) = ax^2 + bx + c
@@ -903,11 +903,11 @@
 }
 
 CSpellEffectAnimation::CSpellEffectAnimation(CBattleInterface * _owner, ui32 _effect, BattleHex _destTile, int _dx, int _dy, bool _Vflip)
-:CBattleAnimation(_owner), effect(_effect), destTile(_destTile), customAnim(""), x(0), y(0), dx(_dx), dy(_dy), Vflip(_Vflip) 
+:CBattleAnimation(_owner), effect(_effect), destTile(_destTile), customAnim(""), x(0), y(0), dx(_dx), dy(_dy), Vflip(_Vflip)
 {}
 
 CSpellEffectAnimation::CSpellEffectAnimation(CBattleInterface * _owner, std::string _customAnim, int _x, int _y, int _dx, int _dy, bool _Vflip)
-:CBattleAnimation(_owner), effect(-1), destTile(0), customAnim(_customAnim), x(_x), y(_y), dx(_dx), dy(_dy), Vflip(_Vflip) 
+:CBattleAnimation(_owner), effect(-1), destTile(0), customAnim(_customAnim), x(_x), y(_y), dx(_dx), dy(_dy), Vflip(_Vflip)
 {}
 
 bool CSpellEffectAnimation::init()
@@ -1020,7 +1020,7 @@
 			return false;
 		}
 	}
-	//battleEffects 
+	//battleEffects
 	return true;
 }
 
@@ -1068,4 +1068,4 @@
 	}
 
 	delete this;
-}
\ No newline at end of file
+}
Index: client/CVideoHandler.cpp
===================================================================
--- client/CVideoHandler.cpp	(revision 2878)
+++ client/CVideoHandler.cpp	(working copy)
@@ -47,7 +47,7 @@
 
 void blitBuffer(char *buffer, int x, int y, int w, int h, SDL_Surface *dst)
 {
-	const int bpp = dst->format->BytesPerPixel;	
+	const int bpp = dst->format->BytesPerPixel;
 	char *dest;
 	for(int i = h; i > 0; i--)
 	{
@@ -142,10 +142,13 @@
 		tlog1 << "BIK handler: failed to open " << name << std::endl;
 		goto checkErrorAndClean;
 	}
+	//GCC wants scope of waveout to be reduced.
+    {
+		void *waveout = GetProcAddress(dll,"_BinkOpenWaveOut@4");
+		if(waveout)
+			binkSetSoundSystem(waveout,NULL);
 
-	void *waveout = GetProcAddress(dll,"_BinkOpenWaveOut@4");
-	if(waveout)
-		binkSetSoundSystem(waveout,NULL);
+    }
 
 	hBink = binkOpen(hBinkFile, 0x8a800000);
 	if(!hBink)
@@ -166,8 +169,8 @@
 
 void CBIKHandler::show( int x, int y, SDL_Surface *dst, bool update )
 {
-	const int w = hBink->width, 
-		h = hBink->height, 
+	const int w = hBink->width,
+		h = hBink->height,
 		Bpp = dst->format->BytesPerPixel;
 
 	int mode = -1;
@@ -298,7 +301,7 @@
 	Uint32 flags[2] = {0xff400, 0xfe400};
 
 	data = ptrSmackOpen( (void*)name.c_str(), flags[1], -1);
-	if (!data) 
+	if (!data)
 	{
 		tlog1 << "Smack cannot open " << name << std::endl;
 		checkForError();
@@ -337,9 +340,9 @@
 {
 	int w = std::min<int>(data->width, dst->w - x), h = std::min<int>(data->height, dst->h - y);
 	/* Lock the screen for direct access to the pixels */
-	if ( SDL_MUSTLOCK(dst) ) 
+	if ( SDL_MUSTLOCK(dst) )
 	{
-		if ( SDL_LockSurface(dst) < 0 ) 
+		if ( SDL_LockSurface(dst) < 0 )
 		{
 			fprintf(stderr, "Can't lock screen: %s\n", SDL_GetError());
 			return;
@@ -374,7 +377,7 @@
 				//convert rgb 555 to 565
 				Uint16 pixel = *addr;
 				Uint16 *p = (Uint16 *)((Uint8 *)dst->pixels + (j+y) * dst->pitch + (i + x) * dst->format->BytesPerPixel);
-				*p =	(pixel & 0x1F) 
+				*p =	(pixel & 0x1F)
 					  +	((pixel & 0x3e0) << 1)
 					  +	((pixel & 0x7c00) << 1);
 
@@ -383,7 +386,7 @@
 		}
 	}
 
-	if ( SDL_MUSTLOCK(dst) ) 
+	if ( SDL_MUSTLOCK(dst) )
 	{
 		SDL_UnlockSurface(dst);
 	}
@@ -425,7 +428,7 @@
 			out.exceptions(std::ifstream::failbit | std::ifstream::badbit);
 			out.write(data.get(), myVideo->getSize());
 		}
-		
+
 		current->open(name);
 		return true;
 	}
@@ -526,7 +529,7 @@
 
 
 
-	if(!w) 
+	if(!w)
 	{
 		show(x,y,dst,update);
 	}
@@ -700,7 +703,7 @@
 bool CVideoPlayer::open(std::string fname, bool loop, bool useOverlay)
 {
 	close();
-	
+
 	this->fname = fname;
 	offset = 0;
 	refreshWait = 3;
@@ -790,7 +793,7 @@
 		// Unsupported codec
 		return false;
 	}
-  
+
 	// Open codec
 #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53, 6, 0)
 	if ( avcodec_open(codecContext, codec) < 0 )
@@ -802,7 +805,7 @@
 		codec = NULL;
 		return false;
 	}
-  
+
 	// Allocate video frame
 	frame = avcodec_alloc_frame();
 
@@ -826,8 +829,8 @@
 	// Convert the image into YUV format that SDL uses
 	if (overlay)
 	{
-		sws = sws_getContext(codecContext->width, codecContext->height, 
-							 codecContext->pix_fmt, codecContext->width, codecContext->height, 
+		sws = sws_getContext(codecContext->width, codecContext->height,
+							 codecContext->pix_fmt, codecContext->width, codecContext->height,
 							 PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
 	}
 	else
@@ -842,8 +845,8 @@
 		default: return false;
 		}
 
-		sws = sws_getContext(codecContext->width, codecContext->height, 
-							 codecContext->pix_fmt, codecContext->width, codecContext->height, 
+		sws = sws_getContext(codecContext->width, codecContext->height,
+							 codecContext->pix_fmt, codecContext->width, codecContext->height,
 							 screenFormat, SWS_BICUBIC, NULL, NULL, NULL);
 	}
 
@@ -905,7 +908,7 @@
 
 					if (overlay) {
 						SDL_LockYUVOverlay(overlay);
-				
+
 						pict.data[0] = overlay->pixels[0];
 						pict.data[1] = overlay->pixels[2];
 						pict.data[2] = overlay->pixels[1];
@@ -945,7 +948,7 @@
 	pos.x = x;
 	pos.y = y;
 	CSDL_Ext::blitSurface(dest, &destRect, dst, &pos);
-	
+
 	if (update)
 		SDL_UpdateRect(dst, pos.x, pos.y, pos.w, pos.h);
 }
@@ -968,14 +971,14 @@
 		else
 		{
 			open(fname);
-			nextFrame();			
-			
+			nextFrame();
+
 			// The y position is wrong at the first frame.
 			// Note: either the windows player or the linux player is
-			// broken. Compensate here until the bug is found.			
+			// broken. Compensate here until the bug is found.
 			show(x, y--, dst, update);
 		}
-	} 
+	}
 	else
 	{
 		redraw(x, y, dst, update);
@@ -986,7 +989,7 @@
 
 void CVideoPlayer::close()
 {
-	fname = "";	
+	fname = "";
 	if (sws)
 	{
 		sws_freeContext(sws);
@@ -1049,7 +1052,7 @@
 
 	while(nextFrame())
 	{
-		
+
 		if(stopOnKey && keyDown())
 			return false;
 
@@ -1071,7 +1074,7 @@
 	close();
 	return ret;
 }
-	
+
 CVideoPlayer::~CVideoPlayer()
 {
 	close();
Index: config/creatures.json
===================================================================
--- config/creatures.json	(revision 2878)
+++ config/creatures.json	(working copy)
@@ -492,7 +492,7 @@
 				"name": [ "HellHound" ],
 				"faction": 3,
 				"upgrades": [47],
-				"ability_remove": [ "FLYING" ],
+				"ability_remove": [ "FLYING" ], //hell hound doesn't fly
 				"defname": "CHHOUN.DEF"
 			},
 
@@ -503,7 +503,7 @@
 				"faction": 3,
 				"ability_add": [ [ "THREE_HEADED_ATTACK", 0, 0, 0 ],
 							   	 [ "BLOCKS_RETALIATION", 0, 0, 0 ] ],
-				"ability_remove": [ "FLYING" ],
+				"ability_remove": [ "FLYING" ],  //cerberus doesn't fly
 				"defname": "CCERBU.DEF"
 			},
 
@@ -1523,7 +1523,7 @@
 				"level": 0,
 				"name": [ "FirstAidTent" ],
 				"faction": 9,
-				"ability_add": [ [ "HEALER", 0, 0, 0 ] ],					//Gorynyches fly
+				"ability_add": [ [ "HEALER", 0, 0, 0 ] ],
 				"defname": "SMTENT.DEF"
 			},
 
@@ -1532,7 +1532,7 @@
 				"level": 0,
 				"name": [ "AmmoCart" ],
 				"faction": 9,
-				"ability_add": [ [ "NOT_ACTIVE", 0, 0, 0 ] ],						//hell hound doesn't fly
+				"ability_add": [ [ "NOT_ACTIVE", 0, 0, 0 ] ],
 				"defname": "SMCART.DEF"
 			},
 
@@ -1541,7 +1541,7 @@
 				"level": 0,
 				"name": [ "ArrowTower" ],
 				"faction": 9,
-				"ability_add": [ [ "SHOOTER", 0, 0, 0 ] ],						//cerberus doesn't fly
+				"ability_add": [ [ "SHOOTER", 0, 0, 0 ] ],
 				"defname": "x"
 			},
 
@@ -1700,7 +1700,7 @@
 				"level": 0,
 				"name": [ "Gorynych" ],
 				"faction": 9,
-				"ability_add": [ [ "FLYING", 0, 0, 0 ] ],
+				"ability_add": [ [ "FLYING", 0, 0, 0 ] ],      //Gorynyches fly
 				"defname": "ZM168DG.DEF"
 			},
 
Index: Global.h
===================================================================
--- Global.h	(revision 2878)
+++ Global.h	(working copy)
@@ -97,7 +97,11 @@
 
 // Import + Export macro declarations
 #ifdef _WIN32
+#ifdef __GNUC__
+#define DLL_EXPORT __attribute__((dllexport))
+#else
 #define DLL_EXPORT __declspec(dllexport)
+#endif
 #else
 #if defined(__GNUC__) && GCC_VERSION >= 400
 #define DLL_EXPORT	__attribute__ ((visibility("default")))
@@ -107,7 +111,11 @@
 #endif
 
 #ifdef _WIN32
+#ifdef __GNUC__
+#define DLL_IMPORT __attribute__((dllimport))
+#else
 #define DLL_IMPORT __declspec(dllimport)
+#endif
 #else
 #if defined(__GNUC__) && GCC_VERSION >= 400
 #define DLL_IMPORT	__attribute__ ((visibility("default")))
Index: lib
===================================================================
--- lib	(revision 2878)
+++ lib	(working copy)

Property changes on: lib
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+*.gch
Index: lib/CConsoleHandler.cpp
===================================================================
--- lib/CConsoleHandler.cpp	(revision 2878)
+++ lib/CConsoleHandler.cpp	(working copy)
@@ -25,9 +25,10 @@
 #else
 	#define WIN32_LEAN_AND_MEAN //excludes rarely used stuff from windows headers - delete this line if something is missing
 	#include <windows.h>
+#ifndef __MINGW32__
 	#include <dbghelp.h>
 	#pragma comment(lib, "dbghelp.lib")
-
+#endif
 	typedef WORD TColor;
 	HANDLE handleIn;
 	HANDLE handleOut;
@@ -43,6 +44,7 @@
 TColor defColor;
 
 #ifdef _WIN32
+#ifndef __MINGW32__
 
 void printWinError()
 {
@@ -108,7 +110,7 @@
 
 	if (einfo->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
 	{
-		tlog1 << "Attempt to " << (einfo->ExceptionInformation[0] == 1 ? "write to " : "read from ") 
+		tlog1 << "Attempt to " << (einfo->ExceptionInformation[0] == 1 ? "write to " : "read from ")
 			<< "0x" <<  std::setw(8) << (void*)einfo->ExceptionInformation[1] << std::endl;;
 	}
 	const DWORD threadId = ::GetCurrentThreadId();
@@ -120,7 +122,7 @@
 	//create file where dump will be placed
 	char *mname = NULL;
 	char buffer[MAX_PATH + 1];
-	HMODULE hModule = NULL;	
+	HMODULE hModule = NULL;
 	GetModuleFileNameA(hModule, buffer, MAX_PATH);
 	mname = strrchr(buffer, '\\');
 	if (mname != 0)
@@ -136,6 +138,7 @@
 	return EXCEPTION_EXECUTE_HANDLER;
 }
 #endif
+#endif
 
 
 void CConsoleHandler::setColor(int level)
@@ -216,8 +219,10 @@
 	GetConsoleScreenBufferInfo(handleOut,&csbi);
 	defColor = csbi.wAttributes;
 #ifndef _DEBUG
+#ifndef __MINGW32__
 	SetUnhandledExceptionFilter(onUnhandledException);
 #endif
+#endif
 #else
 	defColor = "\x1b[0m";
 #endif
@@ -233,7 +238,7 @@
 }
 void CConsoleHandler::end()
 {
-	if (thread) 
+	if (thread)
 	{
 #ifndef _WIN32
 		thread->interrupt();
Index: lib/CThreadHelper.cpp
===================================================================
--- lib/CThreadHelper.cpp	(revision 2878)
+++ lib/CThreadHelper.cpp	(working copy)
@@ -35,7 +35,7 @@
 	while(true)
 	{
 		{
-			boost::unique_lock<boost::mutex> lock(rtinm); 
+			boost::unique_lock<boost::mutex> lock(rtinm);
 			if((pom = currentTask) >= amount)
 				break;
 			else
@@ -50,6 +50,7 @@
 void setThreadName(const std::string &name)
 {
 #ifdef _WIN32
+#ifndef __GNUC__
 	//follows http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
 	const DWORD MS_VC_EXCEPTION=0x406D1388;
 #pragma pack(push,8)
@@ -67,6 +68,7 @@
 	info.dwThreadID = -1;
 	info.dwFlags = 0;
 
+
 	__try
 	{
 		RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
@@ -75,6 +77,10 @@
 	{
 	}
 #else
+//not supported
+#endif
+
+#else
 	 prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
 #endif
-}
\ No newline at end of file
+}
Index: lib/NetPacks.h
===================================================================
--- lib/NetPacks.h	(revision 2878)
+++ lib/NetPacks.h	(working copy)
@@ -48,7 +48,7 @@
 	{
 		tlog1 << "CPack serialized... this should not happen!\n";
 	}
-	DLL_LINKAGE void applyGs(CGameState *gs)
+	void applyGs(CGameState *gs)
 	{};
 };
 
@@ -60,7 +60,7 @@
 	void applyFirstCl(CClient *cl)//called before applying to gs
 	{};
 	void applyCl(CClient *cl)//called after applying to gs
-	{}; 
+	{};
 };
 
 struct CPackForServer : public CPack
@@ -70,7 +70,7 @@
 	CGameState* GS(CGameHandler *gh);
 	CPackForServer()
 	{
-		type = 2; 
+		type = 2;
 		c = NULL;
 		player = 255;
 	};
@@ -82,7 +82,7 @@
 struct Query : public CPackForClient
 {
 	ui32 queryID; // equals to -1 if it is not an actual query (and should not be answered)
-	
+
 	Query()
 	{
 		queryID = -1;
@@ -95,7 +95,7 @@
 private:
 	enum EMessage {TEXACT_STRING, TLOCAL_STRING, TNUMBER, TREPLACE_ESTRING, TREPLACE_LSTRING, TREPLACE_NUMBER, TREPLACE_PLUSNUMBER};
 public:
-	enum {GENERAL_TXT=1, XTRAINFO_TXT, OBJ_NAMES, RES_NAMES, ART_NAMES, ARRAY_TXT, CRE_PL_NAMES, CREGENS, MINE_NAMES, 
+	enum {GENERAL_TXT=1, XTRAINFO_TXT, OBJ_NAMES, RES_NAMES, ART_NAMES, ARRAY_TXT, CRE_PL_NAMES, CREGENS, MINE_NAMES,
 		MINE_EVNTS, ADVOB_TXT, ART_EVNTS, SPELL_NAME, SEC_SKILL_NAME, CRE_SING_NAMES, CREGENS4, COLOR, ART_DESCR};
 
 	std::vector<ui8> message; //vector of EMessage
@@ -169,7 +169,7 @@
 	{
 		type = 2001;
 	}
-}; 
+};
 
 struct StackLocation
 {
@@ -276,16 +276,16 @@
 	{
 		h & player & resid & val;
 	}
-}; 
+};
  struct SetResources : public CPackForClient //104
  {
  	SetResources(){type = 104;};
  	void applyCl(CClient *cl);
  	DLL_LINKAGE void applyGs(CGameState *gs);
- 
+
  	ui8 player;
  	TResources res; //res[resid] => res amount
- 
+
  	template <typename Handler> void serialize(Handler &h, const int version)
  	{
  		h & player & res;
@@ -307,7 +307,7 @@
 	{
 		h & abs & id & which & val;
 	}
-}; 
+};
 struct SetSecSkill : public CPackForClient //106
 {
 	SetSecSkill(){type = 106;};
@@ -344,7 +344,7 @@
 	{
 		h & flags & tid & hid;
 	}
-}; 
+};
 struct ChangeSpells : public CPackForClient //109
 {
 	ChangeSpells(){type = 109;};
@@ -359,7 +359,7 @@
 	{
 		h & learn & hid & spells;
 	}
-}; 
+};
 
 struct SetMana : public CPackForClient //110
 {
@@ -402,7 +402,7 @@
 	{
 		h & tiles & player & mode;
 	}
-}; 
+};
 
 struct SetAvailableHeroes : public CPackForClient //113
 {
@@ -431,7 +431,7 @@
 {
 	GiveBonus(ui8 Who = 0)
 	{
-		who = Who; 
+		who = Who;
 		type = 115;
 	}
 
@@ -454,7 +454,7 @@
 {
 	ChangeObjPos()
 	{
-		type = 116; 
+		type = 116;
 		flags = 0;
 	}
 	void applyFirstCl(CClient *cl);
@@ -495,7 +495,7 @@
 {
 	RemoveBonus(ui8 Who = 0)
 	{
-		who = Who; 
+		who = Who;
 		type = 118;
 	}
 
@@ -584,7 +584,7 @@
 	{
 		h & id;
 	}
-}; 
+};
 struct TryMoveHero : public CPackForClient //501
 {
 	TryMoveHero(){type = 501;humanKnows=false; attackedFrom = int3(-1, -1, -1);};
@@ -616,24 +616,24 @@
 // 	SetGarrisons(){type = 502;};
 // 	void applyCl(CClient *cl);
 // 	DLL_LINKAGE void applyGs(CGameState *gs);
-// 
+//
 // 	std::map<ui32,CCreatureSet> garrs;
-// 
+//
 // 	template <typename Handler> void serialize(Handler &h, const int version)
 // 	{
 // 		h & garrs;
 // 	}
-// }; 
+// };
 
 struct NewStructures : public CPackForClient //504
 {
 	NewStructures(){type = 504;};
 	void applyCl(CClient *cl);
-	DLL_LINKAGE virtual void applyGs(CGameState *gs);
+	DLL_LINKAGE void applyGs(CGameState *gs);
 
 	si32 tid;
 	std::set<si32> bid;
-	si16 builded; 
+	si16 builded;
 
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
@@ -648,7 +648,7 @@
 
 	si32 tid;
 	std::set<si32> bid;
-	si16 destroyed; 
+	si16 destroyed;
 
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
@@ -668,7 +668,7 @@
 	{
 		h & tid & creatures;
 	}
-};  
+};
 struct SetHeroesInTown : public CPackForClient //508
 {
 	SetHeroesInTown(){type = 508;};
@@ -689,19 +689,19 @@
 // 	void applyCl(CClient *cl);
 // 	DLL_LINKAGE void applyGs(CGameState *gs);
 // 	DLL_LINKAGE void setArtAtPos(ui16 pos, const CArtifact* art);
-// 
+//
 // 	si32 hid;
 // 	std::vector<const CArtifact*> artifacts; //hero's artifacts from bag
 // 	std::map<ui16, const CArtifact*> artifWorn; //map<position,artifact_id>; positions: 0 - head; 1 - shoulders; 2 - neck; 3 - right hand; 4 - left hand; 5 - torso; 6 - right ring; 7 - left ring; 8 - feet; 9 - misc1; 10 - misc2; 11 - misc3; 12 - misc4; 13 - mach1; 14 - mach2; 15 - mach3; 16 - mach4; 17 - spellbook; 18 - misc5
-// 
+//
 // 	template <typename Handler> void serialize(Handler &h, const int version)
 // 	{
 // 		h & hid & artifacts & artifWorn;
 // 	}
-// 
+//
 // 	std::vector<const CArtifact*> equipped, unequipped; //used locally
 // 	BonusList gained, lost; //used locally as hlp when applying
-// };   
+// };
 
 struct HeroRecruited : public CPackForClient //515
 {
@@ -717,7 +717,7 @@
 	{
 		h & hid & tid & tile & player;
 	}
-};  
+};
 
 struct GiveHero : public CPackForClient //516
 {
@@ -733,7 +733,7 @@
 	{
 		h & id & player;
 	}
-};  
+};
 
 struct OpenWindow : public CPackForClient //517
 {
@@ -1072,7 +1072,7 @@
 	{
 		h & heroes & cres & res & day & resetBuilded & specialWeek & creatureid;
 	}
-}; 
+};
 
 struct Component : public CPack //2002 helper for object scrips informations
 {
@@ -1110,10 +1110,10 @@
 	{
 		h & text & components & player & soundID;
 	}
-	InfoWindow() 
-	{ 
+	InfoWindow()
+	{
 		type = 103;
-		soundID = 0; 
+		soundID = 0;
 	}
 };
 
@@ -1134,7 +1134,7 @@
 	ui32 val;
 	SetObjectProperty(){type = 1001;};
 	SetObjectProperty(ui32 ID, ui8 What, ui32 Val):id(ID),what(What),val(Val){type = 1001;};
-	
+
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
 		h & id & what & val;
@@ -1149,7 +1149,7 @@
 	MetaString name;
 	SetHoverName(){type = 1002;};
 	SetHoverName(ui32 ID, MetaString& Name):id(ID),name(Name){type = 1002;};
-	
+
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
 		h & id & name;
@@ -1165,7 +1165,7 @@
 	std::vector<ui16> skills;
 
 	HeroLevelUp(){type = 2000;};
-	
+
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
 		h & queryID & heroid & primskill & level & skills;
@@ -1273,14 +1273,14 @@
 
 	BattleInfo * info;
 
-	
+
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
 		h & info;
 	}
 };
 struct BattleNextRound : public CPackForClient//3001
-{	
+{
 	BattleNextRound(){type = 3001;};
 	void applyFirstCl(CClient *cl);
 	void applyCl(CClient *cl);
@@ -1874,7 +1874,7 @@
 {
 	GarrisonHeroSwap(){};
 	GarrisonHeroSwap(si32 TID):tid(TID){};
-	si32 tid; 
+	si32 tid;
 
 	bool applyGh(CGameHandler *gh);
 	template <typename Handler> void serialize(Handler &h, const int version)
@@ -1971,7 +1971,7 @@
 	}
 };
 
-struct BuildBoat : public CPackForServer 
+struct BuildBoat : public CPackForServer
 {
 	BuildBoat(){};
 	si32 objid; //where player wants to buy a boat
@@ -2084,7 +2084,7 @@
 	{
 		h & text & player;
 	}
-}; 
+};
 
 
 struct SetSelection : public CPackForClient, public CPackForServer //514
@@ -2241,7 +2241,7 @@
 {
 	enum {TOWN, HERO, BONUS};
 	ui8 what;
-	si8 direction; //-1 or +1 
+	si8 direction; //-1 or +1
 	ui8 playerID;
 
 	RequestOptionsChange(ui8 What, si8 Dir, ui8 Player)
Index: lib/ResourceSet.h
===================================================================
--- lib/ResourceSet.h	(revision 2878)
+++ lib/ResourceSet.h	(working copy)
@@ -10,7 +10,7 @@
 	class ResourceSet;
 	bool canAfford(const ResourceSet &res, const ResourceSet &price); //can a be used to pay price b
 
-	enum ERes 
+	enum ERes
 	{
 		WOOD = 0, MERCURY, ORE, SULFUR, CRYSTAL, GEMS, GOLD, MITHRIL
 	};
@@ -25,7 +25,7 @@
 
 
 #define scalarOperator(OPSIGN)									\
-		DLL_LINKAGE ResourceSet operator OPSIGN(const TResource &rhs) const	\
+		ResourceSet operator OPSIGN(const TResource &rhs) const	\
 		{														\
 			ResourceSet ret = *this;							\
 			for(int i = 0; i < size(); i++)						\
@@ -37,7 +37,7 @@
 
 
 #define vectorOperator(OPSIGN)										\
-		DLL_LINKAGE ResourceSet operator OPSIGN(const ResourceSet &rhs) const	\
+		ResourceSet operator OPSIGN(const ResourceSet &rhs) const	\
 		{															\
 			ResourceSet ret = *this;								\
 			for(int i = 0; i < size(); i++)							\
@@ -48,7 +48,7 @@
 
 
 #define opEqOperator(OPSIGN, RHS_TYPE)							\
-		DLL_LINKAGE ResourceSet& operator OPSIGN ## =(const RHS_TYPE &rhs)	\
+		ResourceSet& operator OPSIGN ## =(const RHS_TYPE &rhs)	\
 		{														\
 			return *this = *this OPSIGN rhs;					\
 		}
@@ -70,7 +70,7 @@
 #undef opEqOperator
 
 		//to be used for calculations of type "how many units of sth can I afford?"
-		DLL_LINKAGE int operator/(const ResourceSet &rhs)
+		int operator/(const ResourceSet &rhs)
 		{
 			int ret = INT_MAX;
 			for(int i = 0; i < size(); i++)
@@ -80,7 +80,7 @@
 			return ret;
 		}
 
-		DLL_LINKAGE ResourceSet & operator=(const TResource &rhs)
+		ResourceSet & operator=(const TResource &rhs)
 		{
 			for(int i = 0; i < size(); i++)
 				at(i) = rhs;
@@ -88,14 +88,14 @@
 			return *this;
 		}
 
-	// WARNING: comparison operators are used for "can afford" relation: a <= b means that foreach i a[i] <= b[i] 
+	// WARNING: comparison operators are used for "can afford" relation: a <= b means that foreach i a[i] <= b[i]
 	// that doesn't work the other way: a > b doesn't mean that a cannot be afforded with b, it's still b can afford a
 // 		bool operator<(const ResourceSet &rhs)
 // 		{
 // 			for(int i = 0; i < size(); i++)
 // 				if(at(i) >= rhs[i])
 // 					return false;
-// 
+//
 // 			return true;
 // 		}
 
@@ -118,7 +118,7 @@
 			} cur;
 			const ResourceSet &rs;
 			void advance();
-		
+
 		public:
 			nziterator(const ResourceSet &RS);
 			bool valid();
@@ -126,7 +126,7 @@
 			nziterator operator++(int);
 			const ResEntry& operator*() const;
 			const ResEntry* operator->() const;
-		
+
 		};
 	};
 }
Index: Scripting/ERM
===================================================================
--- Scripting/ERM	(revision 2878)
+++ Scripting/ERM	(working copy)

Property changes on: Scripting/ERM
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,5 ##
+bin
+obj
+*.depend
+*.layout
+*_build_log.html
Index: Scripting/ERM/ERM.cbp
===================================================================
--- Scripting/ERM/ERM.cbp	(revision 0)
+++ Scripting/ERM/ERM.cbp	(working copy)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="ERM" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin\Debug\ERM" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Debug\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Option createStaticLib="1" />
+				<Compiler>
+					<Add option="-ggdb" />
+				</Compiler>
+				<Linker>
+					<Add directory="..\..\bin\Debug" />
+				</Linker>
+			</Target>
+			<Target title="Release">
+				<Option output="bin\Release\ERM" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Release\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Option createStaticLib="1" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O3" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+					<Add directory="..\..\bin\Release" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-O1" />
+			<Add option="-O" />
+			<Add option="-Wall" />
+			<Add option="-fexceptions" />
+			<Add option="-Wpointer-arith" />
+			<Add option="-Wno-switch" />
+			<Add option="-Wno-sign-compare" />
+			<Add option="-Wno-unused-parameter" />
+			<Add option="-Wno-overloaded-virtual" />
+		</Compiler>
+		<Linker>
+			<Add option="-lboost_program_options-mgw47-mt-1_51" />
+			<Add option="-lboost_filesystem-mgw47-mt-1_51" />
+			<Add option="-lboost_system-mgw47-mt-1_51" />
+			<Add option="-lboost_thread-mgw47-mt-1_51" />
+			<Add option="-lboost_iostreams-mgw47-mt-1_51" />
+			<Add option="-lboost_chrono-mgw47-mt-1_51" />
+			<Add option="-lVCMI_lib" />
+		</Linker>
+		<Unit filename="ERMInterpreter.cpp" />
+		<Unit filename="ERMInterpreter.h" />
+		<Unit filename="ERMParser.cpp" />
+		<Unit filename="ERMParser.h" />
+		<Unit filename="ERMScriptModule.cpp" />
+		<Unit filename="ERMScriptModule.h" />
+		<Unit filename="StdInc.h">
+			<Option compile="1" />
+			<Option weight="0" />
+		</Unit>
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+			<lib_finder disable_auto="1" />
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
Index: vcmi.workspace
===================================================================
--- vcmi.workspace	(revision 0)
+++ vcmi.workspace	(working copy)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_workspace_file>
+	<Workspace title="vcmi">
+		<Project filename="VCMI_lib.cbp" />
+		<Project filename="VCMI_client.cbp">
+			<Depends filename="VCMI_lib.cbp" />
+		</Project>
+		<Project filename="VCMI_server.cbp">
+			<Depends filename="VCMI_lib.cbp" />
+		</Project>
+		<Project filename="AI/FuzzyLite/FuzzyLite.cbp" />
+		<Project filename="AI/EmptyAI/EmptyAI.cbp">
+			<Depends filename="VCMI_lib.cbp" />
+		</Project>
+		<Project filename="AI/VCAI/VCAI.cbp">
+			<Depends filename="VCMI_lib.cbp" />
+			<Depends filename="AI/FuzzyLite/FuzzyLite.cbp" />
+		</Project>
+		<Project filename="AI/StupidAI/StupidAI.cbp">
+			<Depends filename="VCMI_lib.cbp" />
+		</Project>
+		<Project filename="Scripting/ERM/ERM.cbp">
+			<Depends filename="VCMI_lib.cbp" />
+		</Project>
+	</Workspace>
+</CodeBlocks_workspace_file>
Index: VCMI_client.cbp
===================================================================
--- VCMI_client.cbp	(revision 0)
+++ VCMI_client.cbp	(working copy)
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="VCMI_client" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin\Debug\VCMI_client" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Debug\" />
+				<Option type="1" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-g" />
+				</Compiler>
+				<Linker>
+					<Add directory="bin\Debug" />
+					<Add directory="d:\projects\vcmi\3rdparty\SDL-1.2.15\lib" />
+				</Linker>
+			</Target>
+			<Target title="Release">
+				<Option output="bin\Release\VCMI_client" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Release\" />
+				<Option type="1" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O2" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-Wall" />
+			<Add option="-fexceptions" />
+			<Add option="-Wpointer-arith" />
+			<Add option="-Wno-switch" />
+			<Add option="-Wno-sign-compare" />
+			<Add option="-Wno-unused-parameter" />
+			<Add option="-Wno-overloaded-virtual" />
+			<Add option="-fpermissive" />
+			<Add option="-DBOOST_THREAD_USE_LIB" />
+			<Add option="-DBOOST_SYSTEM_NO_DEPRECATED" />
+			<Add option="-D_WIN32_WINNT=0x0501" />
+			<Add option="-DBOOST_THREAD_VERSION=3" />
+			<Add directory="client" />
+			<Add directory="..\include" />
+		</Compiler>
+		<Linker>
+			<Add option="-lole32" />
+			<Add option="-loleaut32" />
+			<Add option="-lws2_32" />
+			<Add option="-lboost_program_options-mgw47-mt-1_51" />
+			<Add option="-lboost_filesystem-mgw47-mt-1_51" />
+			<Add option="-lboost_system-mgw47-mt-1_51" />
+			<Add option="-lboost_thread-mgw47-mt-1_51" />
+			<Add option="-lboost_iostreams-mgw47-mt-1_51" />
+			<Add option="-lboost_chrono-mgw47-mt-1_51" />
+			<Add option="-lSDL" />
+			<Add option="-lSDL_image" />
+			<Add option="-lSDL_mixer" />
+			<Add option="-lSDL_ttf" />
+			<Add option="-lVCMI_lib" />
+		</Linker>
+		<Unit filename="CCallback.cpp" />
+		<Unit filename="CCallback.h" />
+		<Unit filename="client\AdventureMapClasses.cpp" />
+		<Unit filename="client\AdventureMapClasses.h" />
+		<Unit filename="client\BattleInterface\CBattleAnimations.cpp" />
+		<Unit filename="client\BattleInterface\CBattleAnimations.h" />
+		<Unit filename="client\BattleInterface\CBattleInterface.cpp" />
+		<Unit filename="client\BattleInterface\CBattleInterface.h" />
+		<Unit filename="client\BattleInterface\CBattleInterfaceClasses.cpp" />
+		<Unit filename="client\BattleInterface\CBattleInterfaceClasses.h" />
+		<Unit filename="client\BattleInterface\CCreatureAnimation.cpp" />
+		<Unit filename="client\BattleInterface\CCreatureAnimation.h" />
+		<Unit filename="client\CAdvmapInterface.cpp" />
+		<Unit filename="client\CAdvmapInterface.h" />
+		<Unit filename="client\CAnimation.cpp" />
+		<Unit filename="client\CAnimation.h" />
+		<Unit filename="client\CBitmapHandler.cpp" />
+		<Unit filename="client\CBitmapHandler.h" />
+		<Unit filename="client\CCastleInterface.cpp" />
+		<Unit filename="client\CCastleInterface.h" />
+		<Unit filename="client\CConfigHandler.cpp" />
+		<Unit filename="client\CConfigHandler.h" />
+		<Unit filename="client\CCreatureWindow.cpp" />
+		<Unit filename="client\CCreatureWindow.h" />
+		<Unit filename="client\CDefHandler.cpp" />
+		<Unit filename="client\CDefHandler.h" />
+		<Unit filename="client\CGameInfo.cpp" />
+		<Unit filename="client\CGameInfo.h" />
+		<Unit filename="client\CHeroWindow.cpp" />
+		<Unit filename="client\CHeroWindow.h" />
+		<Unit filename="client\CKingdomInterface.cpp" />
+		<Unit filename="client\CKingdomInterface.h" />
+		<Unit filename="client\CMT.cpp" />
+		<Unit filename="client\CMessage.cpp" />
+		<Unit filename="client\CMessage.h" />
+		<Unit filename="client\CMusicHandler.cpp" />
+		<Unit filename="client\CMusicHandler.h" />
+		<Unit filename="client\CPlayerInterface.cpp" />
+		<Unit filename="client\CPlayerInterface.h" />
+		<Unit filename="client\CPreGame.cpp" />
+		<Unit filename="client\CPreGame.h" />
+		<Unit filename="client\CQuestLog.cpp" />
+		<Unit filename="client\CQuestLog.h" />
+		<Unit filename="client\CSoundBase.h" />
+		<Unit filename="client\CSpellWindow.cpp" />
+		<Unit filename="client\CSpellWindow.h" />
+		<Unit filename="client\CVideoHandler.cpp" />
+		<Unit filename="client\CVideoHandler.h" />
+		<Unit filename="client\Client.cpp" />
+		<Unit filename="client\Client.h" />
+		<Unit filename="client\FontBase.h" />
+		<Unit filename="client\FunctionList.h" />
+		<Unit filename="client\GUIClasses.cpp" />
+		<Unit filename="client\GUIClasses.h" />
+		<Unit filename="client\Graphics.cpp" />
+		<Unit filename="client\Graphics.h" />
+		<Unit filename="client\NetPacksClient.cpp" />
+		<Unit filename="client\StdInc.h">
+			<Option compile="1" />
+			<Option weight="0" />
+		</Unit>
+		<Unit filename="client\UIFramework\CCursorHandler.cpp" />
+		<Unit filename="client\UIFramework\CCursorHandler.h" />
+		<Unit filename="client\UIFramework\CGuiHandler.cpp" />
+		<Unit filename="client\UIFramework\CGuiHandler.h" />
+		<Unit filename="client\UIFramework\CIntObject.cpp" />
+		<Unit filename="client\UIFramework\CIntObject.h" />
+		<Unit filename="client\UIFramework\CIntObjectClasses.cpp" />
+		<Unit filename="client\UIFramework\CIntObjectClasses.h" />
+		<Unit filename="client\UIFramework\Geometries.cpp" />
+		<Unit filename="client\UIFramework\Geometries.h" />
+		<Unit filename="client\UIFramework\SDL_Extensions.cpp" />
+		<Unit filename="client\UIFramework\SDL_Extensions.h" />
+		<Unit filename="client\UIFramework\SDL_Pixels.h" />
+		<Unit filename="client\VCMI_client.rc">
+			<Option compilerVar="WINDRES" />
+		</Unit>
+		<Unit filename="client\mapHandler.cpp" />
+		<Unit filename="client\mapHandler.h" />
+		<Unit filename="client\resource.h" />
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+			<lib_finder disable_auto="1" />
+			<DoxyBlocks>
+				<comment_style block="0" line="0" />
+				<doxyfile_project />
+				<doxyfile_build />
+				<doxyfile_warnings />
+				<doxyfile_output />
+				<doxyfile_dot />
+				<general />
+			</DoxyBlocks>
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
Index: VCMI_lib.cbp
===================================================================
--- VCMI_lib.cbp	(revision 0)
+++ VCMI_lib.cbp	(working copy)
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="VCMI_lib" />
+		<Option execution_dir="D:\projects\vcmi\engine\VCMI_lib\" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option platforms="Windows;" />
+				<Option output="bin\Debug\VCMI_lib" prefix_auto="0" extension_auto="1" />
+				<Option object_output="obj\Debug\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Option createStaticLib="1" />
+				<Compiler>
+					<Add option="-O1" />
+					<Add option="-O" />
+				</Compiler>
+			</Target>
+			<Target title="Release">
+				<Option platforms="Windows;" />
+				<Option output="bin\Release\VCMI_lib" prefix_auto="0" extension_auto="1" />
+				<Option object_output="obj\Release\" />
+				<Option type="3" />
+				<Option compiler="gcc" />
+				<Option createStaticLib="1" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O3" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-Wall" />
+			<Add option="-fexceptions" />
+			<Add option="-Wpointer-arith" />
+			<Add option="-Wno-switch" />
+			<Add option="-Wno-sign-compare" />
+			<Add option="-Wno-unused-parameter" />
+			<Add option="-Wno-overloaded-virtual" />
+			<Add option="-DVCMI_DLL" />
+			<Add option="-DBOOST_THREAD_USE_LIB" />
+			<Add option="-D_WIN32_WINNT=0x0501" />
+			<Add option="-DBOOST_THREAD_VERSION=3" />
+			<Add directory="d:\projects\vcmi\engine\" />
+			<Add directory="lib" />
+			<Add directory="..\include" />
+		</Compiler>
+		<Linker>
+			<Add option="-lws2_32" />
+			<Add option="-lboost_program_options-mgw47-mt-1_51" />
+			<Add option="-lboost_filesystem-mgw47-mt-1_51" />
+			<Add option="-lboost_system-mgw47-mt-1_51" />
+			<Add option="-lboost_thread-mgw47-mt-1_51" />
+			<Add option="-lboost_iostreams-mgw47-mt-1_51" />
+			<Add option="-lboost_chrono-mgw47-mt-1_51" />
+			<Add library="D:\MinGW\lib\libz.a" />
+		</Linker>
+		<Unit filename="Global.h" />
+		<Unit filename="lib\AI_Base.h" />
+		<Unit filename="lib\BattleAction.cpp" />
+		<Unit filename="lib\BattleAction.h" />
+		<Unit filename="lib\BattleHex.cpp" />
+		<Unit filename="lib\BattleHex.h" />
+		<Unit filename="lib\BattleState.cpp" />
+		<Unit filename="lib\BattleState.h" />
+		<Unit filename="lib\CArtHandler.cpp" />
+		<Unit filename="lib\CArtHandler.h" />
+		<Unit filename="lib\CBattleCallback.cpp" />
+		<Unit filename="lib\CBattleCallback.h" />
+		<Unit filename="lib\CBuildingHandler.cpp" />
+		<Unit filename="lib\CBuildingHandler.h" />
+		<Unit filename="lib\CCampaignHandler.cpp" />
+		<Unit filename="lib\CCampaignHandler.h" />
+		<Unit filename="lib\CConsoleHandler.cpp" />
+		<Unit filename="lib\CConsoleHandler.h" />
+		<Unit filename="lib\CCreatureHandler.cpp" />
+		<Unit filename="lib\CCreatureHandler.h" />
+		<Unit filename="lib\CCreatureSet.cpp" />
+		<Unit filename="lib\CCreatureSet.h" />
+		<Unit filename="lib\CDefObjInfoHandler.cpp" />
+		<Unit filename="lib\CDefObjInfoHandler.h" />
+		<Unit filename="lib\CGameInterface.cpp" />
+		<Unit filename="lib\CGameInterface.h" />
+		<Unit filename="lib\CGameState.cpp" />
+		<Unit filename="lib\CGameState.h" />
+		<Unit filename="lib\CGeneralTextHandler.cpp" />
+		<Unit filename="lib\CGeneralTextHandler.h" />
+		<Unit filename="lib\CHeroHandler.cpp" />
+		<Unit filename="lib\CHeroHandler.h" />
+		<Unit filename="lib\CLogger.cpp" />
+		<Unit filename="lib\CLogger.h" />
+		<Unit filename="lib\CMapInfo.cpp" />
+		<Unit filename="lib\CMapInfo.h" />
+		<Unit filename="lib\CModHandler.cpp" />
+		<Unit filename="lib\CModHandler.h" />
+		<Unit filename="lib\CObjectHandler.cpp" />
+		<Unit filename="lib\CObjectHandler.h" />
+		<Unit filename="lib\CObstacleInstance.cpp" />
+		<Unit filename="lib\CObstacleInstance.h" />
+		<Unit filename="lib\CScriptingModule.h" />
+		<Unit filename="lib\CSpellHandler.cpp" />
+		<Unit filename="lib\CSpellHandler.h" />
+		<Unit filename="lib\CStopWatch.h" />
+		<Unit filename="lib\CThreadHelper.cpp" />
+		<Unit filename="lib\CThreadHelper.h" />
+		<Unit filename="lib\CTownHandler.cpp" />
+		<Unit filename="lib\CTownHandler.h" />
+		<Unit filename="lib\CondSh.h" />
+		<Unit filename="lib\Connection.cpp" />
+		<Unit filename="lib\Connection.h" />
+		<Unit filename="lib\ConstTransitivePtr.h" />
+		<Unit filename="lib\Filesystem\CBinaryReader.cpp" />
+		<Unit filename="lib\Filesystem\CBinaryReader.h" />
+		<Unit filename="lib\Filesystem\CCompressedStream.cpp" />
+		<Unit filename="lib\Filesystem\CCompressedStream.h" />
+		<Unit filename="lib\Filesystem\CFileInfo.cpp" />
+		<Unit filename="lib\Filesystem\CFileInfo.h" />
+		<Unit filename="lib\Filesystem\CFileInputStream.cpp" />
+		<Unit filename="lib\Filesystem\CFileInputStream.h" />
+		<Unit filename="lib\Filesystem\CFilesystemLoader.cpp" />
+		<Unit filename="lib\Filesystem\CFilesystemLoader.h" />
+		<Unit filename="lib\Filesystem\CInputStream.h" />
+		<Unit filename="lib\Filesystem\CLodArchiveLoader.cpp" />
+		<Unit filename="lib\Filesystem\CLodArchiveLoader.h" />
+		<Unit filename="lib\Filesystem\CMemoryStream.cpp" />
+		<Unit filename="lib\Filesystem\CMemoryStream.h" />
+		<Unit filename="lib\Filesystem\CResourceLoader.cpp" />
+		<Unit filename="lib\Filesystem\CResourceLoader.h" />
+		<Unit filename="lib\Filesystem\ISimpleResourceLoader.h" />
+		<Unit filename="lib\GameConstants.h" />
+		<Unit filename="lib\HeroBonus.cpp" />
+		<Unit filename="lib\HeroBonus.h" />
+		<Unit filename="lib\IGameCallback.cpp" />
+		<Unit filename="lib\IGameCallback.h" />
+		<Unit filename="lib\IGameEventsReceiver.h" />
+		<Unit filename="lib\Interprocess.h" />
+		<Unit filename="lib\JsonNode.cpp" />
+		<Unit filename="lib\JsonNode.h" />
+		<Unit filename="lib\NetPacks.h" />
+		<Unit filename="lib\NetPacksLib.cpp" />
+		<Unit filename="lib\RegisterTypes.h" />
+		<Unit filename="lib\ResourceSet.cpp" />
+		<Unit filename="lib\ResourceSet.h" />
+		<Unit filename="lib\StartInfo.h" />
+		<Unit filename="lib\StdInc.h">
+			<Option compile="1" />
+			<Option weight="0" />
+		</Unit>
+		<Unit filename="lib\UnlockGuard.h" />
+		<Unit filename="lib\VCMIDirs.h" />
+		<Unit filename="lib\VCMI_Lib.cpp" />
+		<Unit filename="lib\VCMI_Lib.h" />
+		<Unit filename="lib\int3.h" />
+		<Unit filename="lib\map.cpp" />
+		<Unit filename="lib\map.h" />
+		<Unit filename="lib\vcmi_endian.h" />
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+			<lib_finder disable_auto="1" />
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
Index: VCMI_server.cbp
===================================================================
--- VCMI_server.cbp	(revision 0)
+++ VCMI_server.cbp	(working copy)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="VCMI_server" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin\Debug\VCMI_server" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Debug\" />
+				<Option type="1" />
+				<Option compiler="gcc" />
+				<Option use_console_runner="0" />
+				<Compiler>
+					<Add option="-ggdb" />
+				</Compiler>
+				<Linker>
+					<Add directory="bin\Debug" />
+				</Linker>
+			</Target>
+			<Target title="Release">
+				<Option output="bin\Release\VCMI_server" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj\Release\" />
+				<Option type="1" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-fomit-frame-pointer" />
+					<Add option="-O3" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+					<Add directory="bin\Release" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-Wextra" />
+			<Add option="-Wall" />
+			<Add option="-fexceptions" />
+			<Add option="-Wpointer-arith" />
+			<Add option="-Wno-switch" />
+			<Add option="-Wno-sign-compare" />
+			<Add option="-Wno-unused-parameter" />
+			<Add option="-Wno-overloaded-virtual" />
+			<Add option="-D_WIN32_WINNT=0x0501" />
+			<Add option="-DBOOST_THREAD_USE_LIB" />
+			<Add option="-DBOOST_THREAD_VERSION=3" />
+		</Compiler>
+		<Linker>
+			<Add option="-lole32" />
+			<Add option="-loleaut32" />
+			<Add option="-lws2_32" />
+			<Add option="-lmswsock" />
+			<Add option="-lboost_program_options-mgw47-mt-1_51" />
+			<Add option="-lboost_filesystem-mgw47-mt-1_51" />
+			<Add option="-lboost_system-mgw47-mt-1_51" />
+			<Add option="-lboost_thread-mgw47-mt-1_51" />
+			<Add option="-lboost_iostreams-mgw47-mt-1_51" />
+			<Add option="-lboost_chrono-mgw47-mt-1_51" />
+			<Add option="-lVCMI_lib" />
+		</Linker>
+		<Unit filename="server\CGameHandler.cpp" />
+		<Unit filename="server\CGameHandler.h" />
+		<Unit filename="server\CVCMIServer.cpp" />
+		<Unit filename="server\CVCMIServer.h" />
+		<Unit filename="server\NetPacksServer.cpp" />
+		<Unit filename="server\StdInc.h">
+			<Option compile="1" />
+			<Option weight="0" />
+		</Unit>
+		<Extensions>
+			<code_completion />
+			<envvars />
+			<debugger />
+			<lib_finder disable_auto="1" />
+			<DoxyBlocks>
+				<comment_style block="0" line="0" />
+				<doxyfile_project />
+				<doxyfile_build />
+				<doxyfile_warnings />
+				<doxyfile_output />
+				<doxyfile_dot />
+				<general />
+			</DoxyBlocks>
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
