Merge branch 'master' of github-tomreyn-megaglest:MegaGlest/megaglest-source
This commit is contained in:
commit
533b1f0bfe
|
@ -219,7 +219,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
SET(GIT_LIVE_REV_CMD "`git log -1 --format=%h`.`git rev-list HEAD --count`")
|
||||
SET(GIT_LIVE_REV_CMD "`git rev-list HEAD --count`.`git log -1 --format=%h`")
|
||||
|
||||
MESSAGE(STATUS "Using GIT revision stamp: [${GIT_COMMIT_COUNT}.${GIT_SHA1}] CMD [${GIT_LIVE_REV_CMD}]")
|
||||
|
||||
|
|
14
build-mg.sh
14
build-mg.sh
|
@ -18,7 +18,7 @@ CMAKE_ONLY=0
|
|||
MAKE_ONLY=0
|
||||
CLANG_FORCED=0
|
||||
|
||||
while getopts "c:m:n:f:" option; do
|
||||
while getopts "c:m:n:f:h" option; do
|
||||
case "${option}" in
|
||||
c)
|
||||
CPU_COUNT=${OPTARG}
|
||||
|
@ -37,6 +37,18 @@ while getopts "c:m:n:f:" option; do
|
|||
CLANG_FORCED=${OPTARG}
|
||||
# echo "${option} value: ${OPTARG}"
|
||||
;;
|
||||
h)
|
||||
echo "Usage: $0 <option>"
|
||||
echo " where <option> can be: -c=x, -m=1, -n=1, -f=1, -h"
|
||||
echo " option descriptions:"
|
||||
echo " -c=x : Force the cpu / cores count to x - example: -c=4"
|
||||
echo " -m=1 : Force running CMAKE only to create Make files (do not compile)"
|
||||
echo " -n=1 : Force running MAKE only to compile (assume CMAKE already built make files)"
|
||||
echo " -f=1 : Force using CLANG compiler"
|
||||
echo " -h : Display this help usage"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3e3e28d1cbb9a500987811f7f46b06a274b167b1
|
||||
Subproject commit 69b5a991e721d6e79c4dc7b364b8bf0ae987c6d1
|
|
@ -150,7 +150,7 @@ if (MINIUPNP_FOUND)
|
|||
static struct IGDdatas data;
|
||||
int main()
|
||||
{
|
||||
char externalIP[16] = "";
|
||||
char externalIP[16] = \"\";
|
||||
UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIP);
|
||||
|
||||
return 0;
|
||||
|
@ -170,7 +170,7 @@ if (MINIUPNP_FOUND)
|
|||
static struct IGDdatas data;
|
||||
int main()
|
||||
{
|
||||
char externalIP[16] = "";
|
||||
char externalIP[16] = \"\";
|
||||
UPNP_GetExternalIPAddress(urls.controlURL, data.servicetype, externalIP);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../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/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../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/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/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -115,7 +115,7 @@
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../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\;../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../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/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\;../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<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_XXX;STATICLIB;USE_FTGL;FTGL_LIBRARY_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -165,7 +165,7 @@
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../deps/include/lua;../../../deps/include;../../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/tinyxml;../../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/win32_deps/include;../../source/win32_deps/xerces-c-3.0.1/src;../../source/win32_deps/SDL-1.2.x/include;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;../../source/win32_deps/openal-soft-1.12.854/include;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;../../source/win32_deps/curl-7.21.3/include;../../source/shared_lib/include/map</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../deps/include/lua;../../../deps/include;../../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/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../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/win32_deps/include;../../source/win32_deps/xerces-c-3.0.1/src;../../source/win32_deps/SDL-1.2.x/include;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;../../source/win32_deps/openal-soft-1.12.854/include;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;../../source/win32_deps/curl-7.21.3/include;../../source/shared_lib/include/map</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../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\;../../source/windows_deps/cppunit/include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../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/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\;../../source/windows_deps/cppunit/include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -76,7 +76,7 @@
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<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)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../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\;../../source/windows_deps/cppunit/include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../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/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\;../../source/windows_deps/cppunit/include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../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/shared_lib/include/compression;../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../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/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/shared_lib/include/compression;../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../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;../../source/shared_lib/include/compression;../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../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/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;../../source/shared_lib/include/compression;../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<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_XXX;XERCES_STATIC_LIBRARY;GLEW_STATIC;XML_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
@ -126,7 +126,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../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/win32_deps/include;../../source/win32_deps/xerces-c-3.0.1/src;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude;../../source/win32_deps/lpng141;../../source/win32_deps/jpeg-8a;../../source/win32_deps/SDL-1.2.x/include;../../source/shared_lib/include/platform/sdl;../../source/win32_deps/openal-soft-1.12.854/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/win32_deps/curl-7.21.3/include;../../source/shared_lib/include/map;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../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/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;../../source/win32_deps/xerces-c-3.0.1/src;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude;../../source/win32_deps/lpng141;../../source/win32_deps/jpeg-8a;../../source/win32_deps/SDL-1.2.x/include;../../source/shared_lib/include/platform/sdl;../../source/win32_deps/openal-soft-1.12.854/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/win32_deps/curl-7.21.3/include;../../source/shared_lib/include/map;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
@ -241,7 +241,6 @@
|
|||
<ClCompile Include="..\..\source\shared_lib\sources\sound\sound_interface.cpp" />
|
||||
<ClCompile Include="..\..\source\shared_lib\sources\sound\sound_player.cpp" />
|
||||
<ClCompile Include="..\..\source\shared_lib\sources\sound\openal\sound_player_openal.cpp" />
|
||||
<ClCompile Include="..\..\source\shared_lib\sources\sound\ds8\sound_player_ds8.cpp" />
|
||||
<ClCompile Include="..\..\source\shared_lib\sources\platform\common\base_thread.cpp" />
|
||||
<ClCompile Include="..\..\source\shared_lib\sources\platform\common\cache_manager.cpp" />
|
||||
<ClCompile Include="..\..\source\shared_lib\sources\platform\miniupnpc\igd_desc_parse.c" />
|
||||
|
@ -325,8 +324,6 @@
|
|||
<ClInclude Include="..\..\source\shared_lib\include\sound\sound_file_loader.h" />
|
||||
<ClInclude Include="..\..\source\shared_lib\include\sound\sound_interface.h" />
|
||||
<ClInclude Include="..\..\source\shared_lib\include\sound\sound_player.h" />
|
||||
<ClInclude Include="..\..\source\shared_lib\include\sound\ds8\sound_factory_ds8.h" />
|
||||
<ClInclude Include="..\..\source\shared_lib\include\sound\ds8\sound_player_ds8.h" />
|
||||
<ClInclude Include="..\..\source\shared_lib\include\xml\xml_parser.h" />
|
||||
<ClInclude Include="..\..\source\shared_lib\include\platform\common\base_thread.h" />
|
||||
<ClInclude Include="..\..\source\shared_lib\include\platform\common\cache_manager.h" />
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -158,7 +158,7 @@
|
|||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -205,7 +205,7 @@
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/shared_lib/include/compression</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<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)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -272,7 +272,7 @@
|
|||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>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;openal64.lib;iphlpapi.lib;libcurl.lib;ws2_32.lib;libircclient.lib;freetype244MT.lib;ftgl_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>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;openal64.lib;iphlpapi.lib;libcurl.lib;ws2_32.lib;libircclient.lib;freetype244MT.lib;ftgl_static.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../../source/windows_deps_2012/lib;../../../build/$(Configuration)/libglest;$(DXSDK_DIR)/lib/x64;../../../source/windows_deps_2012/Microsoft DirectX SDK %28November 2007%29/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -304,7 +304,7 @@
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../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/tinyxml;../../../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/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/win32_deps/openal-soft-1.12.854/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/streflop;../../../source/shared_lib/include/platform/common;../../../source/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/shared_lib/include/tinyxml;../../../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/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/win32_deps/openal-soft-1.12.854/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/streflop;../../../source/shared_lib/include/platform/common;../../../source/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -344,7 +344,7 @@
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../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/tinyxml;../../../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/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/win32_deps/openal-soft-1.12.854/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/streflop;../../../source/shared_lib/include/platform/common;../../../source/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/shared_lib/include/tinyxml;../../../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/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/win32_deps/openal-soft-1.12.854/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/streflop;../../../source/shared_lib/include/platform/common;../../../source/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/windows_deps_2012/cppunit/include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/windows_deps_2012/cppunit/include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/windows_deps_2012/cppunit/include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/windows_deps_2012/cppunit/include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<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)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/windows_deps_2012/cppunit/include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/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_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/google-breakpad\trunk\src\client\windows\;../../../source/windows_deps_2012/google-breakpad\trunk\src\;../../../source/windows_deps_2012/cppunit/include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/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_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/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_2012/vlc-2.0.1/include;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/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_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/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_2012/vlc-2.0.1/include;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/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_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/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_2012/vlc-2.0.1/include;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/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_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/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_2012/vlc-2.0.1/include;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
|
@ -171,7 +171,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/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_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/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_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/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_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/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_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<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)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
@ -201,7 +201,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../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_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/sound/openal;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/graphics/md5;../../../source/shared_lib/include/graphics/freetype-gl;../../../source/shared_lib/include/xml/rapidxml;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/platform/win32;../../../source/windows_deps_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/sound/openal;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/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_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/graphics/md5;../../../source/shared_lib/include/graphics/freetype-gl;../../../source/shared_lib/include/xml/rapidxml;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/platform/win32;../../../source/windows_deps_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP_XXX;STREFLOP_SSE_XXX;STREFLOP_RANDOM_GEN_SIZE_XXX=32;LIBM_COMPILING_FLT32_XXX;CURL_STATICLIB;UNICODE;USE_FTGL;FTGL_LIBRARY_STATIC;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;USE_FREETYPEGL_XXX;XERCES_STATIC_LIBRARY;GLEW_STATIC;XML_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC_XXX;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD_XXX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
@ -217,7 +217,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>libcurl.lib;glew32s.lib;freetype244MT.lib;libfribidi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libcurl.lib;glew32s.lib;freetype244MT.lib;libfribidi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>.\;..\..\..\source\windows_deps_2012\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreAllDefaultLibraries>
|
||||
|
@ -233,7 +233,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../source/shared_lib/include;../../../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/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude;../../../source/win32_deps/lpng141;../../../source/win32_deps/jpeg-8a;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/win32_deps/openal-soft-1.12.854/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/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../source/shared_lib/include;../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude;../../../source/win32_deps/lpng141;../../../source/win32_deps/jpeg-8a;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/win32_deps/openal-soft-1.12.854/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/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
@ -259,7 +259,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../source/shared_lib/include;../../../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/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude;../../../source/win32_deps/lpng141;../../../source/win32_deps/jpeg-8a;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/win32_deps/openal-soft-1.12.854/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/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../../deps/include/lua;../../../../deps/include;../../../source/shared_lib/include;../../../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/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/win32_deps/include;../../../source/win32_deps/xerces-c-3.0.1/src;../../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude;../../../source/win32_deps/lpng141;../../../source/win32_deps/jpeg-8a;../../../source/win32_deps/SDL-1.2.x/include;../../../source/shared_lib/include/platform/sdl;../../../source/win32_deps/openal-soft-1.12.854/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/win32_deps/curl-7.21.3/include;../../../source/shared_lib/include/map;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
@ -501,4 +501,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -68,7 +68,7 @@ namespace Glest { namespace Game {
|
|||
string getGameReadWritePath(string lookupKey) {
|
||||
string path = "";
|
||||
if(path == "" && getenv("GLESTHOME") != NULL) {
|
||||
path = getenv("GLESTHOME");
|
||||
path = safeCharPtrCopy(getenv("GLESTHOME"),8096);
|
||||
if(path != "" && EndsWith(path, "/") == false && EndsWith(path, "\\") == false) {
|
||||
path += "/";
|
||||
}
|
||||
|
|
|
@ -166,7 +166,6 @@ IF(BUILD_MEGAGLEST)
|
|||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/include)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/platform/posix)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/platform/win32)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/sound/ds8)
|
||||
INCLUDE_DIRECTORIES( ${GLEST_LIB_INCLUDE_ROOT}platform/sdl )
|
||||
ELSE()
|
||||
INCLUDE_DIRECTORIES( ${GLEST_LIB_INCLUDE_ROOT}platform/sdl )
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace Glest{ namespace Game{
|
|||
|
||||
AiInterfaceThread::AiInterfaceThread(AiInterface *aiIntf) : BaseThread() {
|
||||
this->masterController = NULL;
|
||||
this->triggerIdMutex = new Mutex();
|
||||
this->triggerIdMutex = new Mutex(CODE_AT_LINE);
|
||||
this->aiIntf = aiIntf;
|
||||
uniqueID = "AiInterfaceThread";
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ AiInterface::AiInterface(Game &game, int factionIndex, int teamIndex,
|
|||
int useStartLocation) : fp(NULL) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
this->aiMutex = new Mutex();
|
||||
this->aiMutex = new Mutex(CODE_AT_LINE);
|
||||
this->workerThread = NULL;
|
||||
this->world= game.getWorld();
|
||||
this->commander= game.getCommander();
|
||||
|
|
|
@ -35,8 +35,8 @@ namespace Glest{ namespace Game{
|
|||
// class Commander
|
||||
// =====================================================
|
||||
Commander::Commander() {
|
||||
this->world=NULL;
|
||||
this->pauseNetworkCommands = false;
|
||||
this->world = NULL;
|
||||
this->pauseNetworkCommands = false;
|
||||
}
|
||||
|
||||
Commander::~Commander() {
|
||||
|
|
|
@ -53,7 +53,6 @@ private:
|
|||
World *world;
|
||||
Chrono perfTimer;
|
||||
|
||||
Mutex commandMutex;
|
||||
std::vector<std::pair<int,NetworkCommand> > replayCommandList;
|
||||
|
||||
bool pauseNetworkCommands;
|
||||
|
|
|
@ -375,7 +375,7 @@ void Game::endGame() {
|
|||
|
||||
Unit::setGame(NULL);
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] ==== END GAME ==== getCurrentPixelByteCount() = %llu\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,(long long unsigned int)renderer.getCurrentPixelByteCount());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] ==== END GAME ==== getCurrentPixelByteCount() = " MG_SIZE_T_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderer.getCurrentPixelByteCount());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled) SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"==== END GAME ====\n");
|
||||
|
||||
FileCRCPreCacheThread * &preCacheCRCThreadPtr = CacheManager::getCachedItem< FileCRCPreCacheThread * >(GameConstants::preCacheThreadCacheLookupKey);
|
||||
|
@ -457,7 +457,7 @@ Game::~Game() {
|
|||
preCacheCRCThreadPtr->setPauseForGame(false);
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] ==== END GAME ==== getCurrentPixelByteCount() = %llu\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,(long long unsigned int)renderer.getCurrentPixelByteCount());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] ==== END GAME ==== getCurrentPixelByteCount() = " MG_SIZE_T_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderer.getCurrentPixelByteCount());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled) SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"==== END GAME ====\n");
|
||||
|
||||
//this->program->reInitGl();
|
||||
|
@ -1596,7 +1596,7 @@ void Game::init(bool initForPreviewOnly) {
|
|||
printf("*Note: Monitoring Network CRC NORMAL synchronization...\n");
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] ==== START GAME ==== getCurrentPixelByteCount() = %llu\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,(long long unsigned int)renderer.getCurrentPixelByteCount());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] ==== START GAME ==== getCurrentPixelByteCount() = " MG_SIZE_T_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderer.getCurrentPixelByteCount());
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled) SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"=============================================\n");
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled) SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"==== START GAME ====\n");
|
||||
|
@ -5171,9 +5171,13 @@ void Game::render3d(){
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderObjects]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
//objects
|
||||
renderer.renderObjects(avgRenderFps);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderObjects]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
//units
|
||||
renderer.renderUnits(avgRenderFps);
|
||||
//ground units
|
||||
renderer.renderUnits(false, avgRenderFps);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderUnits]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
|
@ -5183,10 +5187,6 @@ void Game::render3d(){
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderObjects]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
}
|
||||
//objects
|
||||
renderer.renderObjects(avgRenderFps);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderObjects]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
//water
|
||||
renderer.renderWater();
|
||||
|
@ -5194,12 +5194,16 @@ void Game::render3d(){
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderWater]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
//air units
|
||||
renderer.renderUnits(true, avgRenderFps);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderUnits]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
//particles
|
||||
renderer.renderParticleManager(rsGame);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderParticleManager]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
|
||||
//mouse 3d
|
||||
renderer.renderMouse3d();
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderMouse3d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
|
||||
|
|
|
@ -315,6 +315,46 @@ void ParticleSystemType::setValues(AttackParticleSystem *ats){
|
|||
ats->setBlendMode(ParticleSystem::strToBlendMode(mode));
|
||||
}
|
||||
|
||||
void ParticleSystemType::loadGame(const XmlNode *rootNode) {
|
||||
const XmlNode *particleSystemTypeNode = rootNode->getChild("ParticleSystemType");
|
||||
|
||||
type = particleSystemTypeNode->getAttribute("type")->getIntValue();
|
||||
|
||||
modelCycle = particleSystemTypeNode->getAttribute("modelCycle")->getFloatValue();
|
||||
primitive = particleSystemTypeNode->getAttribute("primitive")->getValue();
|
||||
offset = Vec3f::strToVec3(particleSystemTypeNode->getAttribute("offset")->getValue());
|
||||
color = Vec4f::strToVec4(particleSystemTypeNode->getAttribute("color")->getValue());
|
||||
colorNoEnergy = Vec4f::strToVec4(particleSystemTypeNode->getAttribute("colorNoEnergy")->getValue());
|
||||
size = particleSystemTypeNode->getAttribute("size")->getFloatValue();
|
||||
sizeNoEnergy = particleSystemTypeNode->getAttribute("sizeNoEnergy")->getFloatValue();
|
||||
speed = particleSystemTypeNode->getAttribute("speed")->getFloatValue();
|
||||
gravity = particleSystemTypeNode->getAttribute("gravity")->getFloatValue();
|
||||
emissionRate = particleSystemTypeNode->getAttribute("emissionRate")->getFloatValue();
|
||||
energyMax = particleSystemTypeNode->getAttribute("energyMax")->getIntValue();
|
||||
energyVar = particleSystemTypeNode->getAttribute("energyVar")->getIntValue();
|
||||
mode = particleSystemTypeNode->getAttribute("mode")->getValue();
|
||||
teamcolorNoEnergy = (particleSystemTypeNode->getAttribute("teamcolorNoEnergy")->getIntValue() != 0);
|
||||
teamcolorEnergy = (particleSystemTypeNode->getAttribute("teamcolorEnergy")->getIntValue() != 0);
|
||||
alternations = particleSystemTypeNode->getAttribute("alternations")->getIntValue();
|
||||
particleSystemStartDelay = particleSystemTypeNode->getAttribute("particleSystemStartDelay")->getIntValue();
|
||||
|
||||
if(particleSystemTypeNode->hasChild("UnitParticleSystemType")) {
|
||||
vector<XmlNode *> particleSystemTypeNodeList = particleSystemTypeNode->getChildList("UnitParticleSystemType");
|
||||
for(unsigned int i = 0; i < particleSystemTypeNodeList.size(); ++i) {
|
||||
XmlNode *node = particleSystemTypeNodeList[i];
|
||||
|
||||
UnitParticleSystemType *child = new UnitParticleSystemType();
|
||||
child->loadGame(node);
|
||||
children.push_back(child);
|
||||
}
|
||||
}
|
||||
|
||||
minmaxEnabled = (particleSystemTypeNode->getAttribute("minmaxEnabled")->getIntValue() != 0);
|
||||
minHp = particleSystemTypeNode->getAttribute("minHp")->getIntValue();
|
||||
maxHp = particleSystemTypeNode->getAttribute("maxHp")->getIntValue();
|
||||
minmaxIsPercent = (particleSystemTypeNode->getAttribute("minmaxIsPercent")->getIntValue() != 0);
|
||||
}
|
||||
|
||||
void ParticleSystemType::saveGame(XmlNode *rootNode) {
|
||||
std::map<string,string> mapTagReplacements;
|
||||
XmlNode *particleSystemTypeNode = rootNode->addChild("ParticleSystemType");
|
||||
|
|
|
@ -111,6 +111,7 @@ public:
|
|||
string getType() const { return type; };
|
||||
|
||||
virtual void saveGame(XmlNode *rootNode);
|
||||
virtual void loadGame(const XmlNode *rootNode);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ bool VisibleQuadContainerCache::enableFrustumCalcs = true;
|
|||
|
||||
// ==================== constructor and destructor ====================
|
||||
|
||||
Renderer::Renderer() : BaseRenderer() {
|
||||
Renderer::Renderer() : BaseRenderer(), saveScreenShotThreadAccessor(new Mutex(CODE_AT_LINE)) {
|
||||
//this->masterserverMode = masterserverMode;
|
||||
//printf("this->masterserverMode = %d\n",this->masterserverMode);
|
||||
//assert(0==1);
|
||||
|
@ -287,7 +287,7 @@ void Renderer::cleanupScreenshotThread() {
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d] FORCING MEMORY CLEANUP and NOT SAVING screenshots, saveScreenQueue.size() = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,saveScreenQueue.size());
|
||||
|
||||
static string mutexOwnerId = string(extractFileFromDirectoryPath(__FILE__).c_str()) + string("_") + intToStr(__LINE__);
|
||||
MutexSafeWrapper safeMutex(&saveScreenShotThreadAccessor,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(saveScreenShotThreadAccessor,mutexOwnerId);
|
||||
for(std::list<std::pair<string,Pixmap2D *> >::iterator iter = saveScreenQueue.begin();
|
||||
iter != saveScreenQueue.end(); ++iter) {
|
||||
delete iter->second;
|
||||
|
@ -340,6 +340,9 @@ Renderer::~Renderer() {
|
|||
this->menu = NULL;
|
||||
this->game = NULL;
|
||||
this->gameCamera = NULL;
|
||||
|
||||
delete saveScreenShotThreadAccessor;
|
||||
saveScreenShotThreadAccessor = NULL;
|
||||
}
|
||||
catch(const exception &e) {
|
||||
char szBuf[8096]="";
|
||||
|
@ -356,7 +359,7 @@ void Renderer::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
Pixmap2D *savePixMapBuffer=NULL;
|
||||
string path="";
|
||||
static string mutexOwnerId = string(extractFileFromDirectoryPath(__FILE__).c_str()) + string("_") + intToStr(__LINE__);
|
||||
MutexSafeWrapper safeMutex(&saveScreenShotThreadAccessor,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(saveScreenShotThreadAccessor,mutexOwnerId);
|
||||
if(saveScreenQueue.empty() == false) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d] saveScreenQueue.size() = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,saveScreenQueue.size());
|
||||
|
||||
|
@ -566,6 +569,11 @@ void Renderer::initGame(const Game *game, GameCamera *gameCamera) {
|
|||
}
|
||||
|
||||
void Renderer::manageDeferredParticleSystems() {
|
||||
|
||||
// if(deferredParticleSystems.empty() == false) {
|
||||
// printf("deferredParticleSystems.size() = %d\n",(int)deferredParticleSystems.size());
|
||||
// }
|
||||
|
||||
for(unsigned int i = 0; i < deferredParticleSystems.size(); ++i) {
|
||||
std::pair<ParticleSystem *, ResourceScope> &deferredParticleSystem = deferredParticleSystems[i];
|
||||
ParticleSystem *ps = deferredParticleSystem.first;
|
||||
|
@ -605,6 +613,7 @@ void Renderer::manageDeferredParticleSystems() {
|
|||
}
|
||||
}
|
||||
manageParticleSystem(ps, rs);
|
||||
//printf("Managing ps [%p]\n",ps);
|
||||
}
|
||||
deferredParticleSystems.clear();
|
||||
//printf("After deferredParticleSystems.size() = %d\n",deferredParticleSystems.size());
|
||||
|
@ -3825,17 +3834,6 @@ void Renderer::MapRenderer::Layer::load_vbos(bool vboEnabled) {
|
|||
}
|
||||
}
|
||||
|
||||
//int32 CalculatePixelsCRC(const Texture2DGl *texture) {
|
||||
// const uint8 *pixels = static_cast<const Pixmap2D *>(texture->getPixmapConst())->getPixels();
|
||||
// uint64 pixelByteCount = static_cast<const Pixmap2D *>(texture->getPixmapConst())->getPixelByteCount();
|
||||
// Checksum crc;
|
||||
// for(uint64 i = 0; i < pixelByteCount; ++i) {
|
||||
// crc.addByte(pixels[i]);
|
||||
// }
|
||||
//
|
||||
// return crc.getSum();
|
||||
//}
|
||||
|
||||
void Renderer::MapRenderer::loadVisibleLayers(float coordStep,VisibleQuadContainerCache &qCache) {
|
||||
int totalCellCount = 0;
|
||||
// we create a layer for each visible texture in the map
|
||||
|
@ -4747,6 +4745,8 @@ void Renderer::renderWater() {
|
|||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if(textures3D) {
|
||||
Texture3D *waterTex= world->getTileset()->getWaterTex();
|
||||
if(waterTex == NULL) {
|
||||
|
@ -5030,7 +5030,7 @@ void Renderer::renderGhostModel(const UnitType *building, const Vec2i pos,Cardin
|
|||
glPopMatrix();
|
||||
}
|
||||
|
||||
void Renderer::renderUnits(const int renderFps) {
|
||||
void Renderer::renderUnits(bool airUnits, const int renderFps) {
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
|
||||
return;
|
||||
}
|
||||
|
@ -5057,6 +5057,9 @@ void Renderer::renderUnits(const int renderFps) {
|
|||
visibleUnitIndex < (int)qCache.visibleQuadUnitList.size(); ++visibleUnitIndex) {
|
||||
Unit *unit = qCache.visibleQuadUnitList[visibleUnitIndex];
|
||||
|
||||
if(( airUnits==false && unit->getType()->getField()==fAir) || ( airUnits==true && unit->getType()->getField()!=fAir)){
|
||||
continue;
|
||||
}
|
||||
meshCallbackTeamColor.setTeamTexture(unit->getFaction()->getTexture());
|
||||
|
||||
if(modelRenderStarted == false) {
|
||||
|
@ -5108,8 +5111,8 @@ void Renderer::renderUnits(const int renderFps) {
|
|||
}
|
||||
else {
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
//this only needs to be done in render fast for selection and shadow calculation. No need to do this in real render
|
||||
//glAlphaFunc(GL_GREATER, 0.4f);
|
||||
// we cut off a tiny bit here to avoid problems with fully transparent texture parts cutting units in background rendered later.
|
||||
glAlphaFunc(GL_GREATER, 0.02f);
|
||||
}
|
||||
|
||||
//render
|
||||
|
@ -7335,7 +7338,7 @@ void Renderer::saveScreen(const string &path,int w, int h) {
|
|||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
// Signal the threads queue to add a screenshot save request
|
||||
MutexSafeWrapper safeMutex(&saveScreenShotThreadAccessor,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(saveScreenShotThreadAccessor,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
saveScreenQueue.push_back(make_pair(path,pixmapScreenShot));
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -7343,7 +7346,7 @@ void Renderer::saveScreen(const string &path,int w, int h) {
|
|||
}
|
||||
|
||||
unsigned int Renderer::getSaveScreenQueueSize() {
|
||||
MutexSafeWrapper safeMutex(&saveScreenShotThreadAccessor,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(saveScreenShotThreadAccessor,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
int queueSize = (int)saveScreenQueue.size();
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -9243,8 +9246,8 @@ void Renderer::setLastRenderFps(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
uint64 Renderer::getCurrentPixelByteCount(ResourceScope rs) const {
|
||||
uint64 result = 0;
|
||||
std::size_t Renderer::getCurrentPixelByteCount(ResourceScope rs) const {
|
||||
std::size_t result = 0;
|
||||
for(int i = (rs == rsCount ? 0 : rs); i < rsCount; ++i) {
|
||||
if(textureManager[i] != NULL) {
|
||||
const ::Shared::Graphics::TextureContainer &textures = textureManager[i]->getTextures();
|
||||
|
|
|
@ -318,7 +318,7 @@ private:
|
|||
std::vector<std::pair<ParticleSystem *, ResourceScope> > deferredParticleSystems;
|
||||
|
||||
SimpleTaskThread *saveScreenShotThread;
|
||||
Mutex saveScreenShotThreadAccessor;
|
||||
Mutex *saveScreenShotThreadAccessor;
|
||||
std::list<std::pair<string,Pixmap2D *> > saveScreenQueue;
|
||||
|
||||
std::map<Vec3f,Vec3f> worldToScreenPosCache;
|
||||
|
@ -545,7 +545,7 @@ public:
|
|||
void renderObjects(const int renderFps);
|
||||
|
||||
void renderWater();
|
||||
void renderUnits(const int renderFps);
|
||||
void renderUnits(bool airUnits, const int renderFps);
|
||||
void renderUnitsToBuild(const int renderFps);
|
||||
|
||||
void renderSelectionEffects();
|
||||
|
@ -627,7 +627,7 @@ public:
|
|||
void removeObjectFromQuadCache(const Object *o);
|
||||
void removeUnitFromQuadCache(const Unit *unit);
|
||||
|
||||
uint64 getCurrentPixelByteCount(ResourceScope rs=rsGame) const;
|
||||
std::size_t getCurrentPixelByteCount(ResourceScope rs=rsGame) const;
|
||||
unsigned int getSaveScreenQueueSize();
|
||||
|
||||
Texture2D *saveScreenToTexture(int x, int y, int width, int height);
|
||||
|
|
|
@ -291,6 +291,31 @@ void UnitParticleSystemType::load(const XmlNode *particleFileNode, const string
|
|||
}
|
||||
}
|
||||
|
||||
void UnitParticleSystemType::loadGame(const XmlNode *rootNode) {
|
||||
ParticleSystemType::loadGame(rootNode);
|
||||
|
||||
const XmlNode *unitParticleSystemTypeNode = rootNode->getChild("UnitParticleSystemType");
|
||||
|
||||
shape = static_cast<UnitParticleSystem::Shape>(unitParticleSystemTypeNode->getAttribute("shape")->getIntValue());
|
||||
angle = unitParticleSystemTypeNode->getAttribute("angle")->getFloatValue();
|
||||
radius = unitParticleSystemTypeNode->getAttribute("radius")->getFloatValue();
|
||||
minRadius = unitParticleSystemTypeNode->getAttribute("minRadius")->getFloatValue();
|
||||
emissionRateFade = unitParticleSystemTypeNode->getAttribute("emissionRateFade")->getFloatValue();
|
||||
direction = Vec3f::strToVec3(unitParticleSystemTypeNode->getAttribute("direction")->getValue());
|
||||
relative = (unitParticleSystemTypeNode->getAttribute("relative")->getIntValue() != 0);
|
||||
relativeDirection = (unitParticleSystemTypeNode->getAttribute("relativeDirection")->getIntValue() != 0);
|
||||
fixed = (unitParticleSystemTypeNode->getAttribute("fixed")->getIntValue() != 0);
|
||||
staticParticleCount = unitParticleSystemTypeNode->getAttribute("staticParticleCount")->getIntValue();
|
||||
isVisibleAtNight = (unitParticleSystemTypeNode->getAttribute("isVisibleAtNight")->getIntValue() != 0);
|
||||
isVisibleAtDay = (unitParticleSystemTypeNode->getAttribute("isVisibleAtDay")->getIntValue() != 0);
|
||||
isDaylightAffected = (unitParticleSystemTypeNode->getAttribute("isDaylightAffected")->getIntValue() != 0);
|
||||
radiusBasedStartenergy = (unitParticleSystemTypeNode->getAttribute("radiusBasedStartenergy")->getIntValue() != 0);
|
||||
delay = unitParticleSystemTypeNode->getAttribute("delay")->getIntValue();
|
||||
lifetime = unitParticleSystemTypeNode->getAttribute("lifetime")->getIntValue();
|
||||
startTime = unitParticleSystemTypeNode->getAttribute("startTime")->getFloatValue();
|
||||
endTime = unitParticleSystemTypeNode->getAttribute("endTime")->getFloatValue();
|
||||
}
|
||||
|
||||
void UnitParticleSystemType::saveGame(XmlNode *rootNode) {
|
||||
ParticleSystemType::saveGame(rootNode);
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@ public:
|
|||
const void setValues (UnitParticleSystem *uts);
|
||||
bool hasTexture() const { return(texture != NULL); }
|
||||
virtual void saveGame(XmlNode *rootNode);
|
||||
virtual void loadGame(const XmlNode *rootNode);
|
||||
};
|
||||
|
||||
class ObjectParticleSystemType: public UnitParticleSystemType {
|
||||
|
|
|
@ -345,17 +345,19 @@ void Gui::groupKey(int groupIndex) {
|
|||
else{
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] groupIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,groupIndex);
|
||||
|
||||
Config &config = Config::getInstance();
|
||||
int recallGroupCenterCameraTimeout = config.getInt("RecallGroupCenterCameraTimeoutMilliseconds","1500");
|
||||
int recallGroupCenterCameraTimeout = Config::getInstance().getInt("RecallGroupCenterCameraTimeoutMilliseconds","1500");
|
||||
|
||||
if(lastGroupRecall == groupIndex &&
|
||||
lastGroupRecallTime.getMillis() > 0 &&
|
||||
lastGroupRecallTime.getMillis() <= recallGroupCenterCameraTimeout) {
|
||||
|
||||
selection.recallGroup(groupIndex);
|
||||
centerCameraOnSelection();
|
||||
}
|
||||
else {
|
||||
selection.recallGroup(groupIndex);
|
||||
}
|
||||
|
||||
lastGroupRecallTime.start();
|
||||
lastGroupRecall = groupIndex;
|
||||
}
|
||||
|
|
|
@ -4739,7 +4739,7 @@ int glestMain(int argc, char** argv) {
|
|||
string newMaxSeconds = paramPartTokens2[0];
|
||||
time_t newTimeMaxSeconds = strToInt(newMaxSeconds);
|
||||
AutoTest::setMaxGameTime(newTimeMaxSeconds);
|
||||
printf("Forcing maximum game time to [%ld] seconds (%.2f minutes)\n",newTimeMaxSeconds,((double)newTimeMaxSeconds / 60.0));
|
||||
printf("Forcing maximum game time to [%ld] seconds (%.2f minutes)\n",(long int)newTimeMaxSeconds,((double)newTimeMaxSeconds / 60.0));
|
||||
}
|
||||
if(paramPartTokens2.size() >= 3 && paramPartTokens2[2].length() > 0) {
|
||||
string autoTestCmd = paramPartTokens2[2];
|
||||
|
|
|
@ -40,8 +40,8 @@ static string IRC_CHANNEL = "#megaglest-lobby";
|
|||
// class MenuStateMasterserver
|
||||
// =====================================================
|
||||
|
||||
MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMenu):
|
||||
MenuState(program, mainMenu, "masterserver")
|
||||
MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMenu) :
|
||||
MenuState(program, mainMenu, "masterserver"), mutexIRCClient(new Mutex(CODE_AT_LINE))
|
||||
{
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\n\n\n\n******************** ENTERING MASTERSERVER MENU\n\n\n\n\n");
|
||||
|
||||
|
@ -306,7 +306,7 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
ircArgs.push_back("");
|
||||
}
|
||||
|
||||
MutexSafeWrapper safeMutexIRCPtr(&mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutexIRCPtr(mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#1 IRCCLient Cache check\n");
|
||||
IRCThread * &ircThread = CacheManager::getCachedItem< IRCThread * >(GameConstants::ircClientCacheLookupKey);
|
||||
|
@ -419,7 +419,7 @@ void MenuStateMasterserver::setButtonLinePosition(int pos){
|
|||
}
|
||||
|
||||
void MenuStateMasterserver::IRC_CallbackEvent(IRCEventType evt, const char* origin, const char **params, unsigned int count) {
|
||||
MutexSafeWrapper safeMutexIRCPtr(&mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutexIRCPtr(mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
if(ircClient != NULL) {
|
||||
if(evt == IRC_evt_exitThread) {
|
||||
ircClient->leaveChannel();
|
||||
|
@ -492,7 +492,7 @@ void MenuStateMasterserver::cleanup() {
|
|||
clearServerLines();
|
||||
clearUserButtons();
|
||||
|
||||
MutexSafeWrapper safeMutexIRCPtr(&mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutexIRCPtr(mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
if(ircClient != NULL) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
|
@ -508,7 +508,12 @@ void MenuStateMasterserver::cleanup() {
|
|||
|
||||
MenuStateMasterserver::~MenuStateMasterserver() {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
cleanup();
|
||||
|
||||
delete mutexIRCClient;
|
||||
mutexIRCClient = NULL;
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] END\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
|
@ -731,7 +736,7 @@ void MenuStateMasterserver::render(){
|
|||
renderer.renderLabel(&selectButton,&titleLabelColor);
|
||||
|
||||
Lang &lang= Lang::getInstance();
|
||||
MutexSafeWrapper safeMutexIRCPtr(&mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutexIRCPtr(mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
if(ircClient != NULL &&
|
||||
ircClient->isConnected() == true &&
|
||||
ircClient->getHasJoinedChannel() == true) {
|
||||
|
@ -820,7 +825,7 @@ void MenuStateMasterserver::update() {
|
|||
//console
|
||||
consoleIRC.update();
|
||||
|
||||
MutexSafeWrapper safeMutexIRCPtr(&mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutexIRCPtr(mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
if(ircClient != NULL) {
|
||||
std::vector<string> nickList = ircClient->getNickList();
|
||||
|
||||
|
@ -1192,7 +1197,7 @@ void MenuStateMasterserver::keyDown(SDL_KeyboardEvent key) {
|
|||
//chatmanger only if connected to irc!
|
||||
if (chatManager.getEditEnabled() == true) {
|
||||
//printf("keyDown key [%d] chatManager.getText() [%s]\n",key,chatManager.getText().c_str());
|
||||
MutexSafeWrapper safeMutexIRCPtr(&mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutexIRCPtr(mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
|
||||
//if (key == vkReturn && ircClient != NULL) {
|
||||
if(isKeyPressed(SDLK_RETURN,key) == true && ircClient != NULL) {
|
||||
ircClient->SendIRCCmdMessage(IRC_CHANNEL, chatManager.getText());
|
||||
|
|
|
@ -103,7 +103,7 @@ private:
|
|||
std::string threadedErrorMsg;
|
||||
|
||||
std::vector<string> ircArgs;
|
||||
Mutex mutexIRCClient;
|
||||
Mutex *mutexIRCClient;
|
||||
IRCThread *ircClient;
|
||||
std::vector<string> oldNickList;
|
||||
|
||||
|
|
|
@ -393,10 +393,6 @@ void MenuStateOptionsGraphics::reloadUI() {
|
|||
std::vector<string> listboxData;
|
||||
listboxData.push_back("None");
|
||||
listboxData.push_back("OpenAL");
|
||||
// deprecated as of 3.6.1
|
||||
//#ifdef WIN32
|
||||
// listboxData.push_back("DirectSound8");
|
||||
//#endif
|
||||
|
||||
labelScreenModes.setText(lang.getString("Resolution"));
|
||||
|
||||
|
|
|
@ -257,11 +257,6 @@ void MenuStateOptionsNetwork::reloadUI() {
|
|||
std::vector<string> listboxData;
|
||||
listboxData.push_back("None");
|
||||
listboxData.push_back("OpenAL");
|
||||
// deprecated as of 3.6.1
|
||||
//#ifdef WIN32
|
||||
// listboxData.push_back("DirectSound8");
|
||||
//#endif
|
||||
|
||||
|
||||
listboxData.clear();
|
||||
listboxData.push_back("Bilinear");
|
||||
|
|
|
@ -109,10 +109,6 @@ MenuStateOptionsSound::MenuStateOptionsSound(Program *program, MainMenu *mainMen
|
|||
listBoxSoundFactory.init(currentColumnStart, currentLine, 100);
|
||||
listBoxSoundFactory.pushBackItem("None");
|
||||
listBoxSoundFactory.pushBackItem("OpenAL");
|
||||
// deprecated as of 3.6.1
|
||||
//#ifdef WIN32
|
||||
//listBoxSoundFactory.pushBackItem("DirectSound8");
|
||||
//#endif
|
||||
|
||||
listBoxSoundFactory.setSelectedItem(config.getString("FactorySound"));
|
||||
currentLine-=lineOffset;
|
||||
|
@ -207,10 +203,6 @@ void MenuStateOptionsSound::reloadUI() {
|
|||
std::vector<string> listboxData;
|
||||
listboxData.push_back("None");
|
||||
listboxData.push_back("OpenAL");
|
||||
// deprecated as of 3.6.1
|
||||
//#ifdef WIN32
|
||||
// listboxData.push_back("DirectSound8");
|
||||
//#endif
|
||||
|
||||
listBoxSoundFactory.setItems(listboxData);
|
||||
|
||||
|
|
|
@ -32,26 +32,26 @@ namespace Glest{ namespace Game{
|
|||
|
||||
ConnectionSlotThread::ConnectionSlotThread(int slotIndex) : BaseThread() {
|
||||
this->masterController = NULL;
|
||||
this->triggerIdMutex = new Mutex();
|
||||
this->triggerIdMutex = new Mutex(CODE_AT_LINE);
|
||||
this->slotIndex = slotIndex;
|
||||
this->slotInterface = NULL;
|
||||
uniqueID = "ConnectionSlotThread";
|
||||
eventList.clear();
|
||||
eventList.reserve(1000);
|
||||
|
||||
triggerGameStarted = new Mutex();
|
||||
triggerGameStarted = new Mutex(CODE_AT_LINE);
|
||||
gameStarted = false;
|
||||
}
|
||||
|
||||
ConnectionSlotThread::ConnectionSlotThread(ConnectionSlotCallbackInterface *slotInterface,int slotIndex) : BaseThread() {
|
||||
this->masterController = NULL;
|
||||
this->triggerIdMutex = new Mutex();
|
||||
this->triggerIdMutex = new Mutex(CODE_AT_LINE);
|
||||
this->slotIndex = slotIndex;
|
||||
this->slotInterface = slotInterface;
|
||||
uniqueID = "ConnectionSlotThread";
|
||||
eventList.clear();
|
||||
|
||||
triggerGameStarted = new Mutex();
|
||||
triggerGameStarted = new Mutex(CODE_AT_LINE);
|
||||
gameStarted = false;
|
||||
}
|
||||
|
||||
|
@ -347,11 +347,11 @@ void ConnectionSlotThread::execute() {
|
|||
ConnectionSlot::ConnectionSlot(ServerInterface* serverInterface, int playerIndex) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
this->mutexSocket = new Mutex();
|
||||
this->mutexSocket = new Mutex(CODE_AT_LINE);
|
||||
this->socket = NULL;
|
||||
this->mutexCloseConnection = new Mutex();
|
||||
this->mutexPendingNetworkCommandList = new Mutex();
|
||||
this->socketSynchAccessor = new Mutex();
|
||||
this->mutexCloseConnection = new Mutex(CODE_AT_LINE);
|
||||
this->mutexPendingNetworkCommandList = new Mutex(CODE_AT_LINE);
|
||||
this->socketSynchAccessor = new Mutex(CODE_AT_LINE);
|
||||
this->connectedRemoteIPAddress = 0;
|
||||
this->sessionKey = 0;
|
||||
this->serverInterface = serverInterface;
|
||||
|
|
|
@ -41,14 +41,14 @@ DisplayMessageFunction NetworkInterface::pCB_DisplayMessage = NULL;
|
|||
Vec3f MarkedCell::static_system_marker_color(MAGENTA.x,MAGENTA.y,MAGENTA.z);
|
||||
|
||||
NetworkInterface::NetworkInterface() {
|
||||
networkAccessMutex = new Mutex();
|
||||
networkAccessMutex = new Mutex(CODE_AT_LINE);
|
||||
|
||||
networkGameDataSynchCheckOkMap=false;
|
||||
networkGameDataSynchCheckOkTile=false;
|
||||
networkGameDataSynchCheckOkTech=false;
|
||||
receivedDataSynchCheck=false;
|
||||
|
||||
networkPlayerFactionCRCMutex = new Mutex();
|
||||
networkPlayerFactionCRCMutex = new Mutex(CODE_AT_LINE);
|
||||
for(unsigned int index = 0; index < (unsigned int)GameConstants::maxPlayers; ++index) {
|
||||
networkPlayerFactionCRC[index] = 0;
|
||||
}
|
||||
|
@ -360,15 +360,11 @@ void GameNetworkInterface::requestCommand(const NetworkCommand *networkCommand,
|
|||
|
||||
if(insertAtStart == false) {
|
||||
MutexSafeWrapper safeMutex(mutex,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
//if(mutex != NULL) mutex->p();
|
||||
requestedCommands.push_back(*networkCommand);
|
||||
//if(mutex != NULL) mutex->v();
|
||||
}
|
||||
else {
|
||||
MutexSafeWrapper safeMutex(mutex,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
//if(mutex != NULL) mutex->p();
|
||||
requestedCommands.insert(requestedCommands.begin(),*networkCommand);
|
||||
//if(mutex != NULL) mutex->v();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -388,7 +384,6 @@ void FileTransferSocketThread::execute()
|
|||
if(info.hostType == eServer)
|
||||
{
|
||||
ServerSocket serverSocket;
|
||||
//serverSocket.setBlock(false);
|
||||
serverSocket.bind(this->info.serverPort);
|
||||
serverSocket.listen(1);
|
||||
Socket *clientSocket = serverSocket.accept();
|
||||
|
@ -465,7 +460,6 @@ void FileTransferSocketThread::execute()
|
|||
{
|
||||
Ip ip(this->info.serverIP);
|
||||
ClientSocket clientSocket;
|
||||
//clientSocket.setBlock(false);
|
||||
clientSocket.connect(this->info.serverIP, this->info.serverPort);
|
||||
|
||||
if(clientSocket.isConnected() == true)
|
||||
|
|
|
@ -2260,9 +2260,9 @@ bool NetworkMessageSynchNetworkGameDataStatus::receive(Socket* socket) {
|
|||
fromEndianHeader();
|
||||
// Here we loop possibly multiple times
|
||||
uint32 packetLoopCount = 1;
|
||||
if(data.header.techCRCFileCount > (uint32)NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount) {
|
||||
packetLoopCount = (data.header.techCRCFileCount / (uint32)NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount);
|
||||
if(data.header.techCRCFileCount % (uint32)NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount > 0) {
|
||||
if(data.header.techCRCFileCount > NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount) {
|
||||
packetLoopCount = (data.header.techCRCFileCount / NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount);
|
||||
if(data.header.techCRCFileCount % NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount > 0) {
|
||||
packetLoopCount++;
|
||||
}
|
||||
}
|
||||
|
@ -2271,8 +2271,8 @@ bool NetworkMessageSynchNetworkGameDataStatus::receive(Socket* socket) {
|
|||
|
||||
for(uint32 iPacketLoop = 0; iPacketLoop < packetLoopCount; ++iPacketLoop) {
|
||||
|
||||
uint32 packetIndex = iPacketLoop * (uint32)NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount;
|
||||
uint32 maxFileCountPerPacket = (uint32)maxFileCRCPacketCount;
|
||||
uint32 packetIndex = iPacketLoop * NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount;
|
||||
uint32 maxFileCountPerPacket = maxFileCRCPacketCount;
|
||||
uint32 packetFileCount = min((uint32)maxFileCountPerPacket,data.header.techCRCFileCount - packetIndex);
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] iPacketLoop = %u, packetIndex = %u, packetFileCount = %u\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,iPacketLoop,packetIndex,packetFileCount);
|
||||
|
@ -2305,7 +2305,7 @@ void NetworkMessageSynchNetworkGameDataStatus::send(Socket* socket) {
|
|||
if(totalFileCount > 0) {
|
||||
// Here we loop possibly multiple times
|
||||
int packetLoopCount = 1;
|
||||
if(totalFileCount > (uint32)NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount) {
|
||||
if(totalFileCount > NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount) {
|
||||
packetLoopCount = (totalFileCount / NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount);
|
||||
if(totalFileCount % NetworkMessageSynchNetworkGameDataStatus::maxFileCRCPacketCount > 0) {
|
||||
packetLoopCount++;
|
||||
|
|
|
@ -601,7 +601,7 @@ private:
|
|||
|
||||
static const int maxStringSize= 255;
|
||||
static const int maxFileCRCCount= 1500;
|
||||
static const int maxFileCRCPacketCount= 25;
|
||||
static const uint32 maxFileCRCPacketCount= 25;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -56,16 +56,16 @@ ServerInterface::ServerInterface(bool publishEnabled) :GameNetworkInterface() {
|
|||
allowInGameConnections = false;
|
||||
gameLaunched = false;
|
||||
|
||||
serverSynchAccessor = new Mutex();
|
||||
switchSetupRequestsSynchAccessor = new Mutex();
|
||||
serverSynchAccessor = new Mutex(CODE_AT_LINE);
|
||||
switchSetupRequestsSynchAccessor = new Mutex(CODE_AT_LINE);
|
||||
|
||||
for(int index = 0; index < GameConstants::maxPlayers; ++index) {
|
||||
slotAccessorMutexes[index] = new Mutex();
|
||||
slotAccessorMutexes[index] = new Mutex(CODE_AT_LINE);
|
||||
}
|
||||
masterServerThreadAccessor = new Mutex();
|
||||
textMessageQueueThreadAccessor = new Mutex();
|
||||
broadcastMessageQueueThreadAccessor = new Mutex();
|
||||
inBroadcastMessageThreadAccessor = new Mutex();
|
||||
masterServerThreadAccessor = new Mutex(CODE_AT_LINE);
|
||||
textMessageQueueThreadAccessor = new Mutex(CODE_AT_LINE);
|
||||
broadcastMessageQueueThreadAccessor = new Mutex(CODE_AT_LINE);
|
||||
inBroadcastMessageThreadAccessor = new Mutex(CODE_AT_LINE);
|
||||
|
||||
serverSocketAdmin = NULL;
|
||||
nextEventId = 1;
|
||||
|
@ -123,7 +123,7 @@ ServerInterface::ServerInterface(bool publishEnabled) :GameNetworkInterface() {
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
gameStatsThreadAccessor = new Mutex();
|
||||
gameStatsThreadAccessor = new Mutex(CODE_AT_LINE);
|
||||
gameStats = NULL;
|
||||
|
||||
Config &config = Config::getInstance();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// ==============================================================
|
||||
// This file is part of Glest (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Martiño Figueroa
|
||||
//
|
||||
|
@ -31,7 +30,7 @@ const float SoundRenderer::audibleDist= 50.f;
|
|||
// class SoundRenderer
|
||||
// =====================================================
|
||||
|
||||
SoundRenderer::SoundRenderer() {
|
||||
SoundRenderer::SoundRenderer() : mutex(new Mutex(CODE_AT_LINE)) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
soundPlayer = NULL;
|
||||
|
@ -58,7 +57,7 @@ bool SoundRenderer::init(Window *window) {
|
|||
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
soundPlayer= si.newSoundPlayer();
|
||||
|
@ -84,7 +83,7 @@ void SoundRenderer::cleanup() {
|
|||
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
delete soundPlayer;
|
||||
soundPlayer = NULL;
|
||||
|
@ -112,6 +111,9 @@ SoundRenderer::~SoundRenderer() {
|
|||
|
||||
cleanup();
|
||||
|
||||
delete mutex;
|
||||
mutex = NULL;
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
|
@ -124,7 +126,7 @@ void SoundRenderer::update() {
|
|||
if(wasInitOk() == true && soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
if(soundPlayer) {
|
||||
soundPlayer->updateStreams();
|
||||
|
@ -141,7 +143,7 @@ void SoundRenderer::playMusic(StrSound *strSound) {
|
|||
if(soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
|
@ -161,7 +163,7 @@ void SoundRenderer::stopMusic(StrSound *strSound) {
|
|||
if(soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
|
@ -190,7 +192,7 @@ void SoundRenderer::playFx(StaticSound *staticSound, Vec3f soundPos, Vec3f camPo
|
|||
if(soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
|
@ -207,7 +209,7 @@ void SoundRenderer::playFx(StaticSound *staticSound) {
|
|||
if(soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
|
@ -225,7 +227,7 @@ void SoundRenderer::playAmbient(StrSound *strSound) {
|
|||
if(soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
|
@ -239,7 +241,7 @@ void SoundRenderer::stopAmbient(StrSound *strSound) {
|
|||
if(soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
|
@ -254,7 +256,7 @@ void SoundRenderer::stopAllSounds(int64 fadeOff) {
|
|||
if(soundPlayer != NULL) {
|
||||
MutexSafeWrapper safeMutex(NULL,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
safeMutex.setMutex(mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
|
|
|
@ -51,7 +51,7 @@ private:
|
|||
float musicVolume;
|
||||
float ambientVolume;
|
||||
|
||||
Mutex mutex;
|
||||
Mutex *mutex;
|
||||
bool runThreadSafe;
|
||||
|
||||
private:
|
||||
|
|
|
@ -213,7 +213,7 @@ void Faction::sortUnitsByCommandGroups() {
|
|||
// =====================================================
|
||||
|
||||
FactionThread::FactionThread(Faction *faction) : BaseThread() {
|
||||
this->triggerIdMutex = new Mutex();
|
||||
this->triggerIdMutex = new Mutex(CODE_AT_LINE);
|
||||
this->faction = faction;
|
||||
this->masterController = NULL;
|
||||
uniqueID = "FactionThread";
|
||||
|
@ -476,7 +476,7 @@ Faction::Faction() {
|
|||
}
|
||||
|
||||
void Faction::init() {
|
||||
unitsMutex = new Mutex();
|
||||
unitsMutex = new Mutex(CODE_AT_LINE);
|
||||
texture = NULL;
|
||||
//lastResourceTargettListPurge = 0;
|
||||
cachingDisabled=false;
|
||||
|
|
|
@ -273,6 +273,8 @@ UnitAttackBoostEffect::UnitAttackBoostEffect() {
|
|||
printf("++ Create UnitAttackBoostEffect [%p] after count = %d\n",this,memoryObjectList[this]);
|
||||
}
|
||||
|
||||
unitId = -1;
|
||||
unitPtr = NULL;
|
||||
boost = NULL;
|
||||
source = NULL;
|
||||
ups = NULL;
|
||||
|
@ -303,6 +305,92 @@ UnitAttackBoostEffect::~UnitAttackBoostEffect() {
|
|||
upst = NULL;
|
||||
}
|
||||
|
||||
const Unit * UnitAttackBoostEffect::getSource() {
|
||||
if(source == NULL && unitPtr != NULL && unitId > 0) {
|
||||
source = unitPtr->getFaction()->findUnit(unitId);
|
||||
|
||||
//printf("#1 Get source - boost effect unitId = %d unitPtr = %s source = %p\n",unitId,unitPtr->getFullName(false).c_str(),source);
|
||||
}
|
||||
//printf("#2 Get source - boost effect unitId = %d unitPtr = %s source = %p\n",unitId,unitPtr->getFullName(false).c_str(),source);
|
||||
return source;
|
||||
}
|
||||
|
||||
void UnitAttackBoostEffect::setSource(const Unit *unit) {
|
||||
source = unit;
|
||||
}
|
||||
|
||||
void UnitAttackBoostEffect::applyLoadedAttackBoostParticles(UnitParticleSystemType *upstPtr,const XmlNode *node, Unit* unit) {
|
||||
if (upstPtr != NULL) {
|
||||
bool showUnitParticles = Config::getInstance().getBool("UnitParticles","true");
|
||||
if (showUnitParticles == true) {
|
||||
upst = new UnitParticleSystemType();
|
||||
*upst = *upstPtr;
|
||||
upst->loadGame(node);
|
||||
|
||||
ups = new UnitParticleSystem(200);
|
||||
//ups->loadGame(node2);
|
||||
ups->setParticleOwner(unit);
|
||||
upst->setValues(ups);
|
||||
ups->setPos(unit->getCurrVector());
|
||||
if (unit->getFaction()->getTexture()) {
|
||||
ups->setFactionColor(unit->getFaction()->getTexture()->getPixmapConst()->getPixel3f(0, 0));
|
||||
}
|
||||
//printf("Adding attack boost particle to deferred buffer: %p\n",ups);
|
||||
Renderer::getInstance().addToDeferredParticleSystemList(make_pair(ups, rsGame));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UnitAttackBoostEffect::loadGame(const XmlNode *rootNode, Unit *unit, World *world, bool applyToOriginator) {
|
||||
const XmlNode *unitAttackBoostEffectNode = rootNode;
|
||||
|
||||
if(unitAttackBoostEffectNode->hasAttribute("source") == true) {
|
||||
unitId = unitAttackBoostEffectNode->getAttribute("source")->getIntValue();
|
||||
unitPtr = unit;
|
||||
source = unit->getFaction()->findUnit(unitId);
|
||||
|
||||
// printf("#1 Loaded boost effect unitId = %d unitPtr = [%d - %s] source = %p\n",
|
||||
// unitId,unitPtr->getId(),unitPtr->getType()->getName(false).c_str(),source);
|
||||
}
|
||||
|
||||
// Lets determine the originator unit's attack boost based on the skill used to trigger it
|
||||
if(unitAttackBoostEffectNode->hasAttribute("source-faction") == true) {
|
||||
string factionName = unitAttackBoostEffectNode->getAttribute("source-faction")->getValue();
|
||||
string unitTypeName = unitAttackBoostEffectNode->getAttribute("source-unit-type")->getValue();
|
||||
string skillTypeName = unitAttackBoostEffectNode->getAttribute("source-skill-type")->getValue();
|
||||
SkillClass skillClass = static_cast<SkillClass>(unitAttackBoostEffectNode->getAttribute("source-skill-class")->getIntValue());
|
||||
|
||||
const UnitType *unitType = world->findUnitTypeByName(factionName, unitTypeName);
|
||||
if(unitType != NULL) {
|
||||
const SkillType *skillType = unitType->getSkillType(skillTypeName,skillClass);
|
||||
if(skillType != NULL) {
|
||||
boost = skillType->getAttackBoost();
|
||||
|
||||
// printf("#2 boost effect unitId = %d unitPtr = [%d - %s] source = %p attackBoost src [%p] dest [%p]\n",
|
||||
// unitId,unitPtr->getId(),unitPtr->getType()->getName(false).c_str(),
|
||||
// source,boost->unitParticleSystemTypeForSourceUnit,boost->unitParticleSystemTypeForAffectedUnit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(boost != NULL) {
|
||||
// printf("unit [%d - %s] applyToOriginator: %d src [%p] dest [%p] Boost attackBoost->enabled = %d:\n%s\n",
|
||||
// unit->getId(),unit->getType()->getName(false).c_str(),applyToOriginator,boost->unitParticleSystemTypeForSourceUnit,boost->unitParticleSystemTypeForAffectedUnit,boost->enabled,boost->getDesc(false).c_str());
|
||||
|
||||
if(applyToOriginator == true) {
|
||||
applyLoadedAttackBoostParticles(boost->unitParticleSystemTypeForSourceUnit,
|
||||
unitAttackBoostEffectNode, unit);
|
||||
}
|
||||
else {
|
||||
applyLoadedAttackBoostParticles(boost->unitParticleSystemTypeForAffectedUnit,
|
||||
unitAttackBoostEffectNode, unit);
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf("******!!!! unit [%d - %s] applyToOriginator: %d NO BOOST FOUND!!!\n",unit->getId(),unit->getType()->getName(false).c_str(),applyToOriginator);
|
||||
}
|
||||
}
|
||||
|
||||
void UnitAttackBoostEffect::saveGame(XmlNode *rootNode) {
|
||||
std::map<string,string> mapTagReplacements;
|
||||
XmlNode *unitAttackBoostEffectNode = rootNode->addChild("UnitAttackBoostEffect");
|
||||
|
@ -312,8 +400,13 @@ void UnitAttackBoostEffect::saveGame(XmlNode *rootNode) {
|
|||
boost->saveGame(unitAttackBoostEffectNode);
|
||||
}
|
||||
// const Unit *source;
|
||||
if(source != NULL) {
|
||||
unitAttackBoostEffectNode->addAttribute("source",intToStr(source->getId()), mapTagReplacements);
|
||||
if(getSource() != NULL) {
|
||||
unitAttackBoostEffectNode->addAttribute("source",intToStr(getSource()->getId()), mapTagReplacements);
|
||||
|
||||
unitAttackBoostEffectNode->addAttribute("source-faction",getSource()->getFaction()->getType()->getName(false), mapTagReplacements);
|
||||
unitAttackBoostEffectNode->addAttribute("source-unit-type",getSource()->getType()->getName(false), mapTagReplacements);
|
||||
unitAttackBoostEffectNode->addAttribute("source-skill-type",getSource()->getCurrSkill()->getName(), mapTagReplacements);
|
||||
unitAttackBoostEffectNode->addAttribute("source-skill-class",intToStr(getSource()->getCurrSkill()->getClass()), mapTagReplacements);
|
||||
}
|
||||
// UnitParticleSystem *ups;
|
||||
if(ups != NULL && Renderer::getInstance().validateParticleSystemStillExists(ups,rsGame) == true) {
|
||||
|
@ -336,6 +429,43 @@ UnitAttackBoostEffectOriginator::~UnitAttackBoostEffectOriginator() {
|
|||
currentAppliedEffect = NULL;
|
||||
}
|
||||
|
||||
void UnitAttackBoostEffectOriginator::loadGame(const XmlNode *rootNode, Unit *unit, World *world) {
|
||||
const XmlNode *unitAttackBoostEffectOriginatorNode = rootNode->getChild("UnitAttackBoostEffectOriginator");
|
||||
|
||||
SkillClass skillClass = scStop;
|
||||
string skillTypeName = unitAttackBoostEffectOriginatorNode->getAttribute("skillType")->getValue();
|
||||
if(unitAttackBoostEffectOriginatorNode->hasAttribute("skillClass") == false) {
|
||||
int skillCount = unit->getType()->getSkillTypeCount();
|
||||
for(int index = 0; index < skillCount; ++index) {
|
||||
const SkillType *st = unit->getType()->getSkillType(index);
|
||||
if(st->getName() == skillTypeName) {
|
||||
skillClass = st->getClass();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
skillClass = static_cast<SkillClass>(unitAttackBoostEffectOriginatorNode->getAttribute("skillClass")->getIntValue());
|
||||
}
|
||||
|
||||
this->skillType = unit->getType()->getSkillType(skillTypeName,skillClass);
|
||||
|
||||
if(unitAttackBoostEffectOriginatorNode->hasChild("currentAttackBoostUnits") == true) {
|
||||
vector<XmlNode *> currentAttackBoostUnitsNodeList = unitAttackBoostEffectOriginatorNode->getChildList("currentAttackBoostUnits");
|
||||
for(unsigned int i = 0; i < currentAttackBoostUnitsNodeList.size(); ++i) {
|
||||
XmlNode *node = currentAttackBoostUnitsNodeList[i];
|
||||
|
||||
int unitId = node->getAttribute("value")->getIntValue();
|
||||
currentAttackBoostUnits.push_back(unitId);
|
||||
}
|
||||
}
|
||||
|
||||
if(unitAttackBoostEffectOriginatorNode->hasChild("UnitAttackBoostEffect") == true) {
|
||||
currentAppliedEffect = new UnitAttackBoostEffect();
|
||||
currentAppliedEffect->loadGame(unitAttackBoostEffectOriginatorNode, unit,world, true);
|
||||
}
|
||||
}
|
||||
|
||||
void UnitAttackBoostEffectOriginator::saveGame(XmlNode *rootNode) {
|
||||
std::map<string,string> mapTagReplacements;
|
||||
XmlNode *unitAttackBoostEffectOriginatorNode = rootNode->addChild("UnitAttackBoostEffectOriginator");
|
||||
|
@ -343,6 +473,7 @@ void UnitAttackBoostEffectOriginator::saveGame(XmlNode *rootNode) {
|
|||
// const SkillType *skillType;
|
||||
if(skillType != NULL) {
|
||||
unitAttackBoostEffectOriginatorNode->addAttribute("skillType",skillType->getName(), mapTagReplacements);
|
||||
unitAttackBoostEffectOriginatorNode->addAttribute("skillClass",intToStr(skillType->getClass()), mapTagReplacements);
|
||||
}
|
||||
// std::vector<int> currentAttackBoostUnits;
|
||||
for(unsigned int i = 0; i < currentAttackBoostUnits.size(); ++i) {
|
||||
|
@ -380,7 +511,7 @@ Unit::Unit(int id, UnitPathInterface *unitpath, const Vec2i &pos,
|
|||
Unit::mapMemoryList[this]=true;
|
||||
#endif
|
||||
|
||||
mutexCommands = new Mutex();
|
||||
mutexCommands = new Mutex(CODE_AT_LINE);
|
||||
changedActiveCommand = false;
|
||||
lastSynchDataString="";
|
||||
modelFacing = CardinalDir::NORTH;
|
||||
|
@ -2489,6 +2620,7 @@ bool Unit::update() {
|
|||
}
|
||||
}
|
||||
|
||||
//printf("Unit has attack boost? unit = [%d - %s] size = %d\n",this->getId(), this->getType()->getName(false).c_str(),(int)currentAttackBoostEffects.size());
|
||||
for(unsigned int i = 0; i < currentAttackBoostEffects.size(); ++i) {
|
||||
UnitAttackBoostEffect *effect = currentAttackBoostEffects[i];
|
||||
if(effect != NULL && effect->ups != NULL) {
|
||||
|
@ -2497,8 +2629,13 @@ bool Unit::update() {
|
|||
effect->ups->setPos(getCurrVector());
|
||||
effect->ups->setRotation(getRotation());
|
||||
}
|
||||
|
||||
//printf("i = %d particleValid = %d\n",i,particleValid);
|
||||
}
|
||||
//printf("i = %d effect = %p effect->ups = %p\n",i,effect,(effect ? effect->ups : NULL));
|
||||
}
|
||||
|
||||
|
||||
if(currentAttackBoostOriginatorEffect.currentAppliedEffect != NULL) {
|
||||
if(currentAttackBoostOriginatorEffect.currentAppliedEffect->ups != NULL) {
|
||||
bool particleValid = Renderer::getInstance().validateParticleSystemStillExists(currentAttackBoostOriginatorEffect.currentAppliedEffect->ups,rsGame);
|
||||
|
@ -2598,16 +2735,19 @@ void Unit::updateTimedParticles() {
|
|||
}
|
||||
}
|
||||
|
||||
bool Unit::unitHasAttackBoost(const AttackBoost *boost, const Unit *source) const {
|
||||
bool Unit::unitHasAttackBoost(const AttackBoost *boost, const Unit *source) {
|
||||
bool result = false;
|
||||
for(unsigned int i = 0; i < currentAttackBoostEffects.size(); ++i) {
|
||||
const UnitAttackBoostEffect *effect = currentAttackBoostEffects[i];
|
||||
UnitAttackBoostEffect *effect = currentAttackBoostEffects[i];
|
||||
if( effect != NULL && effect->boost->name == boost->name &&
|
||||
effect->source->getType()->getId() == source->getType()->getId()) {
|
||||
effect->getSource()->getType()->getId() == source->getType()->getId()) {
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//printf("Unit has attack boost? source = [%d - %s] [%p] boost [%s] result = %d\n",source->getId(), source->getType()->getName(false).c_str(),source,boost->name.c_str(),result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2635,7 +2775,7 @@ bool Unit::applyAttackBoost(const AttackBoost *boost, const Unit *source) {
|
|||
|
||||
UnitAttackBoostEffect *effect = new UnitAttackBoostEffect();
|
||||
effect->boost = boost;
|
||||
effect->source = source;
|
||||
effect->setSource(source);
|
||||
|
||||
bool wasAlive = alive;
|
||||
int originalHp = hp;
|
||||
|
@ -2842,7 +2982,7 @@ void Unit::deapplyAttackBoost(const AttackBoost *boost, const Unit *source) {
|
|||
|
||||
for(unsigned int i = 0; i < currentAttackBoostEffects.size(); ++i) {
|
||||
UnitAttackBoostEffect *effect = currentAttackBoostEffects[i];
|
||||
if(effect != NULL && effect->boost == boost && effect->source == source) {
|
||||
if(effect != NULL && effect->boost == boost && effect->getSource() == source) {
|
||||
delete effect;
|
||||
currentAttackBoostEffects.erase(currentAttackBoostEffects.begin() + i);
|
||||
break;
|
||||
|
@ -3337,7 +3477,7 @@ bool Unit::morph(const MorphCommandType *mct) {
|
|||
for(int i = (int)currentAttackBoostEffects.size() - 1; i >= 0; --i) {
|
||||
UnitAttackBoostEffect *effect = currentAttackBoostEffects[i];
|
||||
if(effect != NULL) {
|
||||
Unit *sourceUnit = game->getWorld()->findUnitById(effect->source->getId());
|
||||
Unit *sourceUnit = game->getWorld()->findUnitById(effect->getSource()->getId());
|
||||
if(sourceUnit == NULL) {
|
||||
throw megaglest_runtime_error("sourceUnit == NULL");
|
||||
}
|
||||
|
@ -5054,13 +5194,31 @@ Unit * Unit::loadGame(const XmlNode *rootNode, GameSettings *settings, Faction *
|
|||
// int maxQueuedCommandDisplayCount;
|
||||
result->maxQueuedCommandDisplayCount = unitNode->getAttribute("maxQueuedCommandDisplayCount")->getIntValue();
|
||||
// UnitAttackBoostEffectOriginator currentAttackBoostOriginatorEffect;
|
||||
// currentAttackBoostOriginatorEffect.saveGame(unitNode);
|
||||
|
||||
// !!! TODO: Softcoder - in progress work to load attack boosts, not working properly yet
|
||||
result->currentAttackBoostOriginatorEffect.loadGame(unitNode,result, world);
|
||||
|
||||
// std::vector<UnitAttackBoostEffect *> currentAttackBoostEffects;
|
||||
// for(unsigned int i = 0; i < currentAttackBoostEffects.size(); ++i) {
|
||||
// UnitAttackBoostEffect *uabe= currentAttackBoostEffects[i];
|
||||
// uabe->saveGame(unitNode);
|
||||
// }
|
||||
|
||||
// !!! TODO: Softcoder - in progress work to load attack boosts, not working properly yet
|
||||
if(unitNode->hasChild("UnitAttackBoostEffect") == true) {
|
||||
vector<XmlNode *> unitParticleSystemNodeList = unitNode->getChildList("UnitAttackBoostEffect");
|
||||
for(unsigned int i = 0; i < unitParticleSystemNodeList.size(); ++i) {
|
||||
XmlNode *node = unitParticleSystemNodeList[i];
|
||||
|
||||
UnitAttackBoostEffect *attackBoostEffect = new UnitAttackBoostEffect();
|
||||
attackBoostEffect->loadGame(node,result,world,false);
|
||||
|
||||
result->currentAttackBoostEffects.push_back(attackBoostEffect);
|
||||
}
|
||||
}
|
||||
//printf("Unit [%d - %s] has currentAttackBoostEffects count: %d\n",result->getId(),result->getType()->getName(false).c_str(),(int)result->currentAttackBoostEffects.size());
|
||||
|
||||
|
||||
// Mutex *mutexCommands;
|
||||
//
|
||||
// //static Mutex mutexDeletedUnits;
|
||||
|
|
|
@ -295,17 +295,27 @@ public:
|
|||
// ===============================
|
||||
|
||||
class UnitAttackBoostEffect {
|
||||
private:
|
||||
int unitId;
|
||||
const Unit *unitPtr;
|
||||
|
||||
const Unit *source;
|
||||
|
||||
void applyLoadedAttackBoostParticles(UnitParticleSystemType *upstPtr,const XmlNode* node, Unit* unit);
|
||||
public:
|
||||
|
||||
UnitAttackBoostEffect();
|
||||
virtual ~UnitAttackBoostEffect();
|
||||
|
||||
const AttackBoost *boost;
|
||||
const Unit *source;
|
||||
//const Unit *source;
|
||||
const Unit * getSource();
|
||||
void setSource(const Unit *unit);
|
||||
UnitParticleSystem *ups;
|
||||
UnitParticleSystemType *upst;
|
||||
|
||||
virtual void saveGame(XmlNode *rootNode);
|
||||
virtual void loadGame(const XmlNode *rootNode, Unit *unit, World *world, bool applyToOriginator);
|
||||
};
|
||||
|
||||
class UnitAttackBoostEffectOriginator {
|
||||
|
@ -319,6 +329,7 @@ public:
|
|||
UnitAttackBoostEffect *currentAppliedEffect;
|
||||
|
||||
virtual void saveGame(XmlNode *rootNode);
|
||||
virtual void loadGame(const XmlNode *rootNode, Unit *unit, World *world);
|
||||
};
|
||||
|
||||
class Unit : public BaseColorPickEntity, ValueCheckerVault, public ParticleOwner {
|
||||
|
@ -498,7 +509,7 @@ public:
|
|||
Vec2i getCurrentPathFinderDesiredFinalPos() const { return currentPathFinderDesiredFinalPos; }
|
||||
|
||||
const UnitAttackBoostEffectOriginator & getAttackBoostOriginatorEffect() const { return currentAttackBoostOriginatorEffect; }
|
||||
bool unitHasAttackBoost(const AttackBoost *boost, const Unit *source) const;
|
||||
bool unitHasAttackBoost(const AttackBoost *boost, const Unit *source);
|
||||
|
||||
inline uint32 getPathfindFailedConsecutiveFrameCount() const { return pathfindFailedConsecutiveFrameCount; }
|
||||
inline void incrementPathfindFailedConsecutiveFrameCount() { pathfindFailedConsecutiveFrameCount++; }
|
||||
|
|
|
@ -205,6 +205,39 @@ string AttackBoost::getDesc(bool translatedValue) const{
|
|||
return "";
|
||||
}
|
||||
|
||||
void AttackBoost::loadGame(const XmlNode *rootNode, Faction *faction, const SkillType *skillType) {
|
||||
const XmlNode *attackBoostNode = rootNode->getChild("AttackBoost");
|
||||
|
||||
enabled = (attackBoostNode->getAttribute("enabled")->getIntValue() != 0);
|
||||
allowMultipleBoosts = (attackBoostNode->getAttribute("allowMultipleBoosts")->getIntValue() != 0);
|
||||
radius = attackBoostNode->getAttribute("radius")->getIntValue();
|
||||
targetType = static_cast<AttackBoostTargetType>(attackBoostNode->getAttribute("targetType")->getIntValue());
|
||||
|
||||
if(attackBoostNode->hasChild("UnitType") == true) {
|
||||
vector<XmlNode *> attackBoostNodeList = attackBoostNode->getChildList("UnitType");
|
||||
for(unsigned int i = 0; i < attackBoostNodeList.size(); ++i) {
|
||||
XmlNode *node = attackBoostNodeList[i];
|
||||
|
||||
string unitTypeName = node->getAttribute("name")->getValue();
|
||||
const UnitType *unitType = faction->getType()->getUnitType(unitTypeName);
|
||||
if(unitType != NULL) {
|
||||
boostUnitList.push_back(unitType);
|
||||
}
|
||||
}
|
||||
}
|
||||
//boostUpgrade.loadGame(attackBoostNode,faction);
|
||||
boostUpgrade = skillType->getAttackBoost()->boostUpgrade;
|
||||
|
||||
unitParticleSystemTypeForSourceUnit = new UnitParticleSystemType();
|
||||
unitParticleSystemTypeForSourceUnit->loadGame(attackBoostNode);
|
||||
|
||||
unitParticleSystemTypeForAffectedUnit = new UnitParticleSystemType();
|
||||
unitParticleSystemTypeForAffectedUnit->loadGame(attackBoostNode);
|
||||
|
||||
includeSelf = (attackBoostNode->getAttribute("includeSelf")->getIntValue() != 0);
|
||||
name = attackBoostNode->getAttribute("name")->getValue();
|
||||
}
|
||||
|
||||
void AttackBoost::saveGame(XmlNode *rootNode) const {
|
||||
std::map<string,string> mapTagReplacements;
|
||||
XmlNode *attackBoostNode = rootNode->addChild("AttackBoost");
|
||||
|
|
|
@ -109,6 +109,7 @@ public:
|
|||
virtual string getDesc(bool translatedValue) const;
|
||||
|
||||
virtual void saveGame(XmlNode *rootNode) const;
|
||||
virtual void loadGame(const XmlNode *rootNode, Faction *faction, const SkillType *skillType);
|
||||
};
|
||||
|
||||
class AnimationAttributes {
|
||||
|
|
|
@ -501,9 +501,6 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
|
|||
if(f) fclose(f);
|
||||
}
|
||||
else {
|
||||
if(f) fclose(f);
|
||||
f = NULL;
|
||||
|
||||
throw megaglest_runtime_error("Can't open file");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ Minimap::~Minimap() {
|
|||
|
||||
// ==================== set ====================
|
||||
|
||||
void Minimap::incFowTextureAlphaSurface(const Vec2i &sPos, float alpha,
|
||||
void Minimap::incFowTextureAlphaSurface(const Vec2i sPos, float alpha,
|
||||
bool isIncrementalUpdate) {
|
||||
if(fowPixmap1) {
|
||||
assert(sPos.x < fowPixmap1->getW() && sPos.y < fowPixmap1->getH());
|
||||
|
@ -301,11 +301,11 @@ void Minimap::saveGame(XmlNode *rootNode) {
|
|||
XmlNode *minimapNode = rootNode->addChild("Minimap");
|
||||
|
||||
if(fowPixmap1 != NULL) {
|
||||
for(unsigned int i = 0; i < fowPixmap1->getPixelByteCount(); ++i) {
|
||||
if(fowPixmap1->getPixels()[i] != 0) {
|
||||
for(std::size_t index = 0; index < fowPixmap1->getPixelByteCount(); ++index) {
|
||||
if(fowPixmap1->getPixels()[index] != 0) {
|
||||
XmlNode *fowPixmap1Node = minimapNode->addChild("fowPixmap1");
|
||||
fowPixmap1Node->addAttribute("index",intToStr(i), mapTagReplacements);
|
||||
fowPixmap1Node->addAttribute("pixel",intToStr(fowPixmap1->getPixels()[i]), mapTagReplacements);
|
||||
fowPixmap1Node->addAttribute("index",intToStr(index), mapTagReplacements);
|
||||
fowPixmap1Node->addAttribute("pixel",intToStr(fowPixmap1->getPixels()[index]), mapTagReplacements);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
const Texture2D *getFowTexture() const {return fowTex;}
|
||||
const Texture2D *getTexture() const {return tex;}
|
||||
|
||||
void incFowTextureAlphaSurface(const Vec2i &sPos, float alpha, bool isIncrementalUpdate=false);
|
||||
void incFowTextureAlphaSurface(const Vec2i sPos, float alpha, bool isIncrementalUpdate=false);
|
||||
void resetFowTex();
|
||||
void updateFowTex(float t);
|
||||
void setFogOfWar(bool value);
|
||||
|
|
|
@ -41,7 +41,8 @@ namespace Glest{ namespace Game{
|
|||
|
||||
// ===================== PUBLIC ========================
|
||||
|
||||
UnitUpdater::UnitUpdater() {
|
||||
UnitUpdater::UnitUpdater() : mutexAttackWarnings(new Mutex(CODE_AT_LINE)),
|
||||
mutexUnitRangeCellsLookupItemCache(new Mutex(CODE_AT_LINE)) {
|
||||
this->game= NULL;
|
||||
this->gui= NULL;
|
||||
this->gameCamera= NULL;
|
||||
|
@ -95,12 +96,20 @@ UnitUpdater::~UnitUpdater() {
|
|||
delete pathFinder;
|
||||
pathFinder = NULL;
|
||||
|
||||
MutexSafeWrapper safeMutex(&mutexAttackWarnings,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexAttackWarnings,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
while(attackWarnings.empty() == false) {
|
||||
AttackWarningData* awd=attackWarnings.back();
|
||||
AttackWarningData* awd = attackWarnings.back();
|
||||
attackWarnings.pop_back();
|
||||
delete awd;
|
||||
}
|
||||
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
delete mutexAttackWarnings;
|
||||
mutexAttackWarnings = NULL;
|
||||
|
||||
delete mutexUnitRangeCellsLookupItemCache;
|
||||
mutexUnitRangeCellsLookupItemCache = NULL;
|
||||
}
|
||||
|
||||
// ==================== progress skills ====================
|
||||
|
@ -2655,30 +2664,24 @@ bool UnitUpdater::findCachedCellsEnemies(Vec2i center, int range, int size, vect
|
|||
const AttackSkillType *ast, const Unit *unit,
|
||||
const Unit *commandTarget) {
|
||||
bool result = false;
|
||||
//return result;
|
||||
MutexSafeWrapper safeMutex(mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > >::iterator iterFind = UnitRangeCellsLookupItemCache.find(center);
|
||||
|
||||
//if(game->isMasterserverMode() == false) {
|
||||
{
|
||||
MutexSafeWrapper safeMutex(&mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > >::iterator iterFind = UnitRangeCellsLookupItemCache.find(center);
|
||||
if(iterFind != UnitRangeCellsLookupItemCache.end()) {
|
||||
std::map<int, std::map<int, UnitRangeCellsLookupItem > >::iterator iterFind3 = iterFind->second.find(size);
|
||||
if(iterFind3 != iterFind->second.end()) {
|
||||
std::map<int, UnitRangeCellsLookupItem>::iterator iterFind4 = iterFind3->second.find(range);
|
||||
if(iterFind4 != iterFind3->second.end()) {
|
||||
result = true;
|
||||
|
||||
if(iterFind != UnitRangeCellsLookupItemCache.end()) {
|
||||
std::map<int, std::map<int, UnitRangeCellsLookupItem > >::iterator iterFind3 = iterFind->second.find(size);
|
||||
if(iterFind3 != iterFind->second.end()) {
|
||||
std::map<int, UnitRangeCellsLookupItem>::iterator iterFind4 = iterFind3->second.find(range);
|
||||
if(iterFind4 != iterFind3->second.end()) {
|
||||
result = true;
|
||||
std::vector<Cell *> &cellList = iterFind4->second.rangeCellList;
|
||||
for(int idx = 0; idx < (int)cellList.size(); ++idx) {
|
||||
Cell *cell = cellList[idx];
|
||||
|
||||
std::vector<Cell *> &cellList = iterFind4->second.rangeCellList;
|
||||
for(int idx = 0; idx < (int)cellList.size(); ++idx) {
|
||||
Cell *cell = cellList[idx];
|
||||
|
||||
findEnemiesForCell(ast,cell,unit,commandTarget,enemies);
|
||||
}
|
||||
findEnemiesForCell(ast,cell,unit,commandTarget,enemies);
|
||||
}
|
||||
}
|
||||
}
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -2787,9 +2790,8 @@ bool UnitUpdater::unitOnRange(Unit *unit, int range, Unit **rangedPtr,
|
|||
|
||||
// Ok update our caches with the latest info
|
||||
if(cacheItem.rangeCellList.empty() == false) {
|
||||
MutexSafeWrapper safeMutex(&mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
|
||||
//cacheItem.UnitRangeCellsLookupItemCacheTimerCountIndex = UnitRangeCellsLookupItemCacheTimerCount++;
|
||||
UnitRangeCellsLookupItemCache[center][size][range] = cacheItem;
|
||||
}
|
||||
}
|
||||
|
@ -2889,7 +2891,7 @@ bool UnitUpdater::unitOnRange(Unit *unit, int range, Unit **rangedPtr,
|
|||
float nearestDistance = 0.f;
|
||||
|
||||
|
||||
MutexSafeWrapper safeMutex(&mutexAttackWarnings,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexAttackWarnings,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
for(int i = (int)attackWarnings.size() - 1; i >= 0; --i) {
|
||||
if(world->getFrameCount() - attackWarnings[i]->lastFrameCount > 200) { //after 200 frames attack break we warn again
|
||||
AttackWarningData *toDelete =attackWarnings[i];
|
||||
|
@ -2938,7 +2940,7 @@ bool UnitUpdater::unitOnRange(Unit *unit, int range, Unit **rangedPtr,
|
|||
awd->attackPosition.x=enemyFloatCenter.x;
|
||||
awd->attackPosition.y=enemyFloatCenter.y;
|
||||
|
||||
MutexSafeWrapper safeMutex(&mutexAttackWarnings,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexAttackWarnings,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
attackWarnings.push_back(awd);
|
||||
|
||||
if(world->getAttackWarningsEnabled() == true) {
|
||||
|
@ -3022,9 +3024,8 @@ vector<Unit*> UnitUpdater::enemyUnitsOnRange(const Unit *unit,const AttackSkillT
|
|||
|
||||
// Ok update our caches with the latest info
|
||||
if(cacheItem.rangeCellList.empty() == false) {
|
||||
MutexSafeWrapper safeMutex(&mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
|
||||
//cacheItem.UnitRangeCellsLookupItemCacheTimerCountIndex = UnitRangeCellsLookupItemCacheTimerCount++;
|
||||
UnitRangeCellsLookupItemCache[center][size][range] = cacheItem;
|
||||
}
|
||||
}
|
||||
|
@ -3101,8 +3102,7 @@ string UnitUpdater::getUnitRangeCellsLookupItemCacheStats() {
|
|||
int rangeCount = 0;
|
||||
int rangeCountCellCount = 0;
|
||||
|
||||
MutexSafeWrapper safeMutex(&mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
//std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > > UnitRangeCellsLookupItemCache;
|
||||
MutexSafeWrapper safeMutex(mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
for(std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > >::iterator iterMap1 = UnitRangeCellsLookupItemCache.begin();
|
||||
iterMap1 != UnitRangeCellsLookupItemCache.end(); ++iterMap1) {
|
||||
posCount++;
|
||||
|
@ -3148,8 +3148,6 @@ void UnitUpdater::saveGame(XmlNode *rootNode) {
|
|||
unitupdaterNode->addAttribute("attackWarnRange",floatToStr(attackWarnRange,6), mapTagReplacements);
|
||||
// AttackWarnings attackWarnings;
|
||||
//
|
||||
// Mutex mutexUnitRangeCellsLookupItemCache;
|
||||
// std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > > UnitRangeCellsLookupItemCache;
|
||||
}
|
||||
|
||||
void UnitUpdater::clearCaches() {
|
||||
|
|
|
@ -80,11 +80,11 @@ private:
|
|||
PathFinder *pathFinder;
|
||||
Game *game;
|
||||
//RandomGen random;
|
||||
Mutex mutexAttackWarnings;
|
||||
Mutex *mutexAttackWarnings;
|
||||
float attackWarnRange;
|
||||
AttackWarnings attackWarnings;
|
||||
|
||||
Mutex mutexUnitRangeCellsLookupItemCache;
|
||||
Mutex *mutexUnitRangeCellsLookupItemCache;
|
||||
std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > > UnitRangeCellsLookupItemCache;
|
||||
//std::map<int,ExploredCellsLookupKey> ExploredCellsLookupItemCacheTimer;
|
||||
//int UnitRangeCellsLookupItemCacheTimerCount;
|
||||
|
|
|
@ -43,7 +43,7 @@ time_t ExploredCellsLookupItem::lastDebug = 0;
|
|||
|
||||
// ===================== PUBLIC ========================
|
||||
|
||||
World::World() {
|
||||
World::World() : mutexFactionNextUnitId(new Mutex(CODE_AT_LINE)) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
Config &config= Config::getInstance();
|
||||
|
||||
|
@ -141,6 +141,9 @@ World::~World() {
|
|||
|
||||
cleanup();
|
||||
|
||||
delete mutexFactionNextUnitId;
|
||||
mutexFactionNextUnitId = NULL;
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
|
@ -1095,6 +1098,26 @@ const UnitType* World::findUnitTypeById(const FactionType* factionType, int id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const UnitType * World::findUnitTypeByName(const string factionName, const string unitTypeName) {
|
||||
const UnitType *unitTypeResult = NULL;
|
||||
|
||||
for(int index = 0; unitTypeResult == NULL && index < getFactionCount(); ++index) {
|
||||
const Faction *faction = getFaction(index);
|
||||
if(factionName == "" || factionName == faction->getType()->getName(false)) {
|
||||
for(int unitIndex = 0;
|
||||
unitTypeResult == NULL && unitIndex < faction->getType()->getUnitTypeCount(); ++unitIndex) {
|
||||
|
||||
const UnitType *unitType = faction->getType()->getUnitType(unitIndex);
|
||||
if(unitType != NULL && unitType->getName(false) == unitTypeName) {
|
||||
unitTypeResult = unitType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return unitTypeResult;
|
||||
}
|
||||
|
||||
//looks for a place for a unit around a start location, returns true if succeded
|
||||
bool World::placeUnit(const Vec2i &startLoc, int radius, Unit *unit, bool spaciated) {
|
||||
if(unit == NULL) {
|
||||
|
@ -2041,7 +2064,7 @@ void World::initFactionTypes(GameSettings *gs) {
|
|||
|
||||
//printf("**LOAD World thisFactionIndex = %d\n",thisFactionIndex);
|
||||
|
||||
MutexSafeWrapper safeMutex(&mutexFactionNextUnitId,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexFactionNextUnitId,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
// std::map<int,int> mapFactionNextUnitId;
|
||||
// for(std::map<int,int>::iterator iterMap = mapFactionNextUnitId.begin();
|
||||
// iterMap != mapFactionNextUnitId.end(); ++iterMap) {
|
||||
|
@ -2588,7 +2611,7 @@ const GameSettings * World::getGameSettings() const {
|
|||
// Calculates the unit unit ID for each faction
|
||||
//
|
||||
int World::getNextUnitId(Faction *faction) {
|
||||
MutexSafeWrapper safeMutex(&mutexFactionNextUnitId,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexFactionNextUnitId,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(mapFactionNextUnitId.find(faction->getIndex()) == mapFactionNextUnitId.end()) {
|
||||
mapFactionNextUnitId[faction->getIndex()] = faction->getIndex() * 100000;
|
||||
}
|
||||
|
@ -2855,7 +2878,7 @@ void World::saveGame(XmlNode *rootNode) {
|
|||
worldNode->addAttribute("frameCount",intToStr(frameCount), mapTagReplacements);
|
||||
// //int nextUnitId;
|
||||
// Mutex mutexFactionNextUnitId;
|
||||
MutexSafeWrapper safeMutex(&mutexFactionNextUnitId,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutex(mutexFactionNextUnitId,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
// std::map<int,int> mapFactionNextUnitId;
|
||||
for(std::map<int,int>::iterator iterMap = mapFactionNextUnitId.begin();
|
||||
iterMap != mapFactionNextUnitId.end(); ++iterMap) {
|
||||
|
|
|
@ -104,7 +104,7 @@ private:
|
|||
int thisFactionIndex;
|
||||
int thisTeamIndex;
|
||||
int frameCount;
|
||||
Mutex mutexFactionNextUnitId;
|
||||
Mutex *mutexFactionNextUnitId;
|
||||
std::map<int,int> mapFactionNextUnitId;
|
||||
|
||||
//config
|
||||
|
@ -209,6 +209,7 @@ public:
|
|||
void update();
|
||||
Unit* findUnitById(int id) const;
|
||||
const UnitType* findUnitTypeById(const FactionType* factionType, int id);
|
||||
const UnitType *findUnitTypeByName(const string factionName, const string unitTypeName);
|
||||
bool placeUnit(const Vec2i &startLoc, int radius, Unit *unit, bool spaciated= false);
|
||||
void moveUnitCells(Unit *unit);
|
||||
|
||||
|
|
|
@ -353,7 +353,6 @@ option(ENABLE_FRIBIDI "Enable FriBIDi support" ON)
|
|||
SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} platform/macosx)
|
||||
ELSEIF(WIN32)
|
||||
SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} platform/win32)
|
||||
SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} sound/ds8)
|
||||
SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} ${PROJECT_SOURCE_DIR}/source/win32_deps/src)
|
||||
ELSE()
|
||||
SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} platform/sdl)
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
virtual int getTextureWidth() const = 0;
|
||||
virtual int getTextureHeight() const = 0;
|
||||
|
||||
void OutputTextureDebugInfo(Texture::Format format, int components, const string path,uint64 rawSize,GLenum texType);
|
||||
void OutputTextureDebugInfo(Texture::Format format, int components, const string path,std::size_t rawSize,GLenum texType);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
|
|
|
@ -26,7 +26,6 @@ using Shared::Platform::int16;
|
|||
using Shared::Platform::uint16;
|
||||
using Shared::Platform::int32;
|
||||
using Shared::Platform::uint32;
|
||||
using Shared::Platform::uint64;
|
||||
using Shared::Platform::float32;
|
||||
using Shared::Util::Checksum;
|
||||
|
||||
|
@ -212,7 +211,7 @@ public:
|
|||
uint8 *getPixels() const {return pixels;}
|
||||
void deletePixels();
|
||||
string getPath() const { return path;}
|
||||
uint64 getPixelByteCount() const;
|
||||
std::size_t getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
};
|
||||
|
@ -295,7 +294,7 @@ public:
|
|||
void subCopy(int x, int y, const Pixmap2D *sourcePixmap);
|
||||
void copyImagePart(int x, int y, const Pixmap2D *sourcePixmap);
|
||||
string getPath() const { return path;}
|
||||
uint64 getPixelByteCount() const;
|
||||
std::size_t getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
|
||||
|
@ -343,7 +342,7 @@ public:
|
|||
uint8 *getPixels() const {return pixels;}
|
||||
void deletePixels();
|
||||
string getPath() const { return path;}
|
||||
uint64 getPixelByteCount() const;
|
||||
std::size_t getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
};
|
||||
|
@ -386,7 +385,7 @@ public:
|
|||
const Pixmap2D *getFace(int face) const {return &faces[face];}
|
||||
void deletePixels();
|
||||
string getPath(int face) const { return path[face];}
|
||||
uint64 getPixelByteCount() const;
|
||||
std::size_t getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
};
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
using std::string;
|
||||
using Shared::Platform::uint8;
|
||||
using Shared::Platform::uint64;
|
||||
|
||||
struct SDL_Surface;
|
||||
|
||||
|
@ -90,7 +89,7 @@ public:
|
|||
virtual void end(bool deletePixelBuffer=true)=0;
|
||||
virtual string getPath() const = 0;
|
||||
virtual void deletePixels() = 0;
|
||||
virtual uint64 getPixelByteCount() const = 0;
|
||||
virtual std::size_t getPixelByteCount() const = 0;
|
||||
|
||||
virtual void reseInitState() { inited = false; }
|
||||
|
||||
|
@ -116,7 +115,7 @@ public:
|
|||
const Pixmap1D *getPixmap() const {return &pixmap;}
|
||||
virtual string getPath() const;
|
||||
virtual void deletePixels();
|
||||
virtual uint64 getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
virtual std::size_t getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
|
||||
virtual int getTextureWidth() const {return pixmap.getW();}
|
||||
virtual int getTextureHeight() const {return -1;}
|
||||
|
@ -139,7 +138,7 @@ public:
|
|||
const Pixmap2D *getPixmapConst() const {return &pixmap;}
|
||||
virtual string getPath() const;
|
||||
virtual void deletePixels();
|
||||
virtual uint64 getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
virtual std::size_t getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
|
||||
virtual int getTextureWidth() const {return pixmap.getW();}
|
||||
virtual int getTextureHeight() const {return pixmap.getH();}
|
||||
|
@ -164,7 +163,7 @@ public:
|
|||
const Pixmap3D *getPixmap() const {return &pixmap;}
|
||||
virtual string getPath() const;
|
||||
virtual void deletePixels();
|
||||
virtual uint64 getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
virtual std::size_t getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
|
||||
virtual int getTextureWidth() const {return pixmap.getW();}
|
||||
virtual int getTextureHeight() const {return pixmap.getH();}
|
||||
|
@ -187,7 +186,7 @@ public:
|
|||
const PixmapCube *getPixmap() const {return &pixmap;}
|
||||
virtual string getPath() const;
|
||||
virtual void deletePixels();
|
||||
virtual uint64 getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
virtual std::size_t getPixelByteCount() const {return pixmap.getPixelByteCount();}
|
||||
|
||||
virtual int getTextureWidth() const {return -1;}
|
||||
virtual int getTextureHeight() const {return -1;}
|
||||
|
|
|
@ -29,17 +29,17 @@ namespace Shared { namespace PlatformCommon {
|
|||
class BaseThread : public Thread
|
||||
{
|
||||
protected:
|
||||
Mutex mutexRunning;
|
||||
Mutex mutexQuit;
|
||||
Mutex mutexBeginExecution;
|
||||
Mutex mutexDeleteSelfOnExecutionDone;
|
||||
Mutex *mutexRunning;
|
||||
Mutex *mutexQuit;
|
||||
Mutex *mutexBeginExecution;
|
||||
Mutex *mutexDeleteSelfOnExecutionDone;
|
||||
|
||||
Mutex mutexThreadObjectAccessor;
|
||||
Mutex *mutexThreadObjectAccessor;
|
||||
|
||||
bool threadOwnerValid;
|
||||
Mutex mutexThreadOwnerValid;
|
||||
Mutex *mutexThreadOwnerValid;
|
||||
|
||||
Mutex mutexExecutingTask;
|
||||
Mutex *mutexExecutingTask;
|
||||
bool executingTask;
|
||||
|
||||
void *ptr;
|
||||
|
@ -52,7 +52,7 @@ protected:
|
|||
bool hasBeginExecution;
|
||||
bool deleteSelfOnExecutionDone;
|
||||
|
||||
Mutex mutexStarted;
|
||||
Mutex *mutexStarted;
|
||||
bool started;
|
||||
|
||||
virtual void setQuitStatus(bool value);
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
bool getThreadOwnerValid();
|
||||
Mutex * getMutexThreadOwnerValid();
|
||||
|
||||
Mutex * getMutexThreadObjectAccessor() { return &mutexThreadObjectAccessor; }
|
||||
Mutex * getMutexThreadObjectAccessor();
|
||||
|
||||
template <typename T>
|
||||
T * getGenericData() {
|
||||
|
|
|
@ -49,7 +49,7 @@ protected:
|
|||
template <typename T>
|
||||
static Mutex & manageCachedItemMutex(string cacheKey) {
|
||||
if(itemCacheMutexList.find(cacheKey) == itemCacheMutexList.end()) {
|
||||
itemCacheMutexList[cacheKey] = new Mutex();
|
||||
itemCacheMutexList[cacheKey] = new Mutex(CODE_AT_LINE);
|
||||
}
|
||||
Mutex *mutex = itemCacheMutexList[cacheKey];
|
||||
return *mutex;
|
||||
|
|
|
@ -123,7 +123,7 @@ private:
|
|||
Uint32 lastStartCount;
|
||||
Uint32 lastTickCount;
|
||||
int64 lastResult;
|
||||
int lastMultiplier;
|
||||
int64 lastMultiplier;
|
||||
bool lastStopped;
|
||||
|
||||
public:
|
||||
|
@ -135,11 +135,12 @@ public:
|
|||
int64 getMillis();
|
||||
int64 getSeconds();
|
||||
|
||||
bool isStarted() const;
|
||||
static int64 getCurTicks();
|
||||
static int64 getCurMillis();
|
||||
|
||||
private:
|
||||
int64 queryCounter(int multiplier);
|
||||
int64 queryCounter(int64 multiplier);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
|
|
|
@ -44,17 +44,11 @@ protected:
|
|||
vector<string> workerThreadTechPaths;
|
||||
FileCRCPreCacheThreadCallbackInterface *processTechCB;
|
||||
|
||||
Mutex mutexPendingTextureList;
|
||||
vector<Texture2D *> pendingTextureList;
|
||||
|
||||
static string preCacheThreadCacheLookupKey;
|
||||
Mutex mutexPauseForGame;
|
||||
Mutex *mutexPauseForGame;
|
||||
bool pauseForGame;
|
||||
std::vector<FileCRCPreCacheThread *> preCacheWorkerThreadList;
|
||||
|
||||
void addPendingTexture(Texture2D *texture);
|
||||
void addPendingTextureList(vector<Texture2D *> textureList);
|
||||
|
||||
public:
|
||||
FileCRCPreCacheThread();
|
||||
FileCRCPreCacheThread(vector<string> techDataPaths,vector<string> workerThreadTechPaths,FileCRCPreCacheThreadCallbackInterface *processTechCB);
|
||||
|
@ -66,7 +60,6 @@ public:
|
|||
void setTechDataPaths(vector<string> value) { this->techDataPaths = value; }
|
||||
void setWorkerThreadTechPaths(vector<string> value) { this->workerThreadTechPaths = value; }
|
||||
void setFileCRCPreCacheThreadCallbackInterface(FileCRCPreCacheThreadCallbackInterface *value) { processTechCB = value; }
|
||||
vector<Texture2D *> getPendingTextureList(int maxTexturesToGet);
|
||||
|
||||
virtual bool canShutdown(bool deleteSelfIfShutdownDelayed);
|
||||
|
||||
|
@ -95,17 +88,17 @@ class SimpleTaskThread : public BaseThread
|
|||
{
|
||||
protected:
|
||||
|
||||
Mutex mutexSimpleTaskInterfaceValid;
|
||||
Mutex *mutexSimpleTaskInterfaceValid;
|
||||
bool simpleTaskInterfaceValid;
|
||||
SimpleTaskCallbackInterface *simpleTaskInterface;
|
||||
unsigned int executionCount;
|
||||
unsigned int millisecsBetweenExecutions;
|
||||
|
||||
Mutex mutexTaskSignaller;
|
||||
Mutex *mutexTaskSignaller;
|
||||
bool taskSignalled;
|
||||
bool needTaskSignal;
|
||||
|
||||
Mutex mutexLastExecuteTimestamp;
|
||||
Mutex *mutexLastExecuteTimestamp;
|
||||
time_t lastExecuteTimestamp;
|
||||
|
||||
taskFunctionCallback *overrideShutdownTask;
|
||||
|
@ -160,7 +153,7 @@ class LogFileThread : public BaseThread
|
|||
{
|
||||
protected:
|
||||
|
||||
Mutex mutexLogList;
|
||||
Mutex *mutexLogList;
|
||||
vector<LogFileEntry> logList;
|
||||
time_t lastSaveToDisk;
|
||||
|
||||
|
|
|
@ -111,6 +111,7 @@ private:
|
|||
SDL_mutex* mutexAccessor;
|
||||
string lastownerId;
|
||||
|
||||
int maxRefCount;
|
||||
Shared::PlatformCommon::Chrono *chronoPerf;
|
||||
|
||||
bool isStaticMutexListMutex;
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// ==============================================================
|
||||
// This file is part of Glest Shared Library (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Martiño Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
// by the Free Software Foundation; either version 2 of the
|
||||
// License, or (at your option) any later version
|
||||
// ==============================================================
|
||||
|
||||
#ifndef _SHARED_SOUND_SOUNDFACTORYDS8_H_
|
||||
#define _SHARED_SOUND_SOUNDFACTORYDS8_H_
|
||||
|
||||
#include "sound_factory.h"
|
||||
#include "sound_player_ds8.h"
|
||||
|
||||
namespace Shared{ namespace Sound{ namespace Ds8{
|
||||
|
||||
// =====================================================
|
||||
// class SoundFactoryDs8
|
||||
// =====================================================
|
||||
|
||||
class SoundFactoryDs8: public SoundFactory{
|
||||
public:
|
||||
virtual SoundPlayer *newSoundPlayer() {return new SoundPlayerDs8();}
|
||||
};
|
||||
|
||||
}}}//end namespace
|
||||
|
||||
#endif
|
|
@ -1,136 +0,0 @@
|
|||
// ==============================================================
|
||||
// This file is part of Glest Shared Library (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Martiño Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
// by the Free Software Foundation; either version 2 of the
|
||||
// License, or (at your option) any later version
|
||||
// ==============================================================
|
||||
|
||||
#ifndef _SHARED_SOUND_SOUNDPLAYERDS8_H_
|
||||
#define _SHARED_SOUND_SOUNDPLAYERDS8_H_
|
||||
|
||||
#include "sound_player.h"
|
||||
#include "platform_util.h"
|
||||
|
||||
#include <mmsystem.h>
|
||||
#include <dsound.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
using std::vector;
|
||||
|
||||
namespace Shared{ namespace Sound{ namespace Ds8{
|
||||
|
||||
// =====================================================
|
||||
// class SoundBuffer
|
||||
// =====================================================
|
||||
|
||||
class SoundBuffer{
|
||||
protected:
|
||||
IDirectSoundBuffer8 *dsBuffer;
|
||||
Sound *sound;
|
||||
DWORD size;
|
||||
|
||||
public:
|
||||
SoundBuffer();
|
||||
virtual ~SoundBuffer(){};
|
||||
virtual void end()=0;
|
||||
|
||||
IDirectSoundBuffer8 *getDsBuffer() const {return dsBuffer;}
|
||||
Sound *getSound() const {return sound;}
|
||||
|
||||
void setDsBuffer(IDirectSoundBuffer8 *dsBuffer) {this->dsBuffer= dsBuffer;}
|
||||
void setSound(IDirectSound8 *dsObject, Sound *sound) {this->sound= sound;}
|
||||
|
||||
bool isFree();
|
||||
bool isReady();
|
||||
|
||||
protected:
|
||||
void createDsBuffer(IDirectSound8 *dsObject);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// class StaticSoundBuffer
|
||||
// =====================================================
|
||||
|
||||
class StaticSoundBuffer: public SoundBuffer{
|
||||
public:
|
||||
StaticSound *getStaticSound() const {return static_cast<StaticSound*>(sound);}
|
||||
void init(IDirectSound8 *dsObject, Sound *sound);
|
||||
void end();
|
||||
void play();
|
||||
private:
|
||||
void fillDsBuffer();
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// class StrSoundBuffer
|
||||
// =====================================================
|
||||
|
||||
class StrSoundBuffer: public SoundBuffer{
|
||||
private:
|
||||
enum State{sFree, sFadingOn, sPlaying, sFadingOff, sStopped};
|
||||
|
||||
private:
|
||||
DWORD lastPlayCursor;
|
||||
State state;
|
||||
Chrono chrono; //delay-fade chrono
|
||||
int64 fade; //fade on fade off delay
|
||||
|
||||
public:
|
||||
StrSoundBuffer();
|
||||
StrSound *getStrSound() const {return static_cast<StrSound*>(sound);}
|
||||
|
||||
void init(IDirectSound8 *dsObject, Sound *sound, uint32 strBufferSize);
|
||||
void end();
|
||||
void play(int64 fadeOn);
|
||||
void update();
|
||||
void stop(int64 fadeOff);
|
||||
|
||||
|
||||
private:
|
||||
void fillDsBuffer();
|
||||
void refreshDsBuffer();
|
||||
void readChunk(void *writePointer, uint32 size);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// class SoundPlayerDs8
|
||||
//
|
||||
/// SoundPlayer implementation using Direct Sound 8
|
||||
// =====================================================
|
||||
|
||||
class SoundPlayerDs8: public SoundPlayer{
|
||||
private:
|
||||
IDirectSound8 *dsObject;
|
||||
vector<StaticSoundBuffer> staticSoundBuffers;
|
||||
vector<StrSoundBuffer> strSoundBuffers;
|
||||
SoundPlayerParams params;
|
||||
|
||||
public:
|
||||
SoundPlayerDs8();
|
||||
virtual bool init(const SoundPlayerParams *params);
|
||||
virtual void end();
|
||||
virtual void play(StaticSound *staticSound);
|
||||
virtual void play(StrSound *strSound, int64 fadeOn=0);
|
||||
virtual void stop(StrSound *strSound, int64 fadeOff=0);
|
||||
virtual void stopAllSounds(int64 fadeOff=0);
|
||||
virtual void updateStreams(); //updates str buffers if needed
|
||||
|
||||
private:
|
||||
bool findStaticBuffer(Sound *sound, int *bufferIndex);
|
||||
bool findStrBuffer(Sound *sound, int *bufferIndex);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// Misc
|
||||
// =====================================================
|
||||
|
||||
long dsVolume(float floatVolume);
|
||||
|
||||
}}}//end namespace
|
||||
|
||||
#endif
|
|
@ -151,7 +151,9 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
|
||||
if (deflateInit(&stream, level) != Z_OK) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("deflateInit() failed!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -163,6 +165,9 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
|
||||
if (fread(s_inbuf, 1, n, pInfile) != n) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed reading from input file!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -180,6 +185,9 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
uint n = BUF_SIZE - stream.avail_out;
|
||||
if (fwrite(s_outbuf, 1, n, pOutfile) != n) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed writing to output file!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
stream.next_out = s_outbuf;
|
||||
|
@ -191,6 +199,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
}
|
||||
else if (status != Z_OK) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("deflate() failed with status %i!\n", status);
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
|
@ -199,6 +208,9 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
|
||||
if (deflateEnd(&stream) != Z_OK) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("deflateEnd() failed!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
@ -208,6 +220,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
|
||||
if (inflateInit(&stream)) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflateInit() failed!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
|
@ -221,6 +234,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
|
||||
if (fread(s_inbuf, 1, n, pInfile) != n) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed reading from input file!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
|
@ -250,6 +264,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
}
|
||||
else if (status != Z_OK) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflate() failed with status %i!\n", status);
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
|
@ -258,6 +273,9 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
|
||||
if (inflateEnd(&stream) != Z_OK) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflateEnd() failed!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
@ -269,7 +287,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
fclose(pInfile);
|
||||
fclose(pInfile); pInfile = 0;
|
||||
if (EOF == fclose(pOutfile)) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed writing to output file!\n");
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
@ -99,7 +99,7 @@ int ftpCreateAccount(const char* name, const char* passw, const char* root, int
|
|||
strncpy(ftpUsers[n].name, name, MAXLEN_USERNAME);
|
||||
strncpy(ftpUsers[n].passw, passw, MAXLEN_PASSWORD);
|
||||
strncpy(ftpUsers[n].ftpRoot, root, MAX_PATH_LEN);
|
||||
ftpUsers[n].ftpRootLen = strlen(root);
|
||||
ftpUsers[n].ftpRootLen = (int)strlen(root);
|
||||
ftpUsers[n].accRights = acc;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ LOCAL uint8_t scratchBuf[LEN_SCRATCHBUF];
|
|||
int ftpSendMsg(msgmode_E mode, int sessionId, int ret, const char* msg)
|
||||
{
|
||||
int sentlen = 0;
|
||||
int len = strlen(msg);
|
||||
int len = (int)strlen(msg);
|
||||
char buf[6];
|
||||
|
||||
if(mode == MSG_QUOTE)
|
||||
|
@ -86,7 +86,7 @@ if(VERBOSE_MODE_ENABLED) printf("%02d <-- %s%s\n", sessionId, buf, msg);
|
|||
int ftpExecTransmission(int sessionId)
|
||||
{
|
||||
int finished = FALSE;
|
||||
int len;
|
||||
size_t len;
|
||||
ftpSession_S *pSession = ftpGetSession(sessionId);
|
||||
transmission_S *pTrans = &pSession->activeTrans;
|
||||
int rxLen;
|
||||
|
@ -99,8 +99,8 @@ int ftpExecTransmission(int sessionId)
|
|||
len = ftpReadFile(scratchBuf, 1, LEN_SCRATCHBUF, pTrans->fsHandle);
|
||||
if(len > 0)
|
||||
{
|
||||
pTrans->fileSize -= len;
|
||||
if(ftpSend(pTrans->dataSocket, scratchBuf, len))
|
||||
pTrans->fileSize -= (uint32_t)len;
|
||||
if(ftpSend(pTrans->dataSocket, scratchBuf, (int)len))
|
||||
{
|
||||
ftpSendMsg(MSG_NORMAL, sessionId, 426, ftpMsg000);
|
||||
finished = TRUE;
|
||||
|
@ -108,7 +108,7 @@ int ftpExecTransmission(int sessionId)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(VERBOSE_MODE_ENABLED) printf("ERROR in ftpExecTransmission ftpReadFile returned = %d for sessionId = %d\n",len,sessionId);
|
||||
if(VERBOSE_MODE_ENABLED) printf("ERROR in ftpExecTransmission ftpReadFile returned = %d for sessionId = %d\n",(int)len,sessionId);
|
||||
ftpSendMsg(MSG_NORMAL, sessionId, 451, ftpMsg001);
|
||||
finished = TRUE;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ int ftpExecTransmission(int sessionId)
|
|||
{
|
||||
len = ftpReceive(pTrans->dataSocket, &scratchBuf[rxLen], LEN_SCRATCHBUF - rxLen);
|
||||
|
||||
if(len <= 0) {
|
||||
if(len < 1) {
|
||||
int errorNumber = getLastSocketError();
|
||||
const char *errText = getLastSocketErrorText(&errorNumber);
|
||||
if(VERBOSE_MODE_ENABLED) printf("ftpExecTransmission ERROR ON RECEIVE for socket = %d, data len = %d, error = %d [%s]\n",pTrans->dataSocket,(LEN_SCRATCHBUF - rxLen),errorNumber,errText);
|
||||
|
@ -133,22 +133,22 @@ int ftpExecTransmission(int sessionId)
|
|||
break;
|
||||
}
|
||||
|
||||
rxLen += len;
|
||||
rxLen += (int)len;
|
||||
} while(rxLen < LEN_SCRATCHBUF);
|
||||
|
||||
if(rxLen > 0)
|
||||
{
|
||||
int res = ftpWriteFile(scratchBuf, 1, rxLen, pTrans->fsHandle);
|
||||
if(res != rxLen)
|
||||
size_t res = ftpWriteFile(scratchBuf, 1, rxLen, pTrans->fsHandle);
|
||||
if(res != (size_t)rxLen)
|
||||
{
|
||||
if(VERBOSE_MODE_ENABLED) printf("ERROR in ftpExecTransmission ftpWriteFile returned = %d for sessionId = %d\n",res,sessionId);
|
||||
if(VERBOSE_MODE_ENABLED) printf("ERROR in ftpExecTransmission ftpWriteFile returned = %d for sessionId = %d\n",(int)res,sessionId);
|
||||
|
||||
ftpSendMsg(MSG_NORMAL, sessionId, 451, ftpMsg001);
|
||||
finished = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if(len <= 0)
|
||||
if(len < 1)
|
||||
{
|
||||
ftpSendMsg(MSG_NORMAL, sessionId, 226, ftpMsg003);
|
||||
finished = TRUE;
|
||||
|
@ -999,7 +999,7 @@ int execFtpCmd(int sessionId, const char* cmd, int cmdlen)
|
|||
|
||||
if(VERBOSE_MODE_ENABLED) printf("About to execute cmds[n].cmdToken [%s] command [%s] for sessionId = %d\n",cmds[n].cmdToken,&cmd[i],sessionId);
|
||||
|
||||
ret = cmds[n].handler(sessionId, &cmd[i], strlen(&cmd[i])); // execute command
|
||||
ret = cmds[n].handler(sessionId, &cmd[i], (int)strlen(&cmd[i])); // execute command
|
||||
|
||||
if(VERBOSE_MODE_ENABLED) printf("Executed cmds[n].cmdToken [%s] command [%s] ret = %d for sessionId = %d\n",cmds[n].cmdToken,&cmd[i],ret,sessionId);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
int ftpRemoveTrailingSlash(char* path)
|
||||
{
|
||||
int len = strlen(path);
|
||||
size_t len = strlen(path);
|
||||
|
||||
if(len > 1)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ int ftpRemoveTrailingSlash(char* path)
|
|||
if(path[len] == '/')
|
||||
path[len] = '\0';
|
||||
}
|
||||
return len;
|
||||
return (int)len;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -259,7 +259,7 @@ const char* ftpGetRealPath(int id, const char* path, int normalize)
|
|||
|
||||
const char *ftp_rootget = ftpGetRoot(sessions[id].userId, &len);
|
||||
snprintf(ftpRoot,2047,"%s",ftp_rootget);
|
||||
ftpRootLen = strlen(ftpRoot);
|
||||
ftpRootLen = (int)strlen(ftpRoot);
|
||||
if(ftpRootLen > 0 && ftpRoot[ftpRootLen-1] != '/') {
|
||||
strcat(ftpRoot,"/");
|
||||
}
|
||||
|
|
|
@ -297,6 +297,7 @@ socket_t ftpEstablishDataConnection(int passive, ip_t *ip, port_t *port, int ses
|
|||
myAddr.sin_family = AF_INET;
|
||||
myAddr.sin_addr.s_addr = INADDR_ANY;
|
||||
myAddr.sin_port = htons(20);
|
||||
myAddr.sin_zero[0] = 0;
|
||||
if(bind(dataSocket, (struct sockaddr *)&myAddr, sizeof(myAddr)))
|
||||
{
|
||||
if(VERBOSE_MODE_ENABLED) printf("In ftpEstablishDataConnection #2 about to Close socket = %d, for sessionId = %d\n",dataSocket, sessionId);
|
||||
|
|
|
@ -78,7 +78,7 @@ int pot(int x) {
|
|||
return val;
|
||||
}
|
||||
|
||||
const uint64 MIN_BYTES_TO_COMPRESS = 12;
|
||||
const std::size_t MIN_BYTES_TO_COMPRESS = 12;
|
||||
|
||||
static std::string getSupportCompressedTextureFormatString(int format) {
|
||||
std::string result = intToStr(format) + "[" + intToHex(format) + "]";
|
||||
|
@ -1261,7 +1261,7 @@ void TextureCubeGl::end(bool deletePixelBuffer) {
|
|||
}
|
||||
}
|
||||
|
||||
void TextureGl::OutputTextureDebugInfo(Texture::Format format, int components,const string path,uint64 rawSize,GLenum texType) {
|
||||
void TextureGl::OutputTextureDebugInfo(Texture::Format format, int components,const string path,std::size_t rawSize,GLenum texType) {
|
||||
if(Texture::useTextureCompression == true) {
|
||||
GLint glFormat= toFormatGl(format, components);
|
||||
|
||||
|
|
|
@ -1807,7 +1807,7 @@ Pixmap2D *PixelBufferWrapper::getPixelBufferFor(int x,int y,int w,int h, int col
|
|||
GLubyte* src = (GLubyte*)glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB);
|
||||
if(src) {
|
||||
pixmapScreenShot = new Pixmap2D(w, h, colorComponents);
|
||||
memcpy(pixmapScreenShot->getPixels(),src,(size_t)pixmapScreenShot->getPixelByteCount());
|
||||
memcpy(pixmapScreenShot->getPixels(),src,pixmapScreenShot->getPixelByteCount());
|
||||
glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB); // release pointer to the mapped buffer
|
||||
//pixmapScreenShot->save("debugPBO.png");
|
||||
}
|
||||
|
|
|
@ -85,9 +85,9 @@ struct TargaFileHeader{
|
|||
const int tgaUncompressedRgb= 2;
|
||||
const int tgaUncompressedBw= 3;
|
||||
|
||||
void CalculatePixelsCRC(uint8 *pixels,uint64 pixelByteCount, Checksum &crc) {
|
||||
void CalculatePixelsCRC(uint8 *pixels,std::size_t pixelByteCount, Checksum &crc) {
|
||||
// crc = Checksum();
|
||||
// for(uint64 i = 0; i < pixelByteCount; ++i) {
|
||||
// for(std::size_t i = 0; i < pixelByteCount; ++i) {
|
||||
// crc.addByte(pixels[i]);
|
||||
// }
|
||||
}
|
||||
|
@ -797,12 +797,12 @@ void Pixmap1D::init(int components){
|
|||
void Pixmap1D::init(int w, int components){
|
||||
this->w= w;
|
||||
this->components= components;
|
||||
pixels= new uint8[(std::size_t)getPixelByteCount()];
|
||||
pixels= new uint8[getPixelByteCount()];
|
||||
CalculatePixelsCRC(pixels,0, crc);
|
||||
}
|
||||
|
||||
uint64 Pixmap1D::getPixelByteCount() const {
|
||||
return ((uint64)w * (uint64)components);
|
||||
std::size_t Pixmap1D::getPixelByteCount() const {
|
||||
return (w * components);
|
||||
}
|
||||
|
||||
void Pixmap1D::deletePixels() {
|
||||
|
@ -850,7 +850,7 @@ void Pixmap1D::loadBmp(const string &path) {
|
|||
components= 3;
|
||||
}
|
||||
if(pixels == NULL) {
|
||||
pixels= new uint8[(std::size_t)getPixelByteCount()];
|
||||
pixels= new uint8[getPixelByteCount()];
|
||||
}
|
||||
|
||||
//data
|
||||
|
@ -880,7 +880,7 @@ void Pixmap1D::loadTga(const string &path) {
|
|||
components= fileComponents;
|
||||
}
|
||||
if(pixels == NULL) {
|
||||
pixels= new uint8[(std::size_t)getPixelByteCount()];
|
||||
pixels= new uint8[getPixelByteCount()];
|
||||
}
|
||||
|
||||
//read data
|
||||
|
@ -950,12 +950,12 @@ void Pixmap2D::init(int w, int h, int components) {
|
|||
snprintf(szBuf,8096,"Invalid pixmap dimensions for [%s], h = %d, w = %d, components = %d\n",path.c_str(),h,w,components);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
pixels= new uint8[(std::size_t)getPixelByteCount()];
|
||||
pixels= new uint8[getPixelByteCount()];
|
||||
CalculatePixelsCRC(pixels,0, crc);
|
||||
}
|
||||
|
||||
uint64 Pixmap2D::getPixelByteCount() const {
|
||||
return ((uint64)h * (uint64)w * (uint64)components);
|
||||
std::size_t Pixmap2D::getPixelByteCount() const {
|
||||
return (h * w * components);
|
||||
}
|
||||
|
||||
void Pixmap2D::deletePixels() {
|
||||
|
@ -1061,10 +1061,10 @@ void Pixmap2D::savePng(const string &path) {
|
|||
|
||||
void Pixmap2D::getPixel(int x, int y, uint8 *value) const {
|
||||
for(int i=0; i<components; ++i){
|
||||
int index = (w*y+x)*components+i;
|
||||
if((unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
|
@ -1073,52 +1073,52 @@ void Pixmap2D::getPixel(int x, int y, uint8 *value) const {
|
|||
}
|
||||
|
||||
void Pixmap2D::getPixel(int x, int y, float32 *value) const {
|
||||
for(int i=0; i<components; ++i) {
|
||||
int index = (w*y+x)*components+i;
|
||||
if((unsigned int)index >= getPixelByteCount()) {
|
||||
for(int i = 0; i < components; ++i) {
|
||||
std::size_t index = (w * y + x) * components + i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
value[i]= pixels[index]/255.f;
|
||||
value[i] = pixels[index] / 255.f;
|
||||
}
|
||||
}
|
||||
|
||||
void Pixmap2D::getComponent(int x, int y, int component, uint8 &value) const {
|
||||
int index = (w*y+x)*components+component;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+component;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
value= pixels[index];
|
||||
value = pixels[index];
|
||||
}
|
||||
|
||||
void Pixmap2D::getComponent(int x, int y, int component, float32 &value) const {
|
||||
int index = (w*y+x)*components+component;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+component;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
value= pixels[index]/255.f;
|
||||
value= pixels[index] / 255.f;
|
||||
}
|
||||
|
||||
//vector get
|
||||
Vec4f Pixmap2D::getPixel4f(int x, int y) const {
|
||||
Vec4f v(0.f);
|
||||
for(int i=0; i<components && i<4; ++i){
|
||||
int index = (w*y+x)*components+i;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
v.ptr()[i]= pixels[index]/255.f;
|
||||
v.ptr()[i]= pixels[index] / 255.f;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
@ -1126,26 +1126,26 @@ Vec4f Pixmap2D::getPixel4f(int x, int y) const {
|
|||
Vec3f Pixmap2D::getPixel3f(int x, int y) const {
|
||||
Vec3f v(0.f);
|
||||
for(int i=0; i<components && i<3; ++i){
|
||||
int index = (w*y+x)*components+i;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
v.ptr()[i]= pixels[index]/255.f;
|
||||
v.ptr()[i]= pixels[index] / 255.f;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
float Pixmap2D::getPixelf(int x, int y) const {
|
||||
int index = (w*y+x)*components;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w * y + x) * components;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
return pixels[index]/255.f;
|
||||
return pixels[index] / 255.f;
|
||||
}
|
||||
|
||||
float Pixmap2D::getComponentf(int x, int y, int component) const {
|
||||
|
@ -1161,10 +1161,10 @@ void Pixmap2D::setPixel(int x, int y, const uint8 *value, int arraySize) {
|
|||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
for(int i = 0; i < components; ++i) {
|
||||
int index = (w * y + x) * components + i;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w * y + x) * components + i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
|
@ -1181,22 +1181,22 @@ void Pixmap2D::setPixel(int x, int y, const float32 *value, int arraySize) {
|
|||
}
|
||||
|
||||
for(int i = 0; i < components; ++i) {
|
||||
int index = (w*y+x)*components+i;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
pixels[index]= static_cast<uint8>(value[i]*255.f);
|
||||
pixels[index] = static_cast<uint8>(value[i] * 255.f);
|
||||
}
|
||||
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
|
||||
}
|
||||
|
||||
void Pixmap2D::setComponent(int x, int y, int component, uint8 value) {
|
||||
int index = (w*y+x)*components+component;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+component;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
|
@ -1205,53 +1205,53 @@ void Pixmap2D::setComponent(int x, int y, int component, uint8 value) {
|
|||
}
|
||||
|
||||
void Pixmap2D::setComponent(int x, int y, int component, float32 value) {
|
||||
int index = (w*y+x)*components+component;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+component;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
pixels[index]= static_cast<uint8>(value*255.f);
|
||||
pixels[index] = static_cast<uint8>(value * 255.f);
|
||||
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
|
||||
}
|
||||
|
||||
//vector set
|
||||
void Pixmap2D::setPixel(int x, int y, const Vec3f &p) {
|
||||
for(int i = 0; i < components && i < 3; ++i) {
|
||||
int index = (w*y+x)*components+i;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
pixels[index]= static_cast<uint8>(p.ptr()[i]*255.f);
|
||||
pixels[index] = static_cast<uint8>(p.ptr()[i] * 255.f);
|
||||
}
|
||||
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
|
||||
}
|
||||
|
||||
void Pixmap2D::setPixel(int x, int y, const Vec4f &p) {
|
||||
for(int i = 0; i < components && i < 4; ++i) {
|
||||
int index = (w*y+x)*components+i;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w*y+x)*components+i;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
pixels[index]= static_cast<uint8>(p.ptr()[i]*255.f);
|
||||
pixels[index] = static_cast<uint8>(p.ptr()[i] * 255.f);
|
||||
}
|
||||
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
|
||||
}
|
||||
|
||||
void Pixmap2D::setPixel(int x, int y, float p) {
|
||||
int index = (w*y+x)*components;
|
||||
if(index < 0 || (unsigned int)index >= getPixelByteCount()) {
|
||||
std::size_t index = (w * y + x) * components;
|
||||
if(index >= getPixelByteCount()) {
|
||||
char szBuf[8096];
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: %d for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
pixels[index]= static_cast<uint8>(p*255.f);
|
||||
pixels[index] = static_cast<uint8>(p * 255.f);
|
||||
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
|
||||
}
|
||||
|
||||
|
@ -1462,12 +1462,12 @@ void Pixmap3D::init(int w, int h, int d, int components){
|
|||
this->h= h;
|
||||
this->d= d;
|
||||
this->components= components;
|
||||
pixels= new uint8[(std::size_t)getPixelByteCount()];
|
||||
pixels= new uint8[getPixelByteCount()];
|
||||
CalculatePixelsCRC(pixels,0, crc);
|
||||
}
|
||||
|
||||
uint64 Pixmap3D::getPixelByteCount() const {
|
||||
return ((uint64)h * (uint64)w * (uint64)d * (uint64)components);
|
||||
std::size_t Pixmap3D::getPixelByteCount() const {
|
||||
return (h * w * d * components);
|
||||
}
|
||||
|
||||
void Pixmap3D::init(int d, int components){
|
||||
|
@ -1538,7 +1538,7 @@ void Pixmap3D::loadSliceBmp(const string &path, int slice){
|
|||
components= 3;
|
||||
}
|
||||
if(pixels==NULL){
|
||||
pixels= new uint8[(std::size_t)getPixelByteCount()];
|
||||
pixels= new uint8[getPixelByteCount()];
|
||||
}
|
||||
|
||||
//data
|
||||
|
@ -1551,27 +1551,6 @@ void Pixmap3D::loadSliceTga(const string &path, int slice){
|
|||
//deletePixels();
|
||||
FileReader<Pixmap3D>::readPath(path,this);
|
||||
//printf("Loading 3D pixmap TGA [%s] this [%p]\n",path.c_str(),this);
|
||||
|
||||
/*
|
||||
PixmapIoTga plt;
|
||||
plt.openRead(path);
|
||||
|
||||
//header
|
||||
int fileComponents= plt.getComponents();
|
||||
|
||||
//init
|
||||
w= plt.getW();
|
||||
h= plt.getH();
|
||||
if(components==-1){
|
||||
components= fileComponents;
|
||||
}
|
||||
if(pixels==NULL){
|
||||
pixels= new uint8[(std::size_t)getPixelByteCount()];
|
||||
}
|
||||
|
||||
//read data
|
||||
plt.read(&pixels[slice*w*h*components], components);
|
||||
*/
|
||||
}
|
||||
|
||||
// =====================================================
|
||||
|
@ -1600,8 +1579,8 @@ void PixmapCube::init(int components) {
|
|||
}
|
||||
}
|
||||
|
||||
uint64 PixmapCube::getPixelByteCount() const {
|
||||
uint64 result = 0;
|
||||
std::size_t PixmapCube::getPixelByteCount() const {
|
||||
std::size_t result = 0;
|
||||
for(int i=0; i<6; ++i) {
|
||||
result += faces[i].getPixelByteCount();
|
||||
}
|
||||
|
|
|
@ -1470,7 +1470,7 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex
|
|||
MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; }
|
||||
r->m_table_sizes[2] = 19;
|
||||
}
|
||||
for ( ; (int)r->m_type >= 0; r->m_type--)
|
||||
for ( ; ; )
|
||||
{
|
||||
int tree_next, tree_cur; tinfl_huff_table *pTable;
|
||||
mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree);
|
||||
|
@ -1513,6 +1513,13 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex
|
|||
}
|
||||
TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]);
|
||||
}
|
||||
|
||||
if(r->m_type == 0) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
r->m_type--;
|
||||
}
|
||||
}
|
||||
for ( ; ; )
|
||||
{
|
||||
|
|
|
@ -24,7 +24,17 @@ namespace Shared { namespace PlatformCommon {
|
|||
Mutex BaseThread::mutexMasterThreadList;
|
||||
std::map<void *,int> BaseThread::masterThreadList;
|
||||
|
||||
BaseThread::BaseThread() : Thread(), ptr(NULL), genericData(NULL) {
|
||||
BaseThread::BaseThread() : Thread(),
|
||||
mutexRunning(new Mutex(CODE_AT_LINE)),
|
||||
mutexQuit(new Mutex(CODE_AT_LINE)),
|
||||
mutexBeginExecution(new Mutex(CODE_AT_LINE)),
|
||||
mutexDeleteSelfOnExecutionDone(new Mutex(CODE_AT_LINE)),
|
||||
mutexThreadObjectAccessor(new Mutex(CODE_AT_LINE)),
|
||||
mutexThreadOwnerValid(new Mutex(CODE_AT_LINE)),
|
||||
mutexExecutingTask(new Mutex(CODE_AT_LINE)),
|
||||
mutexStarted(new Mutex(CODE_AT_LINE)),
|
||||
ptr(NULL), genericData(NULL) {
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
ptr = this;
|
||||
|
@ -45,6 +55,10 @@ BaseThread::BaseThread() : Thread(), ptr(NULL), genericData(NULL) {
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
Mutex * BaseThread::getMutexThreadObjectAccessor() {
|
||||
return mutexThreadObjectAccessor;
|
||||
}
|
||||
|
||||
BaseThread::~BaseThread() {
|
||||
|
||||
//printf("In ~BaseThread Line: %d uniqueID [%s]\n",__LINE__,uniqueID.c_str());
|
||||
|
@ -93,16 +107,36 @@ BaseThread::~BaseThread() {
|
|||
//printf("In ~BaseThread Line: %d uniqueID [%s]\n",__LINE__,uniqueID.c_str());
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] ret [%d] END\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str(),ret);
|
||||
|
||||
safeMutexMasterList.ReleaseLock();
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] ret [%d] END\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str(),ret);
|
||||
|
||||
|
||||
delete mutexRunning;
|
||||
mutexRunning = NULL;
|
||||
delete mutexQuit;
|
||||
mutexQuit = NULL;
|
||||
delete mutexBeginExecution;
|
||||
mutexBeginExecution = NULL;
|
||||
delete mutexDeleteSelfOnExecutionDone;
|
||||
mutexDeleteSelfOnExecutionDone = NULL;
|
||||
delete mutexThreadObjectAccessor;
|
||||
mutexThreadObjectAccessor = NULL;
|
||||
delete mutexThreadOwnerValid;
|
||||
mutexThreadOwnerValid = NULL;
|
||||
delete mutexExecutingTask;
|
||||
mutexExecutingTask = NULL;
|
||||
delete mutexStarted;
|
||||
mutexStarted = NULL;
|
||||
|
||||
//printf("In ~BaseThread Line: %d uniqueID [%s] [%p]\n",__LINE__,uniqueID.c_str(),this);
|
||||
}
|
||||
|
||||
bool BaseThread::getStarted() {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexStarted,mutexOwnerId);
|
||||
mutexStarted.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexStarted,mutexOwnerId);
|
||||
mutexStarted->setOwnerId(mutexOwnerId);
|
||||
bool retval = started;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -113,8 +147,8 @@ void BaseThread::setStarted(bool value) {
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str());
|
||||
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexStarted,mutexOwnerId);
|
||||
mutexStarted.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexStarted,mutexOwnerId);
|
||||
mutexStarted->setOwnerId(mutexOwnerId);
|
||||
started = value;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -133,15 +167,15 @@ bool BaseThread::isThreadDeleted(void *ptr) {
|
|||
|
||||
Mutex * BaseThread::getMutexThreadOwnerValid() {
|
||||
if(getThreadOwnerValid() == true) {
|
||||
return &mutexThreadOwnerValid;
|
||||
return mutexThreadOwnerValid;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void BaseThread::setThreadOwnerValid(bool value) {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexThreadOwnerValid,mutexOwnerId);
|
||||
mutexThreadOwnerValid.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexThreadOwnerValid,mutexOwnerId);
|
||||
mutexThreadOwnerValid->setOwnerId(mutexOwnerId);
|
||||
threadOwnerValid = value;
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
|
@ -149,7 +183,7 @@ void BaseThread::setThreadOwnerValid(bool value) {
|
|||
bool BaseThread::getThreadOwnerValid() {
|
||||
//bool ret = false;
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexThreadOwnerValid,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexThreadOwnerValid,mutexOwnerId);
|
||||
//mutexThreadOwnerValid.setOwnerId(mutexOwnerId);
|
||||
bool ret = threadOwnerValid;
|
||||
safeMutex.ReleaseLock();
|
||||
|
@ -165,8 +199,8 @@ void BaseThread::setQuitStatus(bool value) {
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str());
|
||||
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexQuit,mutexOwnerId);
|
||||
mutexQuit.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexQuit,mutexOwnerId);
|
||||
mutexQuit->setOwnerId(mutexOwnerId);
|
||||
quit = value;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -176,7 +210,7 @@ void BaseThread::setQuitStatus(bool value) {
|
|||
bool BaseThread::getQuitStatus() {
|
||||
//bool retval = false;
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexQuit,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexQuit,mutexOwnerId);
|
||||
//mutexQuit.setOwnerId(mutexOwnerId);
|
||||
bool retval = quit;
|
||||
safeMutex.ReleaseLock();
|
||||
|
@ -187,7 +221,7 @@ bool BaseThread::getQuitStatus() {
|
|||
bool BaseThread::getHasBeginExecution() {
|
||||
//bool retval = false;
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexBeginExecution,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexBeginExecution,mutexOwnerId);
|
||||
//mutexBeginExecution.setOwnerId(mutexOwnerId);
|
||||
bool retval = hasBeginExecution;
|
||||
safeMutex.ReleaseLock();
|
||||
|
@ -199,8 +233,8 @@ void BaseThread::setHasBeginExecution(bool value) {
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str());
|
||||
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexBeginExecution,mutexOwnerId);
|
||||
mutexBeginExecution.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexBeginExecution,mutexOwnerId);
|
||||
mutexBeginExecution->setOwnerId(mutexOwnerId);
|
||||
hasBeginExecution = value;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -211,7 +245,7 @@ bool BaseThread::getRunningStatus() {
|
|||
//bool retval = false;
|
||||
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexRunning,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexRunning,mutexOwnerId);
|
||||
bool retval = running;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -224,8 +258,8 @@ bool BaseThread::getRunningStatus() {
|
|||
|
||||
void BaseThread::setRunningStatus(bool value) {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexRunning,mutexOwnerId);
|
||||
mutexRunning.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexRunning,mutexOwnerId);
|
||||
mutexRunning->setOwnerId(mutexOwnerId);
|
||||
running = value;
|
||||
if(value == true) {
|
||||
setHasBeginExecution(true);
|
||||
|
@ -235,8 +269,8 @@ void BaseThread::setRunningStatus(bool value) {
|
|||
|
||||
void BaseThread::setExecutingTask(bool value) {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexExecutingTask,mutexOwnerId);
|
||||
mutexExecutingTask.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexExecutingTask,mutexOwnerId);
|
||||
mutexExecutingTask->setOwnerId(mutexOwnerId);
|
||||
executingTask = value;
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
|
@ -244,7 +278,7 @@ void BaseThread::setExecutingTask(bool value) {
|
|||
bool BaseThread::getExecutingTask() {
|
||||
//bool retval = false;
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexExecutingTask,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexExecutingTask,mutexOwnerId);
|
||||
bool retval = executingTask;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -254,7 +288,7 @@ bool BaseThread::getExecutingTask() {
|
|||
bool BaseThread::getDeleteSelfOnExecutionDone() {
|
||||
//bool retval = false;
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexDeleteSelfOnExecutionDone,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexDeleteSelfOnExecutionDone,mutexOwnerId);
|
||||
bool retval = deleteSelfOnExecutionDone;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -263,8 +297,8 @@ bool BaseThread::getDeleteSelfOnExecutionDone() {
|
|||
|
||||
void BaseThread::setDeleteSelfOnExecutionDone(bool value) {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexDeleteSelfOnExecutionDone,mutexOwnerId);
|
||||
mutexDeleteSelfOnExecutionDone.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexDeleteSelfOnExecutionDone,mutexOwnerId);
|
||||
mutexDeleteSelfOnExecutionDone->setOwnerId(mutexOwnerId);
|
||||
deleteSelfOnExecutionDone = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,29 +106,29 @@ int ScreenHeight = 600;
|
|||
// PerformanceTimer
|
||||
// =====================================
|
||||
|
||||
void PerformanceTimer::init(float fps, int maxTimes){
|
||||
times= 0;
|
||||
this->maxTimes= maxTimes;
|
||||
|
||||
lastTicks= SDL_GetTicks();
|
||||
|
||||
updateTicks= static_cast<int>(1000./fps);
|
||||
void PerformanceTimer::init(float fps, int maxTimes) {
|
||||
this->times = 0;
|
||||
this->maxTimes = maxTimes;
|
||||
this->lastTicks = SDL_GetTicks();
|
||||
this->updateTicks = static_cast<int>(1000.0f / fps);
|
||||
}
|
||||
|
||||
bool PerformanceTimer::isTime(){
|
||||
bool PerformanceTimer::isTime() {
|
||||
Uint32 thisTicks = SDL_GetTicks();
|
||||
|
||||
if((thisTicks-lastTicks)>=updateTicks && times<maxTimes){
|
||||
lastTicks+= updateTicks;
|
||||
if((thisTicks - lastTicks) >= updateTicks &&
|
||||
times < maxTimes) {
|
||||
|
||||
lastTicks += updateTicks;
|
||||
times++;
|
||||
return true;
|
||||
}
|
||||
times= 0;
|
||||
times = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void PerformanceTimer::reset(){
|
||||
lastTicks= SDL_GetTicks();
|
||||
void PerformanceTimer::reset() {
|
||||
lastTicks = SDL_GetTicks();
|
||||
}
|
||||
|
||||
// =====================================
|
||||
|
@ -136,41 +136,45 @@ void PerformanceTimer::reset(){
|
|||
// =====================================
|
||||
|
||||
Chrono::Chrono(bool autoStart) {
|
||||
freq = 1000;
|
||||
stopped= true;
|
||||
accumCount= 0;
|
||||
freq = 1000;
|
||||
stopped = true;
|
||||
accumCount = 0;
|
||||
|
||||
lastStartCount = 0;
|
||||
lastTickCount = 0;
|
||||
lastResult = 0;
|
||||
lastMultiplier = 0;
|
||||
lastStopped = false;
|
||||
startCount = 0;
|
||||
|
||||
lastStartCount = 0;
|
||||
lastTickCount = 0;
|
||||
lastResult = 0;
|
||||
lastMultiplier = 0;
|
||||
lastStopped = false;
|
||||
startCount = 0;
|
||||
if(autoStart == true) {
|
||||
start();
|
||||
}
|
||||
}
|
||||
|
||||
bool Chrono::isStarted() const {
|
||||
return (stopped == false);
|
||||
}
|
||||
|
||||
void Chrono::start() {
|
||||
stopped= false;
|
||||
startCount = SDL_GetTicks();
|
||||
stopped = false;
|
||||
startCount = SDL_GetTicks();
|
||||
}
|
||||
|
||||
void Chrono::stop() {
|
||||
Uint32 endCount;
|
||||
endCount = SDL_GetTicks();
|
||||
accumCount += endCount-startCount;
|
||||
stopped= true;
|
||||
Uint32 endCount = SDL_GetTicks();
|
||||
accumCount += endCount - startCount;
|
||||
stopped = true;
|
||||
}
|
||||
|
||||
void Chrono::reset() {
|
||||
accumCount = 0;
|
||||
lastStartCount = 0;
|
||||
lastTickCount = 0;
|
||||
lastResult = 0;
|
||||
lastMultiplier = 0;
|
||||
accumCount = 0;
|
||||
lastStartCount = 0;
|
||||
lastTickCount = 0;
|
||||
lastResult = 0;
|
||||
lastMultiplier = 0;
|
||||
|
||||
startCount = SDL_GetTicks();
|
||||
startCount = SDL_GetTicks();
|
||||
}
|
||||
|
||||
int64 Chrono::getMicros() {
|
||||
|
@ -185,13 +189,13 @@ int64 Chrono::getSeconds() {
|
|||
return queryCounter(1);
|
||||
}
|
||||
|
||||
int64 Chrono::queryCounter(int multiplier) {
|
||||
int64 Chrono::queryCounter(int64 multiplier) {
|
||||
|
||||
if( multiplier == lastMultiplier &&
|
||||
stopped == lastStopped &&
|
||||
lastStartCount == startCount) {
|
||||
|
||||
if(stopped) {
|
||||
if(stopped == true) {
|
||||
return lastResult;
|
||||
}
|
||||
else {
|
||||
|
@ -203,19 +207,19 @@ int64 Chrono::queryCounter(int multiplier) {
|
|||
}
|
||||
|
||||
int64 result = 0;
|
||||
if(stopped) {
|
||||
result = (int64)multiplier * (int64)(accumCount / freq);
|
||||
if(stopped == true) {
|
||||
result = multiplier * accumCount / freq;
|
||||
}
|
||||
else {
|
||||
Uint32 endCount = SDL_GetTicks();
|
||||
result = (int64)multiplier * (int64)((accumCount + endCount - startCount) / freq);
|
||||
result = multiplier * (accumCount + endCount - startCount) / freq;
|
||||
lastTickCount = endCount;
|
||||
}
|
||||
|
||||
lastStartCount = startCount;
|
||||
lastResult = result;
|
||||
lastMultiplier = multiplier;
|
||||
lastStopped = stopped;
|
||||
lastStartCount = startCount;
|
||||
lastResult = result;
|
||||
lastMultiplier = multiplier;
|
||||
lastStopped = stopped;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,9 @@ const static int MAX_FileCRCPreCacheThread_WORKER_THREADS = 3;
|
|||
const static double PAUSE_SECONDS_BETWEEN_WORKERS = 15;
|
||||
string FileCRCPreCacheThread::preCacheThreadCacheLookupKey = "";
|
||||
|
||||
FileCRCPreCacheThread::FileCRCPreCacheThread() : BaseThread() {
|
||||
FileCRCPreCacheThread::FileCRCPreCacheThread() : BaseThread(),
|
||||
mutexPauseForGame(new Mutex(CODE_AT_LINE)) {
|
||||
|
||||
techDataPaths.clear();
|
||||
workerThreadTechPaths.clear();
|
||||
preCacheWorkerThreadList.clear();
|
||||
|
@ -40,7 +42,9 @@ FileCRCPreCacheThread::FileCRCPreCacheThread() : BaseThread() {
|
|||
|
||||
FileCRCPreCacheThread::FileCRCPreCacheThread(vector<string> techDataPaths,
|
||||
vector<string> workerThreadTechPaths,
|
||||
FileCRCPreCacheThreadCallbackInterface *processTechCB) {
|
||||
FileCRCPreCacheThreadCallbackInterface *processTechCB) :
|
||||
mutexPauseForGame(new Mutex(CODE_AT_LINE)) {
|
||||
|
||||
this->techDataPaths = techDataPaths;
|
||||
this->workerThreadTechPaths = workerThreadTechPaths;
|
||||
preCacheWorkerThreadList.clear();
|
||||
|
@ -55,11 +59,14 @@ FileCRCPreCacheThread::~FileCRCPreCacheThread() {
|
|||
if(preCacheCRCThreadPtr != NULL && threadControllerMode == true) {
|
||||
preCacheCRCThreadPtr = NULL;
|
||||
}
|
||||
|
||||
delete mutexPauseForGame;
|
||||
mutexPauseForGame = NULL;
|
||||
}
|
||||
|
||||
void FileCRCPreCacheThread::setPauseForGame(bool pauseForGame) {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexPauseForGame,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexPauseForGame,mutexOwnerId);
|
||||
this->pauseForGame = pauseForGame;
|
||||
|
||||
for(unsigned int index = 0; index < preCacheWorkerThreadList.size(); ++index) {
|
||||
|
@ -72,7 +79,7 @@ void FileCRCPreCacheThread::setPauseForGame(bool pauseForGame) {
|
|||
|
||||
bool FileCRCPreCacheThread::getPauseForGame() {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexPauseForGame,mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexPauseForGame,mutexOwnerId);
|
||||
return this->pauseForGame;
|
||||
}
|
||||
|
||||
|
@ -175,7 +182,7 @@ void FileCRCPreCacheThread::execute() {
|
|||
workerThread->setUniqueID(mutexOwnerId);
|
||||
workerThread->setPauseForGame(this->getPauseForGame());
|
||||
static string mutexOwnerId2 = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutexPause(&mutexPauseForGame,mutexOwnerId2);
|
||||
MutexSafeWrapper safeMutexPause(mutexPauseForGame,mutexOwnerId2);
|
||||
preCacheWorkerThreadList.push_back(workerThread);
|
||||
safeMutexPause.ReleaseLock();
|
||||
|
||||
|
@ -210,8 +217,6 @@ void FileCRCPreCacheThread::execute() {
|
|||
FileCRCPreCacheThread *workerThread = preCacheWorkerThreadList[idx];
|
||||
|
||||
if(workerThread != NULL) {
|
||||
//vector<Texture2D *> textureList = workerThread->getPendingTextureList(-1);
|
||||
//addPendingTextureList(textureList);
|
||||
|
||||
if(workerThread->getRunningStatus() == true) {
|
||||
hasRunningWorkerThread = true;
|
||||
|
@ -224,7 +229,7 @@ void FileCRCPreCacheThread::execute() {
|
|||
sleep(25);
|
||||
|
||||
static string mutexOwnerId2 = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutexPause(&mutexPauseForGame,mutexOwnerId2);
|
||||
MutexSafeWrapper safeMutexPause(mutexPauseForGame,mutexOwnerId2);
|
||||
|
||||
delete workerThread;
|
||||
preCacheWorkerThreadList[idx] = NULL;
|
||||
|
@ -347,15 +352,6 @@ void FileCRCPreCacheThread::execute() {
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
}
|
||||
|
||||
// if(processTechCB) {
|
||||
// vector<Texture2D *> files = processTechCB->processTech(techName);
|
||||
// for(unsigned int logoIdx = 0; logoIdx < files.size(); ++logoIdx) {
|
||||
// addPendingTexture(files[logoIdx]);
|
||||
//
|
||||
// if(SystemFlags::VERBOSE_MODE_ENABLED) printf("--------------------- CRC worker thread added texture [%s] for tech [%s] ---------------------------\n",files[logoIdx]->getPath().c_str(),techName.c_str());
|
||||
// }
|
||||
// }
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("--------------------- CRC worker thread END for tech [%s] ---------------------------\n",techName.c_str());
|
||||
|
||||
if(getQuitStatus() == true) {
|
||||
|
@ -388,50 +384,17 @@ void FileCRCPreCacheThread::execute() {
|
|||
deleteSelfIfRequired();
|
||||
}
|
||||
|
||||
void FileCRCPreCacheThread::addPendingTextureList(vector<Texture2D *> textureList) {
|
||||
for(unsigned int textureIdx = 0; textureIdx < textureList.size(); ++textureIdx) {
|
||||
this->addPendingTexture(textureList[textureIdx]);
|
||||
}
|
||||
}
|
||||
|
||||
void FileCRCPreCacheThread::addPendingTexture(Texture2D *texture) {
|
||||
if(texture == NULL) {
|
||||
return;
|
||||
}
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexPendingTextureList,mutexOwnerId);
|
||||
mutexPendingTextureList.setOwnerId(mutexOwnerId);
|
||||
pendingTextureList.push_back(texture);
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
|
||||
vector<Texture2D *> FileCRCPreCacheThread::getPendingTextureList(int maxTexturesToGet) {
|
||||
vector<Texture2D *> result;
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexPendingTextureList,mutexOwnerId);
|
||||
mutexPendingTextureList.setOwnerId(mutexOwnerId);
|
||||
unsigned int listCount = (unsigned int)pendingTextureList.size();
|
||||
if(listCount > 0) {
|
||||
if(maxTexturesToGet >= 0) {
|
||||
listCount = maxTexturesToGet;
|
||||
}
|
||||
for(unsigned int i = 0; i < listCount; ++i) {
|
||||
result.push_back(pendingTextureList[i]);
|
||||
}
|
||||
pendingTextureList.erase(pendingTextureList.begin() + 0, pendingTextureList.begin() + listCount);
|
||||
}
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
SimpleTaskThread::SimpleTaskThread( SimpleTaskCallbackInterface *simpleTaskInterface,
|
||||
unsigned int executionCount,
|
||||
unsigned int millisecsBetweenExecutions,
|
||||
bool needTaskSignal,
|
||||
void *userdata, bool wantSetupAndShutdown) : BaseThread(),
|
||||
simpleTaskInterface(NULL),
|
||||
overrideShutdownTask(NULL) {
|
||||
simpleTaskInterface(NULL),
|
||||
overrideShutdownTask(NULL),
|
||||
mutexSimpleTaskInterfaceValid(new Mutex(CODE_AT_LINE)),
|
||||
mutexTaskSignaller(new Mutex(CODE_AT_LINE)),
|
||||
mutexLastExecuteTimestamp(new Mutex(CODE_AT_LINE)) {
|
||||
|
||||
uniqueID = "SimpleTaskThread";
|
||||
this->simpleTaskInterface = simpleTaskInterface;
|
||||
this->simpleTaskInterfaceValid = (this->simpleTaskInterface != NULL);
|
||||
|
@ -448,13 +411,13 @@ SimpleTaskThread::SimpleTaskThread( SimpleTaskCallbackInterface *simpleTaskInter
|
|||
setTaskSignalled(false);
|
||||
|
||||
string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexLastExecuteTimestamp,mutexOwnerId);
|
||||
mutexLastExecuteTimestamp.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexLastExecuteTimestamp,mutexOwnerId);
|
||||
mutexLastExecuteTimestamp->setOwnerId(mutexOwnerId);
|
||||
lastExecuteTimestamp = time(NULL);
|
||||
|
||||
if(this->wantSetupAndShutdown == true) {
|
||||
string mutexOwnerId1 = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex1(&mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
MutexSafeWrapper safeMutex1(mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
if(this->simpleTaskInterfaceValid == true) {
|
||||
safeMutex1.ReleaseLock();
|
||||
this->simpleTaskInterface->setupTask(this,userdata);
|
||||
|
@ -466,6 +429,16 @@ SimpleTaskThread::~SimpleTaskThread() {
|
|||
//printf("~SimpleTaskThread LINE: %d this = %p\n",__LINE__,this);
|
||||
try {
|
||||
cleanup();
|
||||
|
||||
delete mutexSimpleTaskInterfaceValid;
|
||||
mutexSimpleTaskInterfaceValid = NULL;
|
||||
|
||||
delete mutexTaskSignaller;
|
||||
mutexTaskSignaller = NULL;
|
||||
|
||||
delete mutexLastExecuteTimestamp;
|
||||
mutexLastExecuteTimestamp = NULL;
|
||||
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
|
@ -488,7 +461,7 @@ void SimpleTaskThread::cleanup() {
|
|||
else if(this->simpleTaskInterface != NULL) {
|
||||
//printf("~SimpleTaskThread LINE: %d this = %p\n",__LINE__,this);
|
||||
string mutexOwnerId1 = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex1(&mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
MutexSafeWrapper safeMutex1(mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
//printf("~SimpleTaskThread LINE: %d this = %p\n",__LINE__,this);
|
||||
if(this->simpleTaskInterfaceValid == true) {
|
||||
//printf("~SimpleTaskThread LINE: %d this = %p\n",__LINE__,this);
|
||||
|
@ -509,8 +482,8 @@ void SimpleTaskThread::setOverrideShutdownTask(taskFunctionCallback *ptr) {
|
|||
|
||||
bool SimpleTaskThread::isThreadExecutionLagging() {
|
||||
string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexLastExecuteTimestamp,mutexOwnerId);
|
||||
mutexLastExecuteTimestamp.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexLastExecuteTimestamp,mutexOwnerId);
|
||||
mutexLastExecuteTimestamp->setOwnerId(mutexOwnerId);
|
||||
bool result = (difftime(time(NULL),lastExecuteTimestamp) >= 5.0);
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -530,13 +503,13 @@ bool SimpleTaskThread::canShutdown(bool deleteSelfIfShutdownDelayed) {
|
|||
|
||||
bool SimpleTaskThread::getSimpleTaskInterfaceValid() {
|
||||
string mutexOwnerId1 = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex1(&mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
MutexSafeWrapper safeMutex1(mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
|
||||
return this->simpleTaskInterfaceValid;
|
||||
}
|
||||
void SimpleTaskThread::setSimpleTaskInterfaceValid(bool value) {
|
||||
string mutexOwnerId1 = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex1(&mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
MutexSafeWrapper safeMutex1(mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
|
||||
this->simpleTaskInterfaceValid = value;
|
||||
}
|
||||
|
@ -560,7 +533,7 @@ void SimpleTaskThread::execute() {
|
|||
unsigned int idx = 0;
|
||||
for(;this->simpleTaskInterface != NULL;) {
|
||||
string mutexOwnerId1 = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex1(&mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
MutexSafeWrapper safeMutex1(mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
if(this->simpleTaskInterfaceValid == false) {
|
||||
break;
|
||||
}
|
||||
|
@ -589,8 +562,8 @@ void SimpleTaskThread::execute() {
|
|||
break;
|
||||
}
|
||||
string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexLastExecuteTimestamp,mutexOwnerId);
|
||||
mutexLastExecuteTimestamp.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexLastExecuteTimestamp,mutexOwnerId);
|
||||
mutexLastExecuteTimestamp->setOwnerId(mutexOwnerId);
|
||||
lastExecuteTimestamp = time(NULL);
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
|
@ -640,16 +613,16 @@ void SimpleTaskThread::execute() {
|
|||
|
||||
void SimpleTaskThread::setTaskSignalled(bool value) {
|
||||
string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexTaskSignaller,mutexOwnerId);
|
||||
mutexTaskSignaller.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexTaskSignaller,mutexOwnerId);
|
||||
mutexTaskSignaller->setOwnerId(mutexOwnerId);
|
||||
taskSignalled = value;
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
|
||||
bool SimpleTaskThread::getTaskSignalled() {
|
||||
string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexTaskSignaller,mutexOwnerId);
|
||||
mutexTaskSignaller.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexTaskSignaller,mutexOwnerId);
|
||||
mutexTaskSignaller->setOwnerId(mutexOwnerId);
|
||||
bool retval = taskSignalled;
|
||||
safeMutex.ReleaseLock();
|
||||
|
||||
|
@ -658,22 +631,26 @@ bool SimpleTaskThread::getTaskSignalled() {
|
|||
|
||||
// -------------------------------------------------
|
||||
|
||||
LogFileThread::LogFileThread() : BaseThread() {
|
||||
LogFileThread::LogFileThread() : BaseThread(), mutexLogList(new Mutex(CODE_AT_LINE)) {
|
||||
uniqueID = "LogFileThread";
|
||||
logList.clear();
|
||||
lastSaveToDisk = time(NULL);
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
mutexLogList.setOwnerId(mutexOwnerId);
|
||||
mutexLogList->setOwnerId(mutexOwnerId);
|
||||
}
|
||||
|
||||
LogFileThread::~LogFileThread() {
|
||||
|
||||
delete mutexLogList;
|
||||
mutexLogList = NULL;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#1 In [%s::%s Line: %d] LogFile thread is deleting\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
void LogFileThread::addLogEntry(SystemFlags::DebugType type, string logEntry) {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexLogList,mutexOwnerId);
|
||||
mutexLogList.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexLogList,mutexOwnerId);
|
||||
mutexLogList->setOwnerId(mutexOwnerId);
|
||||
LogFileEntry entry;
|
||||
entry.type = type;
|
||||
entry.entry = logEntry;
|
||||
|
@ -751,8 +728,8 @@ void LogFileThread::execute() {
|
|||
|
||||
std::size_t LogFileThread::getLogEntryBufferCount() {
|
||||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(&mutexLogList,mutexOwnerId);
|
||||
mutexLogList.setOwnerId(mutexOwnerId);
|
||||
MutexSafeWrapper safeMutex(mutexLogList,mutexOwnerId);
|
||||
mutexLogList->setOwnerId(mutexOwnerId);
|
||||
std::size_t logCount = logList.size();
|
||||
safeMutex.ReleaseLock();
|
||||
return logCount;
|
||||
|
@ -773,8 +750,8 @@ void LogFileThread::saveToDisk(bool forceSaveAll,bool logListAlreadyLocked) {
|
|||
static string mutexOwnerId = CODE_AT_LINE;
|
||||
MutexSafeWrapper safeMutex(NULL,mutexOwnerId);
|
||||
if(logListAlreadyLocked == false) {
|
||||
safeMutex.setMutex(&mutexLogList);
|
||||
mutexLogList.setOwnerId(mutexOwnerId);
|
||||
safeMutex.setMutex(mutexLogList);
|
||||
mutexLogList->setOwnerId(mutexOwnerId);
|
||||
}
|
||||
|
||||
std::size_t logCount = logList.size();
|
||||
|
|
|
@ -546,14 +546,21 @@ string getNetworkInterfaceBroadcastAddress(string ipAddress)
|
|||
// Adapted from example code at http://msdn2.microsoft.com/en-us/library/aa365917.aspx
|
||||
// Now get Windows' IPv4 addresses table. Once again, we gotta call GetIpAddrTable()
|
||||
// multiple times in order to deal with potential race conditions properly.
|
||||
MIB_IPADDRTABLE * ipTable = NULL;
|
||||
PMIB_IPADDRTABLE ipTable = NULL;
|
||||
// Before calling AddIPAddress we use GetIpAddrTable to get
|
||||
// an adapter to which we can add the IP.
|
||||
ipTable = (PMIB_IPADDRTABLE) malloc(sizeof (MIB_IPADDRTABLE));
|
||||
ipTable->dwNumEntries = 0;
|
||||
|
||||
{
|
||||
ULONG bufLen = 0;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
||||
DWORD ipRet = GetIpAddrTable(ipTable, &bufLen, false);
|
||||
if (ipRet == ERROR_INSUFFICIENT_BUFFER) {
|
||||
free(ipTable); // in case we had previously allocated it
|
||||
ipTable = (MIB_IPADDRTABLE *) malloc(bufLen);
|
||||
ipTable->dwNumEntries = 0;
|
||||
}
|
||||
else if(ipRet == NO_ERROR) {
|
||||
break;
|
||||
|
@ -635,8 +642,8 @@ string getNetworkInterfaceBroadcastAddress(string ipAddress)
|
|||
}
|
||||
}
|
||||
|
||||
free(pAdapterInfo);
|
||||
free(ipTable);
|
||||
if(pAdapterInfo) free(pAdapterInfo);
|
||||
if(ipTable) free(ipTable);
|
||||
}
|
||||
#else
|
||||
// Dunno what we're running on here!
|
||||
|
@ -778,9 +785,9 @@ bool Socket::isSocketValid(const PLATFORM_SOCKET *validateSocket) {
|
|||
}
|
||||
|
||||
Socket::Socket(PLATFORM_SOCKET sock) {
|
||||
dataSynchAccessorRead = new Mutex();
|
||||
dataSynchAccessorWrite = new Mutex();
|
||||
inSocketDestructorSynchAccessor = new Mutex();
|
||||
dataSynchAccessorRead = new Mutex(CODE_AT_LINE);
|
||||
dataSynchAccessorWrite = new Mutex(CODE_AT_LINE);
|
||||
inSocketDestructorSynchAccessor = new Mutex(CODE_AT_LINE);
|
||||
lastSocketError = 0;
|
||||
|
||||
MutexSafeWrapper safeMutexSocketDestructorFlag(inSocketDestructorSynchAccessor,CODE_AT_LINE);
|
||||
|
@ -801,9 +808,9 @@ Socket::Socket(PLATFORM_SOCKET sock) {
|
|||
}
|
||||
|
||||
Socket::Socket() {
|
||||
dataSynchAccessorRead = new Mutex();
|
||||
dataSynchAccessorWrite = new Mutex();
|
||||
inSocketDestructorSynchAccessor = new Mutex();
|
||||
dataSynchAccessorRead = new Mutex(CODE_AT_LINE);
|
||||
dataSynchAccessorWrite = new Mutex(CODE_AT_LINE);
|
||||
inSocketDestructorSynchAccessor = new Mutex(CODE_AT_LINE);
|
||||
lastSocketError = 0;
|
||||
lastDebugEvent = 0;
|
||||
lastThreadedPing = 0;
|
||||
|
@ -966,7 +973,7 @@ void Socket::disconnectSocket() {
|
|||
::shutdown(sock,2);
|
||||
#ifndef WIN32
|
||||
::close(sock);
|
||||
sock = INVALID_SOCKET;
|
||||
sock = -1;
|
||||
#else
|
||||
::closesocket(sock);
|
||||
sock = INVALID_SOCKET;
|
||||
|
@ -2148,9 +2155,9 @@ void BroadCastClientSocketThread::execute() {
|
|||
|
||||
#ifndef WIN32
|
||||
if(bcfd >= 0) ::close(bcfd);
|
||||
bcfd = INVALID_SOCKET;
|
||||
bcfd = -1;
|
||||
#else
|
||||
if(bcfd >= 0) ::closesocket(bcfd);
|
||||
if(bcfd != INVALID_SOCKET) ::closesocket(bcfd);
|
||||
bcfd = INVALID_SOCKET;
|
||||
#endif
|
||||
|
||||
|
@ -2332,7 +2339,7 @@ void ServerSocket::bind(int port) {
|
|||
snprintf(szBuf, 8096,"In [%s::%s] Error binding socket sock = " PLATFORM_SOCKET_FORMAT_TYPE ", address [%s] port = %d err = %d, error = %s opt_result = %d\n",__FILE__,__FUNCTION__,sock,this->bindSpecificAddress.c_str(),port,err,getLastSocketErrorFormattedText().c_str(),opt_result);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"%s",szBuf);
|
||||
|
||||
snprintf(szBuf, 8096,"Error binding socket sock = %d, address [%s] port = %d err = %d, error = %s\n",sock,this->bindSpecificAddress.c_str(),port,err,getLastSocketErrorFormattedText().c_str());
|
||||
snprintf(szBuf, 8096,"Error binding socket sock = " PLATFORM_SOCKET_FORMAT_TYPE ", address [%s] port = %d err = %d, error = %s\n",sock,this->bindSpecificAddress.c_str(),port,err,getLastSocketErrorFormattedText().c_str());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
portBound = true;
|
||||
|
@ -2413,7 +2420,7 @@ Socket *ServerSocket::accept(bool errorOnFail) {
|
|||
|
||||
if(isSocketValid(&newSock) == false) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf, 8096,"In [%s::%s Line: %d] Error accepting socket connection sock = " PLATFORM_SOCKET_FORMAT_TYPE ", err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,newSock,getLastSocketErrorFormattedText().c_str());
|
||||
snprintf(szBuf, 8096,"In [%s::%s Line: %d] Error accepting socket connection sock = " PLATFORM_SOCKET_FORMAT_TYPE ", err = " PLATFORM_SOCKET_FORMAT_TYPE ", error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,newSock,getLastSocketErrorFormattedText().c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] %s\n",__FILE__,__FUNCTION__,__LINE__,szBuf);
|
||||
|
||||
int lastSocketError = getLastSocketError();
|
||||
|
@ -2431,7 +2438,7 @@ Socket *ServerSocket::accept(bool errorOnFail) {
|
|||
else {
|
||||
#ifndef WIN32
|
||||
::close(newSock);
|
||||
newSock = INVALID_SOCKET;
|
||||
newSock = -1;
|
||||
#else
|
||||
::closesocket(newSock);
|
||||
newSock = INVALID_SOCKET;
|
||||
|
@ -2450,7 +2457,7 @@ Socket *ServerSocket::accept(bool errorOnFail) {
|
|||
|
||||
#ifndef WIN32
|
||||
::close(newSock);
|
||||
newSock = INVALID_SOCKET;
|
||||
newSock = -1;
|
||||
#else
|
||||
::closesocket(newSock);
|
||||
newSock = INVALID_SOCKET;
|
||||
|
@ -2807,7 +2814,7 @@ void UPNP_Tools::NETremRedirects(int ext_port) {
|
|||
//
|
||||
BroadCastSocketThread::BroadCastSocketThread(int boundPort) : BaseThread() {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
mutexPauseBroadcast = new Mutex();
|
||||
mutexPauseBroadcast = new Mutex(CODE_AT_LINE);
|
||||
setPauseBroadcast(false);
|
||||
this->boundPort = boundPort;
|
||||
uniqueID = "BroadCastSocketThread";
|
||||
|
@ -2871,7 +2878,7 @@ void BroadCastSocketThread::execute() {
|
|||
#ifdef WIN32
|
||||
bcfd[idx] = INVALID_SOCKET;
|
||||
#else
|
||||
bcfd[idx] = INVALID_SOCKET;
|
||||
bcfd[idx] = -1;
|
||||
#endif
|
||||
}
|
||||
/* get my host name */
|
||||
|
@ -2905,7 +2912,7 @@ void BroadCastSocketThread::execute() {
|
|||
#ifdef WIN32
|
||||
bcfd[idx] = INVALID_SOCKET;
|
||||
#else
|
||||
bcfd[idx] = INVALID_SOCKET;
|
||||
bcfd[idx] = -1;
|
||||
#endif
|
||||
//if(strlen(subnetmask[idx]) > 0) {
|
||||
bcfd[idx] = socket( AF_INET, SOCK_DGRAM, 0 );
|
||||
|
@ -3003,7 +3010,7 @@ void BroadCastSocketThread::execute() {
|
|||
if( Socket::isSocketValid(&bcfd[idx]) == true ) {
|
||||
#ifndef WIN32
|
||||
::close(bcfd[idx]);
|
||||
bcfd[idx] = INVALID_SOCKET;
|
||||
bcfd[idx] = -1;
|
||||
#else
|
||||
::closesocket(bcfd[idx]);
|
||||
bcfd[idx] = INVALID_SOCKET;
|
||||
|
|
|
@ -36,7 +36,7 @@ class Mutex;
|
|||
class MutexSafeWrapper;
|
||||
|
||||
static auto_ptr<ThreadGarbageCollector> cleanupThread;
|
||||
static auto_ptr<Mutex> cleanupThreadMutex(new Mutex());
|
||||
static auto_ptr<Mutex> cleanupThreadMutex(new Mutex(CODE_AT_LINE));
|
||||
|
||||
class ThreadGarbageCollector : public BaseThread
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ public:
|
|||
// =====================================
|
||||
// Threads
|
||||
// =====================================
|
||||
Thread::Thread() : thread(NULL), mutexthreadAccessor(new Mutex()), deleteAfterExecute(false) {
|
||||
Thread::Thread() : thread(NULL), mutexthreadAccessor(new Mutex(CODE_AT_LINE)), deleteAfterExecute(false) {
|
||||
addThreadToList();
|
||||
}
|
||||
|
||||
|
@ -386,28 +386,30 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
const bool debugMutexLock = false;
|
||||
const int debugMutexLockMillisecondThreshold = 2000;
|
||||
const bool debugMutexLock = false;
|
||||
const int debugMutexLockMillisecondThreshold = 2000;
|
||||
|
||||
Mutex::Mutex(string ownerId) {
|
||||
isStaticMutexListMutex = false;
|
||||
mutexAccessor = SDL_CreateMutex();
|
||||
this->isStaticMutexListMutex = false;
|
||||
this->mutexAccessor = SDL_CreateMutex();
|
||||
|
||||
SDLMutexSafeWrapper safeMutex(&mutexAccessor);
|
||||
refCount=0;
|
||||
this->ownerId = ownerId;
|
||||
this->lastownerId = "";
|
||||
mutex = SDL_CreateMutex();
|
||||
assert(mutex != NULL);
|
||||
if(mutex == NULL) {
|
||||
|
||||
this->maxRefCount = 0;
|
||||
this->refCount = 0;
|
||||
this->ownerId = ownerId;
|
||||
this->lastownerId = "";
|
||||
this->mutex = SDL_CreateMutex();
|
||||
if(this->mutex == NULL) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8095,"In [%s::%s Line: %d] mutex == NULL",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
deleteownerId = "";
|
||||
this->deleteownerId = "";
|
||||
|
||||
chronoPerf = NULL;
|
||||
this->chronoPerf = NULL;
|
||||
if(debugMutexLock == true) {
|
||||
chronoPerf = new Chrono();
|
||||
this->chronoPerf = new Chrono();
|
||||
}
|
||||
|
||||
if(Mutex::mutexMutexList.get()) {
|
||||
|
@ -416,7 +418,7 @@ Mutex::Mutex(string ownerId) {
|
|||
safeMutexX.ReleaseLock();
|
||||
}
|
||||
else {
|
||||
isStaticMutexListMutex = true;
|
||||
this->isStaticMutexListMutex = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -456,6 +458,10 @@ Mutex::~Mutex() {
|
|||
SDL_DestroyMutex(mutex);
|
||||
mutex=NULL;
|
||||
}
|
||||
|
||||
// if(maxRefCount <= 1) {
|
||||
// printf("***> MUTEX candidate for removal ownerId [%s] deleteownerId [%s] lastownerId [%s]\n",ownerId.c_str(),deleteownerId.c_str(),lastownerId.c_str());
|
||||
// }
|
||||
}
|
||||
|
||||
void Mutex::p() {
|
||||
|
@ -473,6 +479,7 @@ void Mutex::p() {
|
|||
chronoLockPerf->start();
|
||||
}
|
||||
|
||||
// maxRefCount = max(maxRefCount,refCount+1);
|
||||
SDL_mutexP(mutex);
|
||||
refCount++;
|
||||
|
||||
|
@ -734,10 +741,9 @@ MasterSlaveThreadController::MasterSlaveThreadController(std::vector<SlaveThread
|
|||
}
|
||||
|
||||
void MasterSlaveThreadController::init(std::vector<SlaveThreadControllerInterface *> &newSlaveThreadList) {
|
||||
static string masterSlaveOwnerId = string(__FILE__) + string("_MasterSlaveThreadController");
|
||||
this->mutex = new Mutex(masterSlaveOwnerId);
|
||||
this->slaveTriggerSem = new Semaphore(0);
|
||||
this->slaveTriggerCounter = (int)newSlaveThreadList.size() + triggerBaseCount;
|
||||
this->mutex = new Mutex(CODE_AT_LINE);
|
||||
this->slaveTriggerSem = new Semaphore(0);
|
||||
this->slaveTriggerCounter = (int)newSlaveThreadList.size() + triggerBaseCount;
|
||||
setSlaves(newSlaveThreadList);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,6 @@ GraphicsFactory *FactoryRepository::getGraphicsFactory(const string &name){
|
|||
}
|
||||
|
||||
SoundFactory *FactoryRepository::getSoundFactory(const string &name){
|
||||
// deprecated as of 3.6.1
|
||||
//if(name == "DirectSound8"){
|
||||
// return &soundFactoryDs8;
|
||||
//}
|
||||
if(name == "OpenAL") {
|
||||
return &soundFactoryOpenAL;
|
||||
}
|
||||
|
|
|
@ -1,528 +0,0 @@
|
|||
// ==============================================================
|
||||
// This file is part of Glest Shared Library (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Martiño Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
// by the Free Software Foundation; either version 2 of the
|
||||
// License, or (at your option) any later version
|
||||
// ==============================================================
|
||||
|
||||
#include "sound_player_ds8.h"
|
||||
|
||||
#include <cassert>
|
||||
#include "math_wrapper.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "leak_dumper.h"
|
||||
|
||||
namespace Shared{ namespace Sound{ namespace Ds8{
|
||||
|
||||
using namespace Util;
|
||||
|
||||
// =====================================================
|
||||
// class SoundBuffer
|
||||
// =====================================================
|
||||
|
||||
// ===================== PUBLIC ========================
|
||||
|
||||
SoundBuffer::SoundBuffer(){
|
||||
dsBuffer= NULL;
|
||||
sound= NULL;
|
||||
}
|
||||
|
||||
bool SoundBuffer::isFree(){
|
||||
if(dsBuffer==NULL){
|
||||
return true;
|
||||
}
|
||||
|
||||
DWORD status;
|
||||
dsBuffer->GetStatus(&status);
|
||||
|
||||
if(status & DSBSTATUS_BUFFERLOST){
|
||||
end();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SoundBuffer::isReady(){
|
||||
DWORD status;
|
||||
dsBuffer->GetStatus(&status);
|
||||
|
||||
if ((status & DSBSTATUS_PLAYING) || (status & DSBSTATUS_BUFFERLOST)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// ==================== PROTECTED ======================
|
||||
|
||||
void SoundBuffer::createDsBuffer(IDirectSound8 *dsObject){
|
||||
IDirectSoundBuffer *buffer;
|
||||
const SoundInfo *soundInfo= sound->getInfo();
|
||||
|
||||
//format
|
||||
WAVEFORMATEX format;
|
||||
format.wFormatTag= WAVE_FORMAT_PCM;
|
||||
format.nChannels= soundInfo->getChannels();
|
||||
format.nSamplesPerSec= soundInfo->getSamplesPerSecond();
|
||||
format.nAvgBytesPerSec= (soundInfo->getBitsPerSample() * soundInfo->getSamplesPerSecond() * soundInfo->getChannels())/8;
|
||||
format.nBlockAlign= (soundInfo->getChannels() * soundInfo->getBitsPerSample())/8;
|
||||
format.wBitsPerSample= soundInfo->getBitsPerSample();
|
||||
format.cbSize= 0;
|
||||
|
||||
//buffer desc
|
||||
DSBUFFERDESC dsBufferDesc;
|
||||
memset(&dsBufferDesc, 0, sizeof(DSBUFFERDESC));
|
||||
dsBufferDesc.dwSize= sizeof(DSBUFFERDESC);
|
||||
dsBufferDesc.dwFlags= DSBCAPS_CTRLVOLUME;
|
||||
dsBufferDesc.dwBufferBytes= size;
|
||||
dsBufferDesc.lpwfxFormat= &format;
|
||||
|
||||
//create buffer
|
||||
HRESULT hr= dsObject->CreateSoundBuffer(&dsBufferDesc, &buffer, NULL);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to create direct sound buffer");
|
||||
}
|
||||
|
||||
//query dx8 interface
|
||||
hr = buffer->QueryInterface(IID_IDirectSoundBuffer8, (void**) &dsBuffer);
|
||||
buffer->Release();
|
||||
if (hr!=S_OK){
|
||||
throw megaglest_runtime_error("Failed to create direct sound 8 static buffer");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================
|
||||
// class StaticBuffer
|
||||
// =====================================================
|
||||
|
||||
// ===================== PUBLIC ========================
|
||||
|
||||
void StaticSoundBuffer::init(IDirectSound8 *dsObject, Sound *sound){
|
||||
if(this->sound==NULL){
|
||||
this->sound= sound;
|
||||
this->size= sound->getInfo()->getSize();
|
||||
createDsBuffer(dsObject);
|
||||
dsBuffer->SetCurrentPosition(0);
|
||||
fillDsBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
void StaticSoundBuffer::end(){
|
||||
dsBuffer->Stop();
|
||||
dsBuffer->Release();
|
||||
dsBuffer= NULL;
|
||||
sound= NULL;
|
||||
}
|
||||
|
||||
void StaticSoundBuffer::play(){
|
||||
dsBuffer->SetVolume(dsVolume(sound->getVolume()));
|
||||
dsBuffer->Play(0, 0, 0);
|
||||
}
|
||||
|
||||
// ===================== PRIVATE =======================
|
||||
|
||||
void StaticSoundBuffer::fillDsBuffer(){
|
||||
void * writePointer;
|
||||
unsigned long size;
|
||||
|
||||
//lock
|
||||
HRESULT hr= dsBuffer->Lock(0, 0, &writePointer, &size, NULL, NULL, DSBLOCK_ENTIREBUFFER);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to Lock direct sound buffer");
|
||||
}
|
||||
|
||||
//copy memory
|
||||
memcpy(writePointer, getStaticSound()->getSamples(), size);
|
||||
|
||||
//unlock
|
||||
hr= dsBuffer->Unlock(writePointer, size, NULL, 0);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to Unlock direct sound buffer");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================
|
||||
// class StrBuffer
|
||||
// =====================================================
|
||||
|
||||
// ===================== PUBLIC ========================
|
||||
|
||||
StrSoundBuffer::StrSoundBuffer(){
|
||||
state= sFree;
|
||||
}
|
||||
|
||||
void StrSoundBuffer::init(IDirectSound8 *dsObject, Sound *sound, uint32 strBufferSize){
|
||||
state= sStopped;
|
||||
if(this->sound==NULL){
|
||||
this->sound= sound;
|
||||
this->size= strBufferSize;
|
||||
createDsBuffer(dsObject);
|
||||
dsBuffer->SetCurrentPosition(0);
|
||||
fillDsBuffer();
|
||||
}
|
||||
else if(this->sound!=sound){
|
||||
this->sound= sound;
|
||||
this->size= strBufferSize;
|
||||
dsBuffer->SetCurrentPosition(0);
|
||||
fillDsBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
void StrSoundBuffer::end(){
|
||||
state= sFree;
|
||||
dsBuffer->Stop();
|
||||
dsBuffer->Release();
|
||||
dsBuffer= NULL;
|
||||
sound= NULL;
|
||||
}
|
||||
|
||||
void StrSoundBuffer::play(int64 fadeOn){
|
||||
assert(state==sStopped);
|
||||
lastPlayCursor= 0;
|
||||
if(fadeOn==0){
|
||||
state= sPlaying;
|
||||
dsBuffer->SetVolume(dsVolume(sound->getVolume()));
|
||||
}
|
||||
else{
|
||||
this->fade= fadeOn;
|
||||
state= sFadingOn;
|
||||
chrono.start();
|
||||
dsBuffer->SetVolume(dsVolume(0.f));
|
||||
}
|
||||
dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
|
||||
}
|
||||
|
||||
void StrSoundBuffer::update(){
|
||||
|
||||
switch(state){
|
||||
case sFadingOn:
|
||||
if(chrono.getMillis()>fade){
|
||||
dsBuffer->SetVolume(dsVolume(sound->getVolume()));
|
||||
state= sPlaying;
|
||||
}
|
||||
else{
|
||||
dsBuffer->SetVolume(dsVolume(sound->getVolume()*(static_cast<float>(chrono.getMillis())/fade)));
|
||||
}
|
||||
refreshDsBuffer();
|
||||
break;
|
||||
|
||||
case sFadingOff:
|
||||
if(chrono.getMillis()>fade){
|
||||
state= sStopped;
|
||||
dsBuffer->Stop();
|
||||
}
|
||||
else{
|
||||
dsBuffer->SetVolume(dsVolume(sound->getVolume()*(1.0f-static_cast<float>(chrono.getMillis())/fade)));
|
||||
refreshDsBuffer();
|
||||
}
|
||||
break;
|
||||
|
||||
case sPlaying:
|
||||
dsBuffer->SetVolume(dsVolume(sound->getVolume()));
|
||||
refreshDsBuffer();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void StrSoundBuffer::stop(int64 fadeOff){
|
||||
|
||||
if(fadeOff==0){
|
||||
dsBuffer->Stop();
|
||||
state= sStopped;
|
||||
}
|
||||
else{
|
||||
this->fade= fadeOff;
|
||||
state= sFadingOff;
|
||||
chrono.start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ===================== PRIVATE =======================
|
||||
|
||||
void StrSoundBuffer::fillDsBuffer(){
|
||||
void * writePointer;
|
||||
unsigned long size;
|
||||
|
||||
//lock
|
||||
HRESULT hr= dsBuffer->Lock(0, 0, &writePointer, &size, NULL, NULL, DSBLOCK_ENTIREBUFFER);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to Lock direct sound buffer");
|
||||
}
|
||||
|
||||
//copy memory
|
||||
readChunk(writePointer, size);
|
||||
|
||||
//unlock
|
||||
hr= dsBuffer->Unlock(writePointer, size, NULL, 0 );
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to Unlock direct sound buffer");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void StrSoundBuffer::refreshDsBuffer(){
|
||||
void *writePointer1, *writePointer2;
|
||||
DWORD size1, size2;
|
||||
DWORD playCursor;
|
||||
DWORD bytesToLock;
|
||||
|
||||
DWORD status;
|
||||
dsBuffer->GetStatus(&status);
|
||||
assert(!(status & DSBSTATUS_BUFFERLOST));
|
||||
|
||||
HRESULT hr= dsBuffer->GetCurrentPosition(&playCursor, NULL);
|
||||
if(hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to Lock query play position");
|
||||
}
|
||||
|
||||
//compute bytes to lock
|
||||
if(playCursor>=lastPlayCursor){
|
||||
bytesToLock= playCursor - lastPlayCursor;
|
||||
}
|
||||
else{
|
||||
bytesToLock= size - (lastPlayCursor - playCursor);
|
||||
}
|
||||
|
||||
//copy data
|
||||
if(bytesToLock>0){
|
||||
|
||||
//lock
|
||||
HRESULT hr=dsBuffer->Lock(lastPlayCursor, bytesToLock, &writePointer1, &size1, &writePointer2, &size2, 0);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to Lock direct sound buffer");
|
||||
}
|
||||
|
||||
//copy memory
|
||||
assert(size1+size2==bytesToLock);
|
||||
|
||||
readChunk(writePointer1, size1);
|
||||
readChunk(writePointer2, size2);
|
||||
|
||||
//unlock
|
||||
hr= dsBuffer->Unlock(writePointer1, size1, writePointer2, size2);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Failed to Unlock direct sound buffer");
|
||||
}
|
||||
}
|
||||
|
||||
lastPlayCursor= playCursor;
|
||||
}
|
||||
|
||||
void StrSoundBuffer::readChunk(void *writePointer, uint32 size){
|
||||
StrSound *s= getStrSound();
|
||||
uint32 readSize= s->read(static_cast<int8*>(writePointer), size);
|
||||
if(readSize<size){
|
||||
StrSound *next= s->getNext()==NULL? s: s->getNext();
|
||||
next->restart();
|
||||
next->read(&static_cast<int8*>(writePointer)[readSize], size-readSize);
|
||||
next->setVolume(s->getVolume());
|
||||
sound= next;
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================
|
||||
// class SoundPlayerDs8
|
||||
// =====================================================
|
||||
|
||||
SoundPlayerDs8::SoundPlayerDs8(){
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
dsObject= NULL;
|
||||
initOk = false;
|
||||
}
|
||||
|
||||
bool SoundPlayerDs8::init(const SoundPlayerParams *params){
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
initOk = false;
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
if(params == NULL) {
|
||||
throw std::runtime_error("params == NULL");
|
||||
}
|
||||
|
||||
this->params= *params;
|
||||
|
||||
try {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
//reserve memory for buffers
|
||||
staticSoundBuffers.resize(params->staticBufferCount);
|
||||
strSoundBuffers.resize(params->strBufferCount);
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
//create object
|
||||
hr=DirectSoundCreate8(NULL, &dsObject, NULL);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Can't create direct sound object");
|
||||
}
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
//Set cooperative level
|
||||
hr= dsObject->SetCooperativeLevel(GetActiveWindow(), DSSCL_PRIORITY);
|
||||
if (hr!=DS_OK){
|
||||
throw megaglest_runtime_error("Can't set cooperative level of dsound");
|
||||
}
|
||||
initOk = true;
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
}
|
||||
|
||||
return initOk;
|
||||
}
|
||||
|
||||
void SoundPlayerDs8::end(){
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
stopAllSounds();
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
void SoundPlayerDs8::play(StaticSound *staticSound){
|
||||
if(initOk == false) return;
|
||||
|
||||
int bufferIndex= -1;
|
||||
|
||||
assert(staticSound!=NULL);
|
||||
|
||||
//if buffer found, play the sound
|
||||
if (findStaticBuffer(staticSound, &bufferIndex)){
|
||||
staticSoundBuffers[bufferIndex].init(dsObject, staticSound);
|
||||
staticSoundBuffers[bufferIndex].play();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SoundPlayerDs8::play(StrSound *strSound, int64 fadeOn){
|
||||
if(initOk == false) return;
|
||||
int bufferIndex= -1;
|
||||
|
||||
//play sound if buffer found
|
||||
if(findStrBuffer(strSound, &bufferIndex)){
|
||||
strSoundBuffers[bufferIndex].init(dsObject, strSound, params.strBufferSize);
|
||||
strSoundBuffers[bufferIndex].play(fadeOn);
|
||||
}
|
||||
}
|
||||
|
||||
void SoundPlayerDs8::stop(StrSound *strSound, int64 fadeOff){
|
||||
if(initOk == false) return;
|
||||
//find the buffer with this sound and stop it
|
||||
for(unsigned int i= 0; i<params.strBufferCount; ++i){
|
||||
if(strSoundBuffers[i].getSound()==strSound){
|
||||
strSoundBuffers[i].stop(fadeOff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SoundPlayerDs8::stopAllSounds(int64 fadeOff){
|
||||
if(initOk == false) return;
|
||||
|
||||
for(unsigned int i=0; i<params.strBufferCount; ++i){
|
||||
if(!strSoundBuffers[i].isFree()){
|
||||
strSoundBuffers[i].stop(fadeOff);
|
||||
strSoundBuffers[i].end();
|
||||
}
|
||||
}
|
||||
for(unsigned int i=0; i<params.staticBufferCount; ++i){
|
||||
if(!staticSoundBuffers[i].isFree()){
|
||||
staticSoundBuffers[i].end();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SoundPlayerDs8::updateStreams(){
|
||||
if(initOk == false) return;
|
||||
|
||||
for(unsigned int i=0; i<params.strBufferCount; ++i){
|
||||
strSoundBuffers[i].update();
|
||||
}
|
||||
}
|
||||
|
||||
// ===================== PRIVATE =======================
|
||||
|
||||
bool SoundPlayerDs8::findStaticBuffer(Sound *sound, int *bufferIndex){
|
||||
bool bufferFound= false;
|
||||
if(initOk == false) return bufferFound;
|
||||
|
||||
assert(sound!=NULL);
|
||||
|
||||
//1st: we try fo find a stopped buffer with the same sound
|
||||
for(unsigned int i=0; i<staticSoundBuffers.size(); ++i){
|
||||
if(sound==staticSoundBuffers[i].getSound() && staticSoundBuffers[i].isReady()){
|
||||
*bufferIndex= i;
|
||||
bufferFound= true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//2nd: we try to find a free buffer
|
||||
if(!bufferFound){
|
||||
for(uint32 i=0; i<staticSoundBuffers.size(); ++i){
|
||||
if(staticSoundBuffers[i].isFree()){
|
||||
*bufferIndex= i;
|
||||
bufferFound= true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//3rd: we try to find a stopped buffer
|
||||
if(!bufferFound){
|
||||
for(unsigned int i=0; i<staticSoundBuffers.size(); ++i){
|
||||
if(staticSoundBuffers[i].isReady()){
|
||||
staticSoundBuffers[i].end();
|
||||
*bufferIndex= i;
|
||||
bufferFound= true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bufferFound;
|
||||
}
|
||||
|
||||
bool SoundPlayerDs8::findStrBuffer(Sound *sound, int *bufferIndex){
|
||||
bool bufferFound= false;
|
||||
if(initOk == false) return bufferFound;
|
||||
|
||||
assert(sound!=NULL);
|
||||
assert(sound->getVolume()<=1.0f && sound->getVolume()>=0.0f);
|
||||
|
||||
//We try to find a free or ready buffer
|
||||
if(!bufferFound){
|
||||
for(uint32 i=0; i<strSoundBuffers.size(); ++i){
|
||||
if(strSoundBuffers[i].isFree() || strSoundBuffers[i].isReady()){
|
||||
*bufferIndex= i;
|
||||
bufferFound= true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bufferFound;
|
||||
}
|
||||
|
||||
// =====================================================
|
||||
// Misc
|
||||
// =====================================================
|
||||
|
||||
long dsVolume(float floatVolume){
|
||||
float correctedVol= std::log10f(floatVolume*9.f+1.f);
|
||||
long vol= static_cast<long>(DSBVOLUME_MIN+correctedVol*(DSBVOLUME_MAX-DSBVOLUME_MIN));
|
||||
return clamp(vol, DSBVOLUME_MIN, DSBVOLUME_MAX);
|
||||
}
|
||||
|
||||
}}}//end namespace
|
|
@ -217,11 +217,11 @@ string formatNumber(uint64 f) {
|
|||
|
||||
string getTimeDuationString(int frames, int updateFps) {
|
||||
int framesleft = frames;
|
||||
int hours = (int) frames / (float)updateFps / 3600.0;
|
||||
int hours = (int)((int) frames / (float)updateFps / 3600.0f);
|
||||
framesleft = framesleft - hours * 3600 * updateFps;
|
||||
int minutes = (int) framesleft / (float)updateFps / 60.0;
|
||||
int minutes = (int)((int) framesleft / (float)updateFps / 60.0f);
|
||||
framesleft = framesleft - minutes * 60 * updateFps;
|
||||
int seconds = (int) framesleft / (float)updateFps;
|
||||
int seconds = (int)((int) framesleft / (float)updateFps);
|
||||
//framesleft=framesleft-seconds*GameConstants::updateFps;
|
||||
|
||||
string hourstr = intToStr(hours);
|
||||
|
|
|
@ -179,18 +179,20 @@ std::map<string,string> Properties::getTagReplacementValues(std::map<string,stri
|
|||
// First add the standard tags
|
||||
//
|
||||
#ifdef WIN32
|
||||
const char *homeDir = getenv("USERPROFILE");
|
||||
const char *homeDirX = getenv("USERPROFILE");
|
||||
#else
|
||||
string home = getUserHome();
|
||||
const char *homeDir = home.c_str();
|
||||
const char *homeDirX = home.c_str();
|
||||
#endif
|
||||
|
||||
mapTagReplacementValues["~/"] = (homeDir != NULL ? homeDir : "");
|
||||
mapTagReplacementValues["$HOME"] = (homeDir != NULL ? homeDir : "");
|
||||
mapTagReplacementValues["%%HOME%%"] = (homeDir != NULL ? homeDir : "");
|
||||
mapTagReplacementValues["%%USERPROFILE%%"] = (homeDir != NULL ? homeDir : "");
|
||||
mapTagReplacementValues["%%HOMEPATH%%"] = (homeDir != NULL ? homeDir : "");
|
||||
mapTagReplacementValues["{HOMEPATH}"] = (homeDir != NULL ? homeDir : "");
|
||||
string homeDir = safeCharPtrCopy(homeDirX, 8096);
|
||||
|
||||
mapTagReplacementValues["~/"] = homeDir;
|
||||
mapTagReplacementValues["$HOME"] = homeDir;
|
||||
mapTagReplacementValues["%%HOME%%"] = homeDir;
|
||||
mapTagReplacementValues["%%USERPROFILE%%"] = homeDir;
|
||||
mapTagReplacementValues["%%HOMEPATH%%"] = homeDir;
|
||||
mapTagReplacementValues["{HOMEPATH}"] = homeDir;
|
||||
|
||||
// For win32 we allow use of the appdata variable since that is the recommended
|
||||
// place for application data in windows platform
|
||||
|
@ -281,18 +283,20 @@ bool Properties::applyTagsToValue(string &value, const std::map<string,string> *
|
|||
}
|
||||
else {
|
||||
#ifdef WIN32
|
||||
const char *homeDir = getenv("USERPROFILE");
|
||||
const char *homeDirX = getenv("USERPROFILE");
|
||||
#else
|
||||
string home = getUserHome();
|
||||
const char *homeDir = home.c_str();
|
||||
const char *homeDirX = home.c_str();
|
||||
#endif
|
||||
|
||||
replaceAll(value, "~/", (homeDir != NULL ? homeDir : ""));
|
||||
replaceAll(value, "$HOME", (homeDir != NULL ? homeDir : ""));
|
||||
replaceAll(value, "%%HOME%%", (homeDir != NULL ? homeDir : ""));
|
||||
replaceAll(value, "%%USERPROFILE%%",(homeDir != NULL ? homeDir : ""));
|
||||
replaceAll(value, "%%HOMEPATH%%", (homeDir != NULL ? homeDir : ""));
|
||||
replaceAll(value, "{HOMEPATH}", (homeDir != NULL ? homeDir : ""));
|
||||
string homeDir = safeCharPtrCopy(homeDirX, 8096);
|
||||
|
||||
replaceAll(value, "~/", homeDir);
|
||||
replaceAll(value, "$HOME", homeDir);
|
||||
replaceAll(value, "%%HOME%%", homeDir);
|
||||
replaceAll(value, "%%USERPROFILE%%",homeDir);
|
||||
replaceAll(value, "%%HOMEPATH%%", homeDir);
|
||||
replaceAll(value, "{HOMEPATH}", homeDir);
|
||||
|
||||
// For win32 we allow use of the appdata variable since that is the recommended
|
||||
// place for application data in windows platform
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace Shared { namespace Util {
|
|||
|
||||
char* ConvertToUTF8(const char* s) {
|
||||
if (NULL != s && *s != '\0')
|
||||
return ConvertToUTF8(s, strlen(s));
|
||||
return ConvertToUTF8(s, (Shared::Platform::uint32)strlen(s));
|
||||
char* ret = new char[1];
|
||||
//LOG_ASSERT(NULL != ret);
|
||||
assert(NULL != ret);
|
||||
|
|
|
@ -553,7 +553,7 @@ void SystemFlags::logDebugEntry(DebugType type, string debugEntry, time_t debugT
|
|||
currentDebugLog.fileStream->open(debugLog.c_str(), ios_base::out | ios_base::trunc);
|
||||
#endif
|
||||
currentDebugLog.fileStreamOwner = true;
|
||||
currentDebugLog.mutex = new Mutex();
|
||||
currentDebugLog.mutex = new Mutex(CODE_AT_LINE);
|
||||
}
|
||||
|
||||
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
|
||||
|
|
|
@ -75,7 +75,6 @@ IF(BUILD_MEGAGLEST_TESTS)
|
|||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/include)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/platform/posix)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/platform/win32)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/sound/ds8)
|
||||
INCLUDE_DIRECTORIES( ${GLEST_LIB_INCLUDE_ROOT}platform/sdl )
|
||||
ELSE()
|
||||
INCLUDE_DIRECTORIES( ${GLEST_LIB_INCLUDE_ROOT}platform/sdl )
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
XmlNode *rootNode = XmlIo::getInstance().load(test_filename, std::map<string,string>());
|
||||
|
||||
CPPUNIT_ASSERT( rootNode != NULL );
|
||||
CPPUNIT_ASSERT_EQUAL( string("menu"), rootNode->getName() );
|
||||
CPPUNIT_ASSERT_EQUAL( string("menu"), (rootNode != NULL ? rootNode->getName() : string("")) );
|
||||
|
||||
delete rootNode;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ public:
|
|||
XmlNode *rootNode = XmlIoRapid::getInstance().load(test_filename, std::map<string,string>());
|
||||
|
||||
CPPUNIT_ASSERT( rootNode != NULL );
|
||||
CPPUNIT_ASSERT_EQUAL( string("menu"), rootNode->getName() );
|
||||
CPPUNIT_ASSERT_EQUAL( string("menu"), (rootNode != NULL ? rootNode->getName() : string("")) );
|
||||
|
||||
delete rootNode;
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ int processMesh(xmlNode *n, FILE *outfile)
|
|||
|
||||
/* populate the MeshHeader structure appropriately */
|
||||
memset(&mh, 0, sizeof(struct MeshHeader));
|
||||
strncpy((char*)mh.name, (char*)xmlGetProp(n, name), NAMESIZE);
|
||||
strncpy((char*)mh.name, (char*)xmlGetProp(n, name), NAMESIZE-1);
|
||||
mh.frameCount = (uint32)atoi((char*)xmlGetProp(n, frameCount));
|
||||
mh.vertexCount = (uint32)atoi((char*)xmlGetProp(n, vertexCount));
|
||||
mh.indexCount = (uint32)atoi((char*)xmlGetProp(n, indexCount));
|
||||
|
|
Loading…
Reference in New Issue