2
0
Эх сурвалжийг харах

* added files for future server
* make code compiling
* broken objects scripts

Michał W. Urbańczyk 17 жил өмнө
parent
commit
b0002ff50b

+ 3 - 3
AdventureMapButton.cpp

@@ -1,9 +1,9 @@
 #include "CAdvmapInterface.h"
 #include "CAdvmapInterface.h"
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
-#include "hch\CDefHandler.h"
+#include "hch/CDefHandler.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CLodHandler.h"
-#include "hch\CPreGameTextHandler.h"
+#include "hch/CLodHandler.h"
+#include "hch/CPreGameTextHandler.h"
 #include "hch/CTownHandler.h"
 #include "hch/CTownHandler.h"
 #include "CLua.h"
 #include "CLua.h"
 #include "CCallback.h"
 #include "CCallback.h"

+ 3 - 3
CAdvmapInterface.cpp

@@ -2,9 +2,9 @@
 #include "CAdvmapInterface.h"
 #include "CAdvmapInterface.h"
 #include "client/CBitmapHandler.h"
 #include "client/CBitmapHandler.h"
 #include "CPlayerInterface.h"
 #include "CPlayerInterface.h"
-#include "hch\CPreGameTextHandler.h"
-#include "hch\CGeneralTextHandler.h"
-#include "hch\CTownHandler.h"
+#include "hch/CPreGameTextHandler.h"
+#include "hch/CGeneralTextHandler.h"
+#include "hch/CTownHandler.h"
 #include "CPathfinder.h"
 #include "CPathfinder.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"

+ 4 - 4
CBattleInterface.cpp

@@ -1,14 +1,14 @@
 #include "CBattleInterface.h"
 #include "CBattleInterface.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CLodHandler.h"
+#include "hch/CLodHandler.h"
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
 #include "CAdvmapInterface.h"
 #include "CAdvmapInterface.h"
 #include "AdventureMapButton.h"
 #include "AdventureMapButton.h"
-#include "hch\CHeroHandler.h"
-#include "hch\CDefHandler.h"
+#include "hch/CHeroHandler.h"
+#include "hch/CDefHandler.h"
 #include "CCallback.h"
 #include "CCallback.h"
 #include "CGameState.h"
 #include "CGameState.h"
-#include "hch\CGeneralTextHandler.h"
+#include "hch/CGeneralTextHandler.h"
 #include "client/CCreatureAnimation.h"
 #include "client/CCreatureAnimation.h"
 #include "client/Graphics.h"
 #include "client/Graphics.h"
 #include <queue>
 #include <queue>

+ 3 - 3
CCallback.cpp

@@ -1,10 +1,10 @@
 #include "stdafx.h"
 #include "stdafx.h"
 #include "CCallback.h"
 #include "CCallback.h"
 #include "CPathfinder.h"
 #include "CPathfinder.h"
-#include "hch\CHeroHandler.h"
-#include "hch\CTownHandler.h"
+#include "hch/CHeroHandler.h"
+#include "hch/CTownHandler.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CAmbarCendamo.h"
+#include "hch/CAmbarCendamo.h"
 #include "mapHandler.h"
 #include "mapHandler.h"
 #include "CGameState.h"
 #include "CGameState.h"
 #include "CPlayerInterface.h"
 #include "CPlayerInterface.h"

+ 1 - 1
CCursorHandler.cpp

@@ -4,7 +4,7 @@
 #include "SDL_thread.h"
 #include "SDL_thread.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
 #include "SDL_framerate.h"
 #include "SDL_framerate.h"
-#include "hch\CLodHandler.h"
+#include "hch/CLodHandler.h"
 
 
 extern SDL_Surface * screen;
 extern SDL_Surface * screen;
 
 

+ 57 - 57
CGameState.cpp

@@ -472,66 +472,66 @@ void CGameState::init(StartInfo * si, Mapa * map, int seed)
 		}
 		}
 	}
 	}
 
 
-	/****************************SCRIPTS************************************************/
-	std::map<int, std::map<std::string, CObjectScript*> > * skrypty = &objscr; //alias for easier access
-	/****************************C++ OBJECT SCRIPTS************************************************/
-	std::map<int,CCPPObjectScript*> scripts;
-	CScriptCallback * csc = new CScriptCallback();
-	csc->gs = this;
-	handleCPPObjS(&scripts,new CVisitableOPH(csc));
-	handleCPPObjS(&scripts,new CVisitableOPW(csc));
-	handleCPPObjS(&scripts,new CPickable(csc));
-	handleCPPObjS(&scripts,new CMines(csc));
-	handleCPPObjS(&scripts,new CTownScript(csc));
-	handleCPPObjS(&scripts,new CHeroScript(csc));
-	handleCPPObjS(&scripts,new CMonsterS(csc));
-	handleCPPObjS(&scripts,new CCreatureGen(csc));
-	//created map
+	///****************************SCRIPTS************************************************/
+	//std::map<int, std::map<std::string, CObjectScript*> > * skrypty = &objscr; //alias for easier access
+	///****************************C++ OBJECT SCRIPTS************************************************/
+	//std::map<int,CCPPObjectScript*> scripts;
+	//CScriptCallback * csc = new CScriptCallback();
+	//csc->gs = this;
+	//handleCPPObjS(&scripts,new CVisitableOPH(csc));
+	//handleCPPObjS(&scripts,new CVisitableOPW(csc));
+	//handleCPPObjS(&scripts,new CPickable(csc));
+	//handleCPPObjS(&scripts,new CMines(csc));
+	//handleCPPObjS(&scripts,new CTownScript(csc));
+	//handleCPPObjS(&scripts,new CHeroScript(csc));
+	//handleCPPObjS(&scripts,new CMonsterS(csc));
+	//handleCPPObjS(&scripts,new CCreatureGen(csc));
+	////created map
 
 
-	/****************************LUA OBJECT SCRIPTS************************************************/
-	std::vector<std::string> * lf = CLuaHandler::searchForScripts("scripts/lua/objects"); //files
-	for (int i=0; i<lf->size(); i++)
-	{
-		try
-		{
-			std::vector<std::string> * temp =  CLuaHandler::functionList((*lf)[i]);
-			CLuaObjectScript * objs = new CLuaObjectScript((*lf)[i]);
-			CLuaCallback::registerFuncs(objs->is);
-			//objs
-			for (int j=0; j<temp->size(); j++)
-			{
-				int obid ; //obj ID
-				int dspos = (*temp)[j].find_first_of('_');
-				obid = atoi((*temp)[j].substr(dspos+1,(*temp)[j].size()-dspos-1).c_str());
-				std::string fname = (*temp)[j].substr(0,dspos);
-				if (skrypty->find(obid)==skrypty->end())
-					skrypty->insert(std::pair<int, std::map<std::string, CObjectScript*> >(obid,std::map<std::string,CObjectScript*>()));
-				(*skrypty)[obid].insert(std::pair<std::string, CObjectScript*>(fname,objs));
-			}
-			delete temp;
-		}HANDLE_EXCEPTION
-	}
-	/****************************INITIALIZING OBJECT SCRIPTS************************************************/
-	std::string temps("newObject");
-	for (int i=0; i<map->objects.size(); i++)
-	{
-		//c++ scripts
-		if (scripts.find(map->objects[i]->ID) != scripts.end())
-		{
-			map->objects[i]->state = scripts[map->objects[i]->ID];
-			map->objects[i]->state->newObject(map->objects[i]);
-		}
-		else 
-		{
-			map->objects[i]->state = NULL;
-		}
+	///****************************LUA OBJECT SCRIPTS************************************************/
+	//std::vector<std::string> * lf = CLuaHandler::searchForScripts("scripts/lua/objects"); //files
+	//for (int i=0; i<lf->size(); i++)
+	//{
+	//	try
+	//	{
+	//		std::vector<std::string> * temp =  CLuaHandler::functionList((*lf)[i]);
+	//		CLuaObjectScript * objs = new CLuaObjectScript((*lf)[i]);
+	//		CLuaCallback::registerFuncs(objs->is);
+	//		//objs
+	//		for (int j=0; j<temp->size(); j++)
+	//		{
+	//			int obid ; //obj ID
+	//			int dspos = (*temp)[j].find_first_of('_');
+	//			obid = atoi((*temp)[j].substr(dspos+1,(*temp)[j].size()-dspos-1).c_str());
+	//			std::string fname = (*temp)[j].substr(0,dspos);
+	//			if (skrypty->find(obid)==skrypty->end())
+	//				skrypty->insert(std::pair<int, std::map<std::string, CObjectScript*> >(obid,std::map<std::string,CObjectScript*>()));
+	//			(*skrypty)[obid].insert(std::pair<std::string, CObjectScript*>(fname,objs));
+	//		}
+	//		delete temp;
+	//	}HANDLE_EXCEPTION
+	//}
+	///****************************INITIALIZING OBJECT SCRIPTS************************************************/
+	//std::string temps("newObject");
+	//for (int i=0; i<map->objects.size(); i++)
+	//{
+	//	//c++ scripts
+	//	if (scripts.find(map->objects[i]->ID) != scripts.end())
+	//	{
+	//		map->objects[i]->state = scripts[map->objects[i]->ID];
+	//		map->objects[i]->state->newObject(map->objects[i]);
+	//	}
+	//	else 
+	//	{
+	//		map->objects[i]->state = NULL;
+	//	}
 
 
-		// lua scripts
-		if(checkFunc(map->objects[i]->ID,temps))
-			(*skrypty)[map->objects[i]->ID][temps]->newObject(map->objects[i]);
-	}
+	//	// lua scripts
+	//	if(checkFunc(map->objects[i]->ID,temps))
+	//		(*skrypty)[map->objects[i]->ID][temps]->newObject(map->objects[i]);
+	//}
 
 
-	delete lf;
+	//delete lf;
 }
 }
 void CGameState::battle(CCreatureSet * army1, CCreatureSet * army2, int3 tile, CArmedInstance *hero1, CArmedInstance *hero2)
 void CGameState::battle(CCreatureSet * army1, CCreatureSet * army2, int3 tile, CArmedInstance *hero1, CArmedInstance *hero2)
 {/*
 {/*

+ 5 - 5
CHeroWindow.cpp

@@ -2,18 +2,18 @@
 #include "global.h"
 #include "global.h"
 #include "CHeroWindow.h"
 #include "CHeroWindow.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CHeroHandler.h"
-#include "hch\CGeneralTextHandler.h"
+#include "hch/CHeroHandler.h"
+#include "hch/CGeneralTextHandler.h"
 #include "SDL.h"
 #include "SDL.h"
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
 #include "CAdvmapInterface.h"
 #include "CAdvmapInterface.h"
-#include "hch\CLodHandler.h"
+#include "hch/CLodHandler.h"
 #include "AdventureMapButton.h"
 #include "AdventureMapButton.h"
-#include "hch\CObjectHandler.h"
+#include "hch/CObjectHandler.h"
 #include "CMessage.h"
 #include "CMessage.h"
 #include "CCallback.h"
 #include "CCallback.h"
 #include "hch/CArtHandler.h"
 #include "hch/CArtHandler.h"
-#include "hch\CAbilityHandler.h"
+#include "hch/CAbilityHandler.h"
 #include <sstream>
 #include <sstream>
 #include "client/Graphics.h"
 #include "client/Graphics.h"
 extern SDL_Surface * screen;
 extern SDL_Surface * screen;

+ 21 - 18
CMT.cpp

@@ -3,9 +3,9 @@
 #include "stdafx.h"
 #include "stdafx.h"
 #include "SDL.h"
 #include "SDL.h"
 #include "SDL_TTF.h"
 #include "SDL_TTF.h"
-#include "hch\CVideoHandler.h"
+#include "hch/CVideoHandler.h"
 #include "SDL_mixer.h"
 #include "SDL_mixer.h"
-#include "hch\CBuildingHandler.h"
+#include "hch/CBuildingHandler.h"
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
 #include "SDL_framerate.h"
 #include "SDL_framerate.h"
 #include <cmath>
 #include <cmath>
@@ -13,24 +13,24 @@
 #include <vector>
 #include <vector>
 #include "zlib.h"
 #include "zlib.h"
 #include <cmath>
 #include <cmath>
-#include "hch\CArtHandler.h"
-#include "hch\CHeroHandler.h"
-#include "hch\CCreatureHandler.h"
-#include "hch\CAbilityHandler.h"
-#include "hch\CSpellHandler.h"
-#include "hch\CBuildingHandler.h"
-#include "hch\CObjectHandler.h"
+#include "hch/CArtHandler.h"
+#include "hch/CHeroHandler.h"
+#include "hch/CCreatureHandler.h"
+#include "hch/CAbilityHandler.h"
+#include "hch/CSpellHandler.h"
+#include "hch/CBuildingHandler.h"
+#include "hch/CObjectHandler.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CMusicHandler.h"
-#include "hch\CLodHandler.h"
-#include "hch\CDefHandler.h"
-#include "hch\CTownHandler.h"
-#include "hch\CDefObjInfoHandler.h"
-#include "hch\CAmbarCendamo.h"
+#include "hch/CMusicHandler.h"
+#include "hch/CLodHandler.h"
+#include "hch/CDefHandler.h"
+#include "hch/CTownHandler.h"
+#include "hch/CDefObjInfoHandler.h"
+#include "hch/CAmbarCendamo.h"
 #include "mapHandler.h"
 #include "mapHandler.h"
 #include "global.h"
 #include "global.h"
 #include "CPreGame.h"
 #include "CPreGame.h"
-#include "hch\CGeneralTextHandler.h"
+#include "hch/CGeneralTextHandler.h"
 #include "CConsoleHandler.h"
 #include "CConsoleHandler.h"
 #include "CCursorHandler.h"
 #include "CCursorHandler.h"
 #include "CScreenHandler.h"
 #include "CScreenHandler.h"
@@ -41,8 +41,9 @@
 #include "CLuaHandler.h"
 #include "CLuaHandler.h"
 #include "CLua.h"
 #include "CLua.h"
 #include "CAdvmapInterface.h"
 #include "CAdvmapInterface.h"
-#include "client\Graphics.h"
+#include "client/Graphics.h"
 #include <boost/asio.hpp>
 #include <boost/asio.hpp>
+#include <boost/thread.hpp>
 std::string NAME = NAME_VER + std::string(" (client)");
 std::string NAME = NAME_VER + std::string(" (client)");
 DLL_EXPORT void initDLL(CLodHandler *b);
 DLL_EXPORT void initDLL(CLodHandler *b);
 using boost::asio::ip::tcp;
 using boost::asio::ip::tcp;
@@ -59,7 +60,9 @@ void handleCPPObjS(std::map<int,CCPPObjectScript*> * mapa, CCPPObjectScript * sc
 	CGI->state->cppscripts.insert(script);
 	CGI->state->cppscripts.insert(script);
 }
 }
 int _tmain(int argc, _TCHAR* argv[])
 int _tmain(int argc, _TCHAR* argv[])
-{ /*
+{ 
+	boost::thread servthr(boost::bind(system,"Debug\\VCMI_server.exe"));
+	/*
     boost::asio::io_service io_service;
     boost::asio::io_service io_service;
     boost::system::error_code error = boost::asio::error::host_not_found;
     boost::system::error_code error = boost::asio::error::host_not_found;
 	tcp::socket socket(io_service);
 	tcp::socket socket(io_service);

+ 3 - 3
CMessage.cpp

@@ -1,14 +1,14 @@
 #include "stdafx.h"
 #include "stdafx.h"
 #include "CMessage.h"
 #include "CMessage.h"
 #include "SDL_TTF.h"
 #include "SDL_TTF.h"
-#include "hch\CDefHandler.h"
+#include "hch/CDefHandler.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
-#include "hch\CLodHandler.h"
+#include "hch/CLodHandler.h"
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include "CPlayerInterface.h"
 #include "CPlayerInterface.h"
-#include "hch\CDefHandler.h"
+#include "hch/CDefHandler.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
 #include <sstream>
 #include <sstream>

+ 1 - 1
CPathfinder.cpp

@@ -2,7 +2,7 @@
 #include "global.h"
 #include "global.h"
 #include "CPathfinder.h"
 #include "CPathfinder.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CAmbarCendamo.h"
+#include "hch/CAmbarCendamo.h"
 #include "mapHandler.h"
 #include "mapHandler.h"
 #include "CGameState.h"
 #include "CGameState.h"
 
 

+ 1 - 1
CPlayerInterface.cpp

@@ -22,7 +22,7 @@
 #include "timeHandler.h"
 #include "timeHandler.h"
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/algorithm/string/replace.hpp>
-#include "hch\CPreGameTextHandler.h"
+#include "hch/CPreGameTextHandler.h"
 #include "CBattleInterface.h"
 #include "CBattleInterface.h"
 #include "CLua.h"
 #include "CLua.h"
 #include <cmath>
 #include <cmath>

BIN
CPreGame.cpp


+ 2 - 2
CPreGame.h

@@ -4,10 +4,10 @@
 #include <set>
 #include <set>
 #include "SDL.h"
 #include "SDL.h"
 #include "StartInfo.h"
 #include "StartInfo.h"
-#include "hch\CPreGameTextHandler.h" 
+#include "hch/CPreGameTextHandler.h" 
 #include "CMessage.h"
 #include "CMessage.h"
 #include "map.h"
 #include "map.h"
-#include "hch\CMusicHandler.h"
+#include "hch/CMusicHandler.h"
 class CPreGame;
 class CPreGame;
 extern CPreGame * CPG;
 extern CPreGame * CPG;
 
 

+ 1 - 1
CScreenHandler.cpp

@@ -6,7 +6,7 @@
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
 #include "CCursorHandler.h"
 #include "CCursorHandler.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CDefHandler.h"
+#include "hch/CDefHandler.h"
 
 
 extern SDL_Surface * screen, * screen2;
 extern SDL_Surface * screen, * screen2;
 
 

+ 1 - 1
SDL_Extensions.cpp

@@ -7,7 +7,7 @@
 #include <algorithm>
 #include <algorithm>
 #include "CMessage.h"
 #include "CMessage.h"
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string.hpp>
-#include "hch\CDefHandler.h"
+#include "hch/CDefHandler.h"
 #include <map>
 #include <map>
 #include "client\Graphics.h"
 #include "client\Graphics.h"
 
 

+ 0 - 4
client/VCMI_client.vcproj

@@ -603,10 +603,6 @@
 				RelativePath="..\CHeroWindow.h"
 				RelativePath="..\CHeroWindow.h"
 				>
 				>
 			</File>
 			</File>
-			<File
-				RelativePath="..\CLua.h"
-				>
-			</File>
 			<File
 			<File
 				RelativePath="..\CLuaHandler.h"
 				RelativePath="..\CLuaHandler.h"
 				>
 				>

+ 4 - 4
mapHandler.cpp

@@ -3,13 +3,13 @@
 #include "SDL_Extensions.h"
 #include "SDL_Extensions.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
 #include <cstdlib>
 #include <cstdlib>
-#include "hch\CLodHandler.h"
-#include "hch\CDefObjInfoHandler.h"
+#include "hch/CLodHandler.h"
+#include "hch/CDefObjInfoHandler.h"
 #include <algorithm>
 #include <algorithm>
 #include "CGameState.h"
 #include "CGameState.h"
 #include "CLua.h"
 #include "CLua.h"
-#include "hch\CHeroHandler.h"
-#include "hch\CTownHandler.h"
+#include "hch/CHeroHandler.h"
+#include "hch/CTownHandler.h"
 #include "client\Graphics.h"
 #include "client\Graphics.h"
 #include <iomanip>
 #include <iomanip>
 #include <sstream>
 #include <sstream>

+ 3 - 3
mapHandler.h

@@ -1,11 +1,11 @@
 #ifndef MAPHANDLER_H
 #ifndef MAPHANDLER_H
 #define MAPHANDLER_H
 #define MAPHANDLER_H
 
 
-#include "hch\CAmbarCendamo.h"
+#include "hch/CAmbarCendamo.h"
 #include "CGameInfo.h"
 #include "CGameInfo.h"
-#include "hch\CDefHandler.h"
+#include "hch/CDefHandler.h"
 #include <boost/logic/tribool.hpp>
 #include <boost/logic/tribool.hpp>
-#include "hch\CObjectHandler.h"
+#include "hch/CObjectHandler.h"
 #include <list>
 #include <list>
 const int Woff = 12; //width of map's frame
 const int Woff = 12; //width of map's frame
 const int Hoff = 8; 
 const int Hoff = 8; 

+ 9 - 0
server/CGameHandler.cpp

@@ -0,0 +1,9 @@
+#include "CGameHandler.h"
+
+CGameHandler::CGameHandler(void)
+{
+}
+
+CGameHandler::~CGameHandler(void)
+{
+}

+ 8 - 0
server/CGameHandler.h

@@ -0,0 +1,8 @@
+#pragma once
+
+class CGameHandler
+{
+public:
+	CGameHandler(void);
+	~CGameHandler(void);
+};

+ 192 - 0
server/VCMI_server.vcproj

@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="windows-1250"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="VCMI_server"
+	ProjectGUID="{8AF697C3-465E-4910-B31B-576A9ECDB309}"
+	RootNamespace="VCMI_server"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				GenerateDebugInformation="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				GenerateDebugInformation="true"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\CGameHandler.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\server_main.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath=".\CGameHandler.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

+ 81 - 0
server/server_main.cpp

@@ -0,0 +1,81 @@
+#include <iostream>
+#include <string>
+#include <boost/bind.hpp>
+#include <boost/asio.hpp>
+#include "../global.h"
+std::string NAME = NAME_VER + std::string(" (server)");
+//using boost::asio::ip::tcp;
+//using namespace boost;
+//using namespace boost::asio;
+//
+//class CConnection
+//{
+//public:
+//	int ID;
+//	tcp::socket socket;
+//	void witaj()
+//	{
+//		char message[50]; strcpy_s(message,50,NAME.c_str());message[NAME.size()]='\n';
+//		write(socket,buffer("Aiya!\n"));
+//		write(socket,buffer(message,NAME.size()+1));
+//	}
+//	CConnection(io_service& io_service, int id=-1)
+//		: socket(io_service), ID(id)
+//	{
+//	}
+//};
+//
+//class CVCMIServer
+//{
+//	tcp::acceptor acceptor;
+//	std::vector<CConnection*> connections;
+//public:
+//	CVCMIServer(io_service& io_service)
+//    : acceptor(io_service, tcp::endpoint(tcp::v4(), 3030))
+//	{
+//		start_accept();
+//	}
+//
+//private:
+//	void start_accept()
+//	{
+//		std::cout<<"Listening for connections at port " << acceptor.local_endpoint().port() << std::endl;
+//		CConnection * new_connection = new CConnection(acceptor.io_service());
+//		acceptor.accept(new_connection->socket);
+//		new_connection->witaj();
+//		acceptor.async_accept(new_connection->socket,
+//			boost::bind(&CVCMIServer::gotConnection, this, new_connection,
+//			placeholders::error));
+//	}
+//
+//	void gotConnection(CConnection * connection,const system::error_code& error)
+//	{
+//		if (!error)
+//		{
+//			std::cout<<"Got connection!" << std::endl;
+//			connection->witaj();
+//			start_accept();
+//		}
+//		else
+//		{
+//			std::cout<<"Got connection but there is an error " << std::endl;
+//		}
+//	}
+//
+//};
+//
+int main()
+{
+//  try
+//  {
+//    io_service io_service;
+//    CVCMIServer server(io_service);
+//    io_service.run();
+//  }
+//  catch (std::exception& e)
+//  {
+//    std::cerr << e.what() << std::endl;
+//  }
+//
+  return 0;
+}