ruby2d 0.9.4 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/assets/include/SDL2/SDL.h +4 -1
  3. data/assets/include/SDL2/SDL_assert.h +3 -1
  4. data/assets/include/SDL2/SDL_atomic.h +1 -1
  5. data/assets/include/SDL2/SDL_audio.h +1 -1
  6. data/assets/include/SDL2/SDL_bits.h +1 -1
  7. data/assets/include/SDL2/SDL_blendmode.h +4 -1
  8. data/assets/include/SDL2/SDL_clipboard.h +1 -1
  9. data/assets/include/SDL2/SDL_config.h +1 -1
  10. data/assets/include/SDL2/SDL_config_android.h +7 -3
  11. data/assets/include/SDL2/SDL_config_iphoneos.h +16 -10
  12. data/assets/include/SDL2/SDL_config_macosx.h +40 -14
  13. data/assets/include/SDL2/SDL_config_minimal.h +1 -1
  14. data/assets/include/SDL2/SDL_config_os2.h +26 -8
  15. data/assets/include/SDL2/SDL_config_pandora.h +4 -2
  16. data/assets/include/SDL2/SDL_config_psp.h +2 -1
  17. data/assets/include/SDL2/SDL_config_windows.h +40 -9
  18. data/assets/include/SDL2/SDL_config_winrt.h +5 -2
  19. data/assets/include/SDL2/SDL_config_wiz.h +5 -2
  20. data/assets/include/SDL2/SDL_copying.h +1 -1
  21. data/assets/include/SDL2/SDL_cpuinfo.h +32 -3
  22. data/assets/include/SDL2/SDL_egl.h +4 -1
  23. data/assets/include/SDL2/SDL_endian.h +6 -3
  24. data/assets/include/SDL2/SDL_error.h +38 -2
  25. data/assets/include/SDL2/SDL_events.h +64 -28
  26. data/assets/include/SDL2/SDL_filesystem.h +1 -1
  27. data/assets/include/SDL2/SDL_gamecontroller.h +160 -9
  28. data/assets/include/SDL2/SDL_gesture.h +1 -1
  29. data/assets/include/SDL2/SDL_haptic.h +10 -1
  30. data/assets/include/SDL2/SDL_hints.h +316 -4
  31. data/assets/include/SDL2/SDL_joystick.h +115 -24
  32. data/assets/include/SDL2/SDL_keyboard.h +1 -1
  33. data/assets/include/SDL2/SDL_keycode.h +11 -9
  34. data/assets/include/SDL2/SDL_loadso.h +1 -1
  35. data/assets/include/SDL2/SDL_locale.h +101 -0
  36. data/assets/include/SDL2/SDL_log.h +3 -3
  37. data/assets/include/SDL2/SDL_main.h +1 -1
  38. data/assets/include/SDL2/SDL_messagebox.h +6 -4
  39. data/assets/include/SDL2/SDL_metal.h +117 -0
  40. data/assets/include/SDL2/SDL_misc.h +75 -0
  41. data/assets/include/SDL2/SDL_mouse.h +1 -1
  42. data/assets/include/SDL2/SDL_mutex.h +1 -1
  43. data/assets/include/SDL2/SDL_name.h +1 -1
  44. data/assets/include/SDL2/SDL_opengl.h +1 -1
  45. data/assets/include/SDL2/SDL_opengl_glext.h +3 -0
  46. data/assets/include/SDL2/SDL_opengles.h +1 -1
  47. data/assets/include/SDL2/SDL_opengles2.h +1 -1
  48. data/assets/include/SDL2/SDL_pixels.h +25 -16
  49. data/assets/include/SDL2/SDL_platform.h +1 -1
  50. data/assets/include/SDL2/SDL_power.h +1 -1
  51. data/assets/include/SDL2/SDL_quit.h +1 -1
  52. data/assets/include/SDL2/SDL_rect.h +1 -1
  53. data/assets/include/SDL2/SDL_render.h +63 -3
  54. data/assets/include/SDL2/SDL_revision.h +2 -2
  55. data/assets/include/SDL2/SDL_rwops.h +2 -10
  56. data/assets/include/SDL2/SDL_scancode.h +1 -1
  57. data/assets/include/SDL2/SDL_sensor.h +25 -9
  58. data/assets/include/SDL2/SDL_shape.h +1 -1
  59. data/assets/include/SDL2/SDL_stdinc.h +44 -4
  60. data/assets/include/SDL2/SDL_surface.h +11 -2
  61. data/assets/include/SDL2/SDL_system.h +50 -4
  62. data/assets/include/SDL2/SDL_syswm.h +29 -2
  63. data/assets/include/SDL2/SDL_test.h +1 -1
  64. data/assets/include/SDL2/SDL_test_assert.h +1 -1
  65. data/assets/include/SDL2/SDL_test_common.h +14 -1
  66. data/assets/include/SDL2/SDL_test_compare.h +1 -1
  67. data/assets/include/SDL2/SDL_test_crc32.h +1 -1
  68. data/assets/include/SDL2/SDL_test_font.h +1 -1
  69. data/assets/include/SDL2/SDL_test_fuzzer.h +1 -1
  70. data/assets/include/SDL2/SDL_test_harness.h +1 -1
  71. data/assets/include/SDL2/SDL_test_images.h +1 -1
  72. data/assets/include/SDL2/SDL_test_log.h +1 -1
  73. data/assets/include/SDL2/SDL_test_md5.h +1 -1
  74. data/assets/include/SDL2/SDL_test_memory.h +1 -1
  75. data/assets/include/SDL2/SDL_test_random.h +1 -1
  76. data/assets/include/SDL2/SDL_thread.h +34 -11
  77. data/assets/include/SDL2/SDL_timer.h +1 -1
  78. data/assets/include/SDL2/SDL_touch.h +1 -1
  79. data/assets/include/SDL2/SDL_types.h +1 -1
  80. data/assets/include/SDL2/SDL_version.h +2 -2
  81. data/assets/include/SDL2/SDL_video.h +11 -5
  82. data/assets/include/SDL2/SDL_vulkan.h +6 -8
  83. data/assets/include/SDL2/begin_code.h +5 -9
  84. data/assets/include/SDL2/close_code.h +1 -1
  85. data/assets/macos/lib/libFLAC.a +0 -0
  86. data/assets/macos/lib/libSDL2.a +0 -0
  87. data/assets/macos/lib/libSDL2_image.a +0 -0
  88. data/assets/macos/lib/libSDL2_mixer.a +0 -0
  89. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  90. data/assets/macos/lib/libfreetype.a +0 -0
  91. data/assets/macos/lib/libjpeg.a +0 -0
  92. data/assets/macos/lib/libmodplug.a +0 -0
  93. data/assets/macos/lib/libmpg123.a +0 -0
  94. data/assets/macos/lib/libogg.a +0 -0
  95. data/assets/macos/lib/libpng16.a +0 -0
  96. data/assets/macos/lib/libtiff.a +0 -0
  97. data/assets/macos/lib/libvorbis.a +0 -0
  98. data/assets/macos/lib/libvorbisfile.a +0 -0
  99. data/assets/macos/lib/libwebp.a +0 -0
  100. data/assets/mingw/bin/SDL2.dll +0 -0
  101. data/assets/mingw/lib/libSDL2.a +0 -0
  102. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  103. data/assets/mingw/lib/libSDL2_test.a +0 -0
  104. data/assets/mingw/lib/libSDL2main.a +0 -0
  105. data/bin/ruby2d +1 -0
  106. data/{assets/linux/simple2d/src/simple2d.c → ext/ruby2d/common.c} +32 -32
  107. data/{assets/linux/simple2d/src → ext/ruby2d}/controllers.c +17 -17
  108. data/ext/ruby2d/extconf.rb +37 -59
  109. data/ext/ruby2d/font.c +35 -0
  110. data/{assets/linux/simple2d/src → ext/ruby2d}/gl.c +66 -98
  111. data/ext/ruby2d/gl2.c +86 -0
  112. data/{assets/linux/simple2d/src → ext/ruby2d}/gl3.c +69 -112
  113. data/{assets/linux/simple2d/src → ext/ruby2d}/gles.c +22 -81
  114. data/ext/ruby2d/image.c +58 -0
  115. data/{assets/linux/simple2d/src → ext/ruby2d}/input.c +8 -8
  116. data/{assets/linux/simple2d/src → ext/ruby2d}/music.c +30 -17
  117. data/ext/ruby2d/ruby2d.c +449 -439
  118. data/ext/ruby2d/ruby2d.h +652 -0
  119. data/{assets/linux/simple2d/src → ext/ruby2d}/shapes.c +18 -18
  120. data/{assets/linux/simple2d/src → ext/ruby2d}/sound.c +39 -14
  121. data/ext/ruby2d/text.c +22 -0
  122. data/{assets/linux/simple2d/src → ext/ruby2d}/window.c +63 -63
  123. data/lib/ruby2d/circle.rb +21 -3
  124. data/lib/ruby2d/cli/build.rb +4 -7
  125. data/lib/ruby2d/dsl.rb +16 -9
  126. data/lib/ruby2d/entity.rb +17 -0
  127. data/lib/ruby2d/font.rb +23 -3
  128. data/lib/ruby2d/image.rb +35 -7
  129. data/lib/ruby2d/line.rb +23 -1
  130. data/lib/ruby2d/music.rb +5 -0
  131. data/lib/ruby2d/pixel.rb +17 -0
  132. data/lib/ruby2d/quad.rb +21 -1
  133. data/lib/ruby2d/rectangle.rb +12 -3
  134. data/lib/ruby2d/renderable.rb +4 -20
  135. data/lib/ruby2d/sound.rb +30 -0
  136. data/lib/ruby2d/sprite.rb +57 -75
  137. data/lib/ruby2d/square.rb +10 -1
  138. data/lib/ruby2d/text.rb +55 -12
  139. data/lib/ruby2d/texture.rb +28 -0
  140. data/lib/ruby2d/tileset.rb +87 -0
  141. data/lib/ruby2d/triangle.rb +19 -1
  142. data/lib/ruby2d/version.rb +1 -1
  143. data/lib/ruby2d/vertices.rb +84 -0
  144. data/lib/ruby2d/window.rb +259 -22
  145. data/lib/ruby2d.rb +6 -1
  146. metadata +30 -26
  147. data/assets/include/simple2d.h +0 -757
  148. data/assets/linux/simple2d/Makefile +0 -260
  149. data/assets/linux/simple2d/bin/simple2d.sh +0 -1318
  150. data/assets/linux/simple2d/include/simple2d.h +0 -757
  151. data/assets/linux/simple2d/src/gl2.c +0 -146
  152. data/assets/linux/simple2d/src/image.c +0 -138
  153. data/assets/linux/simple2d/src/sprite.c +0 -147
  154. data/assets/linux/simple2d/src/text.c +0 -129
  155. data/assets/macos/lib/libsimple2d.a +0 -0
  156. data/assets/mingw/lib/libsimple2d.a +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d097c7865d0f9920bccf154e7e7652bb4fac02767f0874b5adcf74b248ab5eb
4
- data.tar.gz: fd6e9a7b221f850b9e6f71ba0d46a86e28f474d055d355a1c45f07078e2207de
3
+ metadata.gz: 07676c0160c86aa58a3c4d25518263f5f00d131f11fabc8b49dbe4dd376cc997
4
+ data.tar.gz: e8232747a6abc7968633002ff47d0a51e1fe64198287e21d4856b63d5fd4cd0c
5
5
  SHA512:
6
- metadata.gz: 932f5623ab4abd18521f721b2921a9c7e64f81c446345949904613d7e059286ed85788e88b3c181c6e435a104692a7a093edb20cbc49847b925e16bf09d1a8cc
7
- data.tar.gz: 3660bd43e97441b715513dd4236aaf36263d503f92af052fd961c1cb08e27d497a4598e9ca23b301c28a79ca0e8f8d1deed8107b98f54fb94d97255e036b02ef
6
+ metadata.gz: b83fddd9acf3a31f7db8f4725bab254c3cfeab59fbdd2ac47cc2eb31b56a882bf70eddf573e715a381cb8fe405844b2e0d6ca903c2ab98bbcbbb73c7da31e1e2
7
+ data.tar.gz: 55dfe6468ce294edec8157abb892c226bbe7b9f040f5e1e4a5e740061dd2cabb16a1b4ef83c29dfc1009f4392542e08e3d826d8beb8b5b270dab3da2f73cd3d3
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -47,6 +47,7 @@
47
47
  #include "SDL_loadso.h"
