mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
Fix compilation on Windows x64
Add precompiled libraries needed to build MetaMod and SourceMod.
This commit is contained in:
parent
77caffb19a
commit
b1d3d5b58f
@ -329,7 +329,7 @@ enum XUSER_SIGNIN_STATE
|
||||
|
||||
#if (defined(POSIX))
|
||||
typedef size_t ULONG_PTR;
|
||||
#else
|
||||
#elif !(defined(WIN64))
|
||||
typedef _W64 unsigned long ULONG_PTR;
|
||||
#endif
|
||||
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
||||
|
BIN
lib/public/win64/interfaces.lib
Normal file
BIN
lib/public/win64/interfaces.lib
Normal file
Binary file not shown.
BIN
lib/public/win64/mathlib.lib
Normal file
BIN
lib/public/win64/mathlib.lib
Normal file
Binary file not shown.
BIN
lib/public/win64/tier0.lib
Normal file
BIN
lib/public/win64/tier0.lib
Normal file
Binary file not shown.
BIN
lib/public/win64/tier1.lib
Normal file
BIN
lib/public/win64/tier1.lib
Normal file
Binary file not shown.
BIN
lib/public/win64/vstdlib.lib
Normal file
BIN
lib/public/win64/vstdlib.lib
Normal file
Binary file not shown.
BIN
lib/win64/debug/vs2015/libprotobuf.lib
Normal file
BIN
lib/win64/debug/vs2015/libprotobuf.lib
Normal file
Binary file not shown.
BIN
lib/win64/release/vs2015/libprotobuf.lib
Normal file
BIN
lib/win64/release/vs2015/libprotobuf.lib
Normal file
Binary file not shown.
@ -57,7 +57,7 @@ void ColorQuantize(uint8 const *Image,
|
||||
{
|
||||
struct QuantizedValue *v=FindQNode(q,p);
|
||||
if (v)
|
||||
for(int c=0;c<3;c++)
|
||||
for(c=0;c<3;c++)
|
||||
out_palette[p*3+c]=v->Mean[c];
|
||||
}
|
||||
memset(Error,0,sizeof(Error));
|
||||
|
@ -3236,6 +3236,7 @@ void MathLib_Init( float gamma, float texGamma, float brightness, int overbright
|
||||
{
|
||||
s_bSSEEnabled = true;
|
||||
|
||||
#ifndef _WIN64
|
||||
// Select the SSE specific routines if available
|
||||
pfVectorNormalizeFast = _SSE_VectorNormalizeFast;
|
||||
pfInvRSquared = _SSE_InvRSquared;
|
||||
@ -3245,6 +3246,7 @@ void MathLib_Init( float gamma, float texGamma, float brightness, int overbright
|
||||
#ifdef _WIN32
|
||||
pfFastSinCos = _SSE_SinCos;
|
||||
pfFastCos = _SSE_cos;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -3255,7 +3257,7 @@ void MathLib_Init( float gamma, float texGamma, float brightness, int overbright
|
||||
if ( bAllowSSE2 && pi.m_bSSE2 )
|
||||
{
|
||||
s_bSSE2Enabled = true;
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
pfFastSinCos = _SSE2_SinCos;
|
||||
pfFastCos = _SSE2_cos;
|
||||
#endif
|
||||
|
@ -198,8 +198,8 @@ static void UpdateStats(struct QuantizedValue *v)
|
||||
N+=s->Count;
|
||||
for(j=0;j<current_ndims;j++)
|
||||
{
|
||||
uint8 v=s->Value[j];
|
||||
Means[j]+=v*s->Count;
|
||||
uint8 v2=s->Value[j];
|
||||
Means[j]+=v2*s->Count;
|
||||
}
|
||||
}
|
||||
for(j=0;j<current_ndims;j++)
|
||||
@ -316,7 +316,7 @@ static void SubdivideNode(struct QuantizedValue *n, int whichdim)
|
||||
// extrema instead. LocalMean[i][0] will be the point with the lowest
|
||||
// value on the dimension and LocalMean[i][1] the one with the lowest
|
||||
// value.
|
||||
for(int i=0;i<current_ndims;i++)
|
||||
for(i=0;i<current_ndims;i++)
|
||||
{
|
||||
LocalMean[i][0]=minS->Value[i];
|
||||
LocalMean[i][1]=maxS->Value[i];
|
||||
|
@ -16,6 +16,9 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifndef COMPILER_MSVC64
|
||||
// Implement for 64-bit Windows if needed.
|
||||
|
||||
static const uint32 _sincos_masks[] = { (uint32)0x0, (uint32)~0x0 };
|
||||
static const uint32 _sincos_inv_masks[] = { (uint32)~0x0, (uint32)0x0 };
|
||||
|
||||
@ -843,3 +846,4 @@ vec_t DotProduct (const vec_t *a, const vec_t *c)
|
||||
}
|
||||
*/
|
||||
|
||||
#endif // COMPILER_MSVC64
|
||||
|
@ -25,7 +25,6 @@ enum NormalDecodeMode_t
|
||||
// Forward declaration
|
||||
#ifdef _WIN32
|
||||
typedef enum _D3DFORMAT D3DFORMAT;
|
||||
typedef enum DXGI_FORMAT;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -2931,6 +2931,12 @@ FORCEINLINE i32x4 IntShiftLeftWordSIMD(const i32x4 &vSrcA, const i32x4 &vSrcB)
|
||||
// like this.
|
||||
FORCEINLINE void ConvertStoreAsIntsSIMD(intx4 * RESTRICT pDest, const fltx4 &vSrc)
|
||||
{
|
||||
#ifdef COMPILER_MSVC64
|
||||
(*pDest)[0] = SubFloat(vSrc, 0);
|
||||
(*pDest)[1] = SubFloat(vSrc, 1);
|
||||
(*pDest)[2] = SubFloat(vSrc, 2);
|
||||
(*pDest)[3] = SubFloat(vSrc, 3);
|
||||
#else
|
||||
__m64 bottom = _mm_cvttps_pi32( vSrc );
|
||||
__m64 top = _mm_cvttps_pi32( _mm_movehl_ps(vSrc,vSrc) );
|
||||
|
||||
@ -2938,6 +2944,7 @@ FORCEINLINE void ConvertStoreAsIntsSIMD(intx4 * RESTRICT pDest, const fltx4 &vSr
|
||||
*reinterpret_cast<__m64 *>(&(*pDest)[2]) = top;
|
||||
|
||||
_mm_empty();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1126,7 +1126,7 @@ FORCEINLINE void CBitRead::GrabNextDWord( bool bOverFlowImmediately )
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert( reinterpret_cast<int>(m_pDataIn) + 3 < reinterpret_cast<int>(m_pBufferEnd));
|
||||
Assert( reinterpret_cast<uintp>(m_pDataIn) + 3 < reinterpret_cast<uintp>(m_pBufferEnd));
|
||||
m_nInBufWord = LittleDWord( *( m_pDataIn++ ) );
|
||||
}
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ bool bf_write::WriteBits(const void *pInData, int nBits)
|
||||
}
|
||||
|
||||
// Align output to dword boundary
|
||||
while (((unsigned long)pOut & 3) != 0 && nBitsLeft >= 8)
|
||||
while (((uintp)pOut & 3) != 0 && nBitsLeft >= 8)
|
||||
{
|
||||
|
||||
WriteUBitLong( *pOut, 8, false );
|
||||
@ -829,7 +829,7 @@ void old_bf_read::ReadBits(void *pOutData, int nBits)
|
||||
|
||||
|
||||
// align output to dword boundary
|
||||
while( ((unsigned long)pOut & 3) != 0 && nBitsLeft >= 8 )
|
||||
while( ((uintp)pOut & 3) != 0 && nBitsLeft >= 8 )
|
||||
{
|
||||
*pOut = (unsigned char)ReadUBitLong(8);
|
||||
++pOut;
|
||||
|
@ -961,7 +961,7 @@ void ConVar::Create( const char *pName, const char *pDefaultValue, int flags /*=
|
||||
m_pszDefaultValue = pDefaultValue ? pDefaultValue : empty_string;
|
||||
Assert( m_pszDefaultValue );
|
||||
|
||||
m_Value.m_StringLength = strlen( m_pszDefaultValue ) + 1;
|
||||
m_Value.m_StringLength = static_cast<int>(strlen( m_pszDefaultValue ) + 1);
|
||||
m_Value.m_pszString = new char[m_Value.m_StringLength];
|
||||
memcpy( m_Value.m_pszString, m_pszDefaultValue, m_Value.m_StringLength );
|
||||
|
||||
|
@ -154,7 +154,7 @@ static HMODULE InternalLoadLibrary( const char *pName )
|
||||
return LoadLibraryEx( pName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH );
|
||||
#endif
|
||||
}
|
||||
unsigned ThreadedLoadLibraryFunc( void *pParam )
|
||||
uintp ThreadedLoadLibraryFunc( void *pParam )
|
||||
{
|
||||
ThreadedLoadLibaryContext_t *pContext = (ThreadedLoadLibaryContext_t*)pParam;
|
||||
pContext->m_hLibrary = InternalLoadLibrary(pContext->m_pLibraryName);
|
||||
|
@ -483,7 +483,7 @@ void CBitRead::ReadBits(void *pOutData, int nBits)
|
||||
|
||||
|
||||
// align output to dword boundary
|
||||
while( ((unsigned long)pOut & 3) != 0 && nBitsLeft >= 8 )
|
||||
while( ((uintp)pOut & 3) != 0 && nBitsLeft >= 8 )
|
||||
{
|
||||
*pOut = (unsigned char)ReadUBitLong(8);
|
||||
++pOut;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "processor_detect_linux.cpp"
|
||||
|
||||
#elif defined( _X360 )
|
||||
#elif defined( _X360 ) || defined( WIN64 )
|
||||
|
||||
bool CheckMMXTechnology(void) { return false; }
|
||||
bool CheckSSETechnology(void) { return false; }
|
||||
|
Loading…
Reference in New Issue
Block a user