Index: source/tests/shared_lib/xml/xml_parser_test.cpp
===================================================================
--- source/tests/shared_lib/xml/xml_parser_test.cpp	(Revision 4866)
+++ source/tests/shared_lib/xml/xml_parser_test.cpp	(Revision 4867)
@@ -232,13 +232,13 @@
 
 	void test_invalid_xml_engine_lowerbound() {
 		xml_engine_parser_type testType = static_cast<xml_engine_parser_type>(XML_XERCES_ENGINE - 1);
-		if(testType == XML_XERCES_ENGINE - 1) {
+		if((int)testType == (int)(XML_XERCES_ENGINE - 1)) {
 			XmlTree xml(testType);
 		}
 	}
 	void test_invalid_xml_engine_upperbound() {
 		xml_engine_parser_type testType = static_cast<xml_engine_parser_type>(XML_RAPIDXML_ENGINE + 1);
-		if(testType == XML_RAPIDXML_ENGINE + 1) {
+		if((int)testType == (int)(XML_RAPIDXML_ENGINE + 1)) {
 			XmlTree xml(testType);
 		}
 	}
Index: source/glest_game/global/core_data.h
===================================================================
--- source/glest_game/global/core_data.h	(Revision 4866)
+++ source/glest_game/global/core_data.h	(Revision 4867)
@@ -26,12 +26,12 @@
 
 namespace Glest{ namespace Game{
 
-using Shared::Graphics::Texture2D;
-using Shared::Graphics::Texture3D;
-using Shared::Graphics::Font2D;
-using Shared::Graphics::Font3D;
-using Shared::Sound::StrSound;
-using Shared::Sound::StaticSound;
+using ::Shared::Graphics::Texture2D;
+using ::Shared::Graphics::Texture3D;
+using ::Shared::Graphics::Font2D;
+using ::Shared::Graphics::Font3D;
+using ::Shared::Sound::StrSound;
+using ::Shared::Sound::StaticSound;
 
 // =====================================================
 // 	class CoreData  
@@ -47,7 +47,7 @@
     StrSound menuMusic;
 	StaticSound clickSoundA;
     StaticSound clickSoundB;
-    StaticSound clickSoundC;    
+    StaticSound clickSoundC;
     StaticSound attentionSound;
     StaticSound highlightSound;
     StaticSound markerSound;
Index: source/glest_game/graphics/renderer.cpp
===================================================================
--- source/glest_game/graphics/renderer.cpp	(Revision 4866)
+++ source/glest_game/graphics/renderer.cpp	(Revision 4867)
@@ -941,7 +941,7 @@
 	return fontManager[rs]->newFont3D();
 }
 
-void Renderer::endFont(Shared::Graphics::Font *font, ResourceScope rs, bool mustExistInList) {
+void Renderer::endFont(::Shared::Graphics::Font *font, ResourceScope rs, bool mustExistInList) {
 	if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
 		return;
 	}
@@ -2576,7 +2576,7 @@
 			for(int i = 0; i < useWidth; ++i) {
 				temp += DEFAULT_CHAR_FOR_WIDTH_CALC;
 			}
-			float lineWidth = (font->getTextHandler()->Advance(temp.c_str()) * Shared::Graphics::Font::scaleFontValue);
+			float lineWidth = (font->getTextHandler()->Advance(temp.c_str()) * ::Shared::Graphics::Font::scaleFontValue);
 			useWidth = (int)lineWidth;
 
 			maxEditWidth = useWidth;
@@ -2642,7 +2642,7 @@
 			throw megaglest_runtime_error("font->getTextHandler() == NULL (5)");
 		}
 
-		float lineWidth = (font->getTextHandler()->Advance(text.c_str()) * Shared::Graphics::Font::scaleFontValue);
+		float lineWidth = (font->getTextHandler()->Advance(text.c_str()) * ::Shared::Graphics::Font::scaleFontValue);
 		if(lineWidth < w) {
 			pos.x += ((w / 2.f) - (lineWidth / 2.f));
 		}
@@ -2658,7 +2658,7 @@
 
 		//const Metrics &metrics= Metrics::getInstance();
 		//float lineHeight = (font->getTextHandler()->LineHeight(text.c_str()) * Font::scaleFontValue);
-		float lineHeight = (font->getTextHandler()->LineHeight(text.c_str()) * Shared::Graphics::Font::scaleFontValue);
+		float lineHeight = (font->getTextHandler()->LineHeight(text.c_str()) * ::Shared::Graphics::Font::scaleFontValue);
 		//lineHeight=metrics.toVirtualY(lineHeight);
 		//lineHeight= lineHeight / (2.f + 0.2f * FontMetrics::DEFAULT_Y_OFFSET_FACTOR);
 		//pos.y += (h / 2.f) - (lineHeight / 2.f);
@@ -2671,7 +2671,7 @@
 			//if(Font::forceFTGLFonts == true) {
 				// First go to top of bounding box
 				pos.y += (h - lineHeight);
-				pos.y -= ((h - lineHeight) / Shared::Graphics::Font::scaleFontValueCenterHFactor);
+				pos.y -= ((h - lineHeight) / ::Shared::Graphics::Font::scaleFontValueCenterHFactor);
 //			}
 //			else {
 //				pos.y += (float)(((float)h) / 2.0);
@@ -2718,7 +2718,7 @@
 			for(int i = 0; i < useWidth; ++i) {
 				temp += DEFAULT_CHAR_FOR_WIDTH_CALC;
 			}
-			float lineWidth = (font->getTextHandler()->Advance(temp.c_str()) * Shared::Graphics::Font::scaleFontValue);
+			float lineWidth = (font->getTextHandler()->Advance(temp.c_str()) * ::Shared::Graphics::Font::scaleFontValue);
 			useWidth = (int)lineWidth;
 
 			maxEditWidth = useWidth;
@@ -2794,7 +2794,7 @@
 			for(int i = 0; i < useWidth; ++i) {
 				temp += DEFAULT_CHAR_FOR_WIDTH_CALC;
 			}
-			float lineWidth = (font->getTextHandler()->Advance(temp.c_str()) * Shared::Graphics::Font::scaleFontValue);
+			float lineWidth = (font->getTextHandler()->Advance(temp.c_str()) * ::Shared::Graphics::Font::scaleFontValue);
 			useWidth = (int)lineWidth;
 
 			maxEditWidth = useWidth;
@@ -9259,7 +9259,7 @@
 	uint64 result = 0;
 	for(int i = (rs == rsCount ? 0 : rs); i < rsCount; ++i) {
 		if(textureManager[i] != NULL) {
-			const Shared::Graphics::TextureContainer &textures = textureManager[i]->getTextures();
+			const ::Shared::Graphics::TextureContainer &textures = textureManager[i]->getTextures();
 			for(int j = 0; j < (int)textures.size(); ++j) {
 				const Texture *texture = textures[j];
 				result += texture->getPixelByteCount();
Index: source/glest_game/graphics/renderer.h
===================================================================
--- source/glest_game/graphics/renderer.h	(Revision 4866)
+++ source/glest_game/graphics/renderer.h	(Revision 4867)
@@ -55,8 +55,8 @@
 
 namespace Glest{ namespace Game{
 
-using namespace Shared::Graphics;
-using namespace Shared::PlatformCommon;
+using namespace ::Shared::Graphics;
+using namespace ::Shared::PlatformCommon;
 
 //non shared classes
 class Config;
@@ -466,7 +466,7 @@
 	Texture3D *newTexture3D(ResourceScope rs);
 	Font2D *newFont(ResourceScope rs);
 	Font3D *newFont3D(ResourceScope rs);
-	void endFont(Shared::Graphics::Font *font, ResourceScope rs, bool mustExistInList=false);
+	void endFont(::Shared::Graphics::Font *font, ResourceScope rs, bool mustExistInList=false);
 	void resetFontManager(ResourceScope rs);
 
 	inline TextRenderer2D *getTextRenderer() const	{return textRenderer;}
Index: source/glest_game/main/battle_end.cpp
===================================================================
--- source/glest_game/main/battle_end.cpp	(Revision 4866)
+++ source/glest_game/main/battle_end.cpp	(Revision 4867)
@@ -288,7 +288,7 @@
 
 void BattleEnd::initBackgroundVideo() {
 	if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-		Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+		::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 
 		if(menuBackgroundVideo != NULL) {
 			menuBackgroundVideo->closePlayer();
Index: source/glest_game/main/main.cpp
===================================================================
--- source/glest_game/main/main.cpp	(Revision 4866)
+++ source/glest_game/main/main.cpp	(Revision 4867)
@@ -662,7 +662,7 @@
 
 				if(glActiveTexture != NULL) {
 					for(;GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false && mainProgram->isMessageShowing();) {
-						Shared::Platform::Window::handleEvent();
+						::Shared::Platform::Window::handleEvent();
 						try {
 							mainProgram->loop();
 						}
@@ -682,7 +682,7 @@
 
 				if(glActiveTexture != NULL) {
 					for(;GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false && mainProgram->isMessageShowing();) {
-						Shared::Platform::Window::handleEvent();
+						::Shared::Platform::Window::handleEvent();
 						try {
 							mainProgram->loop();
 						}
@@ -4022,7 +4022,7 @@
 	if( haveSpecialOutputCommandLineOption == false ||
 		hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VERSION]) == true) {
 		printf("%s %s",extractFileFromDirectoryPath(argv[0]).c_str(),getNetworkPlatformFreeVersionString().c_str());
-		printf("\nCompiled using: %s on: %s platform: %s endianness: %s",getCompilerNameString().c_str(),getCompileDateTime().c_str(),getPlatformNameString().c_str(),(Shared::PlatformByteOrder::isBigEndian() == true ? "big" : "little"));
+		printf("\nCompiled using: %s on: %s platform: %s endianness: %s",getCompilerNameString().c_str(),getCompileDateTime().c_str(),getPlatformNameString().c_str(),(::Shared::PlatformByteOrder::isBigEndian() == true ? "big" : "little"));
 
 //		printf("\n\nData type sizes int8 = " MG_SIZE_T_SPECIFIER " int16 = " MG_SIZE_T_SPECIFIER " int32 = " MG_SIZE_T_SPECIFIER " int64 = " MG_SIZE_T_SPECIFIER "\n\n",sizeof(int8),sizeof(int16),sizeof(int32),sizeof(int64));
 //
@@ -4089,9 +4089,9 @@
 		if(SystemFlags::VERBOSE_MODE_ENABLED == true) {
 			int8 testVar = 111;
 			printf("\nEndian value = %d",testVar);
-			testVar = Shared::PlatformByteOrder::toCommonEndian(testVar);
+			testVar = ::Shared::PlatformByteOrder::toCommonEndian(testVar);
 			printf("\nEndian to common value = %d",testVar);
-			testVar = Shared::PlatformByteOrder::fromCommonEndian(testVar);
+			testVar = ::Shared::PlatformByteOrder::fromCommonEndian(testVar);
 			printf("\nEndian from common value = %d",testVar);
 
 			printf("\nint8 sizeof = " MG_SIZE_T_SPECIFIER "",sizeof(int8));
@@ -4421,7 +4421,7 @@
 	    }
 
         if(config.getBool("ForceFTGLFonts","false") == true || hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_FORCE_FTGLFONTS]) == true) {
-        	Shared::Graphics::Font::forceFTGLFonts = true;
+        	::Shared::Graphics::Font::forceFTGLFonts = true;
         	printf("**WARNING** Forcing use of FTGL Fonts\n");
         }
         else {
@@ -4429,7 +4429,7 @@
         }
 
         if(config.getBool("EnableLegacyFonts","false") == true || hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_ENABLE_LEGACYFONTS]) == true) {
-        	Shared::Graphics::Font::forceLegacyFonts = true;
+        	::Shared::Graphics::Font::forceLegacyFonts = true;
         	Renderer::renderText3DEnabled = false;
         	printf("**WARNING** Forcing Legacy Fonts Enabled\n");
         }
@@ -4574,20 +4574,20 @@
 
 		// 256 for English
 		// 30000 for Chinese
-		Shared::Graphics::Font::charCount    		= config.getInt("FONT_CHARCOUNT",intToStr(Shared::Graphics::Font::charCount).c_str());
-		Shared::Graphics::Font::fontTypeName 		= config.getString("FONT_TYPENAME",Shared::Graphics::Font::fontTypeName.c_str());
-		Shared::Graphics::Font::fontIsMultibyte 	= config.getBool("FONT_MULTIBYTE",intToStr(Shared::Graphics::Font::fontIsMultibyte).c_str());
-		Shared::Graphics::Font::fontIsRightToLeft	= config.getBool("FONT_RIGHTTOLEFT",intToStr(Shared::Graphics::Font::fontIsRightToLeft).c_str());
-		Shared::Graphics::Font::baseSize			= config.getInt("FONT_BASE_SIZE",intToStr(Shared::Graphics::Font::baseSize).c_str());
-		Shared::Graphics::Font::scaleFontValue				= config.getFloat("FONT_SCALE_SIZE",floatToStr(Shared::Graphics::Font::scaleFontValue).c_str());
-		Shared::Graphics::Font::scaleFontValueCenterHFactor	= config.getFloat("FONT_SCALE_CENTERH_FACTOR",floatToStr(Shared::Graphics::Font::scaleFontValueCenterHFactor).c_str());
-		Shared::Graphics::Font::langHeightText				= config.getString("FONT_HEIGHT_TEXT",Shared::Graphics::Font::langHeightText.c_str());
-		Shared::Graphics::Font::fontSupportMixedRightToLeft = config.getBool("FONT_RIGHTTOLEFT_MIXED_SUPPORT",intToStr(Shared::Graphics::Font::fontSupportMixedRightToLeft).c_str());
+		::Shared::Graphics::Font::charCount    		= config.getInt("FONT_CHARCOUNT",intToStr(::Shared::Graphics::Font::charCount).c_str());
+		::Shared::Graphics::Font::fontTypeName 		= config.getString("FONT_TYPENAME",::Shared::Graphics::Font::fontTypeName.c_str());
+		::Shared::Graphics::Font::fontIsMultibyte 	= config.getBool("FONT_MULTIBYTE",intToStr(::Shared::Graphics::Font::fontIsMultibyte).c_str());
+		::Shared::Graphics::Font::fontIsRightToLeft	= config.getBool("FONT_RIGHTTOLEFT",intToStr(::Shared::Graphics::Font::fontIsRightToLeft).c_str());
+		::Shared::Graphics::Font::baseSize			= config.getInt("FONT_BASE_SIZE",intToStr(::Shared::Graphics::Font::baseSize).c_str());
+		::Shared::Graphics::Font::scaleFontValue				= config.getFloat("FONT_SCALE_SIZE",floatToStr(::Shared::Graphics::Font::scaleFontValue).c_str());
+		::Shared::Graphics::Font::scaleFontValueCenterHFactor	= config.getFloat("FONT_SCALE_CENTERH_FACTOR",floatToStr(::Shared::Graphics::Font::scaleFontValueCenterHFactor).c_str());
+		::Shared::Graphics::Font::langHeightText				= config.getString("FONT_HEIGHT_TEXT",::Shared::Graphics::Font::langHeightText.c_str());
+		::Shared::Graphics::Font::fontSupportMixedRightToLeft = config.getBool("FONT_RIGHTTOLEFT_MIXED_SUPPORT",intToStr(::Shared::Graphics::Font::fontSupportMixedRightToLeft).c_str());
 
 		// Example values:
 		// DEFAULT_CHARSET (English) = 1
 		// GB2312_CHARSET (Chinese)  = 134
-		Shared::Platform::PlatformContextGl::charSet = config.getInt("FONT_CHARSET",intToStr(Shared::Platform::PlatformContextGl::charSet).c_str());
+		::Shared::Platform::PlatformContextGl::charSet = config.getInt("FONT_CHARSET",intToStr(::Shared::Platform::PlatformContextGl::charSet).c_str());
 		if(config.getBool("No2DMouseRendering","false") == false) {
 			showCursor(false);
 		}
@@ -4595,8 +4595,8 @@
 			SystemFlags::DEFAULT_HTTP_TIMEOUT = config.getInt("DEFAULT_HTTP_TIMEOUT",intToStr(SystemFlags::DEFAULT_HTTP_TIMEOUT).c_str());
 		}
 
-		bool allowAltEnterFullscreenToggle = config.getBool("AllowAltEnterFullscreenToggle",boolToStr(Shared::Platform::Window::getAllowAltEnterFullscreenToggle()).c_str());
-		Shared::Platform::Window::setAllowAltEnterFullscreenToggle(allowAltEnterFullscreenToggle);
+		bool allowAltEnterFullscreenToggle = config.getBool("AllowAltEnterFullscreenToggle",boolToStr(::Shared::Platform::Window::getAllowAltEnterFullscreenToggle()).c_str());
+		::Shared::Platform::Window::setAllowAltEnterFullscreenToggle(allowAltEnterFullscreenToggle);
 
 		if(config.getBool("noTeamColors","false") == true) {
 			MeshCallbackTeamColor::noTeamColors = true;
@@ -4605,7 +4605,7 @@
         // Setup debug logging etc
 		setupLogging(config, haveSpecialOutputCommandLineOption);
 
-        SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::PlatformContextGl::charSet = %d, Font::fontIsMultibyte = %d, fontIsRightToLeft = %d\n",__FILE__,__FUNCTION__,__LINE__,Shared::Graphics::Font::charCount,Shared::Graphics::Font::fontTypeName.c_str(),Shared::Platform::PlatformContextGl::charSet,Shared::Graphics::Font::fontIsMultibyte, Shared::Graphics::Font::fontIsRightToLeft);
+        SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::PlatformContextGl::charSet = %d, Font::fontIsMultibyte = %d, fontIsRightToLeft = %d\n",__FILE__,__FUNCTION__,__LINE__,::Shared::Graphics::Font::charCount,::Shared::Graphics::Font::fontTypeName.c_str(),::Shared::Platform::PlatformContextGl::charSet,::Shared::Graphics::Font::fontIsMultibyte, ::Shared::Graphics::Font::fontIsRightToLeft);
 
 		NetworkInterface::setDisplayMessageFunction(ExceptionHandler::DisplayMessage);
 		MenuStateMasterserver::setDisplayMessageFunction(ExceptionHandler::DisplayMessage);
@@ -4640,7 +4640,7 @@
         }
 
         if(config.getBool("EnableVSynch","false") == true) {
-        	Shared::Platform::Window::setTryVSynch(true);
+        	::Shared::Platform::Window::setTryVSynch(true);
         	if(SystemFlags::VERBOSE_MODE_ENABLED) printf("**ENABLED OPENGL VSYNCH**\n");
         }
 
@@ -4749,7 +4749,7 @@
         lang.loadGameStrings(language,false, true);
 
         if(	lang.hasString("FONT_HEIGHT_TEXT")) {
-        	Shared::Graphics::Font::langHeightText = config.getString("FONT_HEIGHT_TEXT",Shared::Graphics::Font::langHeightText.c_str());
+        	::Shared::Graphics::Font::langHeightText = config.getString("FONT_HEIGHT_TEXT",::Shared::Graphics::Font::langHeightText.c_str());
         }
 
     	if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_FONT_BASESIZE]) == true) {
@@ -4765,7 +4765,7 @@
 				string newfontBaseSize = paramPartTokens[1];
 				printf("Forcing font base size[%s]\n",newfontBaseSize.c_str());
 
-				Shared::Graphics::Font::baseSize = strToInt(newfontBaseSize);
+				::Shared::Graphics::Font::baseSize = strToInt(newfontBaseSize);
 			}
 	        else {
 	            printf("\nInvalid missing font base size specified on commandline [%s] value [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
@@ -4774,8 +4774,8 @@
 	        }
     	}
 
-        SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::PlatformContextGl::charSet = %d, Font::fontIsMultibyte = %d, Font::fontIsRightToLeft = %d\n",__FILE__,__FUNCTION__,__LINE__,Shared::Graphics::Font::charCount,Shared::Graphics::Font::fontTypeName.c_str(),Shared::Platform::PlatformContextGl::charSet,Shared::Graphics::Font::fontIsMultibyte,Shared::Graphics::Font::fontIsRightToLeft);
-        if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::PlatformContextGl::charSet = %d, Font::fontIsMultibyte = %d, Font::fontIsRightToLeft = %d\n",Shared::Graphics::Font::charCount,Shared::Graphics::Font::fontTypeName.c_str(),Shared::Platform::PlatformContextGl::charSet,Shared::Graphics::Font::fontIsMultibyte,Shared::Graphics::Font::fontIsRightToLeft);
+        SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::PlatformContextGl::charSet = %d, Font::fontIsMultibyte = %d, Font::fontIsRightToLeft = %d\n",__FILE__,__FUNCTION__,__LINE__,::Shared::Graphics::Font::charCount,::Shared::Graphics::Font::fontTypeName.c_str(),::Shared::Platform::PlatformContextGl::charSet,::Shared::Graphics::Font::fontIsMultibyte,::Shared::Graphics::Font::fontIsRightToLeft);
+        if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::PlatformContextGl::charSet = %d, Font::fontIsMultibyte = %d, Font::fontIsRightToLeft = %d\n",::Shared::Graphics::Font::charCount,::Shared::Graphics::Font::fontTypeName.c_str(),::Shared::Platform::PlatformContextGl::charSet,::Shared::Graphics::Font::fontIsMultibyte,::Shared::Graphics::Font::fontIsRightToLeft);
 
     	if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_USE_FONT]) == true) {
 			int foundParamIndIndex = -1;
@@ -5146,7 +5146,7 @@
 				}
 
 			    sleep(0);
-			    Shared::Platform::Window::handleEvent();
+			    ::Shared::Platform::Window::handleEvent();
 				SDL_PumpEvents();
 
 				int result = 0;
@@ -5177,7 +5177,7 @@
 				    renderer.swapBuffers();
 
 				    sleep(0);
-				    Shared::Platform::Window::handleEvent();
+				    ::Shared::Platform::Window::handleEvent();
 					SDL_PumpEvents();
 
 					Model *model = renderer.newModel(rsGlobal);
@@ -5322,7 +5322,7 @@
 		//throw 123;
 
 		//main loop
-		while(program->isShutdownApplicationEnabled() == false && Shared::Platform::Window::handleEvent()) {
+		while(program->isShutdownApplicationEnabled() == false && ::Shared::Platform::Window::handleEvent()) {
 			if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
 
 				if(disableheadless_console == false) {
Index: source/glest_game/main/battle_end.h
===================================================================
--- source/glest_game/main/battle_end.h	(Revision 4866)
+++ source/glest_game/main/battle_end.h	(Revision 4867)
@@ -46,7 +46,7 @@
 	ProgramState *originState;
 	const char *containerName;
 
-	Shared::Graphics::VideoPlayer *menuBackgroundVideo;
+	::Shared::Graphics::VideoPlayer *menuBackgroundVideo;
 	GameSettings *gameSettings;
 	StrSound battleEndMusic;
 
Index: source/glest_game/main/intro.cpp
===================================================================
--- source/glest_game/main/intro.cpp	(Revision 4866)
+++ source/glest_game/main/intro.cpp	(Revision 4867)
@@ -96,7 +96,7 @@
 	SoundRenderer &soundRenderer= SoundRenderer::getInstance();
 
 	if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-		(Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == false ||
+		(::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == false ||
 		CoreData::getInstance().hasIntroVideoFilename() == false)) {
 		soundRenderer.playMusic(CoreData::getInstance().getIntroMusic());
 	}
@@ -509,7 +509,7 @@
 	SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
 
 	if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-		Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true &&
+		::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true &&
 		CoreData::getInstance().hasIntroVideoFilename() == true) {
 		string introVideoFile = CoreData::getInstance().getIntroVideoFilename();
 		string introVideoFileFallback = CoreData::getInstance().getIntroVideoFilenameFallback();
@@ -521,7 +521,7 @@
 
 		string vlcPluginsPath = Config::getInstance().getString("VideoPlayerPluginsPath","");
 		//printf("screen->w = %d screen->h = %d screen->format->BitsPerPixel = %d\n",screen->w,screen->h,screen->format->BitsPerPixel);
-		Shared::Graphics::VideoPlayer player(
+		::Shared::Graphics::VideoPlayer player(
 				&Renderer::getInstance(),
 				introVideoFile,
 				introVideoFileFallback,
Index: source/glest_game/menu/main_menu.h
===================================================================
--- source/glest_game/menu/main_menu.h	(Revision 4866)
+++ source/glest_game/menu/main_menu.h	(Revision 4867)
@@ -51,7 +51,7 @@
 	//shared
 	GameSettings gameSettings;
 	MenuBackground menuBackground;
-	Shared::Graphics::VideoPlayer *menuBackgroundVideo;
+	::Shared::Graphics::VideoPlayer *menuBackgroundVideo;
 
 	MenuState *state;
 
Index: source/glest_game/menu/menu_state_connected_game.cpp
===================================================================
--- source/glest_game/menu/menu_state_connected_game.cpp	(Revision 4866)
+++ source/glest_game/menu/menu_state_connected_game.cpp	(Revision 4867)
@@ -1124,8 +1124,8 @@
 
 	string advanceToItemStartingWith = "";
 	if(mainMessageBox.getEnabled() == false) {
-    	if(Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == true) {
-    		wchar_t lastKey = Shared::Platform::Window::extractLastKeyPressed();
+    	if(::Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == true) {
+    		wchar_t lastKey = ::Shared::Platform::Window::extractLastKeyPressed();
     		//printf("lastKey = %d [%c]\n",lastKey,lastKey);
     		advanceToItemStartingWith = lastKey;
     	}
@@ -2367,7 +2367,7 @@
 			}
 			else {
 				if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-					Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+					::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 					if(factionVideo != NULL) {
 						factionVideo->closePlayer();
 						delete factionVideo;
@@ -3536,7 +3536,7 @@
 			chatManager.keyDown(key);
 		}
 		if(chatManager.getEditEnabled() == false &&
-				(Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == false)) {
+				(::Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == false)) {
 			Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
 
 			if(isKeyPressed(configKeys.getSDLKey("ShowFullConsole"),key) == true) {
@@ -4693,7 +4693,7 @@
 		if(currentFactionLogo != factionVideoUrl) {
 			currentFactionLogo = factionVideoUrl;
 			if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-				Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+				::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 
 				if(factionVideo != NULL) {
 					factionVideo->closePlayer();
Index: source/glest_game/menu/menu_state_custom_game.h
===================================================================
--- source/glest_game/menu/menu_state_custom_game.h	(Revision 4866)
+++ source/glest_game/menu/menu_state_custom_game.h	(Revision 4867)
@@ -187,7 +187,7 @@
 	string currentFactionName_factionPreview;
 	string currentFactionLogo;
 	Texture2D *factionTexture;
-	Shared::Graphics::VideoPlayer *factionVideo;
+	::Shared::Graphics::VideoPlayer *factionVideo;
 	bool factionVideoSwitchedOffVolume;
 
 	MapPreview mapPreview;
Index: source/glest_game/menu/menu_state_options_graphics.cpp
===================================================================
--- source/glest_game/menu/menu_state_options_graphics.cpp	(Revision 4866)
+++ source/glest_game/menu/menu_state_options_graphics.cpp	(Revision 4867)
@@ -47,7 +47,7 @@
 		this->console.setOnlyChatMessagesInStoredLines(false);
 		screenModeChangedTimer= time(NULL); // just init
 		//modeinfos=list<ModeInfo> ();
-		Shared::PlatformCommon::getFullscreenVideoModes(&modeInfos,!config.getBool("Windowed"));
+		::Shared::PlatformCommon::getFullscreenVideoModes(&modeInfos,!config.getBool("Windowed"));
 
 		int leftLabelStart=50;
 		int leftColumnStart=leftLabelStart+280;
Index: source/glest_game/menu/main_menu.cpp
===================================================================
--- source/glest_game/menu/main_menu.cpp	(Revision 4866)
+++ source/glest_game/menu/main_menu.cpp	(Revision 4867)
@@ -113,7 +113,7 @@
 
 void MainMenu::initBackgroundVideo() {
 	if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-		Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true &&
+		::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true &&
 		CoreData::getInstance().hasMainMenuVideoFilename() == true) {
 		string introVideoFile = CoreData::getInstance().getMainMenuVideoFilename();
 		string introVideoFileFallback = CoreData::getInstance().getMainMenuVideoFilenameFallback();
Index: source/glest_game/menu/menu_state_join_game.cpp
===================================================================
--- source/glest_game/menu/menu_state_join_game.cpp	(Revision 4866)
+++ source/glest_game/menu/menu_state_join_game.cpp	(Revision 4867)
@@ -31,7 +31,7 @@
 
 namespace Glest{ namespace Game{
 
-using namespace Shared::Util;
+using namespace ::Shared::Util;
 
 // ===============================
 // 	class MenuStateJoinGame
Index: source/glest_game/menu/menu_state_connected_game.h
===================================================================
--- source/glest_game/menu/menu_state_connected_game.h	(Revision 4866)
+++ source/glest_game/menu/menu_state_connected_game.h	(Revision 4867)
@@ -137,7 +137,7 @@
 	string currentFactionName_factionPreview;
 	string currentFactionLogo;
 	Texture2D *factionTexture;
-	Shared::Graphics::VideoPlayer *factionVideo;
+	::Shared::Graphics::VideoPlayer *factionVideo;
 	bool factionVideoSwitchedOffVolume;
 
 	MapPreview mapPreview;
Index: source/glest_game/menu/menu_state_mods.cpp
===================================================================
--- source/glest_game/menu/menu_state_mods.cpp	(Revision 4866)
+++ source/glest_game/menu/menu_state_mods.cpp	(Revision 4867)
@@ -28,7 +28,7 @@
 
 namespace Glest{ namespace Game{
 
-using namespace Shared::Util;
+using namespace ::Shared::Util;
 
 struct FormatString {
 	void operator()(string &s) {
Index: source/glest_game/menu/menu_state_custom_game.cpp
===================================================================
--- source/glest_game/menu/menu_state_custom_game.cpp	(Revision 4866)
+++ source/glest_game/menu/menu_state_custom_game.cpp	(Revision 4867)
@@ -37,7 +37,7 @@
 
 namespace Glest{ namespace Game{
 
-using namespace Shared::Util;
+using namespace ::Shared::Util;
 
 const int MASTERSERVER_BROADCAST_MAX_WAIT_RESPONSE_SECONDS   	= 15;
 const int MASTERSERVER_BROADCAST_PUBLISH_SECONDS   			= 6;
@@ -1035,8 +1035,8 @@
         }
         else {
         	string advanceToItemStartingWith = "";
-        	if(Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == true) {
-        		const wchar_t lastKey = Shared::Platform::Window::extractLastKeyPressed();
+        	if(::Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == true) {
+        		const wchar_t lastKey = ::Shared::Platform::Window::extractLastKeyPressed();
 //        		xxx:
 //        		string hehe=lastKey;
 //        		printf("lastKey = %d [%c] '%s'\n",lastKey,lastKey,hehe);
@@ -1325,7 +1325,7 @@
 						int slotsToChangeStart = i;
 						int slotsToChangeEnd = i;
 						// If control is pressed while changing player types then change all other slots to same type
-						if(Shared::Platform::Window::isKeyStateModPressed(KMOD_CTRL) == true &&
+						if(::Shared::Platform::Window::isKeyStateModPressed(KMOD_CTRL) == true &&
 								currentControlType != ctHuman) {
 							slotsToChangeStart = 0;
 							slotsToChangeEnd = mapInfo.players-1;
@@ -1956,7 +1956,7 @@
 			}
 			else {
 				if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-					Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+						::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 					if(factionVideo != NULL) {
 						factionVideo->closePlayer();
 						delete factionVideo;
@@ -2867,7 +2867,7 @@
 		if(currentFactionLogo != factionVideoUrl) {
 			currentFactionLogo = factionVideoUrl;
 			if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-				Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+					::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 
 				if(factionVideo != NULL) {
 					factionVideo->closePlayer();
@@ -4246,7 +4246,7 @@
 			chatManager.keyDown(key);
 		}
 		if(chatManager.getEditEnabled() == false &&
-				(Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == false)	) {
+				(::Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == false)	) {
 			Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
 
 			//if(key == configKeys.getCharKey("ShowFullConsole")) {
Index: source/glest_game/menu/menu_state_scenario.cpp
===================================================================
--- source/glest_game/menu/menu_state_scenario.cpp	(Revision 4866)
+++ source/glest_game/menu/menu_state_scenario.cpp	(Revision 4867)
@@ -25,7 +25,7 @@
 
 namespace Glest{ namespace Game{
 
-using namespace	Shared::Xml;
+using namespace	::Shared::Xml;
 
 // =====================================================
 // 	class MenuStateScenario
@@ -221,8 +221,8 @@
 		return;
 	}
     else {
-    	if(Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == true) {
-    		const wchar_t lastKey = Shared::Platform::Window::extractLastKeyPressed();
+    	if(::Shared::Platform::Window::isKeyStateModPressed(KMOD_SHIFT) == true) {
+    		const wchar_t lastKey = ::Shared::Platform::Window::extractLastKeyPressed();
 //        		xxx:
 //        		string hehe=lastKey;
 //        		printf("lastKey = %d [%c] '%s'\n",lastKey,lastKey,hehe);
Index: source/glest_game/world/map.cpp
===================================================================
--- source/glest_game/world/map.cpp	(Revision 4866)
+++ source/glest_game/world/map.cpp	(Revision 4867)
@@ -413,7 +413,7 @@
 					snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
 					throw megaglest_runtime_error(szBuf);
 				}
-				x = Shared::PlatformByteOrder::fromCommonEndian(x);
+				x = ::Shared::PlatformByteOrder::fromCommonEndian(x);
 
 				readBytes = fread(&y, sizeof(int32), 1, f);
 				if(readBytes != 1) {
@@ -421,7 +421,7 @@
 					snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
 					throw megaglest_runtime_error(szBuf);
 				}
-				y = Shared::PlatformByteOrder::fromCommonEndian(y);
+				y = ::Shared::PlatformByteOrder::fromCommonEndian(y);
 
 				startLocations[i]= Vec2i(x, y)*cellScale;
 			}
@@ -440,7 +440,7 @@
 						snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
 						throw megaglest_runtime_error(szBuf);
 					}
-					alt = Shared::PlatformByteOrder::fromCommonEndian(alt);
+					alt = ::Shared::PlatformByteOrder::fromCommonEndian(alt);
 
 					SurfaceCell *sc= getSurfaceCell(i, j);
 					sc->setVertex(Vec3f(i*mapScale, alt / heightFactor, j*mapScale));
@@ -457,7 +457,7 @@
 						snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
 						throw megaglest_runtime_error(szBuf);
 					}
-					surf = Shared::PlatformByteOrder::fromCommonEndian(surf);
+					surf = ::Shared::PlatformByteOrder::fromCommonEndian(surf);
 
 					getSurfaceCell(i, j)->setSurfaceType(surf-1);
 				}
@@ -474,7 +474,7 @@
 						snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
 						throw megaglest_runtime_error(szBuf);
 					}
-					objNumber = Shared::PlatformByteOrder::fromCommonEndian(objNumber);
+					objNumber = ::Shared::PlatformByteOrder::fromCommonEndian(objNumber);
 
 					SurfaceCell *sc= getSurfaceCell(toSurfCoords(Vec2i(i, j)));
 					if(objNumber == 0) {
Index: source/glest_game/world/world.cpp
===================================================================
--- source/glest_game/world/world.cpp	(Revision 4866)
+++ source/glest_game/world/world.cpp	(Revision 4867)
@@ -119,13 +119,13 @@
 
 	if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
 
-	for(std::map<string,StaticSound *>::iterator iterMap = staticSoundList.begin();
+	for(std::map<string,::Shared::Sound::StaticSound *>::iterator iterMap = staticSoundList.begin();
 		iterMap != staticSoundList.end(); ++iterMap) {
 		delete iterMap->second;
 	}
 	staticSoundList.clear();
 
-	for(std::map<string,StrSound *>::iterator iterMap = streamSoundList.begin();
+	for(std::map<string,::Shared::Sound::StrSound *>::iterator iterMap = streamSoundList.begin();
 		iterMap != streamSoundList.end(); ++iterMap) {
 		delete iterMap->second;
 	}
Index: source/glest_game/world/world.h
===================================================================
--- source/glest_game/world/world.h	(Revision 4866)
+++ source/glest_game/world/world.h	(Revision 4867)
@@ -49,8 +49,11 @@
 class Game;
 class GameSettings;
 class ScriptManager;
+
+namespace Shared{ namespace Sound{
 class StaticSound;
 class StrSound;
+}};
 
 // =====================================================
 // 	class World
@@ -116,8 +119,8 @@
 	bool perfTimerEnabled;
 
 	bool unitParticlesEnabled;
-	std::map<string,StaticSound *> staticSoundList;
-	std::map<string,StrSound *> streamSoundList;
+	std::map<string,::Shared::Sound::StaticSound *> staticSoundList;
+	std::map<string,::Shared::Sound::StrSound *> streamSoundList;
 
 	uint32 nextCommandGroupId;
 
Index: source/glest_game/sound/sound_renderer.h
===================================================================
--- source/glest_game/sound/sound_renderer.h	(Revision 4866)
+++ source/glest_game/sound/sound_renderer.h	(Revision 4867)
@@ -27,11 +27,11 @@
 
 namespace Glest{ namespace Game{
 
-using Shared::Sound::StrSound;
-using Shared::Sound::StaticSound;
-using Shared::Sound::SoundPlayer;
-using Shared::Graphics::Vec3f;
-using namespace Shared::PlatformCommon;
+using ::Shared::Sound::StrSound;
+using ::Shared::Sound::StaticSound;
+using ::Shared::Sound::SoundPlayer;
+using ::Shared::Graphics::Vec3f;
+using namespace ::Shared::PlatformCommon;
 
 // =====================================================
 // 	class SoundRenderer
Index: source/glest_game/type_instances/unit.cpp
===================================================================
--- source/glest_game/type_instances/unit.cpp	(Revision 4866)
+++ source/glest_game/type_instances/unit.cpp	(Revision 4867)
@@ -3878,7 +3878,7 @@
 				ups->setOffset(Vec3f(0,2,0));
 				ups->setDirection(Vec3f(0,1,-0.2f));
 				ups->setRadius(type->getSize()/3.f);
-				ups->setShape(Shared::Graphics::UnitParticleSystem::sLinear);
+				ups->setShape(::Shared::Graphics::UnitParticleSystem::sLinear);
 				ups->setTexture(CoreData::getInstance().getFireTexture());
 				const Game *game = Renderer::getInstance().getGame();
 				ups->setSpeed(2.0f / game->getWorld()->getUpdateFps(this->getFactionIndex()));
Index: source/glest_game/game/game.cpp
===================================================================
--- source/glest_game/game/game.cpp	(Revision 4866)
+++ source/glest_game/game/game.cpp	(Revision 4867)
@@ -1039,7 +1039,7 @@
 	else {
 		logger.loadGameHints(englishFile,languageFile,true);
 
-		Shared::Platform::Window::handleEvent();
+		::Shared::Platform::Window::handleEvent();
 		SDL_PumpEvents();
 	}
 
@@ -1047,7 +1047,7 @@
 		if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
 		Game::findFactionLogoFile(&gameSettings, &logger);
 
-		Shared::Platform::Window::handleEvent();
+		::Shared::Platform::Window::handleEvent();
 		SDL_PumpEvents();
 	}
 
@@ -1097,7 +1097,7 @@
 
     // give CPU time to update other things to avoid apperance of hanging
     sleep(0);
-    Shared::Platform::Window::handleEvent();
+    ::Shared::Platform::Window::handleEvent();
 	SDL_PumpEvents();
 
 	if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
@@ -1145,7 +1145,7 @@
 
     // give CPU time to update other things to avoid apperance of hanging
     sleep(0);
-    Shared::Platform::Window::handleEvent();
+    ::Shared::Platform::Window::handleEvent();
 	SDL_PumpEvents();
 
 	if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
@@ -1163,7 +1163,7 @@
 
     // give CPU time to update other things to avoid apperance of hanging
     sleep(0);
-    Shared::Platform::Window::handleEvent();
+    ::Shared::Platform::Window::handleEvent();
 	SDL_PumpEvents();
 
 	if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
@@ -1252,7 +1252,7 @@
 
 		// give CPU time to update other things to avoid apperance of hanging
 		sleep(0);
-		Shared::Platform::Window::handleEvent();
+		::Shared::Platform::Window::handleEvent();
 		SDL_PumpEvents();
 	}
 
@@ -1302,7 +1302,7 @@
 	if(initForPreviewOnly == false) {
 		// give CPU time to update other things to avoid apperance of hanging
 		sleep(0);
-		Shared::Platform::Window::handleEvent();
+		::Shared::Platform::Window::handleEvent();
 		SDL_PumpEvents();
 
 		gui.init(this);
@@ -1370,7 +1370,7 @@
 	if(initForPreviewOnly == false) {
 		// give CPU time to update other things to avoid apperance of hanging
 		sleep(0);
-		Shared::Platform::Window::handleEvent();
+		::Shared::Platform::Window::handleEvent();
 		SDL_PumpEvents();
 
 		scriptManager.init(&world, &gameCamera,loadGameNode);
@@ -1425,7 +1425,7 @@
 
 		// give CPU time to update other things to avoid apperance of hanging
 		sleep(0);
-		Shared::Platform::Window::handleEvent();
+		::Shared::Platform::Window::handleEvent();
 		SDL_PumpEvents();
 
 		if(world.getFactionCount() == 1 && world.getFaction(0)->getPersonalityType() == fpt_Observer) {
@@ -1492,7 +1492,7 @@
 
 		// give CPU time to update other things to avoid apperance of hanging
 		sleep(0);
-		Shared::Platform::Window::handleEvent();
+		::Shared::Platform::Window::handleEvent();
 		SDL_PumpEvents();
 
 		if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] Waiting for network\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__);
@@ -4351,7 +4351,7 @@
 				float ymult = 0.2f;
 				float xmult = 0.2f;
 
-				Vec2i oldPos=Shared::Platform::Window::getOldMousePos();
+				Vec2i oldPos = ::Shared::Platform::Window::getOldMousePos();
 				int oldx= (oldPos.x * metrics.getVirtualW() / metrics.getScreenW());
 				int oldy= ((metrics.getScreenH()-oldPos.y) * metrics.getVirtualH()  /  metrics.getScreenH());
 				lastMousePos.x=oldx;
@@ -4360,7 +4360,7 @@
 			}
 			mouseX=lastMousePos.x;
 			mouseY=lastMousePos.y;
-			Shared::Platform::Window::revertMousePos();
+			::Shared::Platform::Window::revertMousePos();
 
 			return;
 		}
@@ -6120,7 +6120,7 @@
 
 void Game::playStaticVideo(const string &playVideo) {
 	if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-		Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+			::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 
 		//togglePauseGame(true,true);
 		tryPauseToggle(true);
@@ -6151,13 +6151,13 @@
 void Game::playStreamingVideo(const string &playVideo) {
 	if(videoPlayer == NULL) {
 		if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-			Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+				::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 			Context *c= GraphicsInterface::getInstance().getCurrentContext();
 			SDL_Surface *screen = static_cast<ContextGl*>(c)->getPlatformContextGlPtr()->getScreen();
 
 			string vlcPluginsPath = Config::getInstance().getString("VideoPlayerPluginsPath","");
 
-			videoPlayer = new Shared::Graphics::VideoPlayer(
+			videoPlayer = new ::Shared::Graphics::VideoPlayer(
 					&Renderer::getInstance(),
 					playVideo,
 					"",
@@ -6177,13 +6177,13 @@
 			videoPlayer = NULL;
 
 			if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
-				Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
+					::Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
 				Context *c= GraphicsInterface::getInstance().getCurrentContext();
 				SDL_Surface *screen = static_cast<ContextGl*>(c)->getPlatformContextGlPtr()->getScreen();
 
 				string vlcPluginsPath = Config::getInstance().getString("VideoPlayerPluginsPath","");
 
-				videoPlayer = new Shared::Graphics::VideoPlayer(
+				videoPlayer = new ::Shared::Graphics::VideoPlayer(
 						&Renderer::getInstance(),
 						playVideo,
 						"",
Index: source/glest_game/game/game.h
===================================================================
--- source/glest_game/game/game.h	(Revision 4866)
+++ source/glest_game/game/game.h	(Revision 4867)
@@ -37,7 +37,7 @@
 
 namespace Shared { namespace Graphics {
 	class VideoPlayer;
-}}
+}};
 
 namespace Glest{ namespace Game{
 
@@ -197,7 +197,7 @@
 	std::vector<std::pair<int,NetworkCommand> > replayCommandList;
 
 	std::vector<string> streamingVideos;
-	Shared::Graphics::VideoPlayer *videoPlayer;
+	::Shared::Graphics::VideoPlayer *videoPlayer;
 	bool playingStaticVideo;
 
 	Unit *currentCameraFollowUnit;
Index: source/glest_game/game/game_camera.h
===================================================================
--- source/glest_game/game/game_camera.h	(Revision 4866)
+++ source/glest_game/game/game_camera.h	(Revision 4867)
@@ -29,10 +29,10 @@
 
 namespace Glest{ namespace Game{
 
-using Shared::Graphics::Quad2i;
-using Shared::Graphics::Vec3f;
-using Shared::Graphics::Vec2f;
-using Shared::Xml::XmlNode;
+using ::Shared::Graphics::Quad2i;
+using ::Shared::Graphics::Vec3f;
+using ::Shared::Graphics::Vec2f;
+using ::Shared::Xml::XmlNode;
 
 class Config;
 
Index: source/glest_game/network/network_types.cpp
===================================================================
--- source/glest_game/network/network_types.cpp	(Revision 4866)
+++ source/glest_game/network/network_types.cpp	(Revision 4867)
@@ -98,37 +98,37 @@
 }
 
 void NetworkCommand::toEndian() {
-	networkCommandType = Shared::PlatformByteOrder::toCommonEndian(networkCommandType);
-	unitId = Shared::PlatformByteOrder::toCommonEndian(unitId);
-	unitTypeId = Shared::PlatformByteOrder::toCommonEndian(unitTypeId);
-	commandTypeId = Shared::PlatformByteOrder::toCommonEndian(commandTypeId);
-	positionX = Shared::PlatformByteOrder::toCommonEndian(positionX);
-	positionY = Shared::PlatformByteOrder::toCommonEndian(positionY);
-	targetId = Shared::PlatformByteOrder::toCommonEndian(targetId);
-	wantQueue = Shared::PlatformByteOrder::toCommonEndian(wantQueue);
-	fromFactionIndex = Shared::PlatformByteOrder::toCommonEndian(fromFactionIndex);
-	unitFactionUnitCount = Shared::PlatformByteOrder::toCommonEndian(unitFactionUnitCount);
-	unitFactionIndex = Shared::PlatformByteOrder::toCommonEndian(unitFactionIndex);
-	commandStateType = Shared::PlatformByteOrder::toCommonEndian(commandStateType);
-	commandStateValue = Shared::PlatformByteOrder::toCommonEndian(commandStateValue);
-	unitCommandGroupId = Shared::PlatformByteOrder::toCommonEndian(unitCommandGroupId);
+	networkCommandType = ::Shared::PlatformByteOrder::toCommonEndian(networkCommandType);
+	unitId = ::Shared::PlatformByteOrder::toCommonEndian(unitId);
+	unitTypeId = ::Shared::PlatformByteOrder::toCommonEndian(unitTypeId);
+	commandTypeId = ::Shared::PlatformByteOrder::toCommonEndian(commandTypeId);
+	positionX = ::Shared::PlatformByteOrder::toCommonEndian(positionX);
+	positionY = ::Shared::PlatformByteOrder::toCommonEndian(positionY);
+	targetId = ::Shared::PlatformByteOrder::toCommonEndian(targetId);
+	wantQueue = ::Shared::PlatformByteOrder::toCommonEndian(wantQueue);
+	fromFactionIndex = ::Shared::PlatformByteOrder::toCommonEndian(fromFactionIndex);
+	unitFactionUnitCount = ::Shared::PlatformByteOrder::toCommonEndian(unitFactionUnitCount);
+	unitFactionIndex = ::Shared::PlatformByteOrder::toCommonEndian(unitFactionIndex);
+	commandStateType = ::Shared::PlatformByteOrder::toCommonEndian(commandStateType);
+	commandStateValue = ::Shared::PlatformByteOrder::toCommonEndian(commandStateValue);
+	unitCommandGroupId = ::Shared::PlatformByteOrder::toCommonEndian(unitCommandGroupId);
 
 }
 void NetworkCommand::fromEndian() {
-	networkCommandType = Shared::PlatformByteOrder::fromCommonEndian(networkCommandType);
-	unitId = Shared::PlatformByteOrder::fromCommonEndian(unitId);
-	unitTypeId = Shared::PlatformByteOrder::fromCommonEndian(unitTypeId);
-	commandTypeId = Shared::PlatformByteOrder::fromCommonEndian(commandTypeId);
-	positionX = Shared::PlatformByteOrder::fromCommonEndian(positionX);
-	positionY = Shared::PlatformByteOrder::fromCommonEndian(positionY);
-	targetId = Shared::PlatformByteOrder::fromCommonEndian(targetId);
-	wantQueue = Shared::PlatformByteOrder::fromCommonEndian(wantQueue);
-	fromFactionIndex = Shared::PlatformByteOrder::fromCommonEndian(fromFactionIndex);
-	unitFactionUnitCount = Shared::PlatformByteOrder::fromCommonEndian(unitFactionUnitCount);
-	unitFactionIndex = Shared::PlatformByteOrder::fromCommonEndian(unitFactionIndex);
-	commandStateType = Shared::PlatformByteOrder::fromCommonEndian(commandStateType);
-	commandStateValue = Shared::PlatformByteOrder::fromCommonEndian(commandStateValue);
-	unitCommandGroupId = Shared::PlatformByteOrder::fromCommonEndian(unitCommandGroupId);
+	networkCommandType = ::Shared::PlatformByteOrder::fromCommonEndian(networkCommandType);
+	unitId = ::Shared::PlatformByteOrder::fromCommonEndian(unitId);
+	unitTypeId = ::Shared::PlatformByteOrder::fromCommonEndian(unitTypeId);
+	commandTypeId = ::Shared::PlatformByteOrder::fromCommonEndian(commandTypeId);
+	positionX = ::Shared::PlatformByteOrder::fromCommonEndian(positionX);
+	positionY = ::Shared::PlatformByteOrder::fromCommonEndian(positionY);
+	targetId = ::Shared::PlatformByteOrder::fromCommonEndian(targetId);
+	wantQueue = ::Shared::PlatformByteOrder::fromCommonEndian(wantQueue);
+	fromFactionIndex = ::Shared::PlatformByteOrder::fromCommonEndian(fromFactionIndex);
+	unitFactionUnitCount = ::Shared::PlatformByteOrder::fromCommonEndian(unitFactionUnitCount);
+	unitFactionIndex = ::Shared::PlatformByteOrder::fromCommonEndian(unitFactionIndex);
+	commandStateType = ::Shared::PlatformByteOrder::fromCommonEndian(commandStateType);
+	commandStateValue = ::Shared::PlatformByteOrder::fromCommonEndian(commandStateValue);
+	unitCommandGroupId = ::Shared::PlatformByteOrder::fromCommonEndian(unitCommandGroupId);
 }
 
 XmlNode * NetworkCommand::saveGame(XmlNode *rootNode) {
Index: source/glest_game/network/server_interface.h
===================================================================
--- source/glest_game/network/server_interface.h	(Revision 4866)
+++ source/glest_game/network/server_interface.h	(Revision 4867)
@@ -71,7 +71,7 @@
 	time_t lastMasterserverHeartbeatTime;
 	bool needToRepublishToMasterserver;
 
-    Shared::PlatformCommon::FTPServerThread *ftpServer;
+    ::Shared::PlatformCommon::FTPServerThread *ftpServer;
     bool exitServer;
     int64 nextEventId;
 
Index: source/shared_lib/include/xml/xml_parser.h
===================================================================
--- source/shared_lib/include/xml/xml_parser.h	(Revision 4866)
+++ source/shared_lib/include/xml/xml_parser.h	(Revision 4867)
@@ -45,7 +45,6 @@
 	XML_RAPIDXML_ENGINE = 1
 } ;
 
-static xml_engine_parser_type DEFAULT_XML_ENGINE = XML_RAPIDXML_ENGINE;
 const int strSize= 8094;
 
 class XmlIo;
@@ -129,7 +128,7 @@
 	void clearRootNode();
 
 public:
-	XmlTree(xml_engine_parser_type engine_type = DEFAULT_XML_ENGINE);
+	XmlTree(xml_engine_parser_type engine_type = XML_RAPIDXML_ENGINE);
 	~XmlTree();
 
 	void init(const string &name);
Index: source/shared_lib/include/platform/common/byte_order.h
===================================================================
--- source/shared_lib/include/platform/common/byte_order.h	(Revision 4866)
+++ source/shared_lib/include/platform/common/byte_order.h	(Revision 4867)
@@ -32,7 +32,7 @@
     return t;
 }
 
-static bool isBigEndian() {
+inline static bool isBigEndian() {
 	short n = 0x1;
 	return (*(char*)(&n) == 0x0);
 }
Index: source/shared_lib/sources/map/map_preview.cpp
===================================================================
--- source/shared_lib/sources/map/map_preview.cpp	(Revision 4866)
+++ source/shared_lib/sources/map/map_preview.cpp	(Revision 4867)
@@ -52,6 +52,7 @@
 	title = "";
 	desc = "";
 	author = "";
+	maxFactions = 0;
 	refAlt = DEFAULT_MAP_CELL_HEIGHT;
 	hasChanged = false;
 }
@@ -561,7 +562,7 @@
 
 	this->w = w;
 	this->h = h;
-	this->maxFactions = maxFactions;
+	//this->maxFactions = maxFactions;
 
 	//cells = new Cell*[w];
 	cells.resize(w);
@@ -608,7 +609,7 @@
 	int oldH = this->h;
 	this->w = w;
 	this->h = h;
-	this->maxFactions = maxFactions;
+	//this->maxFactions = maxFactions;
 
 	//create new cells
 	//Cell **oldCells = cells;
Index: build-mg.sh
===================================================================
--- build-mg.sh	(Revision 4866)
+++ build-mg.sh	(Revision 4867)
@@ -4,7 +4,12 @@
 # Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
 # Copyright (c) 2011-2013 Mark Vejvoda under GNU GPL v3.0+
 
+# to enable clang compilation: 
+# 1. sudo apt-get install clang
+# 2. Set the two vars below, WANT_CLANG=YES and CLANG_BIN_PATH=<path to the clang binary>
 WANT_CLANG=NO
+CLANG_BIN_PATH=/usr/bin/
+
 LANG=C
 NUMCORES=`lscpu -p | grep -cv '^#'`
 if [ "$NUMCORES" = '' ]; then NUMCORES=1; fi
@@ -113,9 +118,7 @@
 CURRENTDIR="$(dirname $(readlink -f $0))"
 
 if [ "$WANT_CLANG" = 'YES' ]; then 
-        export CC=/usr/bin/clang
-        export CXX=/usr/bin/clang++
-        EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -D_CMAKE_TOOLCHAIN_PREFIX=llvm-"
+        EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DCMAKE_C_COMPILER=${CLANG_BIN_PATH}clang -DCMAKE_CXX_COMPILER=${CLANG_BIN_PATH}clang++"
         echo "USER WANTS to use CLANG / LLVM compiler! EXTRA_CMAKE_OPTIONS = ${EXTRA_CMAKE_OPTIONS}"
 #exit 1;
 fi
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(Revision 4866)
+++ CMakeLists.txt	(Revision 4867)
@@ -21,6 +21,7 @@
 
 IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
         SET(CMAKE_COMPILER_IS_GNUCXX "YES")
+        ADD_DEFINITIONS("-Qunused-arguments -Wno-switch")
 ENDIF()
 
 FUNCTION(Subversion_IS_WC FOLDER RESULT_VAR)