48
48
  #include "SDL_log.h"
49
49
  #include "SDL_messagebox.h"
50
+ #include "SDL_metal.h"
50
51
  #include "SDL_mutex.h"
51
52
  #include "SDL_power.h"
52
53
  #include "SDL_render.h"
@@ -58,6 +59,8 @@
58
59
  #include "SDL_timer.h"
59
60
  #include "SDL_version.h"
60
61
  #include "SDL_video.h"
62
+ #include "SDL_locale.h"
63
+ #include "SDL_misc.h"
61
64
 
62
65
  #include "begin_code.h"
63
66
  /* Set up for C function definitions, even when using C++ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -53,6 +53,8 @@ assert can have unique static variables associated with it.
53
53
  #define SDL_TriggerBreakpoint() __debugbreak()
54
54
  #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
55
55
  #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
56
+ #elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */
57
+ #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
56
58
  #elif defined(__386__) && defined(__WATCOMC__)
57
59
  #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
58
60
  #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -50,6 +50,9 @@ typedef enum
50
50
  SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
51
51
  dstRGB = srcRGB * dstRGB
52
52
  dstA = dstA */
53
+ SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
54
+ dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
55
+ dstA = (srcA * dstA) + (dstA * (1-srcA)) */
53
56
  SDL_BLENDMODE_INVALID = 0x7FFFFFFF
54
57
 
55
58
  /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
71
71
  #define HAVE_STRCHR 1
72
72
  #define HAVE_STRRCHR 1
73
73
  #define HAVE_STRSTR 1
74
+ #define HAVE_STRTOK_R 1
74
75
  #define HAVE_STRTOL 1
75
76
  #define HAVE_STRTOUL 1
76
77
  #define HAVE_STRTOLL 1
@@ -120,6 +121,8 @@
120
121
  #define HAVE_SQRTF 1
121
122
  #define HAVE_TAN 1
122
123
  #define HAVE_TANF 1
124
+ #define HAVE_TRUNC 1
125
+ #define HAVE_TRUNCF 1
123
126
  #define HAVE_SIGACTION 1
124
127
  #define HAVE_SETJMP 1
125
128
  #define HAVE_NANOSLEEP 1
@@ -135,8 +138,9 @@
135
138
 
136
139
  /* Enable various input drivers */
137
140
  #define SDL_JOYSTICK_ANDROID 1
138
- #define SDL_JOYSTICK_HIDAPI 1
139
- #define SDL_HAPTIC_ANDROID 1
141
+ #define SDL_JOYSTICK_HIDAPI 1
142
+ #define SDL_JOYSTICK_VIRTUAL 1
143
+ #define SDL_HAPTIC_ANDROID 1
140
144
 
141
145
  /* Enable sensor driver */
142
146
  #define SDL_SENSOR_ANDROID 1
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
71
71
  #define HAVE_STRCHR 1
72
72
  #define HAVE_STRRCHR 1
73
73
  #define HAVE_STRSTR 1
74
+ #define HAVE_STRTOK_R 1
74
75
  #define HAVE_STRTOL 1
75
76
  #define HAVE_STRTOUL 1
76
77
  #define HAVE_STRTOLL 1
@@ -121,6 +122,8 @@
121
122
  #define HAVE_SQRTF 1
122
123
  #define HAVE_TAN 1
123
124
  #define HAVE_TANF 1
125
+ #define HAVE_TRUNC 1
126
+ #define HAVE_TRUNCF 1
124
127
  #define HAVE_SIGACTION 1
125
128
  #define HAVE_SETJMP 1
126
129
  #define HAVE_NANOSLEEP 1
@@ -135,9 +138,11 @@
135
138
  /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
136
139
  #define SDL_HAPTIC_DUMMY 1
137
140
 
138
- /* Enable MFi joystick support */
139
- #define SDL_JOYSTICK_MFI 1
141
+ /* Enable joystick support */
142
+ /* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
140
143
  /*#define SDL_JOYSTICK_HIDAPI 1*/
144
+ #define SDL_JOYSTICK_MFI 1
145
+ #define SDL_JOYSTICK_VIRTUAL 1
141
146
 
142
147
  #ifdef __TVOS__
143
148
  #define SDL_SENSOR_DUMMY 1
@@ -166,8 +171,10 @@
166
171
  #define SDL_VIDEO_RENDER_OGL_ES 1
167
172
  #define SDL_VIDEO_RENDER_OGL_ES2 1
168
173
 
169
- /* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */
170
- #if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))
174
+ /* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
175
+ Also supported in simulator from iOS 13.0 and tvOS 13.0
176
+ */
177
+ #if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
171
178
  #define SDL_PLATFORM_SUPPORTS_METAL 1
172
179
  #else
173
180
  #define SDL_PLATFORM_SUPPORTS_METAL 0
@@ -181,6 +188,10 @@
181
188
  #define SDL_VIDEO_VULKAN 1
182
189
  #endif
183
190
 
191
+ #if SDL_PLATFORM_SUPPORTS_METAL
192
+ #define SDL_VIDEO_METAL 1
193
+ #endif
194
+
184
195
  /* Enable system power support */
185
196
  #define SDL_POWER_UIKIT 1
186
197
 
@@ -190,11 +201,6 @@
190
201
  /* enable iOS extended launch screen */
191
202
  #define SDL_IPHONE_LAUNCHSCREEN 1
192
203
 
193
- /* Set max recognized G-force from accelerometer
194
- See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
195
- */
196
- #define SDL_IPHONE_MAX_GFORCE 5.0
197
-
198
204
  /* enable filesystem support */
199
205
  #define SDL_FILESYSTEM_COCOA 1
200
206
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -74,6 +74,7 @@
74
74
  #define HAVE_STRCHR 1
75
75
  #define HAVE_STRRCHR 1
76
76
  #define HAVE_STRSTR 1
77
+ #define HAVE_STRTOK_R 1
77
78
  #define HAVE_STRTOL 1
78
79
  #define HAVE_STRTOUL 1
79
80
  #define HAVE_STRTOLL 1
@@ -124,22 +125,32 @@
124
125
  #define HAVE_SQRTF 1
125
126
  #define HAVE_TAN 1
126
127
  #define HAVE_TANF 1
128
+ #define HAVE_TRUNC 1
129
+ #define HAVE_TRUNCF 1
127
130
  #define HAVE_SIGACTION 1
128
131
  #define HAVE_SETJMP 1
129
132
  #define HAVE_NANOSLEEP 1
130
133
  #define HAVE_SYSCONF 1
131
134
  #define HAVE_SYSCTLBYNAME 1
132
135
 
136
+ #define HAVE_GCC_ATOMICS 1
137
+
133
138
  /* Enable various audio drivers */
134
139
  #define SDL_AUDIO_DRIVER_COREAUDIO 1
135
140
  #define SDL_AUDIO_DRIVER_DISK 1
136
141
  #define SDL_AUDIO_DRIVER_DUMMY 1
137
142
 
138
143
  /* Enable various input drivers */
144
+ #define SDL_JOYSTICK_HIDAPI 1
139
145
  #define SDL_JOYSTICK_IOKIT 1
140
- #define SDL_JOYSTICK_HIDAPI 1
146
+ #define SDL_JOYSTICK_VIRTUAL 1
141
147
  #define SDL_HAPTIC_IOKIT 1
142
148
 
149
+ /* The MFI controller support requires ARC Objective C runtime */
150
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
151
+ #define SDL_JOYSTICK_MFI 1
152
+ #endif
153
+
143
154
  /* Enable the dummy sensor driver */
144
155
  #define SDL_SENSOR_DUMMY 1
145
156
 
@@ -157,13 +168,13 @@
157
168
  #define SDL_VIDEO_DRIVER_COCOA 1
158
169
  #define SDL_VIDEO_DRIVER_DUMMY 1
159
170
  #undef SDL_VIDEO_DRIVER_X11
160
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
161
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
162
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
163
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
164
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
165
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
166
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
171
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
172
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
173
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
174
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
175
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
176
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
177
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
167
178
  #define SDL_VIDEO_DRIVER_X11_XDBE 1
168
179
  #define SDL_VIDEO_DRIVER_X11_XINERAMA 1
169
180
  #define SDL_VIDEO_DRIVER_X11_XRANDR 1
@@ -191,9 +202,15 @@
191
202
  #define SDL_VIDEO_RENDER_OGL_ES2 1
192
203
  #endif
193
204
 
194
- #ifndef SDL_VIDEO_RENDER_METAL
195
205
  /* Metal only supported on 64-bit architectures with 10.11+ */
196
- #if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
206
+ #if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
207
+ #define SDL_PLATFORM_SUPPORTS_METAL 1
208
+ #else
209
+ #define SDL_PLATFORM_SUPPORTS_METAL 0
210
+ #endif
211
+
212
+ #ifndef SDL_VIDEO_RENDER_METAL
213
+ #if SDL_PLATFORM_SUPPORTS_METAL
197
214
  #define SDL_VIDEO_RENDER_METAL 1
198
215
  #else
199
216
  #define SDL_VIDEO_RENDER_METAL 0
@@ -217,13 +234,22 @@
217
234
  #define SDL_VIDEO_OPENGL_GLX 1
218
235
  #endif
219
236
 
220
- /* Enable Vulkan support */
221
- /* Metal/Vulkan Portability only supported on 64-bit architectures with 10.11+ */
222
- #if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
237
+ /* Enable Vulkan and Metal support */
238
+ #ifndef SDL_VIDEO_VULKAN
239
+ #if SDL_PLATFORM_SUPPORTS_METAL
223
240
  #define SDL_VIDEO_VULKAN 1
224
241
  #else
225
242
  #define SDL_VIDEO_VULKAN 0
226
243
  #endif
244
+ #endif
245
+
246
+ #ifndef SDL_VIDEO_METAL
247
+ #if SDL_PLATFORM_SUPPORTS_METAL
248
+ #define SDL_VIDEO_METAL 1
249
+ #else
250
+ #define SDL_VIDEO_METAL 0
251
+ #endif
252
+ #endif
227
253
 
228
254
  /* Enable system power support */
229
255
  #define SDL_POWER_MACOSX 1
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -27,14 +27,17 @@
27
27
 
28
28
  #define SDL_AUDIO_DRIVER_DUMMY 1
29
29
  #define SDL_AUDIO_DRIVER_DISK 1
30
+ #define SDL_AUDIO_DRIVER_OS2 1
30
31
 
31
32
  #define SDL_POWER_DISABLED 1
32
33
  #define SDL_JOYSTICK_DISABLED 1
33
34
  #define SDL_HAPTIC_DISABLED 1
34
35
  /*#undef SDL_JOYSTICK_HIDAPI */
36
+ /*#undef SDL_JOYSTICK_VIRTUAL */
35
37
 
36
38
  #define SDL_SENSOR_DUMMY 1
37
39
  #define SDL_VIDEO_DRIVER_DUMMY 1
40
+ #define SDL_VIDEO_DRIVER_OS2 1
38
41
 
39
42
  /* Enable OpenGL support */
40
43
  /* #undef SDL_VIDEO_OPENGL */
@@ -42,18 +45,19 @@
42
45
  /* Enable Vulkan support */
43
46
  /* #undef SDL_VIDEO_VULKAN */
44
47
 
45
- #define SDL_LOADSO_DISABLED 1
46
- #define SDL_THREADS_DISABLED 1
47
- #define SDL_TIMERS_DISABLED 1
48
- #define SDL_FILESYSTEM_DUMMY 1
48
+ #define SDL_THREAD_OS2 1
49
+ #define SDL_LOADSO_OS2 1
50
+ #define SDL_TIMER_OS2 1
51
+ #define SDL_FILESYSTEM_OS2 1
49
52
 
50
53
  /* Enable assembly routines */
51
54
  #define SDL_ASSEMBLY_ROUTINES 1
52
55
 
53
- /* #undef HAVE_LIBSAMPLERATE_H */
56
+ /* use libsamplerate for audio rate conversion. */
57
+ /*#define HAVE_LIBSAMPLERATE_H 1 */
54
58
 
55
59
  /* Enable dynamic libsamplerate support */
56
- /* #undef SDL_LIBSAMPLERATE_DYNAMIC */
60
+ #define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL"
57
61
 
58
62
  #define HAVE_LIBC 1
59
63
 
@@ -99,6 +103,8 @@
99
103
  #define HAVE_WCSLCPY 1
100
104
  #define HAVE_WCSLCAT 1
101
105
  #define HAVE_WCSCMP 1
106
+ #define HAVE__WCSICMP 1
107
+ #define HAVE__WCSNICMP 1
102
108
  #define HAVE_STRLEN 1
103
109
  #define HAVE_STRLCPY 1
104
110
  #define HAVE_STRLCAT 1
@@ -110,6 +116,7 @@
110
116
  #define HAVE_STRCHR 1
111
117
  #define HAVE_STRRCHR 1
112
118
  #define HAVE_STRSTR 1
119
+ /* #undef HAVE_STRTOK_R */
113
120
  #define HAVE_ITOA 1
114
121
  #define HAVE__LTOA 1
115
122
  #define HAVE__ULTOA 1
@@ -122,12 +129,21 @@
122
129
  #define HAVE_STRTOD 1
123
130
  #define HAVE_ATOI 1
124
131
  #define HAVE_ATOF 1
132
+ #define HAVE_WCSLEN 1
133
+ #define HAVE_WCSLCPY 1
134
+ #define HAVE_WCSLCAT 1
135
+ /* #define HAVE_WCSDUP 1 */
136
+ /* #define wcsdup _wcsdup */
137
+ #define HAVE_WCSSTR 1
138
+ #define HAVE_WCSCMP 1
139
+ #define HAVE_WCSNCMP 1
125
140
  #define HAVE_STRCMP 1
126
141
  #define HAVE_STRNCMP 1
127
142
  #define HAVE_STRICMP 1
128
143
  #define HAVE_STRCASECMP 1
129
144
  #define HAVE_STRNCASECMP 1
130
- #define HAVE_SSCANF 1
145
+ #define HAVE_SSCANF 1
146
+ #define HAVE_VSSCANF 1
131
147
  #define HAVE_SNPRINTF 1
132
148
  #define HAVE_VSNPRINTF 1
133
149
  #define HAVE_SETJMP 1
