diff --git a/mk/windoze/g3d_viewer.vcxproj b/mk/windoze/g3d_viewer.vcxproj index 83a5724dc..96a32e397 100644 --- a/mk/windoze/g3d_viewer.vcxproj +++ b/mk/windoze/g3d_viewer.vcxproj @@ -114,8 +114,7 @@ - - + MachineX86 false diff --git a/mk/windoze/glest_editor.vcxproj b/mk/windoze/glest_editor.vcxproj index b12f1453d..1c92f26ed 100644 --- a/mk/windoze/glest_editor.vcxproj +++ b/mk/windoze/glest_editor.vcxproj @@ -113,8 +113,7 @@ - - + MachineX86 false diff --git a/mk/windoze/glest_game.vcxproj b/mk/windoze/glest_game.vcxproj index a21eaeb1f..2834201ce 100644 --- a/mk/windoze/glest_game.vcxproj +++ b/mk/windoze/glest_game.vcxproj @@ -117,7 +117,7 @@ false ../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/xml/rapidxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/windows_deps/include;../../source/windows_deps/xerces-c-3.1.1/src;../../source/windows_deps/SDL-1.2.15/include;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;../../source/windows_deps/openal-soft-1.14/include;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;../../source/windows_deps/curl-7.21.3/include;../../source/shared_lib/include/map;../../source/windows_deps/libircclient/include;../../source/windows_deps/glew-1.7.0/include;../../source/windows_deps/google-breakpad\trunk\src\client\windows\;../../source/windows_deps/google-breakpad\trunk\src\ %(AdditionalUsingDirectories) - WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;XERCES_STATIC_LIBRARY;GLEW_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;XERCES_STATIC_LIBRARY;GLEW_STATIC;USE_FREETYPEGL;STATICLIB;USE_FTGL;FTGL_LIBRARY_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions) true Async MultiThreaded @@ -134,7 +134,7 @@ dsound.lib;dxguid.lib;glew32s.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opengl32.lib;glu32.lib;wsock32.lib;libglest.lib;mmc.lib;lua.lib;xerces-c_static_3.lib;Dbghelp.lib;libpng15.lib;jpeg.lib;zlibstat.lib;sdl.lib;sdlmain.lib;winmm.lib;openal32.lib;iphlpapi.lib;libstreflop.lib;libcurl.lib;ws2_32.lib;libircclient.lib;freetype244MT.lib;ftgl_static.lib;libeay32.lib;ssleay32.lib;crash_generation_client.lib;exception_handler.lib;common.lib;processor_bits.lib;%(AdditionalDependencies) ../../source/windows_deps/lib;../../build/$(Configuration)/libglest;../../source/shared_lib/sources/streflop/libstreflop;$(DXSDK_DIR)/lib/x86;../../source/windows_deps/Microsoft DirectX SDK %28November 2007%29/Lib/x86;%(AdditionalLibraryDirectories) - %(IgnoreSpecificDefaultLibraries) + libcmtd.lib;%(IgnoreSpecificDefaultLibraries) true Console @@ -146,10 +146,14 @@ false - NotSet + MachineX86 $(OutDir)$(TargetName)$(TargetExt) true true + + + + diff --git a/mk/windoze/libstreflop.vcxproj b/mk/windoze/libstreflop.vcxproj index 2872c42b3..ea1a31d6b 100644 --- a/mk/windoze/libstreflop.vcxproj +++ b/mk/windoze/libstreflop.vcxproj @@ -106,6 +106,10 @@ ProgramDatabase true + + MachineX86 + true + diff --git a/mk/windoze/shared_lib.vcxproj b/mk/windoze/shared_lib.vcxproj index 82e29994a..48856f5bc 100644 --- a/mk/windoze/shared_lib.vcxproj +++ b/mk/windoze/shared_lib.vcxproj @@ -96,7 +96,7 @@ Speed false ../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/windows_deps/include;../../source/windows_deps/xerces-c-3.1.1/src;../../source/windows_deps/xerces-c-3.1.1/src/xercesc/xinclude;../../source/windows_deps/lpng1510;../../source/windows_deps/jpeg-8a;../../source/windows_deps/SDL-1.2.15/include;../../source/windows_deps/openal-soft-1.14/include;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;../../source/windows_deps/curl-7.21.3/include;../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/shared_lib/include/libircclient/include;../../source/shared_lib/include/feathery_ftp;../../source/windows_deps/ftgl-2.1.3-rc5/src;../../source/windows_deps/freetype-2.4.4/include;../../source/windows_deps/glew-1.7.0/include;../../source/shared_lib/include/graphics/md5;../../source/shared_lib/include/graphics/freetype-gl;../../source/shared_lib/include/streflop/softfloat;../../source/shared_lib/include/xml/rapidxml;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/platform/win32;../../source/windows_deps/vlc-2.0.1/include;../../source/windows_deps/fribidi-0.19.5/lib;../../source/windows_deps/fribidi-0.19.5/charset - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;USE_FTGL;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;USE_FREETYPEGL;XERCES_STATIC_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;USE_FTGL;FTGL_LIBRARY_STATIC;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;USE_FREETYPEGL;XERCES_STATIC_LIBRARY;GLEW_STATIC;XML_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions) true Async MultiThreaded @@ -113,6 +113,8 @@ libstreflop.lib;libcurl.lib;glew32s.lib;freetype244MT.lib;libvlc.lib;libfribidi.lib;%(AdditionalDependencies) .\;..\..\source\windows_deps\lib;%(AdditionalLibraryDirectories) + MachineX86 + true diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 33adaa592..91039a311 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -1944,7 +1944,11 @@ void Game::update() { //Checksum checksum; //world->loadScenario(scenarioFile, &checksum, true); } +#if defined(WIN32) + catch(const exception) { +#else catch(const exception &ex) { +#endif gameStarted = true; totalRenderFps++; diff --git a/source/glest_game/network/network_message.cpp b/source/glest_game/network/network_message.cpp index ed2ecf8e2..91d7ab676 100644 --- a/source/glest_game/network/network_message.cpp +++ b/source/glest_game/network/network_message.cpp @@ -284,6 +284,9 @@ unsigned int NetworkMessagePing::getPackedSize() { static unsigned int result = 0; if(result == 0) { Data packedData; + packedData.messageType = 0; + packedData.pingFrequency = 0; + packedData.pingTime = 0; unsigned char *buf = new unsigned char[sizeof(packedData)*3]; result = pack(buf, getPackedMessageFormat(), packedData.messageType, @@ -382,6 +385,8 @@ unsigned int NetworkMessageReady::getPackedSize() { static unsigned int result = 0; if(result == 0) { Data packedData; + packedData.checksum = 0; + packedData.messageType = 0; unsigned char *buf = new unsigned char[sizeof(packedData)*3]; result = pack(buf, getPackedMessageFormat(), packedData.messageType, @@ -1571,6 +1576,7 @@ unsigned int NetworkMessageQuit::getPackedSize() { static unsigned int result = 0; if(result == 0) { Data packedData; + packedData.messageType = 0; unsigned char *buf = new unsigned char[sizeof(packedData)*3]; result = pack(buf, getPackedMessageFormat(), packedData.messageType); @@ -2527,6 +2533,8 @@ unsigned int PlayerIndexMessage::getPackedSize() { static unsigned int result = 0; if(result == 0) { Data packedData; + packedData.messageType = 0; + packedData.playerIndex = 0; unsigned char *buf = new unsigned char[sizeof(packedData)*3]; result = pack(buf, getPackedMessageFormat(), packedData.messageType, @@ -2615,6 +2623,8 @@ unsigned int NetworkMessageLoadingStatus::getPackedSize() { static unsigned int result = 0; if(result == 0) { Data packedData; + packedData.messageType = 0; + packedData.status = 0; unsigned char *buf = new unsigned char[sizeof(packedData)*3]; result = pack(buf, getPackedMessageFormat(), packedData.messageType, @@ -2833,6 +2843,10 @@ unsigned int NetworkMessageUnMarkCell::getPackedSize() { static unsigned int result = 0; if(result == 0) { Data packedData; + packedData.factionIndex = 0; + packedData.messageType = 0; + packedData.targetX = 0; + packedData.targetY = 0; unsigned char *buf = new unsigned char[sizeof(packedData)*3]; result = pack(buf, getPackedMessageFormat(), packedData.messageType, @@ -2936,6 +2950,10 @@ unsigned int NetworkMessageHighlightCell::getPackedSize() { static unsigned int result = 0; if(result == 0) { Data packedData; + packedData.factionIndex = 0; + packedData.messageType = 0; + packedData.targetX = 0; + packedData.targetY = 0; unsigned char *buf = new unsigned char[sizeof(packedData)*3]; result = pack(buf, getPackedMessageFormat(), packedData.messageType, diff --git a/source/shared_lib/include/graphics/FileReader.h b/source/shared_lib/include/graphics/FileReader.h index bfe289af6..9a9109876 100644 --- a/source/shared_lib/include/graphics/FileReader.h +++ b/source/shared_lib/include/graphics/FileReader.h @@ -158,7 +158,11 @@ static inline T* readFromFileReaders(vector const *>* readers, con FileReader const * reader = *i; ret = reader->read(file, filepath); //It is guaranteed that at least the filepath matches ... } +#if defined(WIN32) + catch (megaglest_runtime_error) { +#else catch (megaglest_runtime_error &ex) { +#endif throw; } catch (...) { @@ -206,7 +210,11 @@ static inline T* readFromFileReaders(vector const *>* readers, con FileReader const * reader = *i; ret = reader->read(file, filepath, object); //It is guaranteed that at least the filepath matches ... } +#if defined(WIN32) + catch (megaglest_runtime_error) { +#else catch (megaglest_runtime_error &ex) { +#endif throw; } catch (...) { @@ -329,7 +337,11 @@ bool FileReader::canRead(ifstream& file) const { delete wouldRead; return ret; } +#if defined(WIN32) + catch (megaglest_runtime_error) { +#else catch (megaglest_runtime_error &ex) { +#endif throw; } catch (...) { diff --git a/source/shared_lib/sources/graphics/JPGReader.cpp b/source/shared_lib/sources/graphics/JPGReader.cpp index 6af184e20..eed707033 100644 --- a/source/shared_lib/sources/graphics/JPGReader.cpp +++ b/source/shared_lib/sources/graphics/JPGReader.cpp @@ -82,7 +82,7 @@ Pixmap2D* JPGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const is.read((char*)buffer, (std::streamsize)length); static bool bigEndianSystem = Shared::PlatformByteOrder::isBigEndian(); if(bigEndianSystem == true) { - Shared::PlatformByteOrder::fromEndianTypeArray(buffer,length); + Shared::PlatformByteOrder::fromEndianTypeArray(buffer,(size_t)length); } //Check buffer (weak jpeg check) //if (buffer[0] != 0x46 || buffer[1] != 0xA0) {