mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Updates SDL to version 2.0.4, which makes it compatible with VS2015.
This commit is contained in:
parent
7b52fed504
commit
b63ef177f4
924 changed files with 79241 additions and 39934 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -18,6 +18,11 @@
|
|||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
|
||||
#define SDL_DISABLE_ANALYZE_MACROS 1
|
||||
#endif
|
||||
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* This file contains portable stdlib functions for SDL */
|
||||
|
|
@ -211,6 +216,36 @@ SDL_sqrt(double x)
|
|||
#endif
|
||||
}
|
||||
|
||||
float
|
||||
SDL_sqrtf(float x)
|
||||
{
|
||||
#if defined(HAVE_SQRTF)
|
||||
return sqrtf(x);
|
||||
#else
|
||||
return (float)SDL_sqrt((double)x);
|
||||
#endif
|
||||
}
|
||||
|
||||
double
|
||||
SDL_tan(double x)
|
||||
{
|
||||
#if defined(HAVE_TAN)
|
||||
return tan(x);
|
||||
#else
|
||||
return SDL_uclibc_tan(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
float
|
||||
SDL_tanf(float x)
|
||||
{
|
||||
#if defined(HAVE_TANF)
|
||||
return tanf(x);
|
||||
#else
|
||||
return (float)SDL_tan((double)x);
|
||||
#endif
|
||||
}
|
||||
|
||||
int SDL_abs(int x)
|
||||
{
|
||||
#ifdef HAVE_ABS
|
||||
|
|
@ -243,8 +278,8 @@ int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) :
|
|||
__declspec(selectany) int _fltused = 1;
|
||||
#endif
|
||||
|
||||
/* The optimizer on Visual Studio 2010/2012 generates memcpy() calls */
|
||||
#if _MSC_VER >= 1600 && defined(_WIN64) && !defined(_DEBUG)
|
||||
/* The optimizer on Visual Studio 2005 and later generates memcpy() calls */
|
||||
#if (_MSC_VER >= 1400) && defined(_WIN64) && !defined(_DEBUG)
|
||||
#include <intrin.h>
|
||||
|
||||
#pragma function(memcpy)
|
||||
|
|
@ -347,34 +382,25 @@ _allmul()
|
|||
{
|
||||
/* *INDENT-OFF* */
|
||||
__asm {
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push edi
|
||||
push esi
|
||||
mov eax, dword ptr[esp+8]
|
||||
mov ecx, dword ptr[esp+10h]
|
||||
or ecx, eax
|
||||
mov ecx, dword ptr[esp+0Ch]
|
||||
jne hard
|
||||
mov eax, dword ptr[esp+4]
|
||||
mul ecx
|
||||
ret 10h
|
||||
hard:
|
||||
push ebx
|
||||
sub esp,0Ch
|
||||
mov eax,dword ptr [ebp+10h]
|
||||
mov edi,dword ptr [ebp+8]
|
||||
mov ebx,eax
|
||||
mov esi,eax
|
||||
sar esi,1Fh
|
||||
mov eax,dword ptr [ebp+8]
|
||||
mul ebx
|
||||
imul edi,esi
|
||||
mov ecx,edx
|
||||
mov dword ptr [ebp-18h],eax
|
||||
mov edx,dword ptr [ebp+0Ch]
|
||||
add ecx,edi
|
||||
imul ebx,edx
|
||||
mov eax,dword ptr [ebp-18h]
|
||||
lea ebx,[ebx+ecx]
|
||||
mov dword ptr [ebp-14h],ebx
|
||||
mov edx,dword ptr [ebp-14h]
|
||||
add esp,0Ch
|
||||
mul ecx
|
||||
mov ebx, eax
|
||||
mov eax, dword ptr[esp+8]
|
||||
mul dword ptr[esp+14h]
|
||||
add ebx, eax
|
||||
mov eax, dword ptr[esp+8]
|
||||
mul ecx
|
||||
add edx, ebx
|
||||
pop ebx
|
||||
pop esi
|
||||
pop edi
|
||||
pop ebp
|
||||
ret 10h
|
||||
}
|
||||
/* *INDENT-ON* */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue