diff --git a/mk/windoze/glest_game.vcxproj b/mk/windoze/glest_game.vcxproj
index 5d21850ac..b14bc5bd7 100644
--- a/mk/windoze/glest_game.vcxproj
+++ b/mk/windoze/glest_game.vcxproj
@@ -117,7 +117,7 @@
false
../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/xml/rapidxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/windows_deps/include;../../source/windows_deps/xerces-c-3.1.1/src;../../source/windows_deps/SDL-1.2.15/include;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;../../source/windows_deps/openal-soft-1.14/include;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;../../source/windows_deps/curl-7.21.3/include;../../source/shared_lib/include/map;../../source/windows_deps/libircclient/include;../../source/windows_deps/glew-1.7.0/include;../../source/windows_deps/google-breakpad\trunk\src\client\windows\;../../source/windows_deps/google-breakpad\trunk\src\;../../source/shared_lib/include/compression
%(AdditionalUsingDirectories)
- 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)
+ 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)
true
Async
MultiThreaded
diff --git a/mk/windoze/shared_lib.vcxproj b/mk/windoze/shared_lib.vcxproj
index 69ea7143b..3b53aee49 100644
--- a/mk/windoze/shared_lib.vcxproj
+++ b/mk/windoze/shared_lib.vcxproj
@@ -96,7 +96,7 @@
Speed
false
../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/windows_deps/include;../../source/windows_deps/xerces-c-3.1.1/src;../../source/windows_deps/xerces-c-3.1.1/src/xercesc/xinclude;../../source/windows_deps/lpng1510;../../source/windows_deps/jpeg-8a;../../source/windows_deps/SDL-1.2.15/include;../../source/windows_deps/openal-soft-1.14/include;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;../../source/windows_deps/curl-7.21.3/include;../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/shared_lib/include/libircclient/include;../../source/shared_lib/include/feathery_ftp;../../source/windows_deps/ftgl-2.1.3-rc5/src;../../source/windows_deps/freetype-2.4.4/include;../../source/windows_deps/glew-1.7.0/include;../../source/shared_lib/include/graphics/md5;../../source/shared_lib/include/graphics/freetype-gl;../../source/shared_lib/include/streflop/softfloat;../../source/shared_lib/include/xml/rapidxml;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/platform/win32;../../source/windows_deps/vlc-2.0.1/include;../../source/windows_deps/fribidi-0.19.5/lib;../../source/windows_deps/fribidi-0.19.5/charset;../../source/shared_lib/include/compression;../../source/shared_lib/sources/
- 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)
+ 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)
true
Async
MultiThreaded
diff --git a/source/shared_lib/include/graphics/vec.h b/source/shared_lib/include/graphics/vec.h
index a46454d77..1a02f7d62 100644
--- a/source/shared_lib/include/graphics/vec.h
+++ b/source/shared_lib/include/graphics/vec.h
@@ -68,15 +68,15 @@ inline T truncateDecimal(const T &value, int precision=6) {
#endif
static int MAX_INT_VALUE = numeric_limits::max();
if((T)value * (T)precNum <= MAX_INT_VALUE) {
- int resultInt = (T)value * (T)precNum;
+ int resultInt = (int)((T)value * (T)precNum);
T result = (T)resultInt / precNum;
//printf("=======================\nvalue = %.10f\nresultInt: %d\nprecision: %d\nbecame: %.10f\n----------\n",value,resultInt,precision,result);
return result;
}
// Must use an int64 since the result is large
- int64 resultInt = (T)value * (T)precNum;
- T result = (long double)resultInt / precNum;
+ int64 resultInt = (int64)((T)value * (T)precNum);
+ T result = (T)((long double)resultInt / precNum);
return result;
}
diff --git a/source/shared_lib/sources/graphics/freetype-gl/texture-atlas.c b/source/shared_lib/sources/graphics/freetype-gl/texture-atlas.c
index b91e331ec..7f8ce7eac 100644
--- a/source/shared_lib/sources/graphics/freetype-gl/texture-atlas.c
+++ b/source/shared_lib/sources/graphics/freetype-gl/texture-atlas.c
@@ -45,8 +45,8 @@
#include
#include "texture-atlas.h"
-#define max(a,b) (a)>(b)?(a):(b)
-#define min(a,b) (a)<(b)?(a):(b)
+//#define max(a,b) (a)>(b)?(a):(b)
+//#define min(a,b) (a)<(b)?(a):(b)
typedef struct { int x, y, width; } Node;
@@ -254,7 +254,7 @@ texture_atlas_get_region( TextureAtlas *self,
if( y >= 0 )
{
node = (Node *) vector_get( self->nodes, i );
- if( ( y + height < best_height ) ||
+ if( ( y + (int)height < best_height ) ||
( y + height == best_height && node->width < best_width) )
{
best_height = y + height;
diff --git a/source/shared_lib/sources/graphics/freetype-gl/texture-font.c b/source/shared_lib/sources/graphics/freetype-gl/texture-font.c
index 2079488a7..043e35634 100644
--- a/source/shared_lib/sources/graphics/freetype-gl/texture-font.c
+++ b/source/shared_lib/sources/graphics/freetype-gl/texture-font.c
@@ -54,8 +54,8 @@ const struct {
} FT_Errors[] =
#include FT_ERRORS_H
-#define max(a,b) (a)>(b)?(a):(b)
-#define min(a,b) (a)<(b)?(a):(b)
+//#define max(a,b) (a)>(b)?(a):(b)
+//#define min(a,b) (a)<(b)?(a):(b)
/* ------------------------------------------------------------------------- */
@@ -272,9 +272,9 @@ texture_font_cache_glyphs( TextureFont *self,
slot = face->glyph;
/* Gamma correction (sort of) */
- for( x=0; xbitmap.width; ++x )
+ for( x=0; (int)x < slot->bitmap.width; ++x )
{
- for( y=0; ybitmap.rows; ++y )
+ for( y=0; (int)y < slot->bitmap.rows; ++y )
{
c = *(unsigned char *)(slot->bitmap.buffer
+ y*slot->bitmap.pitch + x );