@@ -166,5 +182,7 @@
166
182
  /* #undef HAVE_SQRTF */
167
183
  #define HAVE_TAN 1
168
184
  /* #undef HAVE_TANF */
185
+ /* #undef HAVE_TRUNC */
186
+ /* #undef HAVE_TRUNCF */
169
187
 
170
188
  #endif /* SDL_config_os2_h_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -102,6 +102,8 @@
102
102
  #define HAVE_SQRTF 1
103
103
  #define HAVE_TAN 1
104
104
  #define HAVE_TANF 1
105
+ #define HAVE_TRUNC 1
106
+ #define HAVE_TRUNCF 1
105
107
  #define HAVE_SIGACTION 1
106
108
  #define HAVE_SETJMP 1
107
109
  #define HAVE_NANOSLEEP 1
@@ -110,8 +112,8 @@
110
112
  #define SDL_AUDIO_DRIVER_OSS 1
111
113
 
112
114
  #define SDL_INPUT_LINUXEV 1
113
- #define SDL_INPUT_TSLIB 1
114
115
  #define SDL_JOYSTICK_LINUX 1
116
+ #define SDL_JOYSTICK_VIRTUAL 1
115
117
  #define SDL_HAPTIC_LINUX 1
116
118
 
117
119
  #define SDL_SENSOR_DUMMY 1
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -136,6 +136,7 @@
136
136
 
137
137
  /* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
138
138
  #define SDL_JOYSTICK_PSP 1
139
+ #define SDL_JOYSTICK_VIRTUAL 1
139
140
 
140
141
  /* Enable the dummy sensor driver */
141
142
  #define SDL_SENSOR_DUMMY 1
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -84,7 +84,7 @@ typedef unsigned int uintptr_t;
84
84
  #define HAVE_XINPUT_H 1
85
85
  #define HAVE_MMDEVICEAPI_H 1
86
86
  #define HAVE_AUDIOCLIENT_H 1
87
- #define HAVE_ENDPOINTVOLUME_H 1
87
+ #define HAVE_SENSORSAPI_H
88
88
 
89
89
  /* This is disabled by default to avoid C runtime dependencies and manifest requirements */
90
90
  #ifdef HAVE_LIBC
@@ -118,6 +118,10 @@ typedef unsigned int uintptr_t;
118
118
  #define HAVE_STRCHR 1
119
119
  #define HAVE_STRRCHR 1
120
120
  #define HAVE_STRSTR 1
121
+ /* #undef HAVE_STRTOK_R */
122
+ #if defined(_MSC_VER)
123
+ #define HAVE_STRTOK_S 1
124
+ #endif
121
125
  /* These functions have security warnings, so we won't use them */
122
126
  /* #undef HAVE__LTOA */
123
127
  /* #undef HAVE__ULTOA */
@@ -130,6 +134,8 @@ typedef unsigned int uintptr_t;
130
134
  #define HAVE_STRNCMP 1
131
135
  #define HAVE__STRICMP 1
132
136
  #define HAVE__STRNICMP 1
137
+ #define HAVE__WCSICMP 1
138
+ #define HAVE__WCSNICMP 1
133
139
  #define HAVE_ACOS 1
134
140
  #define HAVE_ACOSF 1
135
141
  #define HAVE_ASIN 1
@@ -139,7 +145,7 @@ typedef unsigned int uintptr_t;
139
145
  #define HAVE_ATAN2 1
140
146
  #define HAVE_ATAN2F 1
141
147
  #define HAVE_CEILF 1
142
- #define HAVE__COPYSIGN 1
148
+ #define HAVE__COPYSIGN 1
143
149
  #define HAVE_COS 1
144
150
  #define HAVE_COSF 1
145
151
  #define HAVE_EXP 1
@@ -168,7 +174,9 @@ typedef unsigned int uintptr_t;
168
174
  #define HAVE_STRTOLL 1
169
175
  #define HAVE_VSSCANF 1
170
176
  #define HAVE_SCALBN 1
171
- #define HAVE_SCALBNF 1
177
+ #define HAVE_SCALBNF 1
178
+ #define HAVE_TRUNC 1
179
+ #define HAVE_TRUNCF 1
172
180
  #endif
173
181
  /* This function is available with at least the VC++ 2008 C runtime library */
174
182
  #if _MSC_VER >= 1400
@@ -183,6 +191,20 @@ typedef unsigned int uintptr_t;
183
191
  #define HAVE_STDDEF_H 1
184
192
  #endif
185
193
 
