From a59824cd8897dea5dd452c31be1328415478f990 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 7 May 2015 11:36:31 +0200 Subject: [PATCH] - fixed: MD2 vertex indices were signed shorts but should be unsigned. - fixed a few warnings from Visual C++ 2015. --- CMakeLists.txt | 2 +- src/gl/models/gl_models.h | 4 ++-- src/win32/fb_d3d9.cpp | 4 ++-- src/win32/hardware.cpp | 2 +- src/win32/win32gliface.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db58ccf2f0..1975936463 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS( GME if( MSVC ) # Eliminate unreferenced functions and data # Perform identical COMDAT folding - set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE" ) + set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE /LARGEADDRESSAWARE" ) # String pooling # Function-level linking diff --git a/src/gl/models/gl_models.h b/src/gl/models/gl_models.h index 89834df8c2..af7af7c0f6 100644 --- a/src/gl/models/gl_models.h +++ b/src/gl/models/gl_models.h @@ -50,8 +50,8 @@ protected: struct FTriangle { - short vertexIndices[3]; - short textureIndices[3]; + unsigned short vertexIndices[3]; + unsigned short textureIndices[3]; }; diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index e232757344..30846fedc1 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -3277,8 +3277,8 @@ void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints, return; } - cosrot = cos(rot); - sinrot = sin(rot); + cosrot = (float)cos(rot); + sinrot = (float)sin(rot); CheckQuadBatch(npoints - 2, npoints); quad = &QuadExtra[QuadBatchPos]; diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp index e9d1bc5e6a..2c3fbdea48 100644 --- a/src/win32/hardware.cpp +++ b/src/win32/hardware.cpp @@ -92,7 +92,7 @@ CUSTOM_CVAR (Int, vid_renderer, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINI break; } //changerenderer = true; - Printf("You must restart "GAMENAME" to switch the renderer\n"); + Printf("You must restart " GAMENAME " to switch the renderer\n"); } } diff --git a/src/win32/win32gliface.cpp b/src/win32/win32gliface.cpp index c6715b0a73..fbb2765685 100644 --- a/src/win32/win32gliface.cpp +++ b/src/win32/win32gliface.cpp @@ -37,7 +37,7 @@ PFNWGLSWAPINTERVALEXTPROC vsyncfunc; CUSTOM_CVAR(Int, gl_vid_multisample, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL ) { - Printf("This won't take effect until "GAMENAME" is restarted.\n"); + Printf("This won't take effect until " GAMENAME " is restarted.\n"); } CVAR(Bool, gl_debug, false, 0)