author  Sam Lantinga <slouken@libsdl.org> 
Sat, 02 Jan 2016 11:17:06 0800  
changeset 10001  e12c38730512 
parent 9999  4de94185790e 
permissions  rwrr 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

1 
/* 
5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

2 
Simple DirectMedia Layer 
9998
f67cf37e9cd4
Updated copyright to 2016
Sam Lantinga <slouken@libsdl.org>
parents:
9716
diff
changeset

3 
Copyright (C) 19972016 Sam Lantinga <slouken@libsdl.org> 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

4 

5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

5 
This software is provided 'asis', without any express or implied 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

6 
warranty. In no event will the authors be held liable for any damages 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

7 
arising from the use of this software. 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

8 

5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

9 
Permission is granted to anyone to use this software for any purpose, 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

10 
including commercial applications, and to alter it and redistribute it 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

11 
freely, subject to the following restrictions: 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

12 

5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

13 
1. The origin of this software must not be misrepresented; you must not 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

14 
claim that you wrote the original software. If you use this software 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

15 
in a product, an acknowledgment in the product documentation would be 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

16 
appreciated but is not required. 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

17 
2. Altered source versions must be plainly marked as such, and must not be 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

18 
misrepresented as being the original software. 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5455
diff
changeset

19 
3. This notice may not be removed or altered from any source distribution. 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

20 
*/ 
9306
817656bd36ec
Clang static analysis builds should use C runtime directly.
Ryan C. Gordon <icculus@icculus.org>
parents:
9080
diff
changeset

21 

817656bd36ec
Clang static analysis builds should use C runtime directly.
Ryan C. Gordon <icculus@icculus.org>
parents:
9080
diff
changeset

22 
#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS) 
817656bd36ec
Clang static analysis builds should use C runtime directly.
Ryan C. Gordon <icculus@icculus.org>
parents:
9080
diff
changeset

23 
#define SDL_DISABLE_ANALYZE_MACROS 1 
817656bd36ec
Clang static analysis builds should use C runtime directly.
Ryan C. Gordon <icculus@icculus.org>
parents:
9080
diff
changeset

24 
#endif 
817656bd36ec
Clang static analysis builds should use C runtime directly.
Ryan C. Gordon <icculus@icculus.org>
parents:
9080
diff
changeset

25 

8093
b43765095a6f
Make internal SDL sources include SDL_internal.h instead of SDL_config.h
Ryan C. Gordon <icculus@icculus.org>
parents:
8056
diff
changeset

26 
#include "../SDL_internal.h" 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

27 

450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

28 
/* This file contains portable stdlib functions for SDL */ 
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

29 

1354
22f39393668a
Fixed build problem with SDL_string.c
Sam Lantinga <slouken@libsdl.org>
parents:
1346
diff
changeset

30 
#include "SDL_stdinc.h" 
7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

31 
#include "../libm/math_libm.h" 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

32 

7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

33 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

34 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

35 
SDL_atan(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

36 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

37 
#ifdef HAVE_ATAN 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

38 
return atan(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

39 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

40 
return SDL_uclibc_atan(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

41 
#endif /* HAVE_ATAN */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

42 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

43 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

44 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

45 
SDL_atan2(double x, double y) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

46 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

47 
#if defined(HAVE_ATAN2) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

48 
return atan2(x, y); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

49 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

50 
return SDL_uclibc_atan2(x, y); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

51 
#endif /* HAVE_ATAN2 */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

52 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

53 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

54 
double 
8056
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

55 
SDL_acos(double val) 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

56 
{ 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

57 
#if defined(HAVE_ACOS) 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

58 
return acos(val); 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

59 
#else 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

60 
double result; 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

61 
if (val == 1.0) { 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

62 
result = M_PI; 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

63 
} else { 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

64 
result = SDL_atan(SDL_sqrt(1.0  val * val) / val); 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

65 
if (result < 0.0) 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

66 
{ 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

67 
result += M_PI; 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

68 
} 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

69 
} 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

70 
return result; 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

71 
#endif 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

72 
} 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

73 

abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

74 
double 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

75 
SDL_asin(double val) 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

76 
{ 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

77 
#if defined(HAVE_ASIN) 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

78 
return asin(val); 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

79 
#else 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

80 
double result; 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

81 
if (val == 1.0) { 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

82 
result = (M_PI / 2.0); 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

83 
} else { 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

84 
result = (M_PI / 2.0)  SDL_acos(val); 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

85 
} 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

86 
return result; 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

87 
#endif 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

88 
} 
abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

89 

abd9434c5d3e
Hook up SDL_acos and SDL_asin properly.
Ryan C. Gordon <icculus@icculus.org>
parents:
8033
diff
changeset

90 
double 
7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

91 
SDL_ceil(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

92 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

93 
#ifdef HAVE_CEIL 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

94 
return ceil(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

95 
#else 
8033
8181c3a4a055
Fixed bug 2274  SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Sam Lantinga <slouken@libsdl.org>
parents:
7357
diff
changeset

96 
double integer = SDL_floor(x); 
8181c3a4a055
Fixed bug 2274  SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Sam Lantinga <slouken@libsdl.org>
parents:
7357
diff
changeset

97 
double fraction = x  integer; 
8181c3a4a055
Fixed bug 2274  SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Sam Lantinga <slouken@libsdl.org>
parents:
7357
diff
changeset

98 
if (fraction > 0.0) { 
8181c3a4a055
Fixed bug 2274  SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Sam Lantinga <slouken@libsdl.org>
parents:
7357
diff
changeset

99 
integer += 1.0; 
8181c3a4a055
Fixed bug 2274  SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Sam Lantinga <slouken@libsdl.org>
parents:
7357
diff
changeset

100 
} 
8181c3a4a055
Fixed bug 2274  SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Sam Lantinga <slouken@libsdl.org>
parents:
7357
diff
changeset

101 
return integer; 
7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

102 
#endif /* HAVE_CEIL */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

103 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

104 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

105 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

106 
SDL_copysign(double x, double y) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

107 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

108 
#if defined(HAVE_COPYSIGN) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

109 
return copysign(x, y); 
8478
337b5dc0797b
WinRT: build fixes and additional WinRTrelated integrations with SDL 2.0.0
David Ludwig <dludwig@pobox.com>
parents:
7357
diff
changeset

110 
#elif defined(HAVE__COPYSIGN) 
337b5dc0797b
WinRT: build fixes and additional WinRTrelated integrations with SDL 2.0.0
David Ludwig <dludwig@pobox.com>
parents:
7357
diff
changeset

111 
return _copysign(x, y); 
7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

112 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

113 
return SDL_uclibc_copysign(x, y); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

114 
#endif /* HAVE_COPYSIGN */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

115 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

116 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

117 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

118 
SDL_cos(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

119 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

120 
#if defined(HAVE_COS) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

121 
return cos(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

122 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

123 
return SDL_uclibc_cos(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

124 
#endif /* HAVE_COS */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

125 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

126 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

127 
float 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

128 
SDL_cosf(float x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

129 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

130 
#ifdef HAVE_COSF 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

131 
return cosf(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

132 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

133 
return (float)SDL_cos((double)x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

134 
#endif 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

135 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

136 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

137 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

138 
SDL_fabs(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

139 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

140 
#if defined(HAVE_FABS) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

141 
return fabs(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

142 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

143 
return SDL_uclibc_fabs(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

144 
#endif /* HAVE_FABS */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

145 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

146 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

147 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

148 
SDL_floor(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

149 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

150 
#if defined(HAVE_FLOOR) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

151 
return floor(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

152 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

153 
return SDL_uclibc_floor(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

154 
#endif /* HAVE_FLOOR */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

155 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

156 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

157 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

158 
SDL_log(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

159 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

160 
#if defined(HAVE_LOG) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

161 
return log(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

162 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

163 
return SDL_uclibc_log(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

164 
#endif /* HAVE_LOG */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

165 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

166 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

167 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

168 
SDL_pow(double x, double y) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

169 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

170 
#if defined(HAVE_POW) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

171 
return pow(x, y); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

172 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

173 
return SDL_uclibc_pow(x, y); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

174 
#endif /* HAVE_POW */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

175 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

176 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

177 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

178 
SDL_scalbn(double x, int n) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

179 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

180 
#if defined(HAVE_SCALBN) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

181 
return scalbn(x, n); 
8478
337b5dc0797b
WinRT: build fixes and additional WinRTrelated integrations with SDL 2.0.0
David Ludwig <dludwig@pobox.com>
parents:
7357
diff
changeset

182 
#elif defined(HAVE__SCALB) 
337b5dc0797b
WinRT: build fixes and additional WinRTrelated integrations with SDL 2.0.0
David Ludwig <dludwig@pobox.com>
parents:
7357
diff
changeset

183 
return _scalb(x, n); 
7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

184 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

185 
return SDL_uclibc_scalbn(x, n); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

186 
#endif /* HAVE_SCALBN */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

187 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

188 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

189 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

190 
SDL_sin(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

191 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

192 
#if defined(HAVE_SIN) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

193 
return sin(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

194 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

195 
return SDL_uclibc_sin(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

196 
#endif /* HAVE_SIN */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

197 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

198 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

199 
float 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

200 
SDL_sinf(float x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

201 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

202 
#ifdef HAVE_SINF 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

203 
return sinf(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

204 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

205 
return (float)SDL_sin((double)x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

206 
#endif /* HAVE_SINF */ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

207 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

208 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

209 
double 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

210 
SDL_sqrt(double x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

211 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

212 
#if defined(HAVE_SQRT) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

213 
return sqrt(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

214 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

215 
return SDL_uclibc_sqrt(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

216 
#endif 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

217 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

218 

8840
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

219 
float 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

220 
SDL_sqrtf(float x) 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

221 
{ 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

222 
#if defined(HAVE_SQRTF) 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

223 
return sqrtf(x); 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

224 
#else 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

225 
return (float)SDL_sqrt((double)x); 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

226 
#endif 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

227 
} 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

228 

9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

229 
double 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

230 
SDL_tan(double x) 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

231 
{ 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

232 
#if defined(HAVE_TAN) 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

233 
return tan(x); 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

234 
#else 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

235 
return SDL_uclibc_tan(x); 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

236 
#endif 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

237 
} 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

238 

9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

239 
float 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

240 
SDL_tanf(float x) 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

241 
{ 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

242 
#if defined(HAVE_TANF) 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

243 
return tanf(x); 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

244 
#else 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

245 
return (float)SDL_tan((double)x); 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

246 
#endif 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

247 
} 
9b6ddcbdea65
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
Sam Lantinga <slouken@libsdl.org>
parents:
8583
diff
changeset

248 

7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

249 
int SDL_abs(int x) 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

250 
{ 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

251 
#ifdef HAVE_ABS 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

252 
return abs(x); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

253 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

254 
return ((x) < 0 ? (x) : (x)); 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

255 
#endif 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

256 
} 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

257 

668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

258 
#ifdef HAVE_CTYPE_H 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

259 
int SDL_isdigit(int x) { return isdigit(x); } 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

260 
int SDL_isspace(int x) { return isspace(x); } 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

261 
int SDL_toupper(int x) { return toupper(x); } 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

262 
int SDL_tolower(int x) { return tolower(x); } 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

263 
#else 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

264 
int SDL_isdigit(int x) { return ((x) >= '0') && ((x) <= '9'); } 
7357
9bd0b241c941
Fixed SDL's implementation of isspace() to check form feed and vertical tab.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7351
diff
changeset

265 
int SDL_isspace(int x) { return ((x) == ' ')  ((x) == '\t')  ((x) == '\r')  ((x) == '\n')  ((x) == '\f')  ((x) == '\v'); } 
7351
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

266 
int SDL_toupper(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A'+((x)'a')) : (x); } 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

267 
int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)'A')) : (x); } 
668a3dc28361
Removed the inline functions from SDL_stdinc.h
Sam Lantinga <slouken@libsdl.org>
parents:
7180
diff
changeset

268 
#endif 
7003
eeaf77005c30
Improvements to stdlib.
Ryan C. Gordon <icculus@icculus.org>
parents:
6885
diff
changeset

269 

eeaf77005c30
Improvements to stdlib.
Ryan C. Gordon <icculus@icculus.org>
parents:
6885
diff
changeset

270 

1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

271 
#ifndef HAVE_LIBC 
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

272 
/* These are some C runtime intrinsics that need to be defined */ 
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

273 

3255
f8a4214ce90a
Fixed compiling on 64bit Windows
Sam Lantinga <slouken@libsdl.org>
parents:
3253
diff
changeset

274 
#if defined(_MSC_VER) 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

275 

1433
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset

276 
#ifndef __FLTUSED__ 
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset

277 
#define __FLTUSED__ 
3255
f8a4214ce90a
Fixed compiling on 64bit Windows
Sam Lantinga <slouken@libsdl.org>
parents:
3253
diff
changeset

278 
__declspec(selectany) int _fltused = 1; 
1433
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset

279 
#endif 
3255
f8a4214ce90a
Fixed compiling on 64bit Windows
Sam Lantinga <slouken@libsdl.org>
parents:
3253
diff
changeset

280 

9716
f2804ed2a5a3
Let's assume that if VS2005 and VS2010 do it, VS2008 probably does, too.
Ryan C. Gordon <icculus@icculus.org>
parents:
9715
diff
changeset

281 
/* The optimizer on Visual Studio 2005 and later generates memcpy() calls */ 
f2804ed2a5a3
Let's assume that if VS2005 and VS2010 do it, VS2008 probably does, too.
Ryan C. Gordon <icculus@icculus.org>
parents:
9715
diff
changeset

282 
#if (_MSC_VER >= 1400) && defined(_WIN64) && !defined(_DEBUG) 
5455
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

283 
#include <intrin.h> 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

284 

5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

285 
#pragma function(memcpy) 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

286 
void * memcpy ( void * destination, const void * source, size_t num ) 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

287 
{ 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

288 
const Uint8 *src = (const Uint8 *)source; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

289 
Uint8 *dst = (Uint8 *)destination; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

290 
size_t i; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

291 

5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

292 
/* All WIN64 architectures have SSE, right? */ 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

293 
if (!((uintptr_t) src & 15) && !((uintptr_t) dst & 15)) { 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

294 
__m128 values[4]; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

295 
for (i = num / 64; i;) { 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

296 
_mm_prefetch(src, _MM_HINT_NTA); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

297 
values[0] = *(__m128 *) (src + 0); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

298 
values[1] = *(__m128 *) (src + 16); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

299 
values[2] = *(__m128 *) (src + 32); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

300 
values[3] = *(__m128 *) (src + 48); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

301 
_mm_stream_ps((float *) (dst + 0), values[0]); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

302 
_mm_stream_ps((float *) (dst + 16), values[1]); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

303 
_mm_stream_ps((float *) (dst + 32), values[2]); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

304 
_mm_stream_ps((float *) (dst + 48), values[3]); 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

305 
src += 64; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

306 
dst += 64; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

307 
} 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

308 
num &= 63; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

309 
} 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

310 

5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

311 
while (num) { 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

312 
*dst++ = *src++; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

313 
} 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

314 
return destination; 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

315 
} 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

316 
#endif /* _MSC_VER == 1600 && defined(_WIN64) && !defined(_DEBUG) */ 
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

317 

5086
c2539ff054c8
Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008
Sam Lantinga <slouken@libsdl.org>
parents:
4868
diff
changeset

318 
#ifdef _M_IX86 
1433
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset

319 

1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

320 
/* Float to long */ 
3253
5d7ef5970073
Fixed issues building 64bit Windows binary
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset

321 
void 
5d7ef5970073
Fixed issues building 64bit Windows binary
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset

322 
__declspec(naked) 
5d7ef5970073
Fixed issues building 64bit Windows binary
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset

323 
_ftol() 
1345
7f32b9bede06
Fixes for Visual C++ 6.0
Sam Lantinga <slouken@libsdl.org>
parents:
1331
diff
changeset

324 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

325 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

326 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

327 
push ebp 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

328 
mov ebp,esp 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

329 
sub esp,20h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

330 
and esp,0FFFFFFF0h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

331 
fld st(0) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

332 
fst dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

333 
fistp qword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

334 
fild qword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

335 
mov edx,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

336 
mov eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

337 
test eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

338 
je integer_QnaN_or_zero 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

339 
arg_is_not_integer_QnaN: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

340 
fsubp st(1),st 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

341 
test edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

342 
jns positive 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

343 
fstp dword ptr [esp] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

344 
mov ecx,dword ptr [esp] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

345 
xor ecx,80000000h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

346 
add ecx,7FFFFFFFh 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

347 
adc eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

348 
mov edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

349 
adc edx,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

350 
jmp localexit 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

351 
positive: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

352 
fstp dword ptr [esp] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

353 
mov ecx,dword ptr [esp] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

354 
add ecx,7FFFFFFFh 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

355 
sbb eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

356 
mov edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

357 
sbb edx,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

358 
jmp localexit 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

359 
integer_QnaN_or_zero: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

360 
mov edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

361 
test edx,7FFFFFFFh 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

362 
jne arg_is_not_integer_QnaN 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

363 
fstp dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

364 
fstp dword ptr [esp+18h] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

365 
localexit: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

366 
leave 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

367 
ret 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

368 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

369 
/* *INDENTON* */ 
1345
7f32b9bede06
Fixes for Visual C++ 6.0
Sam Lantinga <slouken@libsdl.org>
parents:
1331
diff
changeset

370 
} 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

371 

c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

372 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

373 
_ftol2_sse() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

374 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

375 
_ftol(); 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

376 
} 
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

377 

9015
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

378 
/* 64bit math operators for 32bit systems */ 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

379 
void 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

380 
__declspec(naked) 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

381 
_allmul() 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

382 
{ 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

383 
/* *INDENTOFF* */ 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

384 
__asm { 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

385 
mov eax, dword ptr[esp+8] 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

386 
mov ecx, dword ptr[esp+10h] 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

387 
or ecx, eax 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

388 
mov ecx, dword ptr[esp+0Ch] 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

389 
jne hard 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

390 
mov eax, dword ptr[esp+4] 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

391 
mul ecx 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

392 
ret 10h 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

393 
hard: 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

394 
push ebx 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

395 
mul ecx 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

396 
mov ebx, eax 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

397 
mov eax, dword ptr[esp+8] 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

398 
mul dword ptr[esp+14h] 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

399 
add ebx, eax 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

400 
mov eax, dword ptr[esp+8] 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

401 
mul ecx 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

402 
add edx, ebx 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

403 
pop ebx 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

404 
ret 10h 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

405 
} 
45f11ff360a8
Fixed bug 2537  _allmul in SDL_lib.c is not working properly
Sam Lantinga <slouken@libsdl.org>
parents:
8840
diff
changeset

406 
/* *INDENTON* */ 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

407 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

408 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

409 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

410 
__declspec(naked) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

411 
_alldiv() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

412 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

413 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

414 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

415 
push edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

416 
push esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

417 
push ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

418 
xor edi,edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

419 
mov eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

420 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

421 
jge L1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

422 
inc edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

423 
mov edx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

424 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

425 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

426 
sbb eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

427 
mov dword ptr [esp+14h],eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

428 
mov dword ptr [esp+10h],edx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

429 
L1: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

430 
mov eax,dword ptr [esp+1Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

431 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

432 
jge L2 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

433 
inc edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

434 
mov edx,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

435 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

436 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

437 
sbb eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

438 
mov dword ptr [esp+1Ch],eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

439 
mov dword ptr [esp+18h],edx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

440 
L2: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

441 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

442 
jne L3 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

443 
mov ecx,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

444 
mov eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

445 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

446 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

447 
mov ebx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

448 
mov eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

449 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

450 
mov edx,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

451 
jmp L4 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

452 
L3: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

453 
mov ebx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

454 
mov ecx,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

455 
mov edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

456 
mov eax,dword ptr [esp+10h] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

457 
L5: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

458 
shr ebx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

459 
rcr ecx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

460 
shr edx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

461 
rcr eax,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

462 
or ebx,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

463 
jne L5 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

464 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

465 
mov esi,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

466 
mul dword ptr [esp+1Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

467 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

468 
mov eax,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

469 
mul esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

470 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

471 
jb L6 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

472 
cmp edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

473 
ja L6 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

474 
jb L7 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

475 
cmp eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

476 
jbe L7 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

477 
L6: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

478 
dec esi 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

479 
L7: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

480 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

481 
mov eax,esi 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

482 
L4: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

483 
dec edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

484 
jne L8 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

485 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

486 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

487 
sbb edx,0 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

488 
L8: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

489 
pop ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

490 
pop esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

491 
pop edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

492 
ret 10h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

493 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

494 
/* *INDENTON* */ 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

495 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

496 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

497 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

498 
__declspec(naked) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

499 
_aulldiv() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

500 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

501 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

502 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

503 
push ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

504 
push esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

505 
mov eax,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

506 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

507 
jne L1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

508 
mov ecx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

509 
mov eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

510 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

511 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

512 
mov ebx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

513 
mov eax,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

514 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

515 
mov edx,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

516 
jmp L2 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

517 
L1: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

518 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

519 
mov ebx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

520 
mov edx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

521 
mov eax,dword ptr [esp+0Ch] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

522 
L3: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

523 
shr ecx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

524 
rcr ebx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

525 
shr edx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

526 
rcr eax,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

527 
or ecx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

528 
jne L3 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

529 
div ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

530 
mov esi,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

531 
mul dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

532 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

533 
mov eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

534 
mul esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

535 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

536 
jb L4 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

537 
cmp edx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

538 
ja L4 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

539 
jb L5 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

540 
cmp eax,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

541 
jbe L5 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

542 
L4: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

543 
dec esi 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

544 
L5: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

545 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

546 
mov eax,esi 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

547 
L2: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

548 
pop esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

549 
pop ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

550 
ret 10h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

551 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

552 
/* *INDENTON* */ 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

553 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

554 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

555 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

556 
__declspec(naked) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

557 
_allrem() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

558 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

559 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

560 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

561 
push ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

562 
push edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

563 
xor edi,edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

564 
mov eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

565 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

566 
jge L1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

567 
inc edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

568 
mov edx,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

569 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

570 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

571 
sbb eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

572 
mov dword ptr [esp+10h],eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

573 
mov dword ptr [esp+0Ch],edx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

574 
L1: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

575 
mov eax,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

576 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

577 
jge L2 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

578 
mov edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

579 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

580 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

581 
sbb eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

582 
mov dword ptr [esp+18h],eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

583 
mov dword ptr [esp+14h],edx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

584 
L2: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

585 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

586 
jne L3 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

587 
mov ecx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

588 
mov eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

589 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

590 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

591 
mov eax,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

592 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

593 
mov eax,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

594 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

595 
dec edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

596 
jns L4 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

597 
jmp L8 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

598 
L3: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

599 
mov ebx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

600 
mov ecx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

601 
mov edx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

602 
mov eax,dword ptr [esp+0Ch] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

603 
L5: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

604 
shr ebx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

605 
rcr ecx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

606 
shr edx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

607 
rcr eax,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

608 
or ebx,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

609 
jne L5 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

610 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

611 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

612 
mul dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

613 
xchg eax,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

614 
mul dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

615 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

616 
jb L6 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

617 
cmp edx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

618 
ja L6 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

619 
jb L7 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

620 
cmp eax,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

621 
jbe L7 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

622 
L6: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

623 
sub eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

624 
sbb edx,dword ptr [esp+18h] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

625 
L7: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

626 
sub eax,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

627 
sbb edx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

628 
dec edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

629 
jns L8 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

630 
L4: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

631 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

632 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

633 
sbb edx,0 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

634 
L8: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

635 
pop edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

636 
pop ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

637 
ret 10h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

638 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

639 
/* *INDENTON* */ 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

640 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

641 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

642 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

643 
__declspec(naked) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

644 
_aullrem() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

645 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

646 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

647 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

648 
push ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

649 
mov eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

650 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

651 
jne L1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

652 
mov ecx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

653 
mov eax,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

654 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

655 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

656 
mov eax,dword ptr [esp+8] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

657 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

658 
mov eax,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

659 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

660 
jmp L2 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

661 
L1: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

662 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

663 
mov ebx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

664 
mov edx,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

665 
mov eax,dword ptr [esp+8] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

666 
L3: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

667 
shr ecx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

668 
rcr ebx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

669 
shr edx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

670 
rcr eax,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

671 
or ecx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

672 
jne L3 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

673 
div ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

674 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

675 
mul dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

676 
xchg eax,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

677 
mul dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

678 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

679 
jb L4 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

680 
cmp edx,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

681 
ja L4 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

682 
jb L5 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

683 
cmp eax,dword ptr [esp+8] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

684 
jbe L5 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

685 
L4: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

686 
sub eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

687 
sbb edx,dword ptr [esp+14h] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

688 
L5: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

689 
sub eax,dword ptr [esp+8] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

690 
sbb edx,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

691 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

692 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

693 
sbb edx,0 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

694 
L2: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

695 
pop ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

696 
ret 10h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

697 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

698 
/* *INDENTON* */ 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

699 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

700 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

701 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

702 
__declspec(naked) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

703 
_alldvrm() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

704 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

705 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

706 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

707 
push edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

708 
push esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

709 
push ebp 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

710 
xor edi,edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

711 
xor ebp,ebp 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

712 
mov eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

713 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

714 
jge L1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

715 
inc edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

716 
inc ebp 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

717 
mov edx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

718 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

719 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

720 
sbb eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

721 
mov dword ptr [esp+14h],eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

722 
mov dword ptr [esp+10h],edx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

723 
L1: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

724 
mov eax,dword ptr [esp+1Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

725 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

726 
jge L2 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

727 
inc edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

728 
mov edx,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

729 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

730 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

731 
sbb eax,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

732 
mov dword ptr [esp+1Ch],eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

733 
mov dword ptr [esp+18h],edx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

734 
L2: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

735 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

736 
jne L3 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

737 
mov ecx,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

738 
mov eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

739 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

740 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

741 
mov ebx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

742 
mov eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

743 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

744 
mov esi,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

745 
mov eax,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

746 
mul dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

747 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

748 
mov eax,esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

749 
mul dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

750 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

751 
jmp L4 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

752 
L3: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

753 
mov ebx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

754 
mov ecx,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

755 
mov edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

756 
mov eax,dword ptr [esp+10h] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

757 
L5: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

758 
shr ebx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

759 
rcr ecx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

760 
shr edx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

761 
rcr eax,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

762 
or ebx,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

763 
jne L5 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

764 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

765 
mov esi,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

766 
mul dword ptr [esp+1Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

767 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

768 
mov eax,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

769 
mul esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

770 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

771 
jb L6 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

772 
cmp edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

773 
ja L6 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

774 
jb L7 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

775 
cmp eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

776 
jbe L7 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

777 
L6: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

778 
dec esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

779 
sub eax,dword ptr [esp+18h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

780 
sbb edx,dword ptr [esp+1Ch] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

781 
L7: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

782 
xor ebx,ebx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

783 
L4: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

784 
sub eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

785 
sbb edx,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

786 
dec ebp 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

787 
jns L9 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

788 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

789 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

790 
sbb edx,0 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

791 
L9: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

792 
mov ecx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

793 
mov edx,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

794 
mov ebx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

795 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

796 
mov eax,esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

797 
dec edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

798 
jne L8 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

799 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

800 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

801 
sbb edx,0 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

802 
L8: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

803 
pop ebp 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

804 
pop esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

805 
pop edi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

806 
ret 10h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

807 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

808 
/* *INDENTON* */ 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

809 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

810 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

811 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

812 
__declspec(naked) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

813 
_aulldvrm() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

814 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

815 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

816 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

817 
push esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

818 
mov eax,dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

819 
or eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

820 
jne L1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

821 
mov ecx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

822 
mov eax,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

823 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

824 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

825 
mov ebx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

826 
mov eax,dword ptr [esp+8] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

827 
div ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

828 
mov esi,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

829 
mov eax,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

830 
mul dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

831 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

832 
mov eax,esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

833 
mul dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

834 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

835 
jmp L2 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

836 
L1: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

837 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

838 
mov ebx,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

839 
mov edx,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

840 
mov eax,dword ptr [esp+8] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

841 
L3: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

842 
shr ecx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

843 
rcr ebx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

844 
shr edx,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

845 
rcr eax,1 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

846 
or ecx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

847 
jne L3 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

848 
div ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

849 
mov esi,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

850 
mul dword ptr [esp+14h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

851 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

852 
mov eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

853 
mul esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

854 
add edx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

855 
jb L4 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

856 
cmp edx,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

857 
ja L4 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

858 
jb L5 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

859 
cmp eax,dword ptr [esp+8] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

860 
jbe L5 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

861 
L4: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

862 
dec esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

863 
sub eax,dword ptr [esp+10h] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

864 
sbb edx,dword ptr [esp+14h] 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

865 
L5: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

866 
xor ebx,ebx 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

867 
L2: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

868 
sub eax,dword ptr [esp+8] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

869 
sbb edx,dword ptr [esp+0Ch] 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

870 
neg edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

871 
neg eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

872 
sbb edx,0 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

873 
mov ecx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

874 
mov edx,ebx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

875 
mov ebx,ecx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

876 
mov ecx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

877 
mov eax,esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

878 
pop esi 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

879 
ret 10h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

880 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

881 
/* *INDENTON* */ 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

882 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

883 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

884 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

885 
__declspec(naked) 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

886 
_allshl() 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

887 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

888 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

889 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

890 
cmp cl,40h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

891 
jae RETZERO 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

892 
cmp cl,20h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

893 
jae MORE32 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

894 
shld edx,eax,cl 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

895 
shl eax,cl 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

896 
ret 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

897 
MORE32: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

898 
mov edx,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

899 
xor eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

900 
and cl,1Fh 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

901 
shl edx,cl 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

902 
ret 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

903 
RETZERO: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

904 
xor eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

905 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

906 
ret 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

907 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

908 
/* *INDENTON* */ 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

909 
} 
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset

910 

1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

911 
void 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

912 
__declspec(naked) 
2760
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

913 
_allshr() 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

914 
{ 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

915 
/* *INDENTOFF* */ 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

916 
__asm { 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

917 
cmp cl,40h 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

918 
jae RETZERO 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

919 
cmp cl,20h 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

920 
jae MORE32 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

921 
shrd eax,edx,cl 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

922 
sar edx,cl 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

923 
ret 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

924 
MORE32: 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

925 
mov eax,edx 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

926 
xor edx,edx 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

927 
and cl,1Fh 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

928 
sar eax,cl 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

929 
ret 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

930 
RETZERO: 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

931 
xor eax,eax 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

932 
xor edx,edx 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

933 
ret 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

934 
} 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

935 
/* *INDENTON* */ 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

936 
} 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

937 

02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

938 
void 
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2735
diff
changeset

939 
__declspec(naked) 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

940 
_aullshr() 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

941 
{ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

942 
/* *INDENTOFF* */ 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

943 
__asm { 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

944 
cmp cl,40h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

945 
jae RETZERO 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

946 
cmp cl,20h 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

947 
jae MORE32 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

948 
shrd eax,edx,cl 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

949 
shr edx,cl 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

950 
ret 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

951 
MORE32: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

952 
mov eax,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

953 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

954 
and cl,1Fh 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

955 
shr eax,cl 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

956 
ret 
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset

957 
RETZERO: 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

958 
xor eax,eax 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

959 
xor edx,edx 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

960 
ret 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

961 
} 
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

962 
/* *INDENTON* */ 
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

963 
} 
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

964 

5455
5fbf5fc81aa8
Fixed linking x64 with Visual Studio 2010.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

965 
#endif /* _M_IX86 */ 
3255
f8a4214ce90a
Fixed compiling on 64bit Windows
Sam Lantinga <slouken@libsdl.org>
parents:
3253
diff
changeset

966 

1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

967 
#endif /* MSC_VER */ 
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

968 

1331
1cbaeee565b1
A few fixes to get this building on Linux again
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset

969 
#endif /* !HAVE_LIBC */ 
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

970 

c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1433
diff
changeset

971 
/* vi: set ts=4 sw=4 expandtab: */ 