194
+ /* Check to see if we have Windows 10 build environment */
195
+ #if _MSC_VER >= 1911 /* Visual Studio 15.3 */
196
+ #include <sdkddkver.h>
197
+ #if _WIN32_WINNT >= 0x0601 /* Windows 7 */
198
+ #define SDL_WINDOWS7_SDK
199
+ #endif
200
+ #if _WIN32_WINNT >= 0x0602 /* Windows 8 */
201
+ #define SDL_WINDOWS8_SDK
202
+ #endif
203
+ #if _WIN32_WINNT >= 0x0A00 /* Windows 10 */
204
+ #define SDL_WINDOWS10_SDK
205
+ #endif
206
+ #endif /* _MSC_VER >= 1911 */
207
+
186
208
  /* Enable various audio drivers */
187
209
  #define SDL_AUDIO_DRIVER_WASAPI 1
188
210
  #define SDL_AUDIO_DRIVER_DSOUND 1
@@ -192,13 +214,20 @@ typedef unsigned int uintptr_t;
192
214
 
193
215
  /* Enable various input drivers */
194
216
  #define SDL_JOYSTICK_DINPUT 1
195
- #define SDL_JOYSTICK_XINPUT 1
196
217
  #define SDL_JOYSTICK_HIDAPI 1
218
+ #ifndef __WINRT__
219
+ #define SDL_JOYSTICK_RAWINPUT 1
220
+ #endif
221
+ #define SDL_JOYSTICK_VIRTUAL 1
222
+ #ifdef SDL_WINDOWS10_SDK
223
+ #define SDL_JOYSTICK_WGI 1
224
+ #endif
225
+ #define SDL_JOYSTICK_XINPUT 1
197
226
  #define SDL_HAPTIC_DINPUT 1
198
227
  #define SDL_HAPTIC_XINPUT 1
199
228
 
200
- /* Enable the dummy sensor driver */
201
- #define SDL_SENSOR_DUMMY 1
229
+ /* Enable the sensor driver */
230
+ #define SDL_SENSOR_WINDOWS 1
202
231
 
203
232
  /* Enable various shared object loading systems */
204
233
  #define SDL_LOADSO_WINDOWS 1
@@ -216,8 +245,8 @@ typedef unsigned int uintptr_t;
216
245
  #ifndef SDL_VIDEO_RENDER_D3D
217
246
  #define SDL_VIDEO_RENDER_D3D 1
218
247
  #endif
219
- #ifndef SDL_VIDEO_RENDER_D3D11
220
- #define SDL_VIDEO_RENDER_D3D11 0
248
+ #ifdef SDL_WINDOWS7_SDK
249
+ #define SDL_VIDEO_RENDER_D3D11 1
221
250
  #endif
222
251
 
223
252
  /* Enable OpenGL support */
@@ -255,3 +284,5 @@ typedef unsigned int uintptr_t;
255
284
  #endif
256
285
 
257
286
  #endif /* SDL_config_windows_h_ */
287
+
288
+ /* vi: set ts=4 sw=4 expandtab: */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -100,7 +100,6 @@ typedef unsigned int uintptr_t;
100
100
 
101
101
  #define HAVE_MMDEVICEAPI_H 1
102
102
  #define HAVE_AUDIOCLIENT_H 1
103
- #define HAVE_ENDPOINTVOLUME_H 1
104
103
 
105
104
  #define HAVE_LIBC 1
106
105
  #define STDC_HEADERS 1
@@ -131,6 +130,7 @@ typedef unsigned int uintptr_t;
131
130
  #define HAVE_STRCHR 1
132
131
  #define HAVE_STRRCHR 1
133
132
  #define HAVE_STRSTR 1
133
+ #define HAVE_STRTOK_S 1
134
134
  //#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
135
135
  //#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
136
136
  //#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
@@ -181,6 +181,8 @@ typedef unsigned int uintptr_t;
181
181
  #define HAVE_SQRTF 1
182
182
  #define HAVE_TAN 1
183
183
  #define HAVE_TANF 1
184
+ #define HAVE_TRUNC 1
185
+ #define HAVE_TRUNCF 1
184
186
  #define HAVE__FSEEKI64 1
185
187
 
186
188
  /* Enable various audio drivers */
@@ -193,6 +195,7 @@ typedef unsigned int uintptr_t;
193
195
  #define SDL_JOYSTICK_DISABLED 1
194
196
  #define SDL_HAPTIC_DISABLED 1
195
197
  #else
198
+ #define SDL_JOYSTICK_VIRTUAL 1
196
199
  #define SDL_JOYSTICK_XINPUT 1
197
200
  #define SDL_HAPTIC_XINPUT 1
198
201
  #endif