Browse Source

- Next part of animation system:
-- Reduced memory usage for images with margins
-- Implemented RLE compression
- Linux-related changes:
-- build system updated to include changed paths
-- new dependency: boost-program-options
-- configure option --disable-debug will produce optimized build

- Several gcc compile fixes
- Optimized CPU usage on town screens
- Removed several includes from headers
- Possible fix for #496

Ivan Savenko 14 years ago
parent
commit
2ff07fa66a

+ 2 - 0
AI/EmptyAI/Makefile.in

@@ -40,6 +40,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/m4/ax_boost_base.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_filesystem.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_iostreams.m4 \
+	$(top_srcdir)/aclocal/m4/ax_boost_program_options.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_system.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_thread.m4 \
 	$(top_srcdir)/aclocal/m4/libtool.m4 \
@@ -144,6 +145,7 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
 BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
 BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@
 BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
 BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
 BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
 CC = @CC@

+ 2 - 0
AI/GeniusAI/Makefile.in

@@ -40,6 +40,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/m4/ax_boost_base.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_filesystem.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_iostreams.m4 \
+	$(top_srcdir)/aclocal/m4/ax_boost_program_options.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_system.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_thread.m4 \
 	$(top_srcdir)/aclocal/m4/libtool.m4 \
@@ -146,6 +147,7 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
 BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
 BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@
 BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
 BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
 BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
 CC = @CC@

+ 2 - 0
AI/Makefile.in

@@ -39,6 +39,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/m4/ax_boost_base.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_filesystem.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_iostreams.m4 \
+	$(top_srcdir)/aclocal/m4/ax_boost_program_options.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_system.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_thread.m4 \
 	$(top_srcdir)/aclocal/m4/libtool.m4 \
@@ -113,6 +114,7 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
 BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
 BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@
 BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
 BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
 BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
 CC = @CC@

+ 2 - 2
CCallback.h

@@ -227,8 +227,8 @@ public:
 	si8 battleHasWallPenalty(const CStack * stack, THex destHex) OVERRIDE; //checks if given stack has wall penalty
 	si8 battleCanTeleportTo(const CStack * stack, THex destHex, int telportLevel) OVERRIDE; //checks if teleportation of given stack to given position can take place
 
-	friend CCallback;
-	friend CClient;
+	friend class CCallback;
+	friend class CClient;
 };
 
 class CCallback : public ICallback, public CBattleCallback

+ 2 - 0
Makefile.in

@@ -42,6 +42,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/m4/ax_boost_base.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_filesystem.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_iostreams.m4 \
+	$(top_srcdir)/aclocal/m4/ax_boost_program_options.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_system.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_thread.m4 \
 	$(top_srcdir)/aclocal/m4/libtool.m4 \
@@ -128,6 +129,7 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
 BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
 BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@
 BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
 BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
 BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
 CC = @CC@

+ 1 - 0
aclocal.m4

@@ -979,6 +979,7 @@ AC_SUBST([am__untar])
 m4_include([aclocal/m4/ax_boost_base.m4])
 m4_include([aclocal/m4/ax_boost_filesystem.m4])
 m4_include([aclocal/m4/ax_boost_iostreams.m4])
+m4_include([aclocal/m4/ax_boost_program_options.m4])
 m4_include([aclocal/m4/ax_boost_system.m4])
 m4_include([aclocal/m4/ax_boost_thread.m4])
 m4_include([aclocal/m4/libtool.m4])

+ 108 - 0
aclocal/m4/ax_boost_program_options.m4

@@ -0,0 +1,108 @@
+# ============================================================================
+#  http://www.gnu.org/software/autoconf-archive/ax_boost_program_options.html
+# ============================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_PROGRAM_OPTIONS
+#
+# DESCRIPTION
+#
+#   Test for program options library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_PROGRAM_OPTIONS
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Thomas Porschberg <[email protected]>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 20
+
+AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
+[
+	AC_ARG_WITH([boost-program-options],
+		AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
+                       [use the program options library from boost - it is possible to specify a certain library for the linker
+                        e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
+        [
+        if test "$withval" = "no"; then
+			want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_program_options_lib=""
+        else
+		    want_boost="yes"
+		ax_boost_user_program_options_lib="$withval"
+		fi
+        ],
+        [want_boost="yes"]
+	)
+
+	if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+	    export want_boost
+		CPPFLAGS_SAVED="$CPPFLAGS"
+		CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+		export CPPFLAGS
+		LDFLAGS_SAVED="$LDFLAGS"
+		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+		export LDFLAGS
+		AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
+					   ax_cv_boost_program_options,
+					   [AC_LANG_PUSH(C++)
+				AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options.hpp>
+                                                          ]],
+                                  [[boost::program_options::options_description generic("Generic options");
+                                   return 0;]])],
+                           ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
+					AC_LANG_POP([C++])
+		])
+		if test "$ax_cv_boost_program_options" = yes; then
+				AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
+                  BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+                if test "x$ax_boost_user_program_options_lib" = "x"; then
+                for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+				    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
+                                 [link_program_options="no"])
+				done
+                if test "x$link_program_options" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+				    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
+                                 [link_program_options="no"])
+				done
+                fi
+                else
+                  for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
+				      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
+                                   [link_program_options="no"])
+                  done
+                fi
+            if test "x$ax_lib" = "x"; then
+                AC_MSG_ERROR(Could not find a version of the library!)
+            fi
+				if test "x$link_program_options" != "xyes"; then
+					AC_MSG_ERROR([Could not link against [$ax_lib] !])
+				fi
+		fi
+		CPPFLAGS="$CPPFLAGS_SAVED"
+	LDFLAGS="$LDFLAGS_SAVED"
+	fi
+])

+ 18 - 19
client/AdventureMapButton.cpp

@@ -52,13 +52,13 @@ void CButtonBase::show(SDL_Surface * to)
 	int img = std::min(state+bitmapOffset,int(imgs[curimg]->size()-1));
 	img = std::max(0, img);
 
-	SDL_Surface *toBlit = imgs[curimg]->image(img);
+	IImage *toBlit = imgs[curimg]->getImage(img);
 
 	if (abs)
 	{
 		if(toBlit)
 		{
-			blitAt(toBlit,pos.x,pos.y,to);
+			toBlit->draw(to, pos.x, pos.y);
 		}
 		else
 		{
@@ -72,7 +72,7 @@ void CButtonBase::show(SDL_Surface * to)
 	}
 	else
 	{
-		blitAt(toBlit,pos.x+ourObj->pos.x,pos.y+ourObj->pos.y,to);
+		toBlit->draw(to, pos.x+ourObj->pos.x,pos.y+ourObj->pos.y);
 	}
 }
 
@@ -239,8 +239,8 @@ void AdventureMapButton::init(const CFunctionList<void()> &Callback, const std::
 
 	pos.x += x;
 	pos.y += y;
-	pos.w = imgs[curimg]->image(0)->w;
-	pos.h = imgs[curimg]->image(0)->h  -1;
+	pos.w = imgs[curimg]->getImage(0)->width();
+	pos.h = imgs[curimg]->getImage(0)->height() -1;
 }
 
 void AdventureMapButton::block( ui8 on )
@@ -269,7 +269,7 @@ void AdventureMapButton::setPlayerColor(int player)
 	for(size_t i =0; i<imgs.size();i++)
 		for(size_t j=0;j<imgs[i]->size();j++)
 		{
-			graphics->blueToPlayersAdv(imgs[i]->image(j),player);
+			imgs[i]->getImage(j)->playerColored(player);
 		}
 }
 
@@ -599,20 +599,19 @@ CSlider::CSlider(int x, int y, int totalw, boost::function<void(int)> Moved, int
 
 	if(style == 0)
 	{
-		CAnimation * pics = new CAnimation(horizontal?"IGPCRDIV.DEF":"OVBUTN2.DEF");
-		pics->load();
+		std::string name = horizontal?"IGPCRDIV.DEF":"OVBUTN2.DEF";
 		
-		left->imgs.push_back(new CAnimation());
-		right->imgs.push_back(new CAnimation());
-		slider->imgs.push_back(new CAnimation());
-		
-		left->imgs.back()->add(pics->image(0), true);
-		left->imgs.back()->add(pics->image(1), true);
-		right->imgs.back()->add(pics->image(2), true);
-		right->imgs.back()->add(pics->image(3), true);
-		slider->imgs.back()->add(pics->image(4), true);
-		
-		delete pics;
+		left->imgs.push_back(new CAnimation(name));
+		left->imgs.back()->load();
+		left->bitmapOffset = 0;
+
+		right->imgs.push_back(new CAnimation(name));
+		right->imgs.back()->load();
+		right->bitmapOffset = 2;
+
+		slider->imgs.push_back(new CAnimation(name));
+		slider->imgs.back()->load();
+		slider->bitmapOffset = 4;
 	}
 	else
 	{

+ 1 - 0
client/CAdvmapInterface.cpp

@@ -7,6 +7,7 @@
 #include "CHeroWindow.h"
 #include "CKingdomInterface.h"
 #include "CMessage.h"
+#include "CPlayerInterface.h"
 #include "SDL_Extensions.h"
 #include "CBitmapHandler.h"
 #include "CConfigHandler.h"

File diff suppressed because it is too large
+ 738 - 378
client/CAnimation.cpp


+ 185 - 133
client/CAnimation.h

@@ -6,7 +6,7 @@
 #include <vector>
 #include <string>
 #include <queue>
-#include <set>
+#include <map>
 
 #include "../global.h"
 #include "GUIBase.h"
@@ -22,96 +22,160 @@
  */
 
 struct SDL_Surface;
-struct BMPPalette;
+class SDLImageLoader;
+class CompImageLoader;
 
-//class for def loading, methods are based on CDefHandler
-//after loading will store general info (palette and frame offsets) and pointer to file itself
+/*
+ * class for def loading, methods are based on CDefHandler
+ * after loading will store general info (palette and frame offsets) and pointer to file itself
+ */
 class CDefFile
 {
 private:
 
 	struct SSpriteDef
 	{
-		ui32 prSize;
-		ui32 defType2;
-		ui32 FullWidth;
-		ui32 FullHeight;
-		ui32 SpriteWidth;
-		ui32 SpriteHeight;
-		ui32 LeftMargin;
-		ui32 TopMargin;
+		ui32 size;
+		ui32 format;    /// format in which pixel data is stored
+		ui32 fullWidth; /// full width and height of frame, including borders
+		ui32 fullHeight;
+		ui32 width;     /// width and height of pixel data, borders excluded
+		ui32 height;
+		si32 leftMargin;
+		si32 topMargin;
 	};
-
 	//offset[group][frame] - offset of frame data in file
-	std::vector< std::vector <size_t> > offset;
-
-	//sorted list of offsets used to determine size
-	std::set <size_t> offList;
+	std::map<size_t, std::vector <size_t> > offset;
 
 	unsigned char * data;
-	BMPPalette * colors;
-	int datasize;
-	unsigned int type;
+	SDL_Color * palette;
 
 public:
 	CDefFile(std::string Name);
 	~CDefFile();
 
-	//true if file was opened correctly
-	bool loaded() const;
-
-	//get copy of palette to unpack compressed animation
-	BMPPalette * getPalette();
-
-	//true if frame is present in it
-	bool haveFrame(size_t frame, size_t group) const;
-
-	//get copy of binary data
-	unsigned char * getFrame(size_t frame, size_t group) const;
-
 	//load frame as SDL_Surface
-	SDL_Surface * loadFrame(size_t frame, size_t group) const ;
+	template<class ImageLoader>
+	void loadFrame(size_t frame, size_t group, ImageLoader &loader) const;
 
-	//static version of previous one for calling from compressed anim
-	static SDL_Surface * loadFrame(const unsigned char * FDef, const BMPPalette * palette);
+	const std::map<size_t, std::vector <size_t> > * getEntries() const;
 };
 
-// Class for handling animation.
-class CAnimation
+/*
+ * Base class for images, can be used for non-animation pictures as well
+ */
+class IImage
 {
-private:
+	int refCount;
+public:
 
-	//internal structure to hold all data of specific frame
-	struct AnimEntry
-	{
-		//surface for this entry
-		SDL_Surface * surf;
+	//draws image on surface "where" at position
+	virtual void draw(SDL_Surface *where, int posX=0, int posY=0, Rect *src=NULL) const=0;
 
-		//data for CompressedAnim
-		unsigned char * data;
+	//decrease ref count, returns true if image can be deleted (refCount <= 0)
+	bool decreaseRef();
+	void increaseRef();
 
-		//reference count, changed by loadFrame \ unloadFrame
-		size_t refCount;
+	//Change palette to specific player
+	virtual void playerColored(int player)=0;
+	virtual int width() const=0;
+	virtual int height() const=0;
+	IImage();
+	virtual ~IImage() {};
+};
 
-		//size of compressed data, unused for def files
-		size_t dataSize;
+/*
+ * Wrapper around SDL_Surface
+ */
+class SDLImage : public IImage
+{
+public:
+	//Surface without empty borders
+	SDL_Surface * surf;
+	//size of left and top borders
+	Point margins;
+	//total size including borders
+	Point fullSize;
 
-		//bitfield, location of image data: 1 - def, 2 - file#9.*, 4 - file#9#2.*
-		unsigned char source;
+public:
+	//Load image from def file
+	SDLImage(CDefFile *data, size_t frame, size_t group=0, bool compressed=false);
+	//Load from bitmap file
+	SDLImage(std::string filename, bool compressed=false);
+	//Create using existing surface, extraRef will increase refcount on SDL_Surface
+	SDLImage(SDL_Surface * from, bool extraRef);
+	~SDLImage();
+
+	void draw(SDL_Surface *where, int posX=0, int posY=0, Rect *src=NULL) const;
+	void playerColored(int player);
+	int width() const;
+	int height() const;
+
+	friend class SDLImageLoader;
+};
 
-		AnimEntry();
-	};
+/*
+ *  RLE-compressed image data for 8-bit images with alpha-channel, currently far from finished
+ *  primary purpose is not high compression ratio but fast drawing.
+ *  Consist of repeatable segments with format similar to H3 def compression:
+ *  1st byte:
+ *  if (byte == 0xff)
+ *  	raw data, opaque and semi-transparent data always in separate blocks
+ *  else
+ *  	RLE-compressed image data with this color
+ *  2nd byte = size of segment
+ *  raw data (if any)
+ */
+class CompImage : public IImage
+{
+	//x,y - margins, w,h - sprite size
+	Rect sprite;
+	//total size including borders
+	Point fullSize;
+
+	//RLE-d data
+	ui8 * surf;
+	//array of offsets for each line
+	unsigned int * line;
+	//palette
+	SDL_Color *palette;
+
+	//Used internally to blit one block of data
+	template<int bpp>
+	void BlitBlock(ui8 type, ui8 size, ui8 *&data, ui8 *&dest) const;
+	void BlitBlockWithBpp(ui8 bpp, ui8 type, ui8 size, ui8 *&data, ui8 *&dest) const;
 
-	//palette from def file, used only for compressed anim
-	BMPPalette * defPalette;
+public:
+	//Load image from def file
+	CompImage(const CDefFile *data, size_t frame, size_t group=0);
+	//TODO: load image from SDL_Surface
+	CompImage(SDL_Surface * surf);
+	~CompImage();
+
+	void draw(SDL_Surface *where, int posX=0, int posY=0, Rect *src=NULL) const;
+	void playerColored(int player);
+	int width() const;
+	int height() const;
+
+	friend class CompImageLoader;
+};
 
-	//entries[group][position], store all info regarding frames
-	std::vector< std::vector <AnimEntry> > entries;
+/*
+ * Class for handling animation.
+ */
+class CAnimation
+{
+private:
+	//source[group][position] - file with this frame, if string is empty - image located in def file
+	std::map<size_t, std::vector <std::string> > source;
+
+	//bitmap[group][position], store objects with loaded bitmaps
+	std::map<size_t, std::map<size_t, IImage* > > images;
 
 	//animation file name
 	std::string name;
 
-	//if true all frames will be stored in compressed state
+	//if true all frames will be stored in compressed (RLE) state
 	const bool compressed;
 
 	//loader, will be called by load(), require opened def file for loading from it. Returns true if image is loaded
@@ -120,9 +184,6 @@ private:
 	//unloadFrame, returns true if image has been unloaded ( either deleted or decreased refCount)
 	bool unloadFrame(size_t frame, size_t group);
 
-	//decompress entry data
-	void decompress(AnimEntry &entry);
-
 	//initialize animation from file
 	void init(CDefFile * file);
 
@@ -138,21 +199,12 @@ public:
 	CAnimation();
 	~CAnimation();
 
-	//add custom surface to the end of specific group. If shared==true surface needs to be deleted
-	//somewhere outside of CAnim as well (SDL_Surface::refcount will be increased)
-	void add(SDL_Surface * surf, bool shared=false, size_t group=0);
-
-	//removes all surfaces which have compressed data
-	void removeDecompressed(size_t frame, size_t group);
+	//add custom surface to the selected position.
+	//Known issue: IImage should not be used in another CAnimation (results in crash othervice)
+	void setCustom(IImage * newImage, size_t frame, size_t group=0);
 
-	//get pointer to surface, this function ignores groups (like ourImages in DefHandler)
-	SDL_Surface * image (size_t frame);
-
-	//get pointer to surface, from specific group
-	SDL_Surface * image(size_t frame, size_t group);
-
-	//removes all frames as well as their entries
-	void clear();
+	//get pointer to image from specific group, NULL if not found
+	IImage * getImage(size_t frame, size_t group=0, bool verbose=true) const;
 
 	//all available frames
 	void load  ();
@@ -166,26 +218,22 @@ public:
 	void load  (size_t frame, size_t group=0);
 	void unload(size_t frame, size_t group=0);
 
-	//list of frames (first = group ID, second = frame ID)
-	void load  (std::vector <std::pair <size_t, size_t> > frames);
-	void unload(std::vector <std::pair <size_t, size_t> > frames);
-
 	//helper to fix frame order on some buttons
 	void fixButtonPos();
 
-	//size of specific group, 0 if not present
-	size_t groupSize(size_t group) const;
-
-	//total count of frames in whole anim
-	size_t size() const;
+	//total count of frames in group (including not loaded)
+	size_t size(size_t group=0) const;
 };
+
 /*
-//Class for displaying one image from animation
+ * Class for displaying one image from animation
+ */
 class CAnimImage: public CIntObject
 {
 private:
 	CAnimation anim;
-	size_t frame;//displayed frame/group
+	//displayed frame/group
+	size_t frame;
 	size_t group;
 
 public:
@@ -194,38 +242,37 @@ public:
 
 	//change displayed frame on this one
 	void setFrame(size_t Frame, size_t Group=0);
-	void show(SDL_Surface *to);
-	//TODO: showAll();
+	void showAll(SDL_Surface *to);
 };
-*/
-//Base class for displaying animation, used as superclass for different animations
+
+/*
+ * Base class for displaying animation, used as superclass for different animations
+ */
 class CShowableAnim: public CIntObject
 {
 public:
 	enum EFlags
 	{
-		FLAG_BASE=1,       //base frame will be blitted before current one
-		FLAG_COMPRESSED=2, //animations will be loaded in compressed state
-		FLAG_ROTATED=4,    //will be displayed rotated
-		FLAG_ALPHA=8,      //if image is 8bbp it will be printed with transparency (0=opaque, 255=transparent)
-		FLAG_USERLE=16,    //not used for now, enable RLE compression from SDL
-		FLAG_PREVIEW=32    //for creatures only: several animation (move, attack, defence...) will be randomly selected
+		BASE=1,            //base frame will be blitted before current one
+		HORIZONTAL_FLIP=2, //TODO: will be displayed rotated
+		VERTICAL_FLIP=4,   //TODO: will be displayed rotated
+		USE_RLE=8,         //RLE-d version, support full alpha-channel for 8-bit images
 	};
-
 protected:
 	CAnimation anim;
+
 	size_t group, frame;//current frame
 
 	size_t first, last; //animation range
 
-	unsigned char flags;//flags from EFlags enum
-
+	//TODO: replace with time delay(needed for battles)
 	unsigned int frameDelay;//delay in frames of each image
-
 	unsigned int value;//how many times current frame was showed
 
+	unsigned char flags;//Flags from EFlags enum
+
 	//blit image with optional rotation, fitting into rect, etc
-	void blitImage(SDL_Surface *what, SDL_Surface *to);
+	void blitImage(size_t frame, size_t group, SDL_Surface *to);
 
 	//For clipping in rect, offsets of picture coordinates
 	int xOffset, yOffset;
@@ -234,18 +281,18 @@ public:
 	//called when next animation sequence is required
 	boost::function<void()> callback;
 
-	CShowableAnim(int x, int y, std::string name, unsigned char flags, unsigned int Delay=4, size_t Group=0);
+	CShowableAnim(int x, int y, std::string name, unsigned char flags=0, unsigned int Delay=4, size_t Group=0);
 	~CShowableAnim();
 
 	//set animation to group or part of group
 	bool set(size_t Group);
 	bool set(size_t Group, size_t from, size_t to=-1);
 
-	//set rotation flag
-	void rotate(bool on);
+	//set rotation flags
+	void rotate(bool on, bool vertical=false);
 
 	//move displayed part of picture (if picture is clipped to rect)
-	void movePic( int byX, int byY);
+	void clipRect(int posX, int posY, int width, int height);
 
 	//set frame to first, call callback
 	virtual void reset();
@@ -255,41 +302,44 @@ public:
 	void showAll(SDL_Surface *to);
 };
 
+/*
+ *
+ */
 class CCreatureAnim: public CShowableAnim
 {
 public:
 
 	enum EAnimType // list of creature animations, numbers were taken from def files
 	{
-		ANIM_MOVING=0, //will automatically add MOVE_START and MOVE_END to queue
-		ANIM_MOUSEON=1,
-		ANIM_HOLDING=2,
-		ANIM_HITTED=3,
-		ANIM_DEFENCE=4,
-		ANIM_DEATH=5,
-		//ANIM_DEATH2=6, //unused?
-		ANIM_TURN_L=7, //will automatically play second part of anim and rotate creature
-		ANIM_TURN_R=8, //same
-		//ANIM_TURN_L2=9, //identical to previous?
-		//ANIM_TURN_R2=10,
-		ANIM_ATTACK_UP=11,
-		ANIM_ATTACK_FRONT=12,
-		ANIM_ATTACK_DOWN=13,
-		ANIM_SHOOT_UP=14,
-		ANIM_SHOOT_FRONT=15,
-		ANIM_SHOOT_DOWN=16,
-		ANIM_CAST_UP=17,
-		ANIM_CAST_FRONT=18,
-		ANIM_CAST_DOWN=19,
-		ANIM_2HEX_ATTACK_UP=17,
-		ANIM_2HEX_ATTACK_FRONT=18,
-		ANIM_2HEX_ATTACK_DOWN=19,
-		ANIM_MOVE_START=20, //no need to use this two directly - ANIM_MOVING will be enought
-		ANIM_MOVE_END=21
+		MOVING=0, //will automatically add MOVE_START and MOVE_END to queue
+		MOUSEON=1,
+		HOLDING=2,
+		HITTED=3,
+		DEFENCE=4,
+		DEATH=5,
+		//DEATH2=6, //unused?
+		TURN_L=7, //will automatically play second part of anim and rotate creature
+		TURN_R=8, //same
+		//TURN_L2=9, //identical to previous?
+		//TURN_R2=10,
+		ATTACK_UP=11,
+		ATTACK_FRONT=12,
+		ATTACK_DOWN=13,
+		SHOOT_UP=14,
+		SHOOT_FRONT=15,
+		SHOOT_DOWN=16,
+		CAST_UP=17,
+		CAST_FRONT=18,
+		CAST_DOWN=19,
+		DHEX_ATTACK_UP=17,
+		DHEX_ATTACK_FRONT=18,
+		DHEX_ATTACK_DOWN=19,
+		MOVE_START=20, //no need to use this two directly - MOVING will be enought
+		MOVE_END=21
 	};
 
 private:
-	// queue of animations waiting to be displayed
+	//queue of animations waiting to be displayed
 	std::queue<EAnimType> queue;
 
 	//this funcction is used as callback if preview flag was set during construction
@@ -302,11 +352,13 @@ public:
 	//add sequence to the end of queue
 	void addLast(EAnimType newType);
 
+	void startPreview();
+
 	//clear queue and set animation to this sequence
 	void clearAndSet(EAnimType type);
 
-	CCreatureAnim(int x, int y, std::string name, unsigned char flags=FLAG_COMPRESSED | FLAG_ALPHA | FLAG_PREVIEW,
-	              EAnimType type=ANIM_HOLDING);
+	CCreatureAnim(int x, int y, std::string name, Rect picPos,
+	              unsigned char flags= USE_RLE, EAnimType = HOLDING );
 
 };
 

+ 47 - 63
client/CCastleInterface.cpp

@@ -7,6 +7,7 @@
 #include "CGameInfo.h"
 #include "CHeroWindow.h"
 #include "CMessage.h"
+#include "CPlayerInterface.h"
 #include "SDL_Extensions.h"
 #include "CCreatureAnimation.h"
 #include "Graphics.h"
@@ -57,35 +58,22 @@ int hordeToDwellingID(int bid)//helper, converts horde buiding ID into correspon
 }
 
 CBuildingRect::CBuildingRect(const Structure *Str)
-	:CShowableAnim(0, 0, Str->defName, CShowableAnim::FLAG_BASE),
-	moi(false), str(Str)
+	:CShowableAnim(0, 0, Str->defName, CShowableAnim::BASE | CShowableAnim::USE_RLE),
+	str(Str)
 {
-
+	used |= LCLICK | RCLICK | HOVER;
 	pos.x += str->pos.x + LOCPLINT->castleInt->pos.x;
 	pos.y += str->pos.y + LOCPLINT->castleInt->pos.y;
 
-	if(str->ID == 33 && str->townID == 4) //little 'hack' for estate in necropolis - background color is not always the first color in the palette
-		for(size_t i=0; i<anim.groupSize(0);i++)
-			SDL_SetColorKey(anim.image(i,0), SDL_SRCCOLORKEY,
-			      *((char*)(anim.image(i,0)->pixels)));
-
-	if(Str->ID<0  || (Str->ID>=27 && Str->ID<=29))
-	{
-		area = border = NULL;
-		return;
-	}
-
-	border = BitmapHandler::loadBitmap(str->borderName, true);
-	if (!border)
-	{
-		tlog2 << "Warning: no border for "<<Str->ID<<std::endl;
-	}
+	if (!str->borderName.empty())
+		border = BitmapHandler::loadBitmap(str->borderName, true);
+	else
+		border = NULL;
 
-	area = BitmapHandler::loadBitmap(str->areaName);
-	if (!area)
-	{
-		tlog2 << "Warning: no area for "<<Str->ID<<std::endl;
-	}
+	if (!str->areaName.empty())
+		area = BitmapHandler::loadBitmap(str->areaName);
+	else
+		area = NULL;
 }
 
 CBuildingRect::~CBuildingRect()
@@ -95,22 +83,7 @@ CBuildingRect::~CBuildingRect()
 	if(area)
 		SDL_FreeSurface(area);
 }
-void CBuildingRect::activate()
-{
-	activateHover();
-	activateLClick();
-	activateRClick();
 
-}
-void CBuildingRect::deactivate()
-{
-	deactivateHover();
-	deactivateLClick();
-	deactivateRClick();
-	if(moi)
-		deactivateMouseMove();
-	moi=false;
-}
 bool CBuildingRect::operator<(const CBuildingRect & p2) const
 {
 	if(str->pos.z != p2.str->pos.z)
@@ -123,15 +96,14 @@ void CBuildingRect::hover(bool on)
 	//Hoverable::hover(on);
 	if(on)
 	{
-		if(!moi)
-			activateMouseMove();
-		moi = true;
+		if(!(active & MOVE))
+			changeUsedEvents(MOVE, true, true);
 	}
 	else
 	{
-		if(moi)
-			deactivateMouseMove();
-		moi = false;
+		if(active & MOVE)
+			changeUsedEvents(MOVE, false, true);
+
 		if(LOCPLINT->castleInt->hBuild == this)
 		{
 			LOCPLINT->castleInt->hBuild = NULL;
@@ -179,13 +151,16 @@ void CBuildingRect::show(SDL_Surface *to)
 {
 	CShowableAnim::show(to);
 
-	if(LOCPLINT->castleInt->hBuild == this && border) //if this this higlighted structure and has border we'll blit it
+	if(LOCPLINT->castleInt->hBuild == this && border)
 		blitAtLoc(border,0,0,to);
 }
 
 void CBuildingRect::showAll(SDL_Surface *to)
 {
-	show(to);
+	CShowableAnim::showAll(to);
+
+	if(LOCPLINT->castleInt->hBuild == this && border && !active)
+		blitAtLoc(border,0,0,to);
 }
 
 std::string getBuildingSubtitle(int tid, int bid)//hover text for building
@@ -765,8 +740,8 @@ void CCastleInterface::enterHall()
 
 void CCastleInterface::showAll( SDL_Surface * to/*=NULL*/)
 {
-	blitAt(cityBg,pos,to);
 	blitAt(townInt,pos.x,pos.y+374,to);
+	blitAt(cityBg,pos,to);
 	adventureInt->resdatabar.draw(to);
 	townlist->draw(to);
 	statusbar->show(to);
@@ -792,8 +767,11 @@ void CCastleInterface::showAll( SDL_Surface * to/*=NULL*/)
 	market->show(to);
 	fort->show(to);
 	hall->show(to);
-	show(to);
-
+	for(size_t i=0;i<buildings.size();i++)
+	{
+		buildings[i]->showAll(to);
+	}
+	statusbar->show(to);//refreshing statusbar
 	if(screen->w != 800 || screen->h !=600)
 		CMessage::drawBorder(LOCPLINT->playerID,to,828,628,pos.x-14,pos.y-15);
 	exit->show(to);
@@ -812,13 +790,10 @@ void CCastleInterface::townChange()
 
 void CCastleInterface::show(SDL_Surface * to)
 {
-	blitAt(cityBg,pos,to);
-
-
 	//blit buildings
 	for(size_t i=0;i<buildings.size();i++)
 	{
-		buildings[i]->showAll(to);
+		buildings[i]->show(to);
 	}
 	statusbar->show(to);//refreshing statusbar
 }
@@ -1502,7 +1477,7 @@ void CHallInterface::close()
 {
 	GH.popInts(LOCPLINT->castleInt->winMode == 2? 2 : 1 );
 }
-void CHallInterface::show(SDL_Surface * to)
+void CHallInterface::showAll(SDL_Surface * to)
 {
 	blitAt(bg,pos,to);
 	LOCPLINT->castleInt->statusbar->show(to);
@@ -1700,14 +1675,23 @@ CFortScreen::~CFortScreen()
 
 void CFortScreen::show( SDL_Surface * to)
 {
-	blitAt(bg,pos,to);
 	for (int i=0; i<crePics.size(); i++)
 	{
 		crePics[i]->show(to);
 	}
+}
+
+void CFortScreen::showAll( SDL_Surface * to)
+{
+	blitAt(bg,pos,to);
+	for (int i=0; i<crePics.size(); i++)
+	{
+		crePics[i]->showAll(to);
+	}
 	exit->show(to);
 	resdatabar->show(to);
 	GH.statusbar->show(to);
+	
 }
 
 void CFortScreen::activate()
@@ -1906,7 +1890,7 @@ CMageGuildScreen::CMageGuildScreen(CCastleInterface * owner)
 			}
 			else
 			{
-				blitAt(scrolls.image(1),positions[i][j],*bg);
+				scrolls.getImage(0)->draw(*bg, positions[i][j].x, positions[i][j].y);
 			}
 		}
 	}
@@ -1973,20 +1957,20 @@ void CMageGuildScreen::Scroll::hover(bool on)
 CBlacksmithDialog::CBlacksmithDialog(bool possible, int creMachineID, int aid, int hid)
 {
 	OBJ_CONSTRUCTION_CAPTURING_ALL;
-//	SDL_SetColorKey(bg2,SDL_SRCCOLORKEY,SDL_MapRGB(bg2->format,0,255,255));
 	bmp = new CPicture("TPSMITH");
 	bmp->colorizeAndConvert(LOCPLINT->playerID);
 	
 	pos = bmp->center();
 	
-	SDL_Surface *bg = BitmapHandler::loadBitmap("TPSMITBK.bmp");
-	blitAt(bg,64,50,*bmp);
-	SDL_FreeSurface(bg);
+	animBG = new CPicture("TPSMITBK", 64, 50);
+	animBG->needRefresh = true;
 
-	CCreatureAnim cra(170, 120, CGI->creh->creatures[creMachineID]->animDefName);
+	anim = new CCreatureAnim(64, 50, CGI->creh->creatures[creMachineID]->animDefName, Rect());
+	anim->clipRect(113,125,200,150);
+	anim->startPreview();
 	char pom[75];
 	sprintf(pom,CGI->generaltexth->allTexts[274].c_str(),CGI->creh->creatures[creMachineID]->nameSing.c_str()); //build a new ...
-	printAtMiddle(pom,165,28,FONT_MEDIUM,tytulowy,*bmp);
+	printAtMiddle(pom,165,28,FONT_BIG,tytulowy,*bmp);
 	printAtMiddle(CGI->generaltexth->jktexts[43],165,218,FONT_MEDIUM,zwykly,*bmp); //resource cost
 	SDL_itoa(CGI->arth->artifacts[aid]->price,pom,10);
 	printAtMiddle(pom,165,290,FONT_MEDIUM,zwykly,*bmp);

+ 5 - 11
client/CCastleInterface.h

@@ -1,14 +1,10 @@
 #ifndef __CCASTLEINTERFACE_H__
 #define __CCASTLEINTERFACE_H__
 
-
-
 #include "../global.h"
-#include <SDL.h>
 #include "CAnimation.h"
 #include "GUIBase.h"
-#include "CMusicBase.h"
-//#include "boost/tuple/tuple.hpp"
+
 class CGTownInstance;
 class CTownHandler;
 class CHallInterface;
@@ -37,14 +33,11 @@ class CMinorResDataBar;
 class CBuildingRect : public CShowableAnim
 {
 public:
-	bool moi; //motion interested is active
 	const Structure* str;
 	SDL_Surface* border;
 	SDL_Surface* area;
 	CBuildingRect(const Structure *Str); //c-tor
 	~CBuildingRect(); //d-tor
-	void activate();
-	void deactivate();
 	bool operator<(const CBuildingRect & p2) const;
 	void hover(bool on);
 	void clickLeft(tribool down, bool previousState);
@@ -119,7 +112,6 @@ public:
 	AdventureMapButton *exit;
 	AdventureMapButton *split;
 
-	musicBase::musicID musicID;
 	std::vector<CCreaInfo*> creainfo;//small icons of creatures (bottom-left corner);
 	std::vector<CBuildingRect*> buildings; //building id, building def, structure struct, border, filling
 
@@ -198,7 +190,7 @@ public:
 	CHallInterface(CCastleInterface * owner); //c-tor
 	~CHallInterface(); //d-tor
 	void close();
-	void show(SDL_Surface * to);
+	void showAll(SDL_Surface * to);
 	void activate();
 	void deactivate();
 };
@@ -228,6 +220,7 @@ public:
 	~CFortScreen(); //d-tor
 	void close();
 	void show(SDL_Surface * to);
+	void showAll(SDL_Surface * to);
 	void activate();
 	void deactivate();
 };
@@ -240,7 +233,7 @@ public:
 	public:
 		const CSpell *spell;
 
-		Scroll(const  CSpell *Spell);
+		Scroll(const CSpell *Spell);
 		void clickLeft(tribool down, bool previousState);
 		void clickRight(tribool down, bool previousState);
 		void hover(bool on);
@@ -264,6 +257,7 @@ class CBlacksmithDialog : public CIntObject
 public:
 	AdventureMapButton *buy, *cancel;
 	CPicture *bmp; //background
+	CPicture *animBG;
 	CCreatureAnim * anim;
 
 	CBlacksmithDialog(bool possible, int creMachineID, int aid, int hid); //c-tor

+ 5 - 5
client/CCreatureAnimation.cpp

@@ -240,7 +240,7 @@ int CCreatureAnimation::nextFrameT(SDL_Surface * dest, int x, int y, bool attack
 						if(!destRect || (destRect->x <= xB && destRect->x + destRect->w > xB ))
 						{
 							const ui8 colorNr = SegmentType == 0xff ? FDef[BaseOffset+k] : SegmentType;
-							putPixel<bpp>(dest, xB + yB*dest->w, palette[colorNr], colorNr, yellowBorder, blueBorder, aCountMod);
+							putPixel<bpp>(dest, xB, yB, palette[colorNr], colorNr, yellowBorder, blueBorder, aCountMod);
 						}
 					}
 					ftcp++; //increment pos
@@ -300,7 +300,8 @@ CCreatureAnimation::~CCreatureAnimation()
 template<int bpp>
 inline void CCreatureAnimation::putPixel(
 	SDL_Surface * dest,
-	const int & ftcp,
+	const int & ftcpX,
+	const int & ftcpY,
 	const BMPPalette & color,
 	const unsigned char & palc,
 	const bool & yellowBorder,
@@ -310,7 +311,7 @@ inline void CCreatureAnimation::putPixel(
 {	
 	if(palc!=0)
 	{
-		Uint8 * p = (Uint8*)dest->pixels + ftcp*dest->format->BytesPerPixel;
+		Uint8 * p = (Uint8*)dest->pixels + ftcpX*dest->format->BytesPerPixel + ftcpY*dest->pitch;
 		if(palc > 7) //normal color
 		{
 			ColorPutter<bpp, 0>::PutColor(p, color.R, color.G, color.B);
@@ -332,9 +333,8 @@ inline void CCreatureAnimation::putPixel(
 		else //shadow
 		{
 			//determining transparency value, 255 or 0 should be already filtered
-			Uint16 alpha;
 			static Uint16 colToAlpha[8] = {255,192,128,128,128,255,128,192};
-			alpha = colToAlpha[palc];
+			Uint16 alpha = colToAlpha[palc];
 
 			if(bpp != 3 && bpp != 4)
 			{

+ 2 - 1
client/CCreatureAnimation.h

@@ -49,7 +49,8 @@ private:
 	template<int bpp>
 	void putPixel(
                 SDL_Surface * dest,
-                const int & ftcp,
+                const int & ftcpX,
+                const int & ftcpY,
                 const BMPPalette & color,
                 const unsigned char & palc,
                 const bool & yellowBorder,

+ 1 - 0
client/CHeroWindow.cpp

@@ -12,6 +12,7 @@
 #include "Graphics.h"
 #include "CSpellWindow.h"
 #include "CConfigHandler.h"
+#include "CPlayerInterface.h"
 #include "../global.h"
 #include "../lib/CArtHandler.h"
 #include "CDefHandler.h"

+ 1 - 1
client/CHeroWindow.h

@@ -2,7 +2,7 @@
 #define __CHEROWINDOW_H__
 
 
-#include "CPlayerInterface.h"
+//#include "CPlayerInterface.h"
 
 /*
  * CHeroWindow.h, part of VCMI engine

+ 2 - 2
client/CMT.cpp

@@ -629,7 +629,7 @@ static void listenForEvents()
 				delete client;
 				client = NULL;
 
-				delete CGI->dobjinfo;
+				delete CGI->dobjinfo.get();
 				const_cast<CGameInfo*>(CGI)->dobjinfo = new CDefObjInfoHandler;
 				const_cast<CGameInfo*>(CGI)->dobjinfo->load();
 
@@ -710,4 +710,4 @@ void requestChangingResolution()
 	ev.type = SDL_USEREVENT;
 	ev.user.code = 1;
 	SDL_PushEvent(&ev);
-}
+}

+ 6 - 4
client/CMessage.cpp

@@ -61,6 +61,8 @@ void CMessage::init()
 	{
 		for (int i=0;i<PLAYER_LIMIT;i++)
 		{
+			//FIXME: memory leak. Use SDL_Surface::refcount++ for each required surface
+			//that should not be deleted by CDefHandler destructor
 			CDefHandler * bluePieces = CDefHandler::giveDef("DIALGBOX.DEF");
 			std::vector<SDL_Surface *> n;
 			piecesOfBox.push_back(n);
@@ -417,7 +419,7 @@ void CMessage::drawIWindow(CInfoWindow * ret, std::string text, int player)
 		// Compute total width of buttons
 		bw = 20*(ret->buttons.size()-1); // space between all buttons
 		for(size_t i=0; i<ret->buttons.size(); i++) //and add buttons width
-			bw+=ret->buttons[i]->imgs[0]->image(0)->w; 
+			bw+=ret->buttons[i]->imgs[0]->getImage(0)->width(); 
 		winSize.second += 20 + //before button
 		ok->ourImages[0].bitmap->h; //button	
 	}
@@ -454,13 +456,13 @@ void CMessage::drawIWindow(CInfoWindow * ret, std::string text, int player)
 	{
 		// Position the buttons at the bottom of the window
 		bw = (ret->bitmap->w/2) - (bw/2);
-		curh = ret->bitmap->h - SIDE_MARGIN - ret->buttons[0]->imgs[0]->image(0)->h;
+		curh = ret->bitmap->h - SIDE_MARGIN - ret->buttons[0]->imgs[0]->getImage(0)->height();
 
 		for(size_t i=0; i<ret->buttons.size(); i++)
 		{
 			ret->buttons[i]->pos.x = bw + ret->pos.x;
 			ret->buttons[i]->pos.y = curh + ret->pos.y;
-			bw += ret->buttons[i]->imgs[0]->image(0)->w + 20;
+			bw += ret->buttons[i]->imgs[0]->getImage(0)->width() + 20;
 		}
 	}
 	for(size_t i=0; i<ret->components.size(); i++)
@@ -553,7 +555,7 @@ ComponentsToBlit::~ComponentsToBlit()
 ComponentsToBlit::ComponentsToBlit(std::vector<SComponent*> & SComps, int maxw, SDL_Surface* _or)
 {
 	w = h = 0;
-	if(!SComps.size())
+	if(SComps.empty())
 		return;
 
 	comps.resize(1);

+ 3 - 2
client/CMessage.h

@@ -3,7 +3,7 @@
 
 #include "FontBase.h"
 #include "../global.h"
-#include <SDL.h>
+//#include <SDL.h>
 #include <boost/function.hpp>
 
 /*
@@ -15,7 +15,8 @@
  * Full text of license available in license.txt file, in main folder
  *
  */
-
+ 
+struct SDL_Surface;
 enum EWindowType {infoOnly, infoOK, yesOrNO};
 class CPreGame;
 class MapSel;

+ 10 - 17
client/CPreGame.cpp

@@ -207,7 +207,7 @@ static CApplier<CBaseForPGApply> *applier = NULL;
 
 CMenuScreen::CMenuScreen( EState which )
 {
-	OBJ_CONSTRUCTION;
+	OBJ_CONSTRUCTION;//FIXME: Memory leak in buttons? Images on them definitely were not freed after game start
 	bgAd = NULL;
 
 	switch(which)
@@ -2845,11 +2845,9 @@ void CBonusSelection::updateBonusSelection()
 
 		for(int i = 0; i < bonDescs.size(); i++)
 		{
-			SDL_Surface *notSelected, *selected;
-
 			CDefEssential * de = CDefHandler::giveDefEss(bonDefs[bonDescs[i].type]);
 			SDL_Surface * surfToDuplicate = NULL;
-			bool freeDuplicatedSurface = false;
+			bool createNewRef = true;
 
 			std::string desc;
 			switch(bonDescs[i].type)
@@ -2883,7 +2881,7 @@ void CBonusSelection::updateBonusSelection()
 					std::string bldgBitmapName = graphics->ERMUtoPicture[faction][CBuildingHandler::campToERMU(bonDescs[i].info1, faction, std::set<si32>())];
 					surfToDuplicate = BitmapHandler::loadBitmap(bldgBitmapName);
 
-					freeDuplicatedSurface = true;
+					createNewRef = false;
 				}
 				break;
 			case 3: //artifact
@@ -2997,23 +2995,18 @@ void CBonusSelection::updateBonusSelection()
 
 			bonuses->addButton(new CHighlightableButton(desc, desc, 0, 475 + i*68, 455, bonDefs[bonDescs[i].type], i));
 
-			notSelected = SDL_ConvertSurface(surfToDuplicate, surfToDuplicate->format, surfToDuplicate->flags);
-			selected = SDL_ConvertSurface(notSelected, notSelected->format, notSelected->flags);
-
-			//printing yellow border
+			//create separate surface with yellow border
+			SDL_Surface * selected = SDL_ConvertSurface(surfToDuplicate, surfToDuplicate->format, surfToDuplicate->flags);
 			blitAt(twcp->ourImages[1].bitmap, 0, 0, selected);
 
-			//moving surfaces into button
-			bonuses->buttons.back()->imgs[0]->clear();
-			bonuses->buttons.back()->imgs[0]->add(notSelected);
-			bonuses->buttons.back()->imgs[0]->add(selected);
+			//replace images on button with new ones
+			delete bonuses->buttons.back()->imgs[0];
+			bonuses->buttons.back()->imgs[0] = new CAnimation();
+			bonuses->buttons.back()->imgs[0]->setCustom(new SDLImage(surfToDuplicate, createNewRef), 0);
+			bonuses->buttons.back()->imgs[0]->setCustom(new SDLImage(selected, false), 1);
 
 			//cleaning
 			delete de;
-			if(freeDuplicatedSurface)
-			{
-				SDL_FreeSurface(surfToDuplicate);
-			}
 		}
 	}
 	if (bonuses->buttons.size() > 0)

+ 10 - 1
client/GUIBase.cpp

@@ -513,7 +513,8 @@ void CIntObject::tick()
 
 CIntObject::CIntObject()
 {
-	pressedL = pressedR = hovered = captureAllKeys = strongInterest = toNextTick = active = used = 0;
+	pressedL = pressedR = hovered = captureAllKeys = strongInterest = false;
+	toNextTick = active = used = 0;
 
 	recActions = defActions = GH.defActionsDef;
 
@@ -849,6 +850,7 @@ CPicture::CPicture(const Rect &r, ui32 color, bool screenFormat /*= false*/)
 
 CPicture::CPicture(SDL_Surface *BG, const Rect &SrcRect, int x /*= 0*/, int y /*= 0*/, bool free /*= false*/)
 {
+	needRefresh = false;
 	srcRect = new Rect(SrcRect);
 	pos.x += x;
 	pos.y += y;
@@ -865,9 +867,16 @@ CPicture::~CPicture()
 
 void CPicture::init()
 {
+	needRefresh = false;
 	srcRect = NULL;
 }
 
+void CPicture::show( SDL_Surface * to )
+{
+	if (needRefresh)
+		showAll(to);
+}
+
 void CPicture::showAll( SDL_Surface * to )
 {
 	if(bg)

+ 9 - 0
client/GUIBase.h

@@ -135,6 +135,13 @@ struct Rect : public SDL_Rect
 		w = W;
 		h = H;
 	}
+	Rect(const Point &position, const Point &size) //c-tor
+	{
+		x = position.x;
+		y = position.y;
+		w = size.x;
+		h = size.y;
+	}
 	Rect(const SDL_Rect & r) //c-tor
 	{
 		x = r.x;
@@ -465,6 +472,7 @@ public:
 	SDL_Surface *bg;
 	Rect *srcRect; //if NULL then whole surface will be used
 	bool freeSurf; //whether surface will be freed upon CPicture destruction
+	bool needRefresh;//Surface needs to be displayed each frame
 
 	operator SDL_Surface*()
 	{
@@ -480,6 +488,7 @@ public:
 
 	void createSimpleRect(const Rect &r, bool screenFormat, ui32 color);
 	~CPicture();
+	void show(SDL_Surface * to);
 	void showAll(SDL_Surface * to);
 	void convertToScreenBPP();
 	void colorizeAndConvert(int player);

+ 9 - 23
client/GUIClasses.cpp

@@ -14,6 +14,7 @@
 #include "SDL_framerate.h"
 #include "CConfigHandler.h"
 #include "CCreatureAnimation.h"
+#include "CPlayerInterface.h"
 #include "Graphics.h"
 #include "CAnimation.h"
 #include "../lib/CArtHandler.h"
@@ -1640,19 +1641,19 @@ int CTownList::size()
 }
 
 CCreaturePic::CCreaturePic(int x, int y, const CCreature *cre, bool Big, bool Animated)
-:c(cre),big(Big)
 {
 	OBJ_CONSTRUCTION_CAPTURING_ALL;
 	pos.x+=x;
 	pos.y+=y;
 	
-	x = 225 - (c->isDoubleWide()?63:78);
-	y = 225 - (big?75:65);
-	
-	anim = new CCreatureAnim(0,0, cre->animDefName);
-	anim->movePic(x,y);
-	anim->pos.w = 100;
-	anim->pos.h = big?130:120;
+	if(Big)
+		bg = new CPicture(graphics->backgrounds[cre->faction],0,0,false);
+	else
+		bg = new CPicture(graphics->backgroundsm[cre->faction],0,0,false);
+	bg->needRefresh = true;
+	anim = new CCreatureAnim(0, 0, cre->animDefName, Rect());
+	anim->clipRect(cre->doubleWide?170:150, 155, bg->pos.w, bg->pos.h);
+	anim->startPreview();
 }
 
 CCreaturePic::~CCreaturePic()
@@ -1660,21 +1661,6 @@ CCreaturePic::~CCreaturePic()
 	
 }
 
-void CCreaturePic::show(SDL_Surface *to)
-{
-	if(big)
-		blitAtLoc(graphics->backgrounds[c->faction],0,0,to);
-	else
-		blitAtLoc(graphics->backgroundsm[c->faction],0,0,to);
-
-	CIntObject::show(to);
-}
-
-void CCreaturePic::showAll(SDL_Surface *to)
-{
-	show(to);
-}
-
 void CRecruitmentWindow::close()
 {
 	GH.popIntTotally(this);

+ 1 - 5
client/GUIClasses.h

@@ -444,16 +444,12 @@ public:
 class CCreaturePic : public CIntObject //draws picture with creature on background, use Animated=true to get animation
 {
 private:
-	const CCreature *c; //which creature's picture
-	bool big; //big => 100x130; !big => 100x120
+	CPicture *bg; //background
 	CCreatureAnim *anim; //displayed animation
 	
 public:
 	CCreaturePic(int x, int y, const CCreature *cre, bool Big=true, bool Animated=true); //c-tor
 	~CCreaturePic(); //d-tor
-	void show(SDL_Surface *to); //prints creature on screen
-	void showAll(SDL_Surface *to);
-	
 };
 
 class CRecruitmentWindow : public CIntObject

+ 22 - 33
client/Makefile.am

@@ -1,44 +1,23 @@
 bin_PROGRAMS = vcmiclient
 
-vcmiclient_LDADD = $(top_builddir)/lib/libvcmi.la @SDL_LIBS@ @FFMPEG_LIBS@
+vcmiclient_LDADD = $(top_builddir)/lib/libvcmi.la @SDL_LIBS@ @FFMPEG_LIBS@ @BOOST_PROGRAM_OPTIONS_LIB@
 vcmiclient_CXXFLAGS = @SDL_CXXFLAGS@ @FFMPEG_CXXFLAGS@
 vcmiclient_LDFLAGS = -L$(top_builddir)/lib
 vcmiclient_SOURCES =  \
-	../AI_Base.h \
 	../CCallback.cpp \
 	../CCallback.h \
+	../CConsoleHandler.cpp \
+	../CConsoleHandler.h \
 	../CGameInterface.cpp \
 	../CGameInterface.h \
 	../CThreadHelper.cpp \
 	../CThreadHelper.h \
-	../StartInfo.h \
-	../global.h \
-	../hch/CBuildingHandler.h \
-	../hch/CDefHandler.cpp \
-	../hch/CDefHandler.h \
-	../hch/CHeroHandler.h \
-	../hch/CMusicBase.h \
-	../hch/CMusicHandler.cpp \
-	../hch/CMusicHandler.h \
-	../hch/CObjectHandler.h \
-	../hch/CSndHandler.cpp \
-	../hch/CSndHandler.h \
-	../hch/CSoundBase.h \
-	../hch/CVideoHandler.cpp \
-	../hch/CVideoHandler.h \
-	../lib/CMapInfo.cpp \
-	../lib/CMapInfo.h \
-	../int3.h \
-	../nodrze.h \
-	../stdafx.h \
-	../tchar_amigaos4.h \
-	../timeHandler.h \
 	AdventureMapButton.cpp \
 	AdventureMapButton.h \
 	CAdvmapInterface.cpp \
 	CAdvmapInterface.h \
-	CAnimation.h \
 	CAnimation.cpp \
+	CAnimation.h \
 	CBattleInterface.cpp \
 	CBattleInterface.h \
 	CBitmapHandler.cpp \
@@ -51,35 +30,45 @@ vcmiclient_SOURCES =  \
 	CCreatureAnimation.h \
 	CCursorHandler.cpp \
 	CCursorHandler.h \
+	CDefHandler.cpp \
+	CDefHandler.h \
 	CGameInfo.cpp \
 	CGameInfo.h \
 	CHeroWindow.cpp \
 	CHeroWindow.h \
 	CKingdomInterface.cpp \
 	CKingdomInterface.h \
-	CMT.cpp \
+	Client.cpp \
+	Client.h \
 	CMessage.cpp \
 	CMessage.h \
+	CMT.cpp \
+	CMusicBase.h \
+	CMusicHandler.cpp \
+	CMusicHandler.h \
 	CPlayerInterface.cpp \
 	CPlayerInterface.h \
 	CPreGame.cpp \
 	CPreGame.h \
+	CSndHandler.cpp \
+	CSndHandler.h \
+	CSoundBase.h \
 	CSpellWindow.cpp \
 	CSpellWindow.h \
-	Client.cpp \
-	Client.h \
+	CVideoHandler.cpp \
+	CVideoHandler.h \
 	FontBase.h \
 	FunctionList.h \
+	Graphics.cpp \
+	Graphics.h \
 	GUIBase.cpp \
 	GUIBase.h \
 	GUIClasses.cpp \
 	GUIClasses.h \
-	Graphics.cpp \
-	Graphics.h \
+	mapHandler.cpp \
+	mapHandler.h \
 	NetPacksClient.cpp \
 	SDL_Extensions.cpp \
 	SDL_Extensions.h \
 	SDL_framerate.cpp \
-	SDL_framerate.h \
-	mapHandler.cpp \
-	mapHandler.h
+	SDL_framerate.h

+ 162 - 172
client/Makefile.in

@@ -41,6 +41,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/m4/ax_boost_base.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_filesystem.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_iostreams.m4 \
+	$(top_srcdir)/aclocal/m4/ax_boost_program_options.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_system.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_thread.m4 \
 	$(top_srcdir)/aclocal/m4/libtool.m4 \
@@ -57,13 +58,9 @@ CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 PROGRAMS = $(bin_PROGRAMS)
 am_vcmiclient_OBJECTS = vcmiclient-CCallback.$(OBJEXT) \
+	vcmiclient-CConsoleHandler.$(OBJEXT) \
 	vcmiclient-CGameInterface.$(OBJEXT) \
 	vcmiclient-CThreadHelper.$(OBJEXT) \
-	vcmiclient-CDefHandler.$(OBJEXT) \
-	vcmiclient-CMusicHandler.$(OBJEXT) \
-	vcmiclient-CSndHandler.$(OBJEXT) \
-	vcmiclient-CVideoHandler.$(OBJEXT) \
-	vcmiclient-CMapInfo.$(OBJEXT) \
 	vcmiclient-AdventureMapButton.$(OBJEXT) \
 	vcmiclient-CAdvmapInterface.$(OBJEXT) \
 	vcmiclient-CAnimation.$(OBJEXT) \
@@ -73,19 +70,22 @@ am_vcmiclient_OBJECTS = vcmiclient-CCallback.$(OBJEXT) \
 	vcmiclient-CConfigHandler.$(OBJEXT) \
 	vcmiclient-CCreatureAnimation.$(OBJEXT) \
 	vcmiclient-CCursorHandler.$(OBJEXT) \
+	vcmiclient-CDefHandler.$(OBJEXT) \
 	vcmiclient-CGameInfo.$(OBJEXT) \
 	vcmiclient-CHeroWindow.$(OBJEXT) \
 	vcmiclient-CKingdomInterface.$(OBJEXT) \
-	vcmiclient-CMT.$(OBJEXT) vcmiclient-CMessage.$(OBJEXT) \
+	vcmiclient-Client.$(OBJEXT) vcmiclient-CMessage.$(OBJEXT) \
+	vcmiclient-CMT.$(OBJEXT) vcmiclient-CMusicHandler.$(OBJEXT) \
 	vcmiclient-CPlayerInterface.$(OBJEXT) \
-	vcmiclient-CPreGame.$(OBJEXT) \
-	vcmiclient-CSpellWindow.$(OBJEXT) vcmiclient-Client.$(OBJEXT) \
-	vcmiclient-GUIBase.$(OBJEXT) vcmiclient-GUIClasses.$(OBJEXT) \
-	vcmiclient-Graphics.$(OBJEXT) \
+	vcmiclient-CPreGame.$(OBJEXT) vcmiclient-CSndHandler.$(OBJEXT) \
+	vcmiclient-CSpellWindow.$(OBJEXT) \
+	vcmiclient-CVideoHandler.$(OBJEXT) \
+	vcmiclient-Graphics.$(OBJEXT) vcmiclient-GUIBase.$(OBJEXT) \
+	vcmiclient-GUIClasses.$(OBJEXT) \
+	vcmiclient-mapHandler.$(OBJEXT) \
 	vcmiclient-NetPacksClient.$(OBJEXT) \
 	vcmiclient-SDL_Extensions.$(OBJEXT) \
-	vcmiclient-SDL_framerate.$(OBJEXT) \
-	vcmiclient-mapHandler.$(OBJEXT)
+	vcmiclient-SDL_framerate.$(OBJEXT)
 vcmiclient_OBJECTS = $(am_vcmiclient_OBJECTS)
 vcmiclient_DEPENDENCIES = $(top_builddir)/lib/libvcmi.la
 AM_V_lt = $(am__v_lt_$(V))
@@ -153,6 +153,7 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
 BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
 BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@
 BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
 BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
 BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
 CC = @CC@
@@ -269,45 +270,24 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-vcmiclient_LDADD = $(top_builddir)/lib/libvcmi.la @SDL_LIBS@ @FFMPEG_LIBS@
+vcmiclient_LDADD = $(top_builddir)/lib/libvcmi.la @SDL_LIBS@ @FFMPEG_LIBS@ @BOOST_PROGRAM_OPTIONS_LIB@
 vcmiclient_CXXFLAGS = @SDL_CXXFLAGS@ @FFMPEG_CXXFLAGS@
 vcmiclient_LDFLAGS = -L$(top_builddir)/lib
 vcmiclient_SOURCES = \
-	../AI_Base.h \
 	../CCallback.cpp \
 	../CCallback.h \
+	../CConsoleHandler.cpp \
+	../CConsoleHandler.h \
 	../CGameInterface.cpp \
 	../CGameInterface.h \
 	../CThreadHelper.cpp \
 	../CThreadHelper.h \
-	../StartInfo.h \
-	../global.h \
-	../hch/CBuildingHandler.h \
-	../hch/CDefHandler.cpp \
-	../hch/CDefHandler.h \
-	../hch/CHeroHandler.h \
-	../hch/CMusicBase.h \
-	../hch/CMusicHandler.cpp \
-	../hch/CMusicHandler.h \
-	../hch/CObjectHandler.h \
-	../hch/CSndHandler.cpp \
-	../hch/CSndHandler.h \
-	../hch/CSoundBase.h \
-	../hch/CVideoHandler.cpp \
-	../hch/CVideoHandler.h \
-	../lib/CMapInfo.cpp \
-	../lib/CMapInfo.h \
-	../int3.h \
-	../nodrze.h \
-	../stdafx.h \
-	../tchar_amigaos4.h \
-	../timeHandler.h \
 	AdventureMapButton.cpp \
 	AdventureMapButton.h \
 	CAdvmapInterface.cpp \
 	CAdvmapInterface.h \
-	CAnimation.h \
 	CAnimation.cpp \
+	CAnimation.h \
 	CBattleInterface.cpp \
 	CBattleInterface.h \
 	CBitmapHandler.cpp \
@@ -320,38 +300,48 @@ vcmiclient_SOURCES = \
 	CCreatureAnimation.h \
 	CCursorHandler.cpp \
 	CCursorHandler.h \
+	CDefHandler.cpp \
+	CDefHandler.h \
 	CGameInfo.cpp \
 	CGameInfo.h \
 	CHeroWindow.cpp \
 	CHeroWindow.h \
 	CKingdomInterface.cpp \
 	CKingdomInterface.h \
-	CMT.cpp \
+	Client.cpp \
+	Client.h \
 	CMessage.cpp \
 	CMessage.h \
+	CMT.cpp \
+	CMusicBase.h \
+	CMusicHandler.cpp \
+	CMusicHandler.h \
 	CPlayerInterface.cpp \
 	CPlayerInterface.h \
 	CPreGame.cpp \
 	CPreGame.h \
+	CSndHandler.cpp \
+	CSndHandler.h \
+	CSoundBase.h \
 	CSpellWindow.cpp \
 	CSpellWindow.h \
-	Client.cpp \
-	Client.h \
+	CVideoHandler.cpp \
+	CVideoHandler.h \
 	FontBase.h \
 	FunctionList.h \
+	Graphics.cpp \
+	Graphics.h \
 	GUIBase.cpp \
 	GUIBase.h \
 	GUIClasses.cpp \
 	GUIClasses.h \
-	Graphics.cpp \
-	Graphics.h \
+	mapHandler.cpp \
+	mapHandler.h \
 	NetPacksClient.cpp \
 	SDL_Extensions.cpp \
 	SDL_Extensions.h \
 	SDL_framerate.cpp \
-	SDL_framerate.h \
-	mapHandler.cpp \
-	mapHandler.h
+	SDL_framerate.h
 
 all: all-am
 
@@ -448,6 +438,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCallback.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCastleInterface.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CConfigHandler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CConsoleHandler.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCreatureAnimation.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CCursorHandler.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CDefHandler.Po@am__quote@
@@ -456,7 +447,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CHeroWindow.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CKingdomInterface.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CMT.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CMapInfo.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CMessage.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CMusicHandler.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiclient-CPlayerInterface.Po@am__quote@
@@ -514,6 +504,22 @@ vcmiclient-CCallback.obj: ../CCallback.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CCallback.obj `if test -f '../CCallback.cpp'; then $(CYGPATH_W) '../CCallback.cpp'; else $(CYGPATH_W) '$(srcdir)/../CCallback.cpp'; fi`
 
+vcmiclient-CConsoleHandler.o: ../CConsoleHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CConsoleHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CConsoleHandler.Tpo -c -o vcmiclient-CConsoleHandler.o `test -f '../CConsoleHandler.cpp' || echo '$(srcdir)/'`../CConsoleHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CConsoleHandler.Tpo $(DEPDIR)/vcmiclient-CConsoleHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../CConsoleHandler.cpp' object='vcmiclient-CConsoleHandler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CConsoleHandler.o `test -f '../CConsoleHandler.cpp' || echo '$(srcdir)/'`../CConsoleHandler.cpp
+
+vcmiclient-CConsoleHandler.obj: ../CConsoleHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CConsoleHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CConsoleHandler.Tpo -c -o vcmiclient-CConsoleHandler.obj `if test -f '../CConsoleHandler.cpp'; then $(CYGPATH_W) '../CConsoleHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../CConsoleHandler.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CConsoleHandler.Tpo $(DEPDIR)/vcmiclient-CConsoleHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../CConsoleHandler.cpp' object='vcmiclient-CConsoleHandler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CConsoleHandler.obj `if test -f '../CConsoleHandler.cpp'; then $(CYGPATH_W) '../CConsoleHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../CConsoleHandler.cpp'; fi`
+
 vcmiclient-CGameInterface.o: ../CGameInterface.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CGameInterface.o -MD -MP -MF $(DEPDIR)/vcmiclient-CGameInterface.Tpo -c -o vcmiclient-CGameInterface.o `test -f '../CGameInterface.cpp' || echo '$(srcdir)/'`../CGameInterface.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CGameInterface.Tpo $(DEPDIR)/vcmiclient-CGameInterface.Po
@@ -546,86 +552,6 @@ vcmiclient-CThreadHelper.obj: ../CThreadHelper.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CThreadHelper.obj `if test -f '../CThreadHelper.cpp'; then $(CYGPATH_W) '../CThreadHelper.cpp'; else $(CYGPATH_W) '$(srcdir)/../CThreadHelper.cpp'; fi`
 
-vcmiclient-CDefHandler.o: ../hch/CDefHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CDefHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CDefHandler.Tpo -c -o vcmiclient-CDefHandler.o `test -f '../hch/CDefHandler.cpp' || echo '$(srcdir)/'`../hch/CDefHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CDefHandler.Tpo $(DEPDIR)/vcmiclient-CDefHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CDefHandler.cpp' object='vcmiclient-CDefHandler.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CDefHandler.o `test -f '../hch/CDefHandler.cpp' || echo '$(srcdir)/'`../hch/CDefHandler.cpp
-
-vcmiclient-CDefHandler.obj: ../hch/CDefHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CDefHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CDefHandler.Tpo -c -o vcmiclient-CDefHandler.obj `if test -f '../hch/CDefHandler.cpp'; then $(CYGPATH_W) '../hch/CDefHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CDefHandler.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CDefHandler.Tpo $(DEPDIR)/vcmiclient-CDefHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CDefHandler.cpp' object='vcmiclient-CDefHandler.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CDefHandler.obj `if test -f '../hch/CDefHandler.cpp'; then $(CYGPATH_W) '../hch/CDefHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CDefHandler.cpp'; fi`
-
-vcmiclient-CMusicHandler.o: ../hch/CMusicHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMusicHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CMusicHandler.Tpo -c -o vcmiclient-CMusicHandler.o `test -f '../hch/CMusicHandler.cpp' || echo '$(srcdir)/'`../hch/CMusicHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMusicHandler.Tpo $(DEPDIR)/vcmiclient-CMusicHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CMusicHandler.cpp' object='vcmiclient-CMusicHandler.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMusicHandler.o `test -f '../hch/CMusicHandler.cpp' || echo '$(srcdir)/'`../hch/CMusicHandler.cpp
-
-vcmiclient-CMusicHandler.obj: ../hch/CMusicHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMusicHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CMusicHandler.Tpo -c -o vcmiclient-CMusicHandler.obj `if test -f '../hch/CMusicHandler.cpp'; then $(CYGPATH_W) '../hch/CMusicHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CMusicHandler.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMusicHandler.Tpo $(DEPDIR)/vcmiclient-CMusicHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CMusicHandler.cpp' object='vcmiclient-CMusicHandler.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMusicHandler.obj `if test -f '../hch/CMusicHandler.cpp'; then $(CYGPATH_W) '../hch/CMusicHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CMusicHandler.cpp'; fi`
-
-vcmiclient-CSndHandler.o: ../hch/CSndHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CSndHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CSndHandler.Tpo -c -o vcmiclient-CSndHandler.o `test -f '../hch/CSndHandler.cpp' || echo '$(srcdir)/'`../hch/CSndHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CSndHandler.Tpo $(DEPDIR)/vcmiclient-CSndHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CSndHandler.cpp' object='vcmiclient-CSndHandler.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CSndHandler.o `test -f '../hch/CSndHandler.cpp' || echo '$(srcdir)/'`../hch/CSndHandler.cpp
-
-vcmiclient-CSndHandler.obj: ../hch/CSndHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CSndHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CSndHandler.Tpo -c -o vcmiclient-CSndHandler.obj `if test -f '../hch/CSndHandler.cpp'; then $(CYGPATH_W) '../hch/CSndHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CSndHandler.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CSndHandler.Tpo $(DEPDIR)/vcmiclient-CSndHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CSndHandler.cpp' object='vcmiclient-CSndHandler.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CSndHandler.obj `if test -f '../hch/CSndHandler.cpp'; then $(CYGPATH_W) '../hch/CSndHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CSndHandler.cpp'; fi`
-
-vcmiclient-CVideoHandler.o: ../hch/CVideoHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CVideoHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CVideoHandler.Tpo -c -o vcmiclient-CVideoHandler.o `test -f '../hch/CVideoHandler.cpp' || echo '$(srcdir)/'`../hch/CVideoHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CVideoHandler.Tpo $(DEPDIR)/vcmiclient-CVideoHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CVideoHandler.cpp' object='vcmiclient-CVideoHandler.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CVideoHandler.o `test -f '../hch/CVideoHandler.cpp' || echo '$(srcdir)/'`../hch/CVideoHandler.cpp
-
-vcmiclient-CVideoHandler.obj: ../hch/CVideoHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CVideoHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CVideoHandler.Tpo -c -o vcmiclient-CVideoHandler.obj `if test -f '../hch/CVideoHandler.cpp'; then $(CYGPATH_W) '../hch/CVideoHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CVideoHandler.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CVideoHandler.Tpo $(DEPDIR)/vcmiclient-CVideoHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CVideoHandler.cpp' object='vcmiclient-CVideoHandler.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CVideoHandler.obj `if test -f '../hch/CVideoHandler.cpp'; then $(CYGPATH_W) '../hch/CVideoHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../hch/CVideoHandler.cpp'; fi`
-
-vcmiclient-CMapInfo.o: ../lib/CMapInfo.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMapInfo.o -MD -MP -MF $(DEPDIR)/vcmiclient-CMapInfo.Tpo -c -o vcmiclient-CMapInfo.o `test -f '../lib/CMapInfo.cpp' || echo '$(srcdir)/'`../lib/CMapInfo.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMapInfo.Tpo $(DEPDIR)/vcmiclient-CMapInfo.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../lib/CMapInfo.cpp' object='vcmiclient-CMapInfo.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMapInfo.o `test -f '../lib/CMapInfo.cpp' || echo '$(srcdir)/'`../lib/CMapInfo.cpp
-
-vcmiclient-CMapInfo.obj: ../lib/CMapInfo.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMapInfo.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CMapInfo.Tpo -c -o vcmiclient-CMapInfo.obj `if test -f '../lib/CMapInfo.cpp'; then $(CYGPATH_W) '../lib/CMapInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/../lib/CMapInfo.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMapInfo.Tpo $(DEPDIR)/vcmiclient-CMapInfo.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../lib/CMapInfo.cpp' object='vcmiclient-CMapInfo.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMapInfo.obj `if test -f '../lib/CMapInfo.cpp'; then $(CYGPATH_W) '../lib/CMapInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/../lib/CMapInfo.cpp'; fi`
-
 vcmiclient-AdventureMapButton.o: AdventureMapButton.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-AdventureMapButton.o -MD -MP -MF $(DEPDIR)/vcmiclient-AdventureMapButton.Tpo -c -o vcmiclient-AdventureMapButton.o `test -f 'AdventureMapButton.cpp' || echo '$(srcdir)/'`AdventureMapButton.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-AdventureMapButton.Tpo $(DEPDIR)/vcmiclient-AdventureMapButton.Po
@@ -770,6 +696,22 @@ vcmiclient-CCursorHandler.obj: CCursorHandler.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CCursorHandler.obj `if test -f 'CCursorHandler.cpp'; then $(CYGPATH_W) 'CCursorHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CCursorHandler.cpp'; fi`
 
+vcmiclient-CDefHandler.o: CDefHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CDefHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CDefHandler.Tpo -c -o vcmiclient-CDefHandler.o `test -f 'CDefHandler.cpp' || echo '$(srcdir)/'`CDefHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CDefHandler.Tpo $(DEPDIR)/vcmiclient-CDefHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CDefHandler.cpp' object='vcmiclient-CDefHandler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CDefHandler.o `test -f 'CDefHandler.cpp' || echo '$(srcdir)/'`CDefHandler.cpp
+
+vcmiclient-CDefHandler.obj: CDefHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CDefHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CDefHandler.Tpo -c -o vcmiclient-CDefHandler.obj `if test -f 'CDefHandler.cpp'; then $(CYGPATH_W) 'CDefHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CDefHandler.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CDefHandler.Tpo $(DEPDIR)/vcmiclient-CDefHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CDefHandler.cpp' object='vcmiclient-CDefHandler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CDefHandler.obj `if test -f 'CDefHandler.cpp'; then $(CYGPATH_W) 'CDefHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CDefHandler.cpp'; fi`
+
 vcmiclient-CGameInfo.o: CGameInfo.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CGameInfo.o -MD -MP -MF $(DEPDIR)/vcmiclient-CGameInfo.Tpo -c -o vcmiclient-CGameInfo.o `test -f 'CGameInfo.cpp' || echo '$(srcdir)/'`CGameInfo.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CGameInfo.Tpo $(DEPDIR)/vcmiclient-CGameInfo.Po
@@ -818,21 +760,21 @@ vcmiclient-CKingdomInterface.obj: CKingdomInterface.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CKingdomInterface.obj `if test -f 'CKingdomInterface.cpp'; then $(CYGPATH_W) 'CKingdomInterface.cpp'; else $(CYGPATH_W) '$(srcdir)/CKingdomInterface.cpp'; fi`
 
-vcmiclient-CMT.o: CMT.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMT.o -MD -MP -MF $(DEPDIR)/vcmiclient-CMT.Tpo -c -o vcmiclient-CMT.o `test -f 'CMT.cpp' || echo '$(srcdir)/'`CMT.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMT.Tpo $(DEPDIR)/vcmiclient-CMT.Po
+vcmiclient-Client.o: Client.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Client.o -MD -MP -MF $(DEPDIR)/vcmiclient-Client.Tpo -c -o vcmiclient-Client.o `test -f 'Client.cpp' || echo '$(srcdir)/'`Client.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Client.Tpo $(DEPDIR)/vcmiclient-Client.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CMT.cpp' object='vcmiclient-CMT.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Client.cpp' object='vcmiclient-Client.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMT.o `test -f 'CMT.cpp' || echo '$(srcdir)/'`CMT.cpp
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Client.o `test -f 'Client.cpp' || echo '$(srcdir)/'`Client.cpp
 
-vcmiclient-CMT.obj: CMT.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMT.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CMT.Tpo -c -o vcmiclient-CMT.obj `if test -f 'CMT.cpp'; then $(CYGPATH_W) 'CMT.cpp'; else $(CYGPATH_W) '$(srcdir)/CMT.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMT.Tpo $(DEPDIR)/vcmiclient-CMT.Po
+vcmiclient-Client.obj: Client.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Client.obj -MD -MP -MF $(DEPDIR)/vcmiclient-Client.Tpo -c -o vcmiclient-Client.obj `if test -f 'Client.cpp'; then $(CYGPATH_W) 'Client.cpp'; else $(CYGPATH_W) '$(srcdir)/Client.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Client.Tpo $(DEPDIR)/vcmiclient-Client.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CMT.cpp' object='vcmiclient-CMT.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Client.cpp' object='vcmiclient-Client.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMT.obj `if test -f 'CMT.cpp'; then $(CYGPATH_W) 'CMT.cpp'; else $(CYGPATH_W) '$(srcdir)/CMT.cpp'; fi`
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Client.obj `if test -f 'Client.cpp'; then $(CYGPATH_W) 'Client.cpp'; else $(CYGPATH_W) '$(srcdir)/Client.cpp'; fi`
 
 vcmiclient-CMessage.o: CMessage.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMessage.o -MD -MP -MF $(DEPDIR)/vcmiclient-CMessage.Tpo -c -o vcmiclient-CMessage.o `test -f 'CMessage.cpp' || echo '$(srcdir)/'`CMessage.cpp
@@ -850,6 +792,38 @@ vcmiclient-CMessage.obj: CMessage.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMessage.obj `if test -f 'CMessage.cpp'; then $(CYGPATH_W) 'CMessage.cpp'; else $(CYGPATH_W) '$(srcdir)/CMessage.cpp'; fi`
 
+vcmiclient-CMT.o: CMT.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMT.o -MD -MP -MF $(DEPDIR)/vcmiclient-CMT.Tpo -c -o vcmiclient-CMT.o `test -f 'CMT.cpp' || echo '$(srcdir)/'`CMT.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMT.Tpo $(DEPDIR)/vcmiclient-CMT.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CMT.cpp' object='vcmiclient-CMT.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMT.o `test -f 'CMT.cpp' || echo '$(srcdir)/'`CMT.cpp
+
+vcmiclient-CMT.obj: CMT.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMT.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CMT.Tpo -c -o vcmiclient-CMT.obj `if test -f 'CMT.cpp'; then $(CYGPATH_W) 'CMT.cpp'; else $(CYGPATH_W) '$(srcdir)/CMT.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMT.Tpo $(DEPDIR)/vcmiclient-CMT.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CMT.cpp' object='vcmiclient-CMT.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMT.obj `if test -f 'CMT.cpp'; then $(CYGPATH_W) 'CMT.cpp'; else $(CYGPATH_W) '$(srcdir)/CMT.cpp'; fi`
+
+vcmiclient-CMusicHandler.o: CMusicHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMusicHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CMusicHandler.Tpo -c -o vcmiclient-CMusicHandler.o `test -f 'CMusicHandler.cpp' || echo '$(srcdir)/'`CMusicHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMusicHandler.Tpo $(DEPDIR)/vcmiclient-CMusicHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CMusicHandler.cpp' object='vcmiclient-CMusicHandler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMusicHandler.o `test -f 'CMusicHandler.cpp' || echo '$(srcdir)/'`CMusicHandler.cpp
+
+vcmiclient-CMusicHandler.obj: CMusicHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CMusicHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CMusicHandler.Tpo -c -o vcmiclient-CMusicHandler.obj `if test -f 'CMusicHandler.cpp'; then $(CYGPATH_W) 'CMusicHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CMusicHandler.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CMusicHandler.Tpo $(DEPDIR)/vcmiclient-CMusicHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CMusicHandler.cpp' object='vcmiclient-CMusicHandler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CMusicHandler.obj `if test -f 'CMusicHandler.cpp'; then $(CYGPATH_W) 'CMusicHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CMusicHandler.cpp'; fi`
+
 vcmiclient-CPlayerInterface.o: CPlayerInterface.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CPlayerInterface.o -MD -MP -MF $(DEPDIR)/vcmiclient-CPlayerInterface.Tpo -c -o vcmiclient-CPlayerInterface.o `test -f 'CPlayerInterface.cpp' || echo '$(srcdir)/'`CPlayerInterface.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CPlayerInterface.Tpo $(DEPDIR)/vcmiclient-CPlayerInterface.Po
@@ -882,6 +856,22 @@ vcmiclient-CPreGame.obj: CPreGame.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CPreGame.obj `if test -f 'CPreGame.cpp'; then $(CYGPATH_W) 'CPreGame.cpp'; else $(CYGPATH_W) '$(srcdir)/CPreGame.cpp'; fi`
 
+vcmiclient-CSndHandler.o: CSndHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CSndHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CSndHandler.Tpo -c -o vcmiclient-CSndHandler.o `test -f 'CSndHandler.cpp' || echo '$(srcdir)/'`CSndHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CSndHandler.Tpo $(DEPDIR)/vcmiclient-CSndHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CSndHandler.cpp' object='vcmiclient-CSndHandler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CSndHandler.o `test -f 'CSndHandler.cpp' || echo '$(srcdir)/'`CSndHandler.cpp
+
+vcmiclient-CSndHandler.obj: CSndHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CSndHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CSndHandler.Tpo -c -o vcmiclient-CSndHandler.obj `if test -f 'CSndHandler.cpp'; then $(CYGPATH_W) 'CSndHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CSndHandler.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CSndHandler.Tpo $(DEPDIR)/vcmiclient-CSndHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CSndHandler.cpp' object='vcmiclient-CSndHandler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CSndHandler.obj `if test -f 'CSndHandler.cpp'; then $(CYGPATH_W) 'CSndHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CSndHandler.cpp'; fi`
+
 vcmiclient-CSpellWindow.o: CSpellWindow.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CSpellWindow.o -MD -MP -MF $(DEPDIR)/vcmiclient-CSpellWindow.Tpo -c -o vcmiclient-CSpellWindow.o `test -f 'CSpellWindow.cpp' || echo '$(srcdir)/'`CSpellWindow.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CSpellWindow.Tpo $(DEPDIR)/vcmiclient-CSpellWindow.Po
@@ -898,21 +888,37 @@ vcmiclient-CSpellWindow.obj: CSpellWindow.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CSpellWindow.obj `if test -f 'CSpellWindow.cpp'; then $(CYGPATH_W) 'CSpellWindow.cpp'; else $(CYGPATH_W) '$(srcdir)/CSpellWindow.cpp'; fi`
 
-vcmiclient-Client.o: Client.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Client.o -MD -MP -MF $(DEPDIR)/vcmiclient-Client.Tpo -c -o vcmiclient-Client.o `test -f 'Client.cpp' || echo '$(srcdir)/'`Client.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Client.Tpo $(DEPDIR)/vcmiclient-Client.Po
+vcmiclient-CVideoHandler.o: CVideoHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CVideoHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-CVideoHandler.Tpo -c -o vcmiclient-CVideoHandler.o `test -f 'CVideoHandler.cpp' || echo '$(srcdir)/'`CVideoHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CVideoHandler.Tpo $(DEPDIR)/vcmiclient-CVideoHandler.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Client.cpp' object='vcmiclient-Client.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CVideoHandler.cpp' object='vcmiclient-CVideoHandler.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Client.o `test -f 'Client.cpp' || echo '$(srcdir)/'`Client.cpp
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CVideoHandler.o `test -f 'CVideoHandler.cpp' || echo '$(srcdir)/'`CVideoHandler.cpp
 
-vcmiclient-Client.obj: Client.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Client.obj -MD -MP -MF $(DEPDIR)/vcmiclient-Client.Tpo -c -o vcmiclient-Client.obj `if test -f 'Client.cpp'; then $(CYGPATH_W) 'Client.cpp'; else $(CYGPATH_W) '$(srcdir)/Client.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Client.Tpo $(DEPDIR)/vcmiclient-Client.Po
+vcmiclient-CVideoHandler.obj: CVideoHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-CVideoHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-CVideoHandler.Tpo -c -o vcmiclient-CVideoHandler.obj `if test -f 'CVideoHandler.cpp'; then $(CYGPATH_W) 'CVideoHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CVideoHandler.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-CVideoHandler.Tpo $(DEPDIR)/vcmiclient-CVideoHandler.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Client.cpp' object='vcmiclient-Client.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CVideoHandler.cpp' object='vcmiclient-CVideoHandler.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Client.obj `if test -f 'Client.cpp'; then $(CYGPATH_W) 'Client.cpp'; else $(CYGPATH_W) '$(srcdir)/Client.cpp'; fi`
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-CVideoHandler.obj `if test -f 'CVideoHandler.cpp'; then $(CYGPATH_W) 'CVideoHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/CVideoHandler.cpp'; fi`
+
+vcmiclient-Graphics.o: Graphics.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Graphics.o -MD -MP -MF $(DEPDIR)/vcmiclient-Graphics.Tpo -c -o vcmiclient-Graphics.o `test -f 'Graphics.cpp' || echo '$(srcdir)/'`Graphics.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Graphics.Tpo $(DEPDIR)/vcmiclient-Graphics.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Graphics.cpp' object='vcmiclient-Graphics.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Graphics.o `test -f 'Graphics.cpp' || echo '$(srcdir)/'`Graphics.cpp
+
+vcmiclient-Graphics.obj: Graphics.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Graphics.obj -MD -MP -MF $(DEPDIR)/vcmiclient-Graphics.Tpo -c -o vcmiclient-Graphics.obj `if test -f 'Graphics.cpp'; then $(CYGPATH_W) 'Graphics.cpp'; else $(CYGPATH_W) '$(srcdir)/Graphics.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Graphics.Tpo $(DEPDIR)/vcmiclient-Graphics.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Graphics.cpp' object='vcmiclient-Graphics.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Graphics.obj `if test -f 'Graphics.cpp'; then $(CYGPATH_W) 'Graphics.cpp'; else $(CYGPATH_W) '$(srcdir)/Graphics.cpp'; fi`
 
 vcmiclient-GUIBase.o: GUIBase.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-GUIBase.o -MD -MP -MF $(DEPDIR)/vcmiclient-GUIBase.Tpo -c -o vcmiclient-GUIBase.o `test -f 'GUIBase.cpp' || echo '$(srcdir)/'`GUIBase.cpp
@@ -946,21 +952,21 @@ vcmiclient-GUIClasses.obj: GUIClasses.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-GUIClasses.obj `if test -f 'GUIClasses.cpp'; then $(CYGPATH_W) 'GUIClasses.cpp'; else $(CYGPATH_W) '$(srcdir)/GUIClasses.cpp'; fi`
 
-vcmiclient-Graphics.o: Graphics.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Graphics.o -MD -MP -MF $(DEPDIR)/vcmiclient-Graphics.Tpo -c -o vcmiclient-Graphics.o `test -f 'Graphics.cpp' || echo '$(srcdir)/'`Graphics.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Graphics.Tpo $(DEPDIR)/vcmiclient-Graphics.Po
+vcmiclient-mapHandler.o: mapHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-mapHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-mapHandler.Tpo -c -o vcmiclient-mapHandler.o `test -f 'mapHandler.cpp' || echo '$(srcdir)/'`mapHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-mapHandler.Tpo $(DEPDIR)/vcmiclient-mapHandler.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Graphics.cpp' object='vcmiclient-Graphics.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mapHandler.cpp' object='vcmiclient-mapHandler.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Graphics.o `test -f 'Graphics.cpp' || echo '$(srcdir)/'`Graphics.cpp
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-mapHandler.o `test -f 'mapHandler.cpp' || echo '$(srcdir)/'`mapHandler.cpp
 
-vcmiclient-Graphics.obj: Graphics.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-Graphics.obj -MD -MP -MF $(DEPDIR)/vcmiclient-Graphics.Tpo -c -o vcmiclient-Graphics.obj `if test -f 'Graphics.cpp'; then $(CYGPATH_W) 'Graphics.cpp'; else $(CYGPATH_W) '$(srcdir)/Graphics.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-Graphics.Tpo $(DEPDIR)/vcmiclient-Graphics.Po
+vcmiclient-mapHandler.obj: mapHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-mapHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-mapHandler.Tpo -c -o vcmiclient-mapHandler.obj `if test -f 'mapHandler.cpp'; then $(CYGPATH_W) 'mapHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/mapHandler.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-mapHandler.Tpo $(DEPDIR)/vcmiclient-mapHandler.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Graphics.cpp' object='vcmiclient-Graphics.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mapHandler.cpp' object='vcmiclient-mapHandler.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-Graphics.obj `if test -f 'Graphics.cpp'; then $(CYGPATH_W) 'Graphics.cpp'; else $(CYGPATH_W) '$(srcdir)/Graphics.cpp'; fi`
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-mapHandler.obj `if test -f 'mapHandler.cpp'; then $(CYGPATH_W) 'mapHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/mapHandler.cpp'; fi`
 
 vcmiclient-NetPacksClient.o: NetPacksClient.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-NetPacksClient.o -MD -MP -MF $(DEPDIR)/vcmiclient-NetPacksClient.Tpo -c -o vcmiclient-NetPacksClient.o `test -f 'NetPacksClient.cpp' || echo '$(srcdir)/'`NetPacksClient.cpp
@@ -1010,22 +1016,6 @@ vcmiclient-SDL_framerate.obj: SDL_framerate.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-SDL_framerate.obj `if test -f 'SDL_framerate.cpp'; then $(CYGPATH_W) 'SDL_framerate.cpp'; else $(CYGPATH_W) '$(srcdir)/SDL_framerate.cpp'; fi`
 
-vcmiclient-mapHandler.o: mapHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-mapHandler.o -MD -MP -MF $(DEPDIR)/vcmiclient-mapHandler.Tpo -c -o vcmiclient-mapHandler.o `test -f 'mapHandler.cpp' || echo '$(srcdir)/'`mapHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-mapHandler.Tpo $(DEPDIR)/vcmiclient-mapHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mapHandler.cpp' object='vcmiclient-mapHandler.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-mapHandler.o `test -f 'mapHandler.cpp' || echo '$(srcdir)/'`mapHandler.cpp
-
-vcmiclient-mapHandler.obj: mapHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -MT vcmiclient-mapHandler.obj -MD -MP -MF $(DEPDIR)/vcmiclient-mapHandler.Tpo -c -o vcmiclient-mapHandler.obj `if test -f 'mapHandler.cpp'; then $(CYGPATH_W) 'mapHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/mapHandler.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiclient-mapHandler.Tpo $(DEPDIR)/vcmiclient-mapHandler.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mapHandler.cpp' object='vcmiclient-mapHandler.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiclient_CXXFLAGS) $(CXXFLAGS) -c -o vcmiclient-mapHandler.obj `if test -f 'mapHandler.cpp'; then $(CYGPATH_W) 'mapHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/mapHandler.cpp'; fi`
-
 mostlyclean-libtool:
 	-rm -f *.lo
 

+ 8 - 3
client/SDL_Extensions.cpp

@@ -61,9 +61,9 @@ STRONG_INLINE void ColorPutter<bpp, incrementPtr>::PutColorAlphaSwitch(Uint8 *&p
 template<int bpp, int incrementPtr>
 STRONG_INLINE void ColorPutter<bpp, incrementPtr>::PutColor(Uint8 *&ptr, const Uint8 & R, const Uint8 & G, const Uint8 & B, const Uint8 & A)
 {
-	PutColor(ptr,	(((Uint32)ptr[2]-(Uint32)R)*(Uint32)A) >> (8 + (Uint32)R), 
-		(((Uint32)ptr[1]-(Uint32)G)*(Uint32)A) >> (8 + (Uint32)G), 
-		(((Uint32)ptr[0]-(Uint32)B)*(Uint32)A) >> (8 + (Uint32)B));
+	PutColor(ptr, ((((Uint32)ptr[2]-(Uint32)R)*(Uint32)A) >> 8 ) + (Uint32)R, 
+	              ((((Uint32)ptr[1]-(Uint32)G)*(Uint32)A) >> 8 ) + (Uint32)G, 
+	              ((((Uint32)ptr[0]-(Uint32)B)*(Uint32)A) >> 8 ) + (Uint32)B);
 }
 
 
@@ -1295,3 +1295,8 @@ void CSDL_Ext::fillRect( SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color )
 }
 
 SDL_Surface * CSDL_Ext::std32bppSurface = NULL;
+
+//instantiation of templates used in CAnimation, required for correct linking
+template struct ColorPutter<2,1>;
+template struct ColorPutter<3,1>;
+template struct ColorPutter<4,1>;

+ 4 - 2
client/SDL_Extensions.h

@@ -22,8 +22,9 @@
 //A macro to force inlining some of our functions. Compiler (at least MSVC) is not so smart here-> without that displaying is MUCH slower
 #ifdef _MSC_VER
 	#define STRONG_INLINE __forceinline
+#elif __GNUC__
+	#define STRONG_INLINE __attribute__((always_inline))
 #else
-	//TODO: GCC counterpart?
 	#define STRONG_INLINE inline
 #endif
 
@@ -88,7 +89,8 @@ inline SDL_Rect genRect(const int & hh, const int & ww, const int & xx, const in
 	return ret;
 }
 
-
+//TODO: inlining will work only if functions are defined in each compilation unit (like placing them in headers)
+//however here PutColor defined in SDL_Extensions.cpp, but used in CAnimation.cpp and CCreatureAnimation.cpp
 template<int bpp, int incrementPtr>
 struct ColorPutter
 {

+ 252 - 20
configure

@@ -748,6 +748,7 @@ FFMPEG_LIBS
 SDL_CXXFLAGS
 SDL_LIBS
 HAVE_SDL_CONFIG
+BOOST_PROGRAM_OPTIONS_LIB
 BOOST_IOSTREAMS_LIB
 BOOST_THREAD_LIB
 BOOST_FILESYSTEM_LIB
@@ -886,6 +887,7 @@ with_boost_system
 with_boost_filesystem
 with_boost_thread
 with_boost_iostreams
+with_boost_program_options
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1562,6 +1564,11 @@ Optional Packages:
                           possible to specify a certain library for the
                           linker
 e.g.
                           --with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1
+  --with-boost-program-options[=special-lib]
+                          use the program options library from boost - it is
+                          possible to specify a certain library for the linker
+                          e.g.
+                          --with-boost-program-options=boost_program_options-gcc-mt-1_33_1
 
 Some influential environment variables:
   CXX         C++ compiler command
@@ -5206,13 +5213,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5209: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5216: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5212: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5219: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5215: output\"" >&5)
+  (eval echo "\"\$as_me:5222: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6418,7 +6425,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6421 "configure"' > conftest.$ac_ext
+  echo '#line 6428 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8414,11 +8421,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8417: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8424: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8421: \$? = $ac_status" >&5
+   echo "$as_me:8428: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8753,11 +8760,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8756: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8763: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8760: \$? = $ac_status" >&5
+   echo "$as_me:8767: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8858,11 +8865,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8861: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8868: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8865: \$? = $ac_status" >&5
+   echo "$as_me:8872: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8913,11 +8920,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8916: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8923: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8920: \$? = $ac_status" >&5
+   echo "$as_me:8927: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11293,7 +11300,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11296 "configure"
+#line 11303 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11389,7 +11396,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11392 "configure"
+#line 11399 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13345,11 +13352,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13348: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13355: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13352: \$? = $ac_status" >&5
+   echo "$as_me:13359: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13444,11 +13451,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13447: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13454: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13451: \$? = $ac_status" >&5
+   echo "$as_me:13458: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13496,11 +13503,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13499: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13506: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13503: \$? = $ac_status" >&5
+   echo "$as_me:13510: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15707,6 +15714,231 @@ fi
 	fi
 
 
+
+# Check whether --with-boost-program-options was given.
+if test "${with_boost_program_options+set}" = set; then :
+  withval=$with_boost_program_options;
+        if test "$withval" = "no"; then
+			want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_program_options_lib=""
+        else
+		    want_boost="yes"
+		ax_boost_user_program_options_lib="$withval"
+		fi
+
+else
+  want_boost="yes"
+
+fi
+
+
+	if test "x$want_boost" = "xyes"; then
+
+	    export want_boost
+		CPPFLAGS_SAVED="$CPPFLAGS"
+		CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+		export CPPFLAGS
+		LDFLAGS_SAVED="$LDFLAGS"
+		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+		export LDFLAGS
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Program_Options library is available" >&5
+$as_echo_n "checking whether the Boost::Program_Options library is available... " >&6; }
+if test "${ax_cv_boost_program_options+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <boost/program_options.hpp>
+
+int
+main ()
+{
+boost::program_options::options_description generic("Generic options");
+                                   return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_boost_program_options=yes
+else
+  ax_cv_boost_program_options=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+					ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_program_options" >&5
+$as_echo "$ax_cv_boost_program_options" >&6; }
+		if test "$ax_cv_boost_program_options" = yes; then
+
+$as_echo "#define HAVE_BOOST_PROGRAM_OPTIONS /**/" >>confdefs.h
+
+                  BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
+                if test "x$ax_boost_user_program_options_lib" = "x"; then
+                for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+				    as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
+$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$ax_lib  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char exit ();
+int
+main ()
+{
+return exit ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib";  link_program_options="yes"; break
+else
+  link_program_options="no"
+fi
+
+				done
+                if test "x$link_program_options" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+				    as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
+$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$ax_lib  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char exit ();
+int
+main ()
+{
+return exit ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib";  link_program_options="yes"; break
+else
+  link_program_options="no"
+fi
+
+				done
+                fi
+                else
+                  for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
+				      as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
+$as_echo_n "checking for main in -l$ax_lib... " >&6; }
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$ax_lib  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib";  link_program_options="yes"; break
+else
+  link_program_options="no"
+fi
+
+                  done
+                fi
+            if test "x$ax_lib" = "x"; then
+                as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
+            fi
+				if test "x$link_program_options" != "xyes"; then
+					as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
+				fi
+		fi
+		CPPFLAGS="$CPPFLAGS_SAVED"
+	LDFLAGS="$LDFLAGS_SAVED"
+	fi
+
+
 # Check for SDL libraries
 saved_LIBS=$LIBS
 # Extract the first word of "sdl-config", so it can be a program name with args.

+ 1 - 0
configure.ac

@@ -41,6 +41,7 @@ AX_BOOST_SYSTEM
 AX_BOOST_FILESYSTEM
 AX_BOOST_THREAD
 AX_BOOST_IOSTREAMS
+AX_BOOST_PROGRAM_OPTIONS
 
 # Check for SDL libraries
 saved_LIBS=$LIBS

+ 1 - 2
global.h

@@ -378,8 +378,7 @@ class bmap : public std::map<KeyT, ValT>
 public:
 	const ValT & operator[](KeyT key) const
 	{
-		const_iterator it = find(key);
-		return it->second;
+		return find(key)->second;
 	}
 	ValT & operator[](KeyT key) 
 	{

+ 1 - 1
lib/BattleAction.h

@@ -1,4 +1,4 @@
-#pragma once;
+#pragma once
 #ifndef __BATTLEACTION_H__
 #define __BATTLEACTION_H__
 

+ 3 - 1
lib/BattleState.h

@@ -3,6 +3,8 @@
 #include "../global.h"
 #include "HeroBonus.h"
 #include "CCreatureSet.h"
+#include "CObjectHandler.h"
+#include "CCreatureHandler.h"
 
 #include "ConstTransitivePtr.h"
 
@@ -112,7 +114,7 @@ struct DLL_EXPORT BattleInfo : public CBonusSystemNode
 	const CGHeroInstance * battleGetOwner(const CStack * stack) const; //returns hero that owns given stack; NULL if none
 	si8 battleMaxSpellLevel() const; //calculates maximum spell level possible to be cast on battlefield - takes into account artifacts of both heroes; if no effects are set, SPELL_LEVELS is returned
 	void localInit();
-	static BattleInfo * BattleInfo::setupBattle( int3 tile, int terrain, int terType, const CArmedInstance *armies[2], const CGHeroInstance * heroes[2], bool creatureBank, const CGTownInstance *town );
+	static BattleInfo * setupBattle( int3 tile, int terrain, int terType, const CArmedInstance *armies[2], const CGHeroInstance * heroes[2], bool creatureBank, const CGTownInstance *town );
 };
 
 class DLL_EXPORT CStack : public CBonusSystemNode, public CStackBasicDescriptor

+ 1 - 1
lib/CBuildingHandler.cpp

@@ -150,7 +150,7 @@ CBuildingHandler::~CBuildingHandler()
 {
 	for(std::vector< bmap<int, ConstTransitivePtr<CBuilding> > >::iterator i=buildings.begin(); i!=buildings.end(); i++)
 		for(std::map<int, ConstTransitivePtr<CBuilding> >::iterator j=i->begin(); j!=i->end(); j++)
-			delete j->second;
+			j->second.dellNull();
 }
 
 static std::string emptyStr = "";

+ 2 - 2
lib/CCreatureSet.cpp

@@ -446,7 +446,7 @@ void CStackInstance::setType(const CCreature *c)
 }
 std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const
 {
-	std::map<TBonusType, std::pair<std::string, std::string>>::iterator it = VLC->creh->stackBonuses.find(bonus->type);
+	std::map<TBonusType, std::pair<std::string, std::string> >::iterator it = VLC->creh->stackBonuses.find(bonus->type);
 	if (it != VLC->creh->stackBonuses.end())
 	{
 		std::string text;
@@ -649,4 +649,4 @@ bool CSimpleArmy::setCreature(TSlot slot, TCreature cre, TQuantity count)
 	assert(!vstd::contains(army, slot));
 	army[slot] = CStackBasicDescriptor(cre, count);
 	return true;
-}
+}

+ 1 - 1
lib/CDefObjInfoHandler.cpp

@@ -144,5 +144,5 @@ CDefObjInfoHandler::~CDefObjInfoHandler()
 {
 	for(bmap<int,bmap<int, ConstTransitivePtr<CGDefInfo> > >::iterator i=gobjs.begin(); i!=gobjs.end(); i++)
 		for(bmap<int, ConstTransitivePtr<CGDefInfo> >::iterator j=i->second.begin(); j!=i->second.end(); j++)
-			delete j->second;
+			j->second.dellNull();
 }

+ 3 - 3
lib/CGameState.cpp

@@ -766,8 +766,8 @@ CGameState::CGameState()
 CGameState::~CGameState()
 {
 	delete mx;
-	delete map;
-	delete curB;
+	map.dellNull();
+	curB.dellNull();
 	//delete scenarioOps; //TODO: fix for loading ind delete
 	//delete initialOpts;
 	delete applierGs;
@@ -3132,4 +3132,4 @@ DuelParameters::DuelParameters()
 {
 	terType = TerrainTile::dirt;
 	bfieldType = 15;
-}
+}

+ 1 - 1
lib/CHeroHandler.cpp

@@ -135,7 +135,7 @@ int CObstacleInfo::getMaxBlocked(int hex) const
 CHeroHandler::~CHeroHandler()
 {
 	for (int i = 0; i < heroes.size(); i++)
-		delete heroes[i];
+		heroes[i].dellNull();
 
 	for (int i = 0; i < heroClasses.size(); i++)
 		delete heroClasses[i];

+ 7 - 3
lib/CLodHandler.h

@@ -73,11 +73,13 @@ struct Entry
 	Entry(std::string con): name(con){};
 	Entry(){};
 };
-
+namespace boost
+{
 template<>
-struct boost::hash<Entry> : public std::unary_function<Entry, std::size_t> {
+struct hash<Entry> : public std::unary_function<Entry, std::size_t>
+{
 private:
-	boost::hash<std::string> stringHasher;
+	hash<std::string> stringHasher;
 public:
 	std::size_t operator()(Entry const& en) const
 	{
@@ -86,6 +88,8 @@ public:
 	}
 };
 
+}
+
 class DLL_EXPORT CLodHandler
 {
 	std::map<std::string, LodFileType> extMap;// to convert extensions to file type

+ 1 - 0
lib/Connection.cpp

@@ -13,6 +13,7 @@
 //for smart objs serialization over net
 #include "../lib/CMapInfo.h"
 #include "../StartInfo.h"
+#include "BattleState.h"
 #include "CGameState.h"
 #include "map.h"
 #include "CObjectHandler.h"

+ 1 - 1
lib/ConstTransitivePtr.h

@@ -62,5 +62,5 @@ public:
 		h & ptr;
 	}
 
-	friend CGameHandler;
+	friend class CGameHandler;
 };

+ 33 - 32
lib/Makefile.am

@@ -2,52 +2,53 @@ pkglib_LTLIBRARIES = libvcmi.la
 libvcmi_la_LIBADD = @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @BOOST_IOSTREAMS_LIB@ -lz -lpthread
 libvcmi_la_CXXFLAGS = @SDL_CXXFLAGS@
 libvcmi_la_SOURCES = \
-	../CConsoleHandler.cpp \
-	../CConsoleHandler.h \
-	../hch/CArtHandler.cpp \
-	../hch/CArtHandler.h \
-	../hch/CBuildingHandler.cpp \
-	../hch/CBuildingHandler.h \
-	../hch/CCampaignHandler.cpp \
-	../hch/CCampaignHandler.h \
-	../hch/CCreatureHandler.cpp \
-	../hch/CCreatureHandler.h \
-	../hch/CDefObjInfoHandler.cpp \
-	../hch/CDefObjInfoHandler.h \
-	../hch/CGeneralTextHandler.cpp \
-	../hch/CGeneralTextHandler.h \
-	../hch/CHeroHandler.cpp \
-	../hch/CHeroHandler.h \
-	../hch/CLodHandler.cpp \
-	../hch/CLodHandler.h \
-	../hch/CObjectHandler.cpp \
-	../hch/CObjectHandler.h \
-	../hch/CSpellHandler.cpp \
-	../hch/CSpellHandler.h \
-	../hch/CTownHandler.cpp \
-	../hch/CTownHandler.h \
-	../stdafx.cpp \
+	BattleAction.cpp \
 	BattleAction.h \
+	BattleState.cpp \
+	BattleState.h \
+	CArtHandler.cpp \
+	CArtHandler.h \
+	CBuildingHandler.cpp \
+	CBuildingHandler.h \
+	CCampaignHandler.cpp \
+	CCampaignHandler.h \
+	CCreatureHandler.cpp \
+	CCreatureHandler.h \
 	CCreatureSet.cpp \
 	CCreatureSet.h \
-	CMapInfo.cpp \
-	CMapInfo.h \
+	CDefObjInfoHandler.cpp \
+	CDefObjInfoHandler.h \
 	CGameState.cpp \
 	CGameState.h \
+	CGeneralTextHandler.cpp \
+	CGeneralTextHandler.h \
+	CHeroHandler.cpp \
+	CHeroHandler.h \
+	CLodHandler.cpp \
+	CLodHandler.h \
+	CMapInfo.cpp \
+	CMapInfo.h \
+	CObjectHandler.cpp \
+	CObjectHandler.h \
 	CondSh.h \
 	Connection.cpp \
 	Connection.h \
+	ConstTransitivePtr.h \
+	CSpellHandler.cpp \
+	CSpellHandler.h \
+	CTownHandler.cpp \
+	CTownHandler.h \
 	HeroBonus.cpp \
 	HeroBonus.h \
 	IGameCallback.cpp \
 	IGameCallback.h \
 	Interprocess.h \
+	map.cpp \
+	map.h \
 	NetPacks.h \
 	NetPacksLib.cpp \
 	RegisterTypes.cpp \
 	RegisterTypes.h \
-	StackFeature.h \
-	VCMI_Lib.cpp \
-	VCMI_Lib.h \
-	map.cpp \
-	map.h
+	VCMIDirs.h \
+	VCMI_Lib.cpp
+	VCMI_Lib.h

+ 135 - 133
lib/Makefile.in

@@ -40,6 +40,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/m4/ax_boost_base.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_filesystem.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_iostreams.m4 \
+	$(top_srcdir)/aclocal/m4/ax_boost_program_options.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_system.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_thread.m4 \
 	$(top_srcdir)/aclocal/m4/libtool.m4 \
@@ -77,19 +78,18 @@ am__base_list = \
 am__installdirs = "$(DESTDIR)$(pkglibdir)"
 LTLIBRARIES = $(pkglib_LTLIBRARIES)
 libvcmi_la_DEPENDENCIES =
-am_libvcmi_la_OBJECTS = libvcmi_la-CConsoleHandler.lo \
-	libvcmi_la-CArtHandler.lo libvcmi_la-CBuildingHandler.lo \
-	libvcmi_la-CCampaignHandler.lo libvcmi_la-CCreatureHandler.lo \
-	libvcmi_la-CDefObjInfoHandler.lo \
+am_libvcmi_la_OBJECTS = libvcmi_la-BattleAction.lo \
+	libvcmi_la-BattleState.lo libvcmi_la-CArtHandler.lo \
+	libvcmi_la-CBuildingHandler.lo libvcmi_la-CCampaignHandler.lo \
+	libvcmi_la-CCreatureHandler.lo libvcmi_la-CCreatureSet.lo \
+	libvcmi_la-CDefObjInfoHandler.lo libvcmi_la-CGameState.lo \
 	libvcmi_la-CGeneralTextHandler.lo libvcmi_la-CHeroHandler.lo \
-	libvcmi_la-CLodHandler.lo libvcmi_la-CObjectHandler.lo \
+	libvcmi_la-CLodHandler.lo libvcmi_la-CMapInfo.lo \
+	libvcmi_la-CObjectHandler.lo libvcmi_la-Connection.lo \
 	libvcmi_la-CSpellHandler.lo libvcmi_la-CTownHandler.lo \
-	libvcmi_la-stdafx.lo libvcmi_la-CCreatureSet.lo \
-	libvcmi_la-CMapInfo.lo libvcmi_la-CGameState.lo \
-	libvcmi_la-Connection.lo libvcmi_la-HeroBonus.lo \
-	libvcmi_la-IGameCallback.lo libvcmi_la-NetPacksLib.lo \
-	libvcmi_la-RegisterTypes.lo libvcmi_la-VCMI_Lib.lo \
-	libvcmi_la-map.lo
+	libvcmi_la-HeroBonus.lo libvcmi_la-IGameCallback.lo \
+	libvcmi_la-map.lo libvcmi_la-NetPacksLib.lo \
+	libvcmi_la-RegisterTypes.lo libvcmi_la-VCMI_Lib.lo
 libvcmi_la_OBJECTS = $(am_libvcmi_la_OBJECTS)
 AM_V_lt = $(am__v_lt_$(V))
 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
@@ -156,6 +156,7 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
 BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
 BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@
 BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
 BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
 BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
 CC = @CC@
@@ -276,55 +277,55 @@ pkglib_LTLIBRARIES = libvcmi.la
 libvcmi_la_LIBADD = @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @BOOST_IOSTREAMS_LIB@ -lz -lpthread
 libvcmi_la_CXXFLAGS = @SDL_CXXFLAGS@
 libvcmi_la_SOURCES = \
-	../CConsoleHandler.cpp \
-	../CConsoleHandler.h \
-	../hch/CArtHandler.cpp \
-	../hch/CArtHandler.h \
-	../hch/CBuildingHandler.cpp \
-	../hch/CBuildingHandler.h \
-	../hch/CCampaignHandler.cpp \
-	../hch/CCampaignHandler.h \
-	../hch/CCreatureHandler.cpp \
-	../hch/CCreatureHandler.h \
-	../hch/CDefObjInfoHandler.cpp \
-	../hch/CDefObjInfoHandler.h \
-	../hch/CGeneralTextHandler.cpp \
-	../hch/CGeneralTextHandler.h \
-	../hch/CHeroHandler.cpp \
-	../hch/CHeroHandler.h \
-	../hch/CLodHandler.cpp \
-	../hch/CLodHandler.h \
-	../hch/CObjectHandler.cpp \
-	../hch/CObjectHandler.h \
-	../hch/CSpellHandler.cpp \
-	../hch/CSpellHandler.h \
-	../hch/CTownHandler.cpp \
-	../hch/CTownHandler.h \
-	../stdafx.cpp \
+	BattleAction.cpp \
 	BattleAction.h \
+	BattleState.cpp \
+	BattleState.h \
+	CArtHandler.cpp \
+	CArtHandler.h \
+	CBuildingHandler.cpp \
+	CBuildingHandler.h \
+	CCampaignHandler.cpp \
+	CCampaignHandler.h \
+	CCreatureHandler.cpp \
+	CCreatureHandler.h \
 	CCreatureSet.cpp \
 	CCreatureSet.h \
-	CMapInfo.cpp \
-	CMapInfo.h \
+	CDefObjInfoHandler.cpp \
+	CDefObjInfoHandler.h \
 	CGameState.cpp \
 	CGameState.h \
+	CGeneralTextHandler.cpp \
+	CGeneralTextHandler.h \
+	CHeroHandler.cpp \
+	CHeroHandler.h \
+	CLodHandler.cpp \
+	CLodHandler.h \
+	CMapInfo.cpp \
+	CMapInfo.h \
+	CObjectHandler.cpp \
+	CObjectHandler.h \
 	CondSh.h \
 	Connection.cpp \
 	Connection.h \
+	ConstTransitivePtr.h \
+	CSpellHandler.cpp \
+	CSpellHandler.h \
+	CTownHandler.cpp \
+	CTownHandler.h \
 	HeroBonus.cpp \
 	HeroBonus.h \
 	IGameCallback.cpp \
 	IGameCallback.h \
 	Interprocess.h \
+	map.cpp \
+	map.h \
 	NetPacks.h \
 	NetPacksLib.cpp \
 	RegisterTypes.cpp \
 	RegisterTypes.h \
-	StackFeature.h \
-	VCMI_Lib.cpp \
-	VCMI_Lib.h \
-	map.cpp \
-	map.h
+	VCMIDirs.h \
+	VCMI_Lib.cpp
 
 all: all-am
 
@@ -400,10 +401,11 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-BattleAction.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-BattleState.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CArtHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CBuildingHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CCampaignHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CConsoleHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CCreatureHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CCreatureSet.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CDefObjInfoHandler.Plo@am__quote@
@@ -422,7 +424,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-RegisterTypes.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-VCMI_Lib.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-map.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-stdafx.Plo@am__quote@
 
 .cpp.o:
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -448,117 +449,101 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
 
-libvcmi_la-CConsoleHandler.lo: ../CConsoleHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CConsoleHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CConsoleHandler.Tpo -c -o libvcmi_la-CConsoleHandler.lo `test -f '../CConsoleHandler.cpp' || echo '$(srcdir)/'`../CConsoleHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CConsoleHandler.Tpo $(DEPDIR)/libvcmi_la-CConsoleHandler.Plo
+libvcmi_la-BattleAction.lo: BattleAction.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-BattleAction.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-BattleAction.Tpo -c -o libvcmi_la-BattleAction.lo `test -f 'BattleAction.cpp' || echo '$(srcdir)/'`BattleAction.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-BattleAction.Tpo $(DEPDIR)/libvcmi_la-BattleAction.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../CConsoleHandler.cpp' object='libvcmi_la-CConsoleHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BattleAction.cpp' object='libvcmi_la-BattleAction.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CConsoleHandler.lo `test -f '../CConsoleHandler.cpp' || echo '$(srcdir)/'`../CConsoleHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-BattleAction.lo `test -f 'BattleAction.cpp' || echo '$(srcdir)/'`BattleAction.cpp
 
-libvcmi_la-CArtHandler.lo: ../hch/CArtHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CArtHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CArtHandler.Tpo -c -o libvcmi_la-CArtHandler.lo `test -f '../hch/CArtHandler.cpp' || echo '$(srcdir)/'`../hch/CArtHandler.cpp
+libvcmi_la-BattleState.lo: BattleState.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-BattleState.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-BattleState.Tpo -c -o libvcmi_la-BattleState.lo `test -f 'BattleState.cpp' || echo '$(srcdir)/'`BattleState.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-BattleState.Tpo $(DEPDIR)/libvcmi_la-BattleState.Plo
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BattleState.cpp' object='libvcmi_la-BattleState.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-BattleState.lo `test -f 'BattleState.cpp' || echo '$(srcdir)/'`BattleState.cpp
+
+libvcmi_la-CArtHandler.lo: CArtHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CArtHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CArtHandler.Tpo -c -o libvcmi_la-CArtHandler.lo `test -f 'CArtHandler.cpp' || echo '$(srcdir)/'`CArtHandler.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CArtHandler.Tpo $(DEPDIR)/libvcmi_la-CArtHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CArtHandler.cpp' object='libvcmi_la-CArtHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CArtHandler.cpp' object='libvcmi_la-CArtHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CArtHandler.lo `test -f '../hch/CArtHandler.cpp' || echo '$(srcdir)/'`../hch/CArtHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CArtHandler.lo `test -f 'CArtHandler.cpp' || echo '$(srcdir)/'`CArtHandler.cpp
 
-libvcmi_la-CBuildingHandler.lo: ../hch/CBuildingHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CBuildingHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CBuildingHandler.Tpo -c -o libvcmi_la-CBuildingHandler.lo `test -f '../hch/CBuildingHandler.cpp' || echo '$(srcdir)/'`../hch/CBuildingHandler.cpp
+libvcmi_la-CBuildingHandler.lo: CBuildingHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CBuildingHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CBuildingHandler.Tpo -c -o libvcmi_la-CBuildingHandler.lo `test -f 'CBuildingHandler.cpp' || echo '$(srcdir)/'`CBuildingHandler.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CBuildingHandler.Tpo $(DEPDIR)/libvcmi_la-CBuildingHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CBuildingHandler.cpp' object='libvcmi_la-CBuildingHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CBuildingHandler.cpp' object='libvcmi_la-CBuildingHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CBuildingHandler.lo `test -f '../hch/CBuildingHandler.cpp' || echo '$(srcdir)/'`../hch/CBuildingHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CBuildingHandler.lo `test -f 'CBuildingHandler.cpp' || echo '$(srcdir)/'`CBuildingHandler.cpp
 
-libvcmi_la-CCampaignHandler.lo: ../hch/CCampaignHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCampaignHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCampaignHandler.Tpo -c -o libvcmi_la-CCampaignHandler.lo `test -f '../hch/CCampaignHandler.cpp' || echo '$(srcdir)/'`../hch/CCampaignHandler.cpp
+libvcmi_la-CCampaignHandler.lo: CCampaignHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCampaignHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCampaignHandler.Tpo -c -o libvcmi_la-CCampaignHandler.lo `test -f 'CCampaignHandler.cpp' || echo '$(srcdir)/'`CCampaignHandler.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CCampaignHandler.Tpo $(DEPDIR)/libvcmi_la-CCampaignHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CCampaignHandler.cpp' object='libvcmi_la-CCampaignHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CCampaignHandler.cpp' object='libvcmi_la-CCampaignHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCampaignHandler.lo `test -f '../hch/CCampaignHandler.cpp' || echo '$(srcdir)/'`../hch/CCampaignHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCampaignHandler.lo `test -f 'CCampaignHandler.cpp' || echo '$(srcdir)/'`CCampaignHandler.cpp
 
-libvcmi_la-CCreatureHandler.lo: ../hch/CCreatureHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCreatureHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCreatureHandler.Tpo -c -o libvcmi_la-CCreatureHandler.lo `test -f '../hch/CCreatureHandler.cpp' || echo '$(srcdir)/'`../hch/CCreatureHandler.cpp
+libvcmi_la-CCreatureHandler.lo: CCreatureHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCreatureHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCreatureHandler.Tpo -c -o libvcmi_la-CCreatureHandler.lo `test -f 'CCreatureHandler.cpp' || echo '$(srcdir)/'`CCreatureHandler.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CCreatureHandler.Tpo $(DEPDIR)/libvcmi_la-CCreatureHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CCreatureHandler.cpp' object='libvcmi_la-CCreatureHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CCreatureHandler.cpp' object='libvcmi_la-CCreatureHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCreatureHandler.lo `test -f '../hch/CCreatureHandler.cpp' || echo '$(srcdir)/'`../hch/CCreatureHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCreatureHandler.lo `test -f 'CCreatureHandler.cpp' || echo '$(srcdir)/'`CCreatureHandler.cpp
 
-libvcmi_la-CDefObjInfoHandler.lo: ../hch/CDefObjInfoHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CDefObjInfoHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CDefObjInfoHandler.Tpo -c -o libvcmi_la-CDefObjInfoHandler.lo `test -f '../hch/CDefObjInfoHandler.cpp' || echo '$(srcdir)/'`../hch/CDefObjInfoHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CDefObjInfoHandler.Tpo $(DEPDIR)/libvcmi_la-CDefObjInfoHandler.Plo
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CDefObjInfoHandler.cpp' object='libvcmi_la-CDefObjInfoHandler.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CDefObjInfoHandler.lo `test -f '../hch/CDefObjInfoHandler.cpp' || echo '$(srcdir)/'`../hch/CDefObjInfoHandler.cpp
-
-libvcmi_la-CGeneralTextHandler.lo: ../hch/CGeneralTextHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CGeneralTextHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CGeneralTextHandler.Tpo -c -o libvcmi_la-CGeneralTextHandler.lo `test -f '../hch/CGeneralTextHandler.cpp' || echo '$(srcdir)/'`../hch/CGeneralTextHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CGeneralTextHandler.Tpo $(DEPDIR)/libvcmi_la-CGeneralTextHandler.Plo
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CGeneralTextHandler.cpp' object='libvcmi_la-CGeneralTextHandler.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CGeneralTextHandler.lo `test -f '../hch/CGeneralTextHandler.cpp' || echo '$(srcdir)/'`../hch/CGeneralTextHandler.cpp
-
-libvcmi_la-CHeroHandler.lo: ../hch/CHeroHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CHeroHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CHeroHandler.Tpo -c -o libvcmi_la-CHeroHandler.lo `test -f '../hch/CHeroHandler.cpp' || echo '$(srcdir)/'`../hch/CHeroHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CHeroHandler.Tpo $(DEPDIR)/libvcmi_la-CHeroHandler.Plo
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CHeroHandler.cpp' object='libvcmi_la-CHeroHandler.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CHeroHandler.lo `test -f '../hch/CHeroHandler.cpp' || echo '$(srcdir)/'`../hch/CHeroHandler.cpp
-
-libvcmi_la-CLodHandler.lo: ../hch/CLodHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CLodHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CLodHandler.Tpo -c -o libvcmi_la-CLodHandler.lo `test -f '../hch/CLodHandler.cpp' || echo '$(srcdir)/'`../hch/CLodHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CLodHandler.Tpo $(DEPDIR)/libvcmi_la-CLodHandler.Plo
+libvcmi_la-CCreatureSet.lo: CCreatureSet.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCreatureSet.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCreatureSet.Tpo -c -o libvcmi_la-CCreatureSet.lo `test -f 'CCreatureSet.cpp' || echo '$(srcdir)/'`CCreatureSet.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CCreatureSet.Tpo $(DEPDIR)/libvcmi_la-CCreatureSet.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CLodHandler.cpp' object='libvcmi_la-CLodHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CCreatureSet.cpp' object='libvcmi_la-CCreatureSet.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CLodHandler.lo `test -f '../hch/CLodHandler.cpp' || echo '$(srcdir)/'`../hch/CLodHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCreatureSet.lo `test -f 'CCreatureSet.cpp' || echo '$(srcdir)/'`CCreatureSet.cpp
 
-libvcmi_la-CObjectHandler.lo: ../hch/CObjectHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CObjectHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CObjectHandler.Tpo -c -o libvcmi_la-CObjectHandler.lo `test -f '../hch/CObjectHandler.cpp' || echo '$(srcdir)/'`../hch/CObjectHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CObjectHandler.Tpo $(DEPDIR)/libvcmi_la-CObjectHandler.Plo
+libvcmi_la-CDefObjInfoHandler.lo: CDefObjInfoHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CDefObjInfoHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CDefObjInfoHandler.Tpo -c -o libvcmi_la-CDefObjInfoHandler.lo `test -f 'CDefObjInfoHandler.cpp' || echo '$(srcdir)/'`CDefObjInfoHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CDefObjInfoHandler.Tpo $(DEPDIR)/libvcmi_la-CDefObjInfoHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CObjectHandler.cpp' object='libvcmi_la-CObjectHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CDefObjInfoHandler.cpp' object='libvcmi_la-CDefObjInfoHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CObjectHandler.lo `test -f '../hch/CObjectHandler.cpp' || echo '$(srcdir)/'`../hch/CObjectHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CDefObjInfoHandler.lo `test -f 'CDefObjInfoHandler.cpp' || echo '$(srcdir)/'`CDefObjInfoHandler.cpp
 
-libvcmi_la-CSpellHandler.lo: ../hch/CSpellHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CSpellHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CSpellHandler.Tpo -c -o libvcmi_la-CSpellHandler.lo `test -f '../hch/CSpellHandler.cpp' || echo '$(srcdir)/'`../hch/CSpellHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CSpellHandler.Tpo $(DEPDIR)/libvcmi_la-CSpellHandler.Plo
+libvcmi_la-CGameState.lo: CGameState.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CGameState.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CGameState.Tpo -c -o libvcmi_la-CGameState.lo `test -f 'CGameState.cpp' || echo '$(srcdir)/'`CGameState.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CGameState.Tpo $(DEPDIR)/libvcmi_la-CGameState.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CSpellHandler.cpp' object='libvcmi_la-CSpellHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CGameState.cpp' object='libvcmi_la-CGameState.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CSpellHandler.lo `test -f '../hch/CSpellHandler.cpp' || echo '$(srcdir)/'`../hch/CSpellHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CGameState.lo `test -f 'CGameState.cpp' || echo '$(srcdir)/'`CGameState.cpp
 
-libvcmi_la-CTownHandler.lo: ../hch/CTownHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CTownHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CTownHandler.Tpo -c -o libvcmi_la-CTownHandler.lo `test -f '../hch/CTownHandler.cpp' || echo '$(srcdir)/'`../hch/CTownHandler.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CTownHandler.Tpo $(DEPDIR)/libvcmi_la-CTownHandler.Plo
+libvcmi_la-CGeneralTextHandler.lo: CGeneralTextHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CGeneralTextHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CGeneralTextHandler.Tpo -c -o libvcmi_la-CGeneralTextHandler.lo `test -f 'CGeneralTextHandler.cpp' || echo '$(srcdir)/'`CGeneralTextHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CGeneralTextHandler.Tpo $(DEPDIR)/libvcmi_la-CGeneralTextHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../hch/CTownHandler.cpp' object='libvcmi_la-CTownHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CGeneralTextHandler.cpp' object='libvcmi_la-CGeneralTextHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CTownHandler.lo `test -f '../hch/CTownHandler.cpp' || echo '$(srcdir)/'`../hch/CTownHandler.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CGeneralTextHandler.lo `test -f 'CGeneralTextHandler.cpp' || echo '$(srcdir)/'`CGeneralTextHandler.cpp
 
-libvcmi_la-stdafx.lo: ../stdafx.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-stdafx.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-stdafx.Tpo -c -o libvcmi_la-stdafx.lo `test -f '../stdafx.cpp' || echo '$(srcdir)/'`../stdafx.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-stdafx.Tpo $(DEPDIR)/libvcmi_la-stdafx.Plo
+libvcmi_la-CHeroHandler.lo: CHeroHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CHeroHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CHeroHandler.Tpo -c -o libvcmi_la-CHeroHandler.lo `test -f 'CHeroHandler.cpp' || echo '$(srcdir)/'`CHeroHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CHeroHandler.Tpo $(DEPDIR)/libvcmi_la-CHeroHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../stdafx.cpp' object='libvcmi_la-stdafx.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CHeroHandler.cpp' object='libvcmi_la-CHeroHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-stdafx.lo `test -f '../stdafx.cpp' || echo '$(srcdir)/'`../stdafx.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CHeroHandler.lo `test -f 'CHeroHandler.cpp' || echo '$(srcdir)/'`CHeroHandler.cpp
 
-libvcmi_la-CCreatureSet.lo: CCreatureSet.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CCreatureSet.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CCreatureSet.Tpo -c -o libvcmi_la-CCreatureSet.lo `test -f 'CCreatureSet.cpp' || echo '$(srcdir)/'`CCreatureSet.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CCreatureSet.Tpo $(DEPDIR)/libvcmi_la-CCreatureSet.Plo
+libvcmi_la-CLodHandler.lo: CLodHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CLodHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CLodHandler.Tpo -c -o libvcmi_la-CLodHandler.lo `test -f 'CLodHandler.cpp' || echo '$(srcdir)/'`CLodHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CLodHandler.Tpo $(DEPDIR)/libvcmi_la-CLodHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CCreatureSet.cpp' object='libvcmi_la-CCreatureSet.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CLodHandler.cpp' object='libvcmi_la-CLodHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CCreatureSet.lo `test -f 'CCreatureSet.cpp' || echo '$(srcdir)/'`CCreatureSet.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CLodHandler.lo `test -f 'CLodHandler.cpp' || echo '$(srcdir)/'`CLodHandler.cpp
 
 libvcmi_la-CMapInfo.lo: CMapInfo.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CMapInfo.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CMapInfo.Tpo -c -o libvcmi_la-CMapInfo.lo `test -f 'CMapInfo.cpp' || echo '$(srcdir)/'`CMapInfo.cpp
@@ -568,13 +553,13 @@ libvcmi_la-CMapInfo.lo: CMapInfo.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CMapInfo.lo `test -f 'CMapInfo.cpp' || echo '$(srcdir)/'`CMapInfo.cpp
 
-libvcmi_la-CGameState.lo: CGameState.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CGameState.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CGameState.Tpo -c -o libvcmi_la-CGameState.lo `test -f 'CGameState.cpp' || echo '$(srcdir)/'`CGameState.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CGameState.Tpo $(DEPDIR)/libvcmi_la-CGameState.Plo
+libvcmi_la-CObjectHandler.lo: CObjectHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CObjectHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CObjectHandler.Tpo -c -o libvcmi_la-CObjectHandler.lo `test -f 'CObjectHandler.cpp' || echo '$(srcdir)/'`CObjectHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CObjectHandler.Tpo $(DEPDIR)/libvcmi_la-CObjectHandler.Plo
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CGameState.cpp' object='libvcmi_la-CGameState.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CObjectHandler.cpp' object='libvcmi_la-CObjectHandler.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CGameState.lo `test -f 'CGameState.cpp' || echo '$(srcdir)/'`CGameState.cpp
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CObjectHandler.lo `test -f 'CObjectHandler.cpp' || echo '$(srcdir)/'`CObjectHandler.cpp
 
 libvcmi_la-Connection.lo: Connection.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-Connection.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-Connection.Tpo -c -o libvcmi_la-Connection.lo `test -f 'Connection.cpp' || echo '$(srcdir)/'`Connection.cpp
@@ -584,6 +569,22 @@ libvcmi_la-Connection.lo: Connection.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-Connection.lo `test -f 'Connection.cpp' || echo '$(srcdir)/'`Connection.cpp
 
+libvcmi_la-CSpellHandler.lo: CSpellHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CSpellHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CSpellHandler.Tpo -c -o libvcmi_la-CSpellHandler.lo `test -f 'CSpellHandler.cpp' || echo '$(srcdir)/'`CSpellHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CSpellHandler.Tpo $(DEPDIR)/libvcmi_la-CSpellHandler.Plo
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CSpellHandler.cpp' object='libvcmi_la-CSpellHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CSpellHandler.lo `test -f 'CSpellHandler.cpp' || echo '$(srcdir)/'`CSpellHandler.cpp
+
+libvcmi_la-CTownHandler.lo: CTownHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-CTownHandler.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-CTownHandler.Tpo -c -o libvcmi_la-CTownHandler.lo `test -f 'CTownHandler.cpp' || echo '$(srcdir)/'`CTownHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CTownHandler.Tpo $(DEPDIR)/libvcmi_la-CTownHandler.Plo
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CTownHandler.cpp' object='libvcmi_la-CTownHandler.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-CTownHandler.lo `test -f 'CTownHandler.cpp' || echo '$(srcdir)/'`CTownHandler.cpp
+
 libvcmi_la-HeroBonus.lo: HeroBonus.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-HeroBonus.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-HeroBonus.Tpo -c -o libvcmi_la-HeroBonus.lo `test -f 'HeroBonus.cpp' || echo '$(srcdir)/'`HeroBonus.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-HeroBonus.Tpo $(DEPDIR)/libvcmi_la-HeroBonus.Plo
@@ -600,6 +601,14 @@ libvcmi_la-IGameCallback.lo: IGameCallback.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-IGameCallback.lo `test -f 'IGameCallback.cpp' || echo '$(srcdir)/'`IGameCallback.cpp
 
+libvcmi_la-map.lo: map.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-map.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-map.Tpo -c -o libvcmi_la-map.lo `test -f 'map.cpp' || echo '$(srcdir)/'`map.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-map.Tpo $(DEPDIR)/libvcmi_la-map.Plo
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='map.cpp' object='libvcmi_la-map.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-map.lo `test -f 'map.cpp' || echo '$(srcdir)/'`map.cpp
+
 libvcmi_la-NetPacksLib.lo: NetPacksLib.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-NetPacksLib.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-NetPacksLib.Tpo -c -o libvcmi_la-NetPacksLib.lo `test -f 'NetPacksLib.cpp' || echo '$(srcdir)/'`NetPacksLib.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-NetPacksLib.Tpo $(DEPDIR)/libvcmi_la-NetPacksLib.Plo
@@ -624,14 +633,6 @@ libvcmi_la-VCMI_Lib.lo: VCMI_Lib.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-VCMI_Lib.lo `test -f 'VCMI_Lib.cpp' || echo '$(srcdir)/'`VCMI_Lib.cpp
 
-libvcmi_la-map.lo: map.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -MT libvcmi_la-map.lo -MD -MP -MF $(DEPDIR)/libvcmi_la-map.Tpo -c -o libvcmi_la-map.lo `test -f 'map.cpp' || echo '$(srcdir)/'`map.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-map.Tpo $(DEPDIR)/libvcmi_la-map.Plo
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='map.cpp' object='libvcmi_la-map.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvcmi_la_CXXFLAGS) $(CXXFLAGS) -c -o libvcmi_la-map.lo `test -f 'map.cpp' || echo '$(srcdir)/'`map.cpp
-
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -839,6 +840,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES
 
+	VCMI_Lib.h
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

+ 2 - 0
lib/RegisterTypes.cpp

@@ -3,7 +3,9 @@
 #include "Connection.h"
 #include "NetPacks.h"
 #include "VCMI_Lib.h"
+#include "CArtHandler.h"
 #include "CObjectHandler.h"
+#include "CGameState.h"
 #include "CHeroHandler.h"
 #include "CTownHandler.h"
 /*

+ 2 - 2
lib/map.cpp

@@ -518,7 +518,7 @@ Mapa::~Mapa()
 		delete [] terrain;
 	}
 	for(std::list<ConstTransitivePtr<CMapEvent> >::iterator i = events.begin(); i != events.end(); i++)
-		delete *i;
+		i->dellNull();
 }
 
 CGHeroInstance * Mapa::getHero(int ID, int mode)
@@ -2131,4 +2131,4 @@ bool TerrainTile::entrableTerrain(bool allowLand, bool allowSea) const
 bool TerrainTile::isClear(const TerrainTile *from /*= NULL*/) const
 {
 	return entrableTerrain(from) && !blocked;
-}
+}

+ 4 - 2
server/Makefile.am

@@ -4,10 +4,12 @@ vcmiserver_LDADD = $(top_builddir)/lib/libvcmi.la
 vcmiserver_CXXFLAGS = @SDL_CXXFLAGS@
 vcmiserver_LDFLAGS = -L$(top_builddir)/lib
 vcmiserver_SOURCES = \
+	../CConsoleHandler.cpp \
+	../CConsoleHandler.h \
 	CGameHandler.cpp \
 	CGameHandler.h \
 	CVCMIServer.cpp \
 	CVCMIServer.h \
 	NetPacksServer.cpp \
-	../lib/CMapInfo.cpp \
-	../lib/CMapInfo.h
+	stdafx.cpp \
+	stdafx.h

+ 37 - 15
server/Makefile.in

@@ -41,6 +41,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/m4/ax_boost_base.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_filesystem.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_iostreams.m4 \
+	$(top_srcdir)/aclocal/m4/ax_boost_program_options.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_system.m4 \
 	$(top_srcdir)/aclocal/m4/ax_boost_thread.m4 \
 	$(top_srcdir)/aclocal/m4/libtool.m4 \
@@ -56,10 +57,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_vcmiserver_OBJECTS = vcmiserver-CGameHandler.$(OBJEXT) \
+am_vcmiserver_OBJECTS = vcmiserver-CConsoleHandler.$(OBJEXT) \
+	vcmiserver-CGameHandler.$(OBJEXT) \
 	vcmiserver-CVCMIServer.$(OBJEXT) \
 	vcmiserver-NetPacksServer.$(OBJEXT) \
-	vcmiserver-CMapInfo.$(OBJEXT)
+	vcmiserver-stdafx.$(OBJEXT)
 vcmiserver_OBJECTS = $(am_vcmiserver_OBJECTS)
 vcmiserver_DEPENDENCIES = $(top_builddir)/lib/libvcmi.la
 AM_V_lt = $(am__v_lt_$(V))
@@ -127,6 +129,7 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
 BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
 BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@
 BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
 BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
 BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
 CC = @CC@
@@ -247,13 +250,15 @@ vcmiserver_LDADD = $(top_builddir)/lib/libvcmi.la
 vcmiserver_CXXFLAGS = @SDL_CXXFLAGS@
 vcmiserver_LDFLAGS = -L$(top_builddir)/lib
 vcmiserver_SOURCES = \
+	../CConsoleHandler.cpp \
+	../CConsoleHandler.h \
 	CGameHandler.cpp \
 	CGameHandler.h \
 	CVCMIServer.cpp \
 	CVCMIServer.h \
 	NetPacksServer.cpp \
-	../lib/CMapInfo.cpp \
-	../lib/CMapInfo.h
+	stdafx.cpp \
+	stdafx.h
 
 all: all-am
 
@@ -342,10 +347,11 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiserver-CConsoleHandler.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiserver-CGameHandler.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiserver-CMapInfo.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiserver-CVCMIServer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiserver-NetPacksServer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcmiserver-stdafx.Po@am__quote@
 
 .cpp.o:
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -371,6 +377,22 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
 
+vcmiserver-CConsoleHandler.o: ../CConsoleHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -MT vcmiserver-CConsoleHandler.o -MD -MP -MF $(DEPDIR)/vcmiserver-CConsoleHandler.Tpo -c -o vcmiserver-CConsoleHandler.o `test -f '../CConsoleHandler.cpp' || echo '$(srcdir)/'`../CConsoleHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiserver-CConsoleHandler.Tpo $(DEPDIR)/vcmiserver-CConsoleHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../CConsoleHandler.cpp' object='vcmiserver-CConsoleHandler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -c -o vcmiserver-CConsoleHandler.o `test -f '../CConsoleHandler.cpp' || echo '$(srcdir)/'`../CConsoleHandler.cpp
+
+vcmiserver-CConsoleHandler.obj: ../CConsoleHandler.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -MT vcmiserver-CConsoleHandler.obj -MD -MP -MF $(DEPDIR)/vcmiserver-CConsoleHandler.Tpo -c -o vcmiserver-CConsoleHandler.obj `if test -f '../CConsoleHandler.cpp'; then $(CYGPATH_W) '../CConsoleHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../CConsoleHandler.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiserver-CConsoleHandler.Tpo $(DEPDIR)/vcmiserver-CConsoleHandler.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../CConsoleHandler.cpp' object='vcmiserver-CConsoleHandler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -c -o vcmiserver-CConsoleHandler.obj `if test -f '../CConsoleHandler.cpp'; then $(CYGPATH_W) '../CConsoleHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/../CConsoleHandler.cpp'; fi`
+
 vcmiserver-CGameHandler.o: CGameHandler.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -MT vcmiserver-CGameHandler.o -MD -MP -MF $(DEPDIR)/vcmiserver-CGameHandler.Tpo -c -o vcmiserver-CGameHandler.o `test -f 'CGameHandler.cpp' || echo '$(srcdir)/'`CGameHandler.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiserver-CGameHandler.Tpo $(DEPDIR)/vcmiserver-CGameHandler.Po
@@ -419,21 +441,21 @@ vcmiserver-NetPacksServer.obj: NetPacksServer.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -c -o vcmiserver-NetPacksServer.obj `if test -f 'NetPacksServer.cpp'; then $(CYGPATH_W) 'NetPacksServer.cpp'; else $(CYGPATH_W) '$(srcdir)/NetPacksServer.cpp'; fi`
 
-vcmiserver-CMapInfo.o: ../lib/CMapInfo.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -MT vcmiserver-CMapInfo.o -MD -MP -MF $(DEPDIR)/vcmiserver-CMapInfo.Tpo -c -o vcmiserver-CMapInfo.o `test -f '../lib/CMapInfo.cpp' || echo '$(srcdir)/'`../lib/CMapInfo.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiserver-CMapInfo.Tpo $(DEPDIR)/vcmiserver-CMapInfo.Po
+vcmiserver-stdafx.o: stdafx.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -MT vcmiserver-stdafx.o -MD -MP -MF $(DEPDIR)/vcmiserver-stdafx.Tpo -c -o vcmiserver-stdafx.o `test -f 'stdafx.cpp' || echo '$(srcdir)/'`stdafx.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiserver-stdafx.Tpo $(DEPDIR)/vcmiserver-stdafx.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../lib/CMapInfo.cpp' object='vcmiserver-CMapInfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='stdafx.cpp' object='vcmiserver-stdafx.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -c -o vcmiserver-CMapInfo.o `test -f '../lib/CMapInfo.cpp' || echo '$(srcdir)/'`../lib/CMapInfo.cpp
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -c -o vcmiserver-stdafx.o `test -f 'stdafx.cpp' || echo '$(srcdir)/'`stdafx.cpp
 
-vcmiserver-CMapInfo.obj: ../lib/CMapInfo.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -MT vcmiserver-CMapInfo.obj -MD -MP -MF $(DEPDIR)/vcmiserver-CMapInfo.Tpo -c -o vcmiserver-CMapInfo.obj `if test -f '../lib/CMapInfo.cpp'; then $(CYGPATH_W) '../lib/CMapInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/../lib/CMapInfo.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiserver-CMapInfo.Tpo $(DEPDIR)/vcmiserver-CMapInfo.Po
+vcmiserver-stdafx.obj: stdafx.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -MT vcmiserver-stdafx.obj -MD -MP -MF $(DEPDIR)/vcmiserver-stdafx.Tpo -c -o vcmiserver-stdafx.obj `if test -f 'stdafx.cpp'; then $(CYGPATH_W) 'stdafx.cpp'; else $(CYGPATH_W) '$(srcdir)/stdafx.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vcmiserver-stdafx.Tpo $(DEPDIR)/vcmiserver-stdafx.Po
 @am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../lib/CMapInfo.cpp' object='vcmiserver-CMapInfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='stdafx.cpp' object='vcmiserver-stdafx.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -c -o vcmiserver-CMapInfo.obj `if test -f '../lib/CMapInfo.cpp'; then $(CYGPATH_W) '../lib/CMapInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/../lib/CMapInfo.cpp'; fi`
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vcmiserver_CXXFLAGS) $(CXXFLAGS) -c -o vcmiserver-stdafx.obj `if test -f 'stdafx.cpp'; then $(CYGPATH_W) 'stdafx.cpp'; else $(CYGPATH_W) '$(srcdir)/stdafx.cpp'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo

Some files were not shown because too many files changed in this diff