Browse Source

- fix for bonuses in campaign screen
- fixed gcc warnings
- build system updated

Ivan Savenko 15 năm trước cách đây
mục cha
commit
923fed7dc1

+ 1 - 1
client/CPreGame.cpp

@@ -2948,7 +2948,7 @@ void CBonusSelection::updateBonusSelection()
 			blitAt(twcp->ourImages[1].bitmap, 0, 0, selected);
 
 			//moving surfaces into button
-			bonuses->buttons.back()->imgs[0]->unload();
+			bonuses->buttons.back()->imgs[0]->clear();
 			bonuses->buttons.back()->imgs[0]->add(notSelected);
 			bonuses->buttons.back()->imgs[0]->add(selected);
 

+ 2 - 0
client/Makefile.am

@@ -28,6 +28,8 @@ vcmiclient_SOURCES =  \
 	../hch/CSoundBase.h \
 	../hch/CVideoHandler.cpp \
 	../hch/CVideoHandler.h \
+	../lib/CMapInfo.cpp \
+	../lib/CMapInfo.h \
 	../int3.h \
 	../nodrze.h \
 	../stdafx.h \

+ 20 - 0
client/Makefile.in

@@ -64,6 +64,7 @@ am_vcmiclient_OBJECTS = vcmiclient-CCallback.$(OBJEXT) \
 	vcmiclient-CMusicHandler.$(OBJEXT) \
 	vcmiclient-CSndHandler.$(OBJEXT) \
 	vcmiclient-CVideoHandler.$(OBJEXT) \
+	vcmiclient-CMapInfo.$(OBJEXT) \
 	vcmiclient-AdventureMapButton.$(OBJEXT) \
 	vcmiclient-CAdvmapInterface.$(OBJEXT) \
 	vcmiclient-CBattleInterface.$(OBJEXT) \
@@ -296,6 +297,8 @@ vcmiclient_SOURCES = \
 	../hch/CSoundBase.h \
 	../hch/CVideoHandler.cpp \
 	../hch/CVideoHandler.h \
+	../lib/CMapInfo.cpp \
+	../lib/CMapInfo.h \
 	../int3.h \
 	../nodrze.h \
 	../stdafx.h \
@@ -453,6 +456,7 @@ 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@
@@ -622,6 +626,22 @@ vcmiclient-CVideoHandler.obj: ../hch/CVideoHandler.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-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

+ 5 - 0
hch/CAnimation.cpp

@@ -606,6 +606,11 @@ SDL_Surface * CAnimation::image(size_t frame, size_t group)
 	return NULL;
 }
 
+void CAnimation::clear()
+{
+	entries.clear();
+}
+
 void CAnimation::load()
 {
 	CDefFile * file = getFile();

+ 3 - 0
hch/CAnimation.h

@@ -146,6 +146,9 @@ public:
 	//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();
+
 	//all available frames
 	void load  ();
 	void unload();

+ 14 - 14
hch/CCreatureHandler.cpp

@@ -142,7 +142,7 @@ bool CCreature::isMyUpgrade(const CCreature *anotherCre) const
 int readNumber(int & befi, int & i, int andame, std::string & buf) //helper function for void CCreatureHandler::loadCreatures() and loadUnitAnimInfo()
 {
 	befi=i;
-	for(i; i<andame; ++i)
+	for(; i<andame; ++i)
 	{
 		if(buf[i]=='\t')
 			break;
@@ -156,7 +156,7 @@ int readNumber(int & befi, int & i, int andame, std::string & buf) //helper func
 float readFloat(int & befi, int & i, int andame, std::string & buf) //helper function for void CCreatureHandler::loadUnitAnimInfo()
 {
 	befi=i;
-	for(i; i<andame; ++i)
+	for(; i<andame; ++i)
 	{
 		if(buf[i]=='\t')
 			break;
@@ -211,7 +211,7 @@ void CCreatureHandler::loadCreatures()
 	int andame = buf.size();
 	int i=0; //buf iterator
 	int hmcr=0;
-	for(i; i<andame; ++i)
+	for(; i<andame; ++i)
 	{
 		if(buf[i]=='\r')
 			++hmcr;
@@ -228,7 +228,7 @@ void CCreatureHandler::loadCreatures()
 		ncre.level=0;
 
 		int befi=i;
-		for(i; i<andame; ++i)
+		for(; i<andame; ++i)
 		{
 			if(buf[i]=='\t')
 				break;
@@ -237,7 +237,7 @@ void CCreatureHandler::loadCreatures()
 		++i;
 
 		befi=i;
-		for(i; i<andame; ++i)
+		for(; i<andame; ++i)
 		{
 			if(buf[i]=='\t')
 				break;
@@ -273,7 +273,7 @@ void CCreatureHandler::loadCreatures()
 		ncre.ammMax = readNumber(befi, i, andame, buf);
 
 		befi=i;
-		for(i; i<andame; ++i)
+		for(; i<andame; ++i)
 		{
 			if(buf[i]=='\t')
 				break;
@@ -282,7 +282,7 @@ void CCreatureHandler::loadCreatures()
 		++i;
 
 		befi=i;
-		for(i; i<andame; ++i)
+		for(; i<andame; ++i)
 		{
 			if(buf[i]=='\r')
 				break;
@@ -457,7 +457,7 @@ void CCreatureHandler::loadCreatures()
 	}
 	ifs.close();
 	ifs.clear();
-	for(int i=1;i<=10;i++)
+	for(i=1;i<=10;i++)
 		levelCreatures.insert(std::pair<int,std::vector<CCreature*> >(i,std::vector<CCreature*>()));
 
 	tlog5 << "\t\tReading config/monsters.txt" << std::endl;
@@ -514,7 +514,7 @@ void CCreatureHandler::loadCreatures()
 
 	i = 0; //buf iterator
 	hmcr = 0;
-	for(i; i<andame2; ++i) //omitting rubbish
+	for(; i<andame2; ++i) //omitting rubbish
 	{
 		if(buf[i]=='\r')
 			break;
@@ -526,7 +526,7 @@ void CCreatureHandler::loadCreatures()
 		//tlog5 <<"\t\t\t" << s <<". Reading defname. \n";
 		int befi=i;
 		std::string rub;
-		for(i; i<andame2; ++i)
+		for(; i<andame2; ++i)
 		{
 			if(buf[i]==' ')
 				break;
@@ -535,7 +535,7 @@ void CCreatureHandler::loadCreatures()
 		++i;
 
 		befi=i;
-		for(i; i<andame2; ++i)
+		for(; i<andame2; ++i)
 		{
 			if(buf[i]=='\r')
 				break;
@@ -587,7 +587,7 @@ void CCreatureHandler::loadAnimationInfo()
 	int andame = buf.size();
 	int i=0; //buf iterator
 	int hmcr=0;
-	for(i; i<andame; ++i)
+	for(; i<andame; ++i)
 	{
 		if(buf[i]=='\r')
 			++hmcr;
@@ -611,7 +611,7 @@ void CCreatureHandler::loadUnitAnimInfo(CCreature & unit, std::string & src, int
 
 	while(unit.timeBetweenFidgets == 0.0)
 	{
-		for(i; i<src.size(); ++i)
+		for(; i<src.size(); ++i)
 		{
 			if(src[i]=='\r')
 				break;
@@ -643,7 +643,7 @@ void CCreatureHandler::loadUnitAnimInfo(CCreature & unit, std::string & src, int
 	unit.troopCountLocationOffset= readNumber(befi, i, src.size(), src);
 	unit.attackClimaxFrame = readNumber(befi, i, src.size(), src);
 
-	for(i; i<src.size(); ++i)
+	for(; i<src.size(); ++i)
 	{
 		if(src[i]=='\r')
 			break;

+ 3 - 3
hch/CGeneralTextHandler.cpp

@@ -64,7 +64,7 @@ void CGeneralTextHandler::load()
 	for(int gg=0; gg<14; ++gg)
 	{
 		int befi=i;
-		for(i; i<andame; ++i)
+		for(; i<andame; ++i)
 		{
 			if(buf[i]=='\r')
 				break;
@@ -78,7 +78,7 @@ void CGeneralTextHandler::load()
 	for(int gg=0; gg<4; ++gg)
 	{
 		int befi=i;
-		for(i; i<andame; ++i)
+		for(; i<andame; ++i)
 		{
 			if(buf[i]=='\r')
 				break;
@@ -335,7 +335,7 @@ void CGeneralTextHandler::load()
 	std::string tmp;
 	andame = buf.size();
 	i=0; //buf iterator
-	for(i; i<andame; ++i)
+	for(; i<andame; ++i)
 	{
 		if(buf[i]=='\r')
 			break;

+ 2 - 2
hch/CObjectHandler.cpp

@@ -1233,11 +1233,11 @@ void CGHeroInstance::updateSkill(int which, int val)
 		case 23: //Armorer
 			skillVal = 5 * val; break;
 		case 24: //Intelligence
-			skillVal = 25 << val-1; break;
+			skillVal = 25 << (val-1); break;
 		case 25: //Sorcery
 			skillVal = 5 * val; break;
 		case 26: //Resistance
-			skillVal = 5 << val-1; break;
+			skillVal = 5 << (val-1); break;
 		case 27: //First Aid
 			skillVal = 25 + 25*val; break;
 	}

+ 2 - 2
lib/CMapInfo.cpp

@@ -1,9 +1,9 @@
 #define VCMI_DLL
 
 #include "CMapInfo.h"
-#include "..\StartInfo.h"
+#include "../StartInfo.h"
 #include "map.h"
-#include "..\hch\CCampaignHandler.h"
+#include "../hch/CCampaignHandler.h"
 
 void CMapInfo::countPlayers()
 {

+ 2 - 0
lib/Connection.cpp

@@ -11,6 +11,8 @@
 #endif
 
 //for smart objs serialization over net
+#include "../lib/CMapInfo.h"
+#include "../StartInfo.h"
 #include "CGameState.h"
 #include "map.h"
 #include "../hch/CObjectHandler.h"

+ 2 - 0
lib/Makefile.am

@@ -30,6 +30,8 @@ libvcmi_la_SOURCES = \
 	BattleAction.h \
 	CCreatureSet.cpp \
 	CCreatureSet.h \
+	CMapInfo.cpp \
+	CMapInfo.h \
 	CGameState.cpp \
 	CGameState.h \
 	CondSh.h \

+ 16 - 4
lib/Makefile.in

@@ -85,10 +85,11 @@ am_libvcmi_la_OBJECTS = libvcmi_la-CConsoleHandler.lo \
 	libvcmi_la-CLodHandler.lo libvcmi_la-CObjectHandler.lo \
 	libvcmi_la-CSpellHandler.lo libvcmi_la-CTownHandler.lo \
 	libvcmi_la-stdafx.lo libvcmi_la-CCreatureSet.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-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_OBJECTS = $(am_libvcmi_la_OBJECTS)
 AM_V_lt = $(am__v_lt_$(V))
 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
@@ -303,6 +304,8 @@ libvcmi_la_SOURCES = \
 	BattleAction.h \
 	CCreatureSet.cpp \
 	CCreatureSet.h \
+	CMapInfo.cpp \
+	CMapInfo.h \
 	CGameState.cpp \
 	CGameState.h \
 	CondSh.h \
@@ -408,6 +411,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CGeneralTextHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CHeroHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CLodHandler.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CMapInfo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CObjectHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CSpellHandler.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvcmi_la-CTownHandler.Plo@am__quote@
@@ -556,6 +560,14 @@ libvcmi_la-CCreatureSet.lo: CCreatureSet.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-CCreatureSet.lo `test -f 'CCreatureSet.cpp' || echo '$(srcdir)/'`CCreatureSet.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
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvcmi_la-CMapInfo.Tpo $(DEPDIR)/libvcmi_la-CMapInfo.Plo
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CMapInfo.cpp' object='libvcmi_la-CMapInfo.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-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

+ 3 - 1
lib/NetPacks.h

@@ -6,6 +6,8 @@
 #include "HeroBonus.h"
 #include <set>
 #include "CCreatureSet.h"
+#include "CMapInfo.h"
+#include "../StartInfo.h"
 
 /*
  * NetPacks.h, part of VCMI engine
@@ -24,7 +26,7 @@ class CConnection;
 class CCampaignState;
 class CArtifact;
 class CSelectionScreen;
-class CMapInfo;
+//class CMapInfo;
 
 struct CPack
 {

+ 1 - 1
lib/map.h

@@ -119,7 +119,7 @@ struct DLL_EXPORT PlayerInfo
 	}
 	si8 defaultHero(bool isMapRoE = false) const
 	{
-		if ((generateHeroAtMainTown || isMapRoE)  &&  hasMainTown  //we will generate hero in front of main town
+		if ( ((generateHeroAtMainTown || isMapRoE)  &&  hasMainTown)  //we will generate hero in front of main town
 			|| p8) //random hero
 			return -1;
 		else

+ 3 - 1
server/Makefile.am

@@ -8,4 +8,6 @@ vcmiserver_SOURCES = \
 	CGameHandler.h \
 	CVCMIServer.cpp \
 	CVCMIServer.h \
-	NetPacksServer.cpp
+	NetPacksServer.cpp \
+	../lib/CMapInfo.cpp \
+	../lib/CMapInfo.h

+ 22 - 2
server/Makefile.in

@@ -58,7 +58,8 @@ am__installdirs = "$(DESTDIR)$(bindir)"
 PROGRAMS = $(bin_PROGRAMS)
 am_vcmiserver_OBJECTS = vcmiserver-CGameHandler.$(OBJEXT) \
 	vcmiserver-CVCMIServer.$(OBJEXT) \
-	vcmiserver-NetPacksServer.$(OBJEXT)
+	vcmiserver-NetPacksServer.$(OBJEXT) \
+	vcmiserver-CMapInfo.$(OBJEXT)
 vcmiserver_OBJECTS = $(am_vcmiserver_OBJECTS)
 vcmiserver_DEPENDENCIES = $(top_builddir)/lib/libvcmi.la
 AM_V_lt = $(am__v_lt_$(V))
@@ -250,7 +251,9 @@ vcmiserver_SOURCES = \
 	CGameHandler.h \
 	CVCMIServer.cpp \
 	CVCMIServer.h \
-	NetPacksServer.cpp
+	NetPacksServer.cpp \
+	../lib/CMapInfo.cpp \
+	../lib/CMapInfo.h
 
 all: all-am
 
@@ -340,6 +343,7 @@ distclean-compile:
 	-rm -f *.tab.c
 
 @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@
 
@@ -415,6 +419,22 @@ 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
+@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@	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
+
+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
+@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@	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`
+
 mostlyclean-libtool:
 	-rm -f *.lo