alphatau 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1362) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +11 -0
  3. data/bin/console +14 -0
  4. data/bin/setup +8 -0
  5. data/ext/alphatau/native/alphatau_native.cpp +141 -0
  6. data/ext/alphatau/native/extconf.rb +18 -0
  7. data/ext/alphatau/native/sdl/Android.mk +110 -0
  8. data/ext/alphatau/native/sdl/BUGS.txt +16 -0
  9. data/ext/alphatau/native/sdl/CMakeLists.txt +1877 -0
  10. data/ext/alphatau/native/sdl/COPYING.txt +20 -0
  11. data/ext/alphatau/native/sdl/CREDITS.txt +53 -0
  12. data/ext/alphatau/native/sdl/INSTALL.txt +40 -0
  13. data/ext/alphatau/native/sdl/Makefile.in +240 -0
  14. data/ext/alphatau/native/sdl/Makefile.minimal +44 -0
  15. data/ext/alphatau/native/sdl/Makefile.pandora +60 -0
  16. data/ext/alphatau/native/sdl/Makefile.psp +95 -0
  17. data/ext/alphatau/native/sdl/Makefile.wiz +80 -0
  18. data/ext/alphatau/native/sdl/README-SDL.txt +13 -0
  19. data/ext/alphatau/native/sdl/README.txt +21 -0
  20. data/ext/alphatau/native/sdl/SDL2.spec.in +118 -0
  21. data/ext/alphatau/native/sdl/SDL2Config.cmake +1 -0
  22. data/ext/alphatau/native/sdl/TODO.txt +10 -0
  23. data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2-WinRT.nuspec +23 -0
  24. data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2-WinRT.targets +38 -0
  25. data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2main-WinRT-NonXAML.nuspec +22 -0
  26. data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2main-WinRT-NonXAML.targets +10 -0
  27. data/ext/alphatau/native/sdl/VisualC-WinRT/UWP_VS2015/SDL-UWP.sln +34 -0
  28. data/ext/alphatau/native/sdl/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj +575 -0
  29. data/ext/alphatau/native/sdl/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj.filters +774 -0
  30. data/ext/alphatau/native/sdl/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.sln +28 -0
  31. data/ext/alphatau/native/sdl/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj +466 -0
  32. data/ext/alphatau/native/sdl/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj.filters +735 -0
  33. data/ext/alphatau/native/sdl/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.sln +34 -0
  34. data/ext/alphatau/native/sdl/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj +571 -0
  35. data/ext/alphatau/native/sdl/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj.filters +771 -0
  36. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/Logo.png +0 -0
  37. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/SmallLogo.png +0 -0
  38. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/SplashScreen.png +0 -0
  39. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/StoreLogo.png +0 -0
  40. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Package.appxmanifest +42 -0
  41. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/loopwave_VS2012.vcxproj +170 -0
  42. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/loopwave_VS2012_TemporaryKey.pfx +0 -0
  43. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/Logo.png +0 -0
  44. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/SmallLogo.png +0 -0
  45. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/SplashScreen.png +0 -0
  46. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/StoreLogo.png +0 -0
  47. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Package.appxmanifest +42 -0
  48. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/testthread_VS2012.vcxproj +160 -0
  49. data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/testthread_VS2012_TemporaryKey.pfx +0 -0
  50. data/ext/alphatau/native/sdl/VisualC.html +146 -0
  51. data/ext/alphatau/native/sdl/VisualC/SDL.sln +291 -0
  52. data/ext/alphatau/native/sdl/VisualC/SDL/SDL.vcxproj +559 -0
  53. data/ext/alphatau/native/sdl/VisualC/SDL/SDL.vcxproj.filters +479 -0
  54. data/ext/alphatau/native/sdl/VisualC/SDLmain/SDLmain.vcxproj +162 -0
  55. data/ext/alphatau/native/sdl/VisualC/SDLtest/SDLtest.vcxproj +177 -0
  56. data/ext/alphatau/native/sdl/VisualC/clean.sh +4 -0
  57. data/ext/alphatau/native/sdl/VisualC/tests/checkkeys/checkkeys.vcxproj +218 -0
  58. data/ext/alphatau/native/sdl/VisualC/tests/controllermap/controllermap.vcxproj +259 -0
  59. data/ext/alphatau/native/sdl/VisualC/tests/loopwave/loopwave.vcxproj +229 -0
  60. data/ext/alphatau/native/sdl/VisualC/tests/testatomic/testatomic.vcxproj +203 -0
  61. data/ext/alphatau/native/sdl/VisualC/tests/testautomation/testautomation.vcxproj +230 -0
  62. data/ext/alphatau/native/sdl/VisualC/tests/testdraw2/testdraw2.vcxproj +209 -0
  63. data/ext/alphatau/native/sdl/VisualC/tests/testfile/testfile.vcxproj +203 -0
  64. data/ext/alphatau/native/sdl/VisualC/tests/testgamecontroller/testgamecontroller.vcxproj +259 -0
  65. data/ext/alphatau/native/sdl/VisualC/tests/testgesture/testgesture.vcxproj +203 -0
  66. data/ext/alphatau/native/sdl/VisualC/tests/testgl2/testgl2.vcxproj +213 -0
  67. data/ext/alphatau/native/sdl/VisualC/tests/testgles2/testgles2.vcxproj +209 -0
  68. data/ext/alphatau/native/sdl/VisualC/tests/testjoystick/testjoystick.vcxproj +203 -0
  69. data/ext/alphatau/native/sdl/VisualC/tests/testoverlay2/testoverlay2.vcxproj +224 -0
  70. data/ext/alphatau/native/sdl/VisualC/tests/testplatform/testplatform.vcxproj +231 -0
  71. data/ext/alphatau/native/sdl/VisualC/tests/testpower/testpower.vcxproj +203 -0
  72. data/ext/alphatau/native/sdl/VisualC/tests/testrendertarget/testrendertarget.vcxproj +247 -0
  73. data/ext/alphatau/native/sdl/VisualC/tests/testrumble/testrumble.vcxproj +203 -0
  74. data/ext/alphatau/native/sdl/VisualC/tests/testscale/testscale.vcxproj +247 -0
  75. data/ext/alphatau/native/sdl/VisualC/tests/testshape/testshape.vcxproj +203 -0
  76. data/ext/alphatau/native/sdl/VisualC/tests/testsprite2/testsprite2.vcxproj +229 -0
  77. data/ext/alphatau/native/sdl/VisualC/tests/testvulkan/testvulkan.vcxproj +203 -0
  78. data/ext/alphatau/native/sdl/VisualC/tests/testyuv/testyuv.vcxproj +233 -0
  79. data/ext/alphatau/native/sdl/VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj +216 -0
  80. data/ext/alphatau/native/sdl/VisualC/visualtest/visualtest_VS2012.vcxproj +304 -0
  81. data/ext/alphatau/native/sdl/WhatsNew.txt +401 -0
  82. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Default.png +0 -0
  83. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj +1299 -0
  84. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Icon.png +0 -0
  85. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Info.plist +32 -0
  86. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/README +43 -0
  87. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp +0 -0
  88. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/bitmapfont/license.txt +258 -0
  89. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_brush_snare.wav +0 -0
  90. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_china.wav +0 -0
  91. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav +0 -0
  92. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav +0 -0
  93. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/icon.bmp +0 -0
  94. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/ship.bmp +0 -0
  95. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/space.bmp +0 -0
  96. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/stroke.bmp +0 -0
  97. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/iOS Launch Screen.storyboard +40 -0
  98. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/accelerometer.c +226 -0
  99. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/common.c +56 -0
  100. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/common.h +10 -0
  101. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/fireworks.c +474 -0
  102. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/happy.c +180 -0
  103. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/keyboard.c +301 -0
  104. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/mixer.c +344 -0
  105. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/rectangles.c +92 -0
  106. data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/touch.c +129 -0
  107. data/ext/alphatau/native/sdl/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj +2047 -0
  108. data/ext/alphatau/native/sdl/Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj +422 -0
  109. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Default-568h@2x.png +0 -0
  110. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Default.png +0 -0
  111. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Icon.png +0 -0
  112. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Info.plist +28 -0
  113. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns +0 -0
  114. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +10 -0
  115. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj +308 -0
  116. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  117. data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/main.c +100 -0
  118. data/ext/alphatau/native/sdl/Xcode-iOS/Test/Info.plist +26 -0
  119. data/ext/alphatau/native/sdl/Xcode-iOS/Test/README +11 -0
  120. data/ext/alphatau/native/sdl/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj +3095 -0
  121. data/ext/alphatau/native/sdl/Xcode/SDL/Info-Framework.plist +28 -0
  122. data/ext/alphatau/native/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj +3384 -0
  123. data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/SDL.info +15 -0
  124. data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/resources/License.txt +19 -0
  125. data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/resources/ReadMe.txt +32 -0
  126. data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/resources/SDL_DS_Store +0 -0
  127. data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/sdl_logo.pdf +0 -0
  128. data/ext/alphatau/native/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj +4995 -0
  129. data/ext/alphatau/native/sdl/Xcode/SDLTest/TestDropFile-Info.plist +35 -0
  130. data/ext/alphatau/native/sdl/Xcode/XcodeDocSet/Doxyfile +1558 -0
  131. data/ext/alphatau/native/sdl/acinclude/ac_check_define.m4 +14 -0
  132. data/ext/alphatau/native/sdl/acinclude/alsa.m4 +145 -0
  133. data/ext/alphatau/native/sdl/acinclude/ax_check_compiler_flags.m4 +76 -0
  134. data/ext/alphatau/native/sdl/acinclude/ax_gcc_archflag.m4 +215 -0
  135. data/ext/alphatau/native/sdl/acinclude/ax_gcc_x86_cpuid.m4.htm +79 -0
  136. data/ext/alphatau/native/sdl/acinclude/esd.m4 +168 -0
  137. data/ext/alphatau/native/sdl/acinclude/libtool.m4 +7998 -0
  138. data/ext/alphatau/native/sdl/acinclude/ltoptions.m4 +384 -0
  139. data/ext/alphatau/native/sdl/acinclude/ltsugar.m4 +123 -0
  140. data/ext/alphatau/native/sdl/acinclude/ltversion.m4 +23 -0
  141. data/ext/alphatau/native/sdl/acinclude/lt~obsolete.m4 +98 -0
  142. data/ext/alphatau/native/sdl/android-project-ant/AndroidManifest.xml +1 -0
  143. data/ext/alphatau/native/sdl/android-project-ant/ant.properties +17 -0
  144. data/ext/alphatau/native/sdl/android-project-ant/build.properties +17 -0
  145. data/ext/alphatau/native/sdl/android-project-ant/build.xml +93 -0
  146. data/ext/alphatau/native/sdl/android-project-ant/default.properties +11 -0
  147. data/ext/alphatau/native/sdl/android-project-ant/jni/Android.mk +1 -0
  148. data/ext/alphatau/native/sdl/android-project-ant/jni/Application.mk +10 -0
  149. data/ext/alphatau/native/sdl/android-project-ant/jni/src/Android.mk +18 -0
  150. data/ext/alphatau/native/sdl/android-project-ant/jni/src/Android_static.mk +12 -0
  151. data/ext/alphatau/native/sdl/android-project-ant/proguard-project.txt +20 -0
  152. data/ext/alphatau/native/sdl/android-project-ant/project.properties +14 -0
  153. data/ext/alphatau/native/sdl/android-project-ant/res/drawable-hdpi/ic_launcher.png +0 -0
  154. data/ext/alphatau/native/sdl/android-project-ant/res/drawable-mdpi/ic_launcher.png +0 -0
  155. data/ext/alphatau/native/sdl/android-project-ant/res/drawable-xhdpi/ic_launcher.png +0 -0
  156. data/ext/alphatau/native/sdl/android-project-ant/res/drawable-xxhdpi/ic_launcher.png +0 -0
  157. data/ext/alphatau/native/sdl/android-project-ant/res/layout/main.xml +13 -0
  158. data/ext/alphatau/native/sdl/android-project-ant/res/values/strings.xml +4 -0
  159. data/ext/alphatau/native/sdl/android-project-ant/src +1 -0
  160. data/ext/alphatau/native/sdl/android-project/app/build.gradle +69 -0
  161. data/ext/alphatau/native/sdl/android-project/app/jni/Android.mk +1 -0
  162. data/ext/alphatau/native/sdl/android-project/app/jni/Application.mk +9 -0
  163. data/ext/alphatau/native/sdl/android-project/app/jni/src/Android.mk +18 -0
  164. data/ext/alphatau/native/sdl/android-project/app/proguard-rules.pro +17 -0
  165. data/ext/alphatau/native/sdl/android-project/app/src/main/AndroidManifest.xml +77 -0
  166. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java +19 -0
  167. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java +640 -0
  168. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java +624 -0
  169. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java +298 -0
  170. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDL.java +37 -0
  171. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +2103 -0
  172. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java +178 -0
  173. data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java +812 -0
  174. data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  175. data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  176. data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  177. data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  178. data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  179. data/ext/alphatau/native/sdl/android-project/app/src/main/res/values/colors.xml +6 -0
  180. data/ext/alphatau/native/sdl/android-project/app/src/main/res/values/strings.xml +3 -0
  181. data/ext/alphatau/native/sdl/android-project/app/src/main/res/values/styles.xml +8 -0
  182. data/ext/alphatau/native/sdl/android-project/build.gradle +23 -0
  183. data/ext/alphatau/native/sdl/android-project/gradle.properties +17 -0
  184. data/ext/alphatau/native/sdl/android-project/gradle/wrapper/gradle-wrapper.jar +0 -0
  185. data/ext/alphatau/native/sdl/android-project/gradle/wrapper/gradle-wrapper.properties +6 -0
  186. data/ext/alphatau/native/sdl/android-project/gradlew +160 -0
  187. data/ext/alphatau/native/sdl/android-project/gradlew.bat +90 -0
  188. data/ext/alphatau/native/sdl/android-project/settings.gradle +1 -0
  189. data/ext/alphatau/native/sdl/autogen.sh +23 -0
  190. data/ext/alphatau/native/sdl/build-scripts/androidbuild.sh +100 -0
  191. data/ext/alphatau/native/sdl/build-scripts/androidbuildlibs.sh +74 -0
  192. data/ext/alphatau/native/sdl/build-scripts/checker-buildbot.sh +103 -0
  193. data/ext/alphatau/native/sdl/build-scripts/config.guess +1476 -0
  194. data/ext/alphatau/native/sdl/build-scripts/config.sub +1868 -0
  195. data/ext/alphatau/native/sdl/build-scripts/config.sub.patch +72 -0
  196. data/ext/alphatau/native/sdl/build-scripts/emscripten-buildbot.sh +77 -0
  197. data/ext/alphatau/native/sdl/build-scripts/g++-fat.sh +101 -0
  198. data/ext/alphatau/native/sdl/build-scripts/gcc-fat.sh +102 -0
  199. data/ext/alphatau/native/sdl/build-scripts/install-sh +323 -0
  200. data/ext/alphatau/native/sdl/build-scripts/iosbuild.sh +188 -0
  201. data/ext/alphatau/native/sdl/build-scripts/ltmain.sh +9658 -0
  202. data/ext/alphatau/native/sdl/build-scripts/mkinstalldirs +99 -0
  203. data/ext/alphatau/native/sdl/build-scripts/nacl-buildbot.sh +61 -0
  204. data/ext/alphatau/native/sdl/build-scripts/naclbuild.sh +105 -0
  205. data/ext/alphatau/native/sdl/build-scripts/raspberrypi-buildbot.sh +60 -0
  206. data/ext/alphatau/native/sdl/build-scripts/showrev.sh +5 -0
  207. data/ext/alphatau/native/sdl/build-scripts/strip_fPIC.sh +21 -0
  208. data/ext/alphatau/native/sdl/build-scripts/update-copyright.sh +8 -0
  209. data/ext/alphatau/native/sdl/build-scripts/updaterev.sh +20 -0
  210. data/ext/alphatau/native/sdl/build-scripts/windows-buildbot-zipper.bat +40 -0
  211. data/ext/alphatau/native/sdl/build-scripts/winrtbuild.bat +8 -0
  212. data/ext/alphatau/native/sdl/build-scripts/winrtbuild.ps1 +302 -0
  213. data/ext/alphatau/native/sdl/cmake/macros.cmake +73 -0
  214. data/ext/alphatau/native/sdl/cmake/sdlchecks.cmake +1184 -0
  215. data/ext/alphatau/native/sdl/cmake_uninstall.cmake.in +18 -0
  216. data/ext/alphatau/native/sdl/configure +27540 -0
  217. data/ext/alphatau/native/sdl/configure.in +4236 -0
  218. data/ext/alphatau/native/sdl/debian/changelog +114 -0
  219. data/ext/alphatau/native/sdl/debian/compat +1 -0
  220. data/ext/alphatau/native/sdl/debian/control +76 -0
  221. data/ext/alphatau/native/sdl/debian/copyright +351 -0
  222. data/ext/alphatau/native/sdl/debian/docs +4 -0
  223. data/ext/alphatau/native/sdl/debian/libsdl2-dev.install +8 -0
  224. data/ext/alphatau/native/sdl/debian/libsdl2-dev.manpages +1 -0
  225. data/ext/alphatau/native/sdl/debian/libsdl2.install +1 -0
  226. data/ext/alphatau/native/sdl/debian/rules +41 -0
  227. data/ext/alphatau/native/sdl/debian/sdl2-config.1 +86 -0
  228. data/ext/alphatau/native/sdl/debian/source/format +1 -0
  229. data/ext/alphatau/native/sdl/debian/watch +2 -0
  230. data/ext/alphatau/native/sdl/docs/README-android.md +432 -0
  231. data/ext/alphatau/native/sdl/docs/README-cmake.md +32 -0
  232. data/ext/alphatau/native/sdl/docs/README-directfb.md +107 -0
  233. data/ext/alphatau/native/sdl/docs/README-dynapi.md +130 -0
  234. data/ext/alphatau/native/sdl/docs/README-emscripten.md +35 -0
  235. data/ext/alphatau/native/sdl/docs/README-gesture.md +71 -0
  236. data/ext/alphatau/native/sdl/docs/README-hg.md +22 -0
  237. data/ext/alphatau/native/sdl/docs/README-ios.md +284 -0
  238. data/ext/alphatau/native/sdl/docs/README-linux.md +90 -0
  239. data/ext/alphatau/native/sdl/docs/README-macosx.md +240 -0
  240. data/ext/alphatau/native/sdl/docs/README-nacl.md +103 -0
  241. data/ext/alphatau/native/sdl/docs/README-pandora.md +17 -0
  242. data/ext/alphatau/native/sdl/docs/README-platforms.md +8 -0
  243. data/ext/alphatau/native/sdl/docs/README-porting.md +68 -0
  244. data/ext/alphatau/native/sdl/docs/README-psp.md +19 -0
  245. data/ext/alphatau/native/sdl/docs/README-raspberrypi.md +188 -0
  246. data/ext/alphatau/native/sdl/docs/README-touch.md +86 -0
  247. data/ext/alphatau/native/sdl/docs/README-wince.md +10 -0
  248. data/ext/alphatau/native/sdl/docs/README-windows.md +45 -0
  249. data/ext/alphatau/native/sdl/docs/README-winrt.md +544 -0
  250. data/ext/alphatau/native/sdl/docs/README.md +63 -0
  251. data/ext/alphatau/native/sdl/docs/doxyfile +1560 -0
  252. data/ext/alphatau/native/sdl/include/SDL.h +135 -0
  253. data/ext/alphatau/native/sdl/include/SDL_assert.h +291 -0
  254. data/ext/alphatau/native/sdl/include/SDL_atomic.h +277 -0
  255. data/ext/alphatau/native/sdl/include/SDL_audio.h +825 -0
  256. data/ext/alphatau/native/sdl/include/SDL_bits.h +112 -0
  257. data/ext/alphatau/native/sdl/include/SDL_blendmode.h +120 -0
  258. data/ext/alphatau/native/sdl/include/SDL_clipboard.h +71 -0
  259. data/ext/alphatau/native/sdl/include/SDL_config.h +53 -0
  260. data/ext/alphatau/native/sdl/include/SDL_config.h.cmake +471 -0
  261. data/ext/alphatau/native/sdl/include/SDL_config.h.in +417 -0
  262. data/ext/alphatau/native/sdl/include/SDL_config_android.h +177 -0
  263. data/ext/alphatau/native/sdl/include/SDL_config_iphoneos.h +201 -0
  264. data/ext/alphatau/native/sdl/include/SDL_config_macosx.h +240 -0
  265. data/ext/alphatau/native/sdl/include/SDL_config_minimal.h +85 -0
  266. data/ext/alphatau/native/sdl/include/SDL_config_pandora.h +133 -0
  267. data/ext/alphatau/native/sdl/include/SDL_config_psp.h +164 -0
  268. data/ext/alphatau/native/sdl/include/SDL_config_windows.h +254 -0
  269. data/ext/alphatau/native/sdl/include/SDL_config_winrt.h +235 -0
  270. data/ext/alphatau/native/sdl/include/SDL_config_wiz.h +146 -0
  271. data/ext/alphatau/native/sdl/include/SDL_copying.h +20 -0
  272. data/ext/alphatau/native/sdl/include/SDL_cpuinfo.h +188 -0
  273. data/ext/alphatau/native/sdl/include/SDL_egl.h +1673 -0
  274. data/ext/alphatau/native/sdl/include/SDL_endian.h +260 -0
  275. data/ext/alphatau/native/sdl/include/SDL_error.h +76 -0
  276. data/ext/alphatau/native/sdl/include/SDL_events.h +788 -0
  277. data/ext/alphatau/native/sdl/include/SDL_filesystem.h +136 -0
  278. data/ext/alphatau/native/sdl/include/SDL_gamecontroller.h +383 -0
  279. data/ext/alphatau/native/sdl/include/SDL_gesture.h +87 -0
  280. data/ext/alphatau/native/sdl/include/SDL_haptic.h +1227 -0
  281. data/ext/alphatau/native/sdl/include/SDL_hints.h +1106 -0
  282. data/ext/alphatau/native/sdl/include/SDL_joystick.h +395 -0
  283. data/ext/alphatau/native/sdl/include/SDL_keyboard.h +217 -0
  284. data/ext/alphatau/native/sdl/include/SDL_keycode.h +349 -0
  285. data/ext/alphatau/native/sdl/include/SDL_loadso.h +81 -0
  286. data/ext/alphatau/native/sdl/include/SDL_log.h +211 -0
  287. data/ext/alphatau/native/sdl/include/SDL_main.h +168 -0
  288. data/ext/alphatau/native/sdl/include/SDL_messagebox.h +144 -0
  289. data/ext/alphatau/native/sdl/include/SDL_mouse.h +302 -0
  290. data/ext/alphatau/native/sdl/include/SDL_mutex.h +251 -0
  291. data/ext/alphatau/native/sdl/include/SDL_name.h +33 -0
  292. data/ext/alphatau/native/sdl/include/SDL_opengl.h +2183 -0
  293. data/ext/alphatau/native/sdl/include/SDL_opengl_glext.h +11177 -0
  294. data/ext/alphatau/native/sdl/include/SDL_opengles.h +39 -0
  295. data/ext/alphatau/native/sdl/include/SDL_opengles2.h +52 -0
  296. data/ext/alphatau/native/sdl/include/SDL_opengles2_gl2.h +621 -0
  297. data/ext/alphatau/native/sdl/include/SDL_opengles2_gl2ext.h +2050 -0
  298. data/ext/alphatau/native/sdl/include/SDL_opengles2_gl2platform.h +30 -0
  299. data/ext/alphatau/native/sdl/include/SDL_opengles2_khrplatform.h +282 -0
  300. data/ext/alphatau/native/sdl/include/SDL_pixels.h +470 -0
  301. data/ext/alphatau/native/sdl/include/SDL_platform.h +198 -0
  302. data/ext/alphatau/native/sdl/include/SDL_power.h +75 -0
  303. data/ext/alphatau/native/sdl/include/SDL_quit.h +58 -0
  304. data/ext/alphatau/native/sdl/include/SDL_rect.h +148 -0
  305. data/ext/alphatau/native/sdl/include/SDL_render.h +931 -0
  306. data/ext/alphatau/native/sdl/include/SDL_revision.h +2 -0
  307. data/ext/alphatau/native/sdl/include/SDL_rwops.h +254 -0
  308. data/ext/alphatau/native/sdl/include/SDL_scancode.h +413 -0
  309. data/ext/alphatau/native/sdl/include/SDL_sensor.h +251 -0
  310. data/ext/alphatau/native/sdl/include/SDL_shape.h +144 -0
  311. data/ext/alphatau/native/sdl/include/SDL_stdinc.h +607 -0
  312. data/ext/alphatau/native/sdl/include/SDL_surface.h +546 -0
  313. data/ext/alphatau/native/sdl/include/SDL_system.h +279 -0
  314. data/ext/alphatau/native/sdl/include/SDL_syswm.h +324 -0
  315. data/ext/alphatau/native/sdl/include/SDL_test.h +69 -0
  316. data/ext/alphatau/native/sdl/include/SDL_test_assert.h +105 -0
  317. data/ext/alphatau/native/sdl/include/SDL_test_common.h +188 -0
  318. data/ext/alphatau/native/sdl/include/SDL_test_compare.h +69 -0
  319. data/ext/alphatau/native/sdl/include/SDL_test_crc32.h +124 -0
  320. data/ext/alphatau/native/sdl/include/SDL_test_font.h +81 -0
  321. data/ext/alphatau/native/sdl/include/SDL_test_fuzzer.h +384 -0
  322. data/ext/alphatau/native/sdl/include/SDL_test_harness.h +134 -0
  323. data/ext/alphatau/native/sdl/include/SDL_test_images.h +78 -0
  324. data/ext/alphatau/native/sdl/include/SDL_test_log.h +67 -0
  325. data/ext/alphatau/native/sdl/include/SDL_test_md5.h +129 -0
  326. data/ext/alphatau/native/sdl/include/SDL_test_memory.h +63 -0
  327. data/ext/alphatau/native/sdl/include/SDL_test_random.h +115 -0
  328. data/ext/alphatau/native/sdl/include/SDL_thread.h +309 -0
  329. data/ext/alphatau/native/sdl/include/SDL_timer.h +115 -0
  330. data/ext/alphatau/native/sdl/include/SDL_touch.h +86 -0
  331. data/ext/alphatau/native/sdl/include/SDL_types.h +29 -0
  332. data/ext/alphatau/native/sdl/include/SDL_version.h +162 -0
  333. data/ext/alphatau/native/sdl/include/SDL_video.h +1276 -0
  334. data/ext/alphatau/native/sdl/include/SDL_vulkan.h +278 -0
  335. data/ext/alphatau/native/sdl/include/begin_code.h +167 -0
  336. data/ext/alphatau/native/sdl/include/close_code.h +37 -0
  337. data/ext/alphatau/native/sdl/sdl2-config.cmake.in +11 -0
  338. data/ext/alphatau/native/sdl/sdl2-config.in +60 -0
  339. data/ext/alphatau/native/sdl/sdl2.m4 +234 -0
  340. data/ext/alphatau/native/sdl/sdl2.pc.in +15 -0
  341. data/ext/alphatau/native/sdl/src/SDL.c +514 -0
  342. data/ext/alphatau/native/sdl/src/SDL_assert.c +451 -0
  343. data/ext/alphatau/native/sdl/src/SDL_assert_c.h +24 -0
  344. data/ext/alphatau/native/sdl/src/SDL_dataqueue.c +339 -0
  345. data/ext/alphatau/native/sdl/src/SDL_dataqueue.h +55 -0
  346. data/ext/alphatau/native/sdl/src/SDL_error.c +319 -0
  347. data/ext/alphatau/native/sdl/src/SDL_error_c.h +65 -0
  348. data/ext/alphatau/native/sdl/src/SDL_hints.c +236 -0
  349. data/ext/alphatau/native/sdl/src/SDL_internal.h +52 -0
  350. data/ext/alphatau/native/sdl/src/SDL_log.c +450 -0
  351. data/ext/alphatau/native/sdl/src/atomic/SDL_atomic.c +303 -0
  352. data/ext/alphatau/native/sdl/src/atomic/SDL_spinlock.c +176 -0
  353. data/ext/alphatau/native/sdl/src/audio/SDL_audio.c +1647 -0
  354. data/ext/alphatau/native/sdl/src/audio/SDL_audio_c.h +79 -0
  355. data/ext/alphatau/native/sdl/src/audio/SDL_audiocvt.c +1673 -0
  356. data/ext/alphatau/native/sdl/src/audio/SDL_audiodev.c +124 -0
  357. data/ext/alphatau/native/sdl/src/audio/SDL_audiodev_c.h +38 -0
  358. data/ext/alphatau/native/sdl/src/audio/SDL_audiotypecvt.c +1430 -0
  359. data/ext/alphatau/native/sdl/src/audio/SDL_mixer.c +369 -0
  360. data/ext/alphatau/native/sdl/src/audio/SDL_sysaudio.h +211 -0
  361. data/ext/alphatau/native/sdl/src/audio/SDL_wave.c +694 -0
  362. data/ext/alphatau/native/sdl/src/audio/SDL_wave.h +77 -0
  363. data/ext/alphatau/native/sdl/src/audio/alsa/SDL_alsa_audio.c +990 -0
  364. data/ext/alphatau/native/sdl/src/audio/alsa/SDL_alsa_audio.h +48 -0
  365. data/ext/alphatau/native/sdl/src/audio/android/SDL_androidaudio.c +226 -0
  366. data/ext/alphatau/native/sdl/src/audio/android/SDL_androidaudio.h +42 -0
  367. data/ext/alphatau/native/sdl/src/audio/arts/SDL_artsaudio.c +365 -0
  368. data/ext/alphatau/native/sdl/src/audio/arts/SDL_artsaudio.h +53 -0
  369. data/ext/alphatau/native/sdl/src/audio/coreaudio/SDL_coreaudio.h +66 -0
  370. data/ext/alphatau/native/sdl/src/audio/coreaudio/SDL_coreaudio.m +861 -0
  371. data/ext/alphatau/native/sdl/src/audio/directsound/SDL_directsound.c +604 -0
  372. data/ext/alphatau/native/sdl/src/audio/directsound/SDL_directsound.h +47 -0
  373. data/ext/alphatau/native/sdl/src/audio/disk/SDL_diskaudio.c +207 -0
  374. data/ext/alphatau/native/sdl/src/audio/disk/SDL_diskaudio.h +41 -0
  375. data/ext/alphatau/native/sdl/src/audio/dsp/SDL_dspaudio.c +320 -0
  376. data/ext/alphatau/native/sdl/src/audio/dsp/SDL_dspaudio.h +43 -0
  377. data/ext/alphatau/native/sdl/src/audio/dummy/SDL_dummyaudio.c +65 -0
  378. data/ext/alphatau/native/sdl/src/audio/dummy/SDL_dummyaudio.h +41 -0
  379. data/ext/alphatau/native/sdl/src/audio/emscripten/SDL_emscriptenaudio.c +379 -0
  380. data/ext/alphatau/native/sdl/src/audio/emscripten/SDL_emscriptenaudio.h +38 -0
  381. data/ext/alphatau/native/sdl/src/audio/esd/SDL_esdaudio.c +335 -0
  382. data/ext/alphatau/native/sdl/src/audio/esd/SDL_esdaudio.h +51 -0
  383. data/ext/alphatau/native/sdl/src/audio/fusionsound/SDL_fsaudio.c +328 -0
  384. data/ext/alphatau/native/sdl/src/audio/fusionsound/SDL_fsaudio.h +50 -0
  385. data/ext/alphatau/native/sdl/src/audio/haiku/SDL_haikuaudio.cc +248 -0
  386. data/ext/alphatau/native/sdl/src/audio/haiku/SDL_haikuaudio.h +38 -0
  387. data/ext/alphatau/native/sdl/src/audio/jack/SDL_jackaudio.c +446 -0
  388. data/ext/alphatau/native/sdl/src/audio/jack/SDL_jackaudio.h +41 -0
  389. data/ext/alphatau/native/sdl/src/audio/nacl/SDL_naclaudio.c +165 -0
  390. data/ext/alphatau/native/sdl/src/audio/nacl/SDL_naclaudio.h +43 -0
  391. data/ext/alphatau/native/sdl/src/audio/nas/SDL_nasaudio.c +463 -0
  392. data/ext/alphatau/native/sdl/src/audio/nas/SDL_nasaudio.h +56 -0
  393. data/ext/alphatau/native/sdl/src/audio/netbsd/SDL_netbsdaudio.c +412 -0
  394. data/ext/alphatau/native/sdl/src/audio/netbsd/SDL_netbsdaudio.h +48 -0
  395. data/ext/alphatau/native/sdl/src/audio/paudio/SDL_paudio.c +516 -0
  396. data/ext/alphatau/native/sdl/src/audio/paudio/SDL_paudio.h +48 -0
  397. data/ext/alphatau/native/sdl/src/audio/psp/SDL_pspaudio.c +181 -0
  398. data/ext/alphatau/native/sdl/src/audio/psp/SDL_pspaudio.h +45 -0
  399. data/ext/alphatau/native/sdl/src/audio/pulseaudio/SDL_pulseaudio.c +782 -0
  400. data/ext/alphatau/native/sdl/src/audio/pulseaudio/SDL_pulseaudio.h +52 -0
  401. data/ext/alphatau/native/sdl/src/audio/qsa/SDL_qsa_audio.c +666 -0
  402. data/ext/alphatau/native/sdl/src/audio/qsa/SDL_qsa_audio.h +57 -0
  403. data/ext/alphatau/native/sdl/src/audio/sndio/SDL_sndioaudio.c +382 -0
  404. data/ext/alphatau/native/sdl/src/audio/sndio/SDL_sndioaudio.h +49 -0
  405. data/ext/alphatau/native/sdl/src/audio/sun/SDL_sunaudio.c +419 -0
  406. data/ext/alphatau/native/sdl/src/audio/sun/SDL_sunaudio.h +47 -0
  407. data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi.c +779 -0
  408. data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi.h +85 -0
  409. data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi_win32.c +417 -0
  410. data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi_winrt.cpp +276 -0
  411. data/ext/alphatau/native/sdl/src/audio/winmm/SDL_winmm.c +457 -0
  412. data/ext/alphatau/native/sdl/src/audio/winmm/SDL_winmm.h +45 -0
  413. data/ext/alphatau/native/sdl/src/core/android/SDL_android.c +2285 -0
  414. data/ext/alphatau/native/sdl/src/core/android/SDL_android.h +122 -0
  415. data/ext/alphatau/native/sdl/src/core/android/keyinfotable.h +175 -0
  416. data/ext/alphatau/native/sdl/src/core/linux/SDL_dbus.c +347 -0
  417. data/ext/alphatau/native/sdl/src/core/linux/SDL_dbus.h +97 -0
  418. data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev.c +698 -0
  419. data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev.h +39 -0
  420. data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd.c +840 -0
  421. data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd.h +29 -0
  422. data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd_default_accents.h +284 -0
  423. data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd_default_keymap.h +4763 -0
  424. data/ext/alphatau/native/sdl/src/core/linux/SDL_fcitx.c +373 -0
  425. data/ext/alphatau/native/sdl/src/core/linux/SDL_fcitx.h +40 -0
  426. data/ext/alphatau/native/sdl/src/core/linux/SDL_ibus.c +584 -0
  427. data/ext/alphatau/native/sdl/src/core/linux/SDL_ibus.h +58 -0
  428. data/ext/alphatau/native/sdl/src/core/linux/SDL_ime.c +152 -0
  429. data/ext/alphatau/native/sdl/src/core/linux/SDL_ime.h +40 -0
  430. data/ext/alphatau/native/sdl/src/core/linux/SDL_udev.c +553 -0
  431. data/ext/alphatau/native/sdl/src/core/linux/SDL_udev.h +121 -0
  432. data/ext/alphatau/native/sdl/src/core/unix/SDL_poll.c +87 -0
  433. data/ext/alphatau/native/sdl/src/core/unix/SDL_poll.h +34 -0
  434. data/ext/alphatau/native/sdl/src/core/windows/SDL_directx.h +111 -0
  435. data/ext/alphatau/native/sdl/src/core/windows/SDL_windows.c +233 -0
  436. data/ext/alphatau/native/sdl/src/core/windows/SDL_windows.h +75 -0
  437. data/ext/alphatau/native/sdl/src/core/windows/SDL_xinput.c +139 -0
  438. data/ext/alphatau/native/sdl/src/core/windows/SDL_xinput.h +177 -0
  439. data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_common.cpp +66 -0
  440. data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_common.h +31 -0
  441. data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_direct3d.cpp +855 -0
  442. data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_direct3d.h +92 -0
  443. data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_xaml.cpp +160 -0
  444. data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_xaml.h +33 -0
  445. data/ext/alphatau/native/sdl/src/cpuinfo/SDL_cpuinfo.c +855 -0
  446. data/ext/alphatau/native/sdl/src/cpuinfo/SDL_simd.h +88 -0
  447. data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi.c +331 -0
  448. data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi.h +67 -0
  449. data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi_overrides.h +698 -0
  450. data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi_procs.h +740 -0
  451. data/ext/alphatau/native/sdl/src/dynapi/gendynapi.pl +141 -0
  452. data/ext/alphatau/native/sdl/src/events/SDL_clipboardevents.c +46 -0
  453. data/ext/alphatau/native/sdl/src/events/SDL_clipboardevents_c.h +30 -0
  454. data/ext/alphatau/native/sdl/src/events/SDL_displayevents.c +60 -0
  455. data/ext/alphatau/native/sdl/src/events/SDL_displayevents_c.h +30 -0
  456. data/ext/alphatau/native/sdl/src/events/SDL_dropevents.c +98 -0
  457. data/ext/alphatau/native/sdl/src/events/SDL_dropevents_c.h +32 -0
  458. data/ext/alphatau/native/sdl/src/events/SDL_events.c +976 -0
  459. data/ext/alphatau/native/sdl/src/events/SDL_events_c.h +52 -0
  460. data/ext/alphatau/native/sdl/src/events/SDL_gesture.c +700 -0
  461. data/ext/alphatau/native/sdl/src/events/SDL_gesture_c.h +35 -0
  462. data/ext/alphatau/native/sdl/src/events/SDL_keyboard.c +1033 -0
  463. data/ext/alphatau/native/sdl/src/events/SDL_keyboard_c.h +70 -0
  464. data/ext/alphatau/native/sdl/src/events/SDL_mouse.c +1031 -0
  465. data/ext/alphatau/native/sdl/src/events/SDL_mouse_c.h +141 -0
  466. data/ext/alphatau/native/sdl/src/events/SDL_quit.c +152 -0
  467. data/ext/alphatau/native/sdl/src/events/SDL_sysevents.h +36 -0
  468. data/ext/alphatau/native/sdl/src/events/SDL_touch.c +375 -0
  469. data/ext/alphatau/native/sdl/src/events/SDL_touch_c.h +61 -0
  470. data/ext/alphatau/native/sdl/src/events/SDL_windowevents.c +227 -0
  471. data/ext/alphatau/native/sdl/src/events/SDL_windowevents_c.h +31 -0
  472. data/ext/alphatau/native/sdl/src/events/blank_cursor.h +33 -0
  473. data/ext/alphatau/native/sdl/src/events/default_cursor.h +114 -0
  474. data/ext/alphatau/native/sdl/src/events/scancodes_darwin.h +159 -0
  475. data/ext/alphatau/native/sdl/src/events/scancodes_linux.h +263 -0
  476. data/ext/alphatau/native/sdl/src/events/scancodes_windows.h +55 -0
  477. data/ext/alphatau/native/sdl/src/events/scancodes_xfree86.h +506 -0
  478. data/ext/alphatau/native/sdl/src/file/SDL_rwops.c +867 -0
  479. data/ext/alphatau/native/sdl/src/file/cocoa/SDL_rwopsbundlesupport.h +30 -0
  480. data/ext/alphatau/native/sdl/src/file/cocoa/SDL_rwopsbundlesupport.m +62 -0
  481. data/ext/alphatau/native/sdl/src/filesystem/android/SDL_sysfilesystem.c +62 -0
  482. data/ext/alphatau/native/sdl/src/filesystem/cocoa/SDL_sysfilesystem.m +117 -0
  483. data/ext/alphatau/native/sdl/src/filesystem/dummy/SDL_sysfilesystem.c +47 -0
  484. data/ext/alphatau/native/sdl/src/filesystem/emscripten/SDL_sysfilesystem.c +81 -0
  485. data/ext/alphatau/native/sdl/src/filesystem/haiku/SDL_sysfilesystem.cc +110 -0
  486. data/ext/alphatau/native/sdl/src/filesystem/nacl/SDL_sysfilesystem.c +43 -0
  487. data/ext/alphatau/native/sdl/src/filesystem/unix/SDL_sysfilesystem.c +250 -0
  488. data/ext/alphatau/native/sdl/src/filesystem/windows/SDL_sysfilesystem.c +192 -0
  489. data/ext/alphatau/native/sdl/src/filesystem/winrt/SDL_sysfilesystem.cpp +233 -0
  490. data/ext/alphatau/native/sdl/src/haptic/SDL_haptic.c +850 -0
  491. data/ext/alphatau/native/sdl/src/haptic/SDL_haptic_c.h +25 -0
  492. data/ext/alphatau/native/sdl/src/haptic/SDL_syshaptic.h +208 -0
  493. data/ext/alphatau/native/sdl/src/haptic/android/SDL_syshaptic.c +358 -0
  494. data/ext/alphatau/native/sdl/src/haptic/android/SDL_syshaptic_c.h +12 -0
  495. data/ext/alphatau/native/sdl/src/haptic/darwin/SDL_syshaptic.c +1417 -0
  496. data/ext/alphatau/native/sdl/src/haptic/darwin/SDL_syshaptic_c.h +26 -0
  497. data/ext/alphatau/native/sdl/src/haptic/dummy/SDL_syshaptic.c +186 -0
  498. data/ext/alphatau/native/sdl/src/haptic/linux/SDL_syshaptic.c +1165 -0
  499. data/ext/alphatau/native/sdl/src/haptic/windows/SDL_dinputhaptic.c +1305 -0
  500. data/ext/alphatau/native/sdl/src/haptic/windows/SDL_dinputhaptic_c.h +47 -0
  501. data/ext/alphatau/native/sdl/src/haptic/windows/SDL_windowshaptic.c +456 -0
  502. data/ext/alphatau/native/sdl/src/haptic/windows/SDL_windowshaptic_c.h +88 -0
  503. data/ext/alphatau/native/sdl/src/haptic/windows/SDL_xinputhaptic.c +487 -0
  504. data/ext/alphatau/native/sdl/src/haptic/windows/SDL_xinputhaptic_c.h +47 -0
  505. data/ext/alphatau/native/sdl/src/hidapi/AUTHORS.txt +16 -0
  506. data/ext/alphatau/native/sdl/src/hidapi/HACKING.txt +15 -0
  507. data/ext/alphatau/native/sdl/src/hidapi/LICENSE-bsd.txt +26 -0
  508. data/ext/alphatau/native/sdl/src/hidapi/LICENSE-gpl3.txt +674 -0
  509. data/ext/alphatau/native/sdl/src/hidapi/LICENSE-orig.txt +9 -0
  510. data/ext/alphatau/native/sdl/src/hidapi/LICENSE.txt +13 -0
  511. data/ext/alphatau/native/sdl/src/hidapi/Makefile.am +85 -0
  512. data/ext/alphatau/native/sdl/src/hidapi/README.txt +339 -0
  513. data/ext/alphatau/native/sdl/src/hidapi/android/hid.cpp +1079 -0
  514. data/ext/alphatau/native/sdl/src/hidapi/android/jni/Android.mk +16 -0
  515. data/ext/alphatau/native/sdl/src/hidapi/android/jni/Application.mk +2 -0
  516. data/ext/alphatau/native/sdl/src/hidapi/android/project.properties +14 -0
  517. data/ext/alphatau/native/sdl/src/hidapi/bootstrap +2 -0
  518. data/ext/alphatau/native/sdl/src/hidapi/configure.ac +236 -0
  519. data/ext/alphatau/native/sdl/src/hidapi/doxygen/Doxyfile +1630 -0
  520. data/ext/alphatau/native/sdl/src/hidapi/hidapi/hidapi.h +398 -0
  521. data/ext/alphatau/native/sdl/src/hidapi/hidtest/Makefile.am +20 -0
  522. data/ext/alphatau/native/sdl/src/hidapi/hidtest/hidtest.cpp +194 -0
  523. data/ext/alphatau/native/sdl/src/hidapi/ios/Makefile-manual +32 -0
  524. data/ext/alphatau/native/sdl/src/hidapi/ios/Makefile.am +9 -0
  525. data/ext/alphatau/native/sdl/src/hidapi/ios/hid.m +909 -0
  526. data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile-manual +18 -0
  527. data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile.am +27 -0
  528. data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile.freebsd +46 -0
  529. data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile.linux +49 -0
  530. data/ext/alphatau/native/sdl/src/hidapi/libusb/hid.c +1615 -0
  531. data/ext/alphatau/native/sdl/src/hidapi/libusb/hidusb.cpp +3 -0
  532. data/ext/alphatau/native/sdl/src/hidapi/linux/Makefile-manual +49 -0
  533. data/ext/alphatau/native/sdl/src/hidapi/linux/Makefile.am +10 -0
  534. data/ext/alphatau/native/sdl/src/hidapi/linux/README.txt +59 -0
  535. data/ext/alphatau/native/sdl/src/hidapi/linux/hid.c +893 -0
  536. data/ext/alphatau/native/sdl/src/hidapi/linux/hid.cpp +333 -0
  537. data/ext/alphatau/native/sdl/src/hidapi/linux/hidraw.cpp +3 -0
  538. data/ext/alphatau/native/sdl/src/hidapi/m4/ax_pthread.m4 +309 -0
  539. data/ext/alphatau/native/sdl/src/hidapi/m4/pkg.m4 +157 -0
  540. data/ext/alphatau/native/sdl/src/hidapi/mac/Makefile-manual +32 -0
  541. data/ext/alphatau/native/sdl/src/hidapi/mac/Makefile.am +9 -0
  542. data/ext/alphatau/native/sdl/src/hidapi/mac/hid.c +1186 -0
  543. data/ext/alphatau/native/sdl/src/hidapi/pc/hidapi-hidraw.pc.in +10 -0
  544. data/ext/alphatau/native/sdl/src/hidapi/pc/hidapi-libusb.pc.in +10 -0
  545. data/ext/alphatau/native/sdl/src/hidapi/pc/hidapi.pc.in +10 -0
  546. data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile-manual +26 -0
  547. data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.am +43 -0
  548. data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.freebsd +33 -0
  549. data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.linux +32 -0
  550. data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.mac +46 -0
  551. data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.mingw +32 -0
  552. data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/Info.plist +28 -0
  553. data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/PkgInfo +1 -0
  554. data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings +0 -0
  555. data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/Signal11.icns +0 -0
  556. data/ext/alphatau/native/sdl/src/hidapi/testgui/copy_to_bundle.sh +97 -0
  557. data/ext/alphatau/native/sdl/src/hidapi/testgui/mac_support.cpp +134 -0
  558. data/ext/alphatau/native/sdl/src/hidapi/testgui/mac_support.h +17 -0
  559. data/ext/alphatau/native/sdl/src/hidapi/testgui/mac_support_cocoa.m +94 -0
  560. data/ext/alphatau/native/sdl/src/hidapi/testgui/start.sh +2 -0
  561. data/ext/alphatau/native/sdl/src/hidapi/testgui/test.cpp +532 -0
  562. data/ext/alphatau/native/sdl/src/hidapi/testgui/testgui.sln +20 -0
  563. data/ext/alphatau/native/sdl/src/hidapi/testgui/testgui.vcproj +217 -0
  564. data/ext/alphatau/native/sdl/src/hidapi/udev/99-hid.rules +33 -0
  565. data/ext/alphatau/native/sdl/src/hidapi/windows/Makefile-manual +14 -0
  566. data/ext/alphatau/native/sdl/src/hidapi/windows/Makefile.am +16 -0
  567. data/ext/alphatau/native/sdl/src/hidapi/windows/Makefile.mingw +35 -0
  568. data/ext/alphatau/native/sdl/src/hidapi/windows/ddk_build/hidapi.def +17 -0
  569. data/ext/alphatau/native/sdl/src/hidapi/windows/ddk_build/makefile +49 -0
  570. data/ext/alphatau/native/sdl/src/hidapi/windows/ddk_build/sources +23 -0
  571. data/ext/alphatau/native/sdl/src/hidapi/windows/hid.c +983 -0
  572. data/ext/alphatau/native/sdl/src/hidapi/windows/hidapi.sln +29 -0
  573. data/ext/alphatau/native/sdl/src/hidapi/windows/hidapi.vcproj +201 -0
  574. data/ext/alphatau/native/sdl/src/hidapi/windows/hidtest.vcproj +196 -0
  575. data/ext/alphatau/native/sdl/src/joystick/SDL_gamecontroller.c +2066 -0
  576. data/ext/alphatau/native/sdl/src/joystick/SDL_gamecontrollerdb.h +583 -0
  577. data/ext/alphatau/native/sdl/src/joystick/SDL_joystick.c +1547 -0
  578. data/ext/alphatau/native/sdl/src/joystick/SDL_joystick_c.h +94 -0
  579. data/ext/alphatau/native/sdl/src/joystick/SDL_sysjoystick.h +153 -0
  580. data/ext/alphatau/native/sdl/src/joystick/android/SDL_sysjoystick.c +703 -0
  581. data/ext/alphatau/native/sdl/src/joystick/android/SDL_sysjoystick_c.h +59 -0
  582. data/ext/alphatau/native/sdl/src/joystick/bsd/SDL_sysjoystick.c +701 -0
  583. data/ext/alphatau/native/sdl/src/joystick/controller_type.h +457 -0
  584. data/ext/alphatau/native/sdl/src/joystick/darwin/SDL_sysjoystick.c +1012 -0
  585. data/ext/alphatau/native/sdl/src/joystick/darwin/SDL_sysjoystick_c.h +79 -0
  586. data/ext/alphatau/native/sdl/src/joystick/dummy/SDL_sysjoystick.c +113 -0
  587. data/ext/alphatau/native/sdl/src/joystick/emscripten/SDL_sysjoystick.c +406 -0
  588. data/ext/alphatau/native/sdl/src/joystick/emscripten/SDL_sysjoystick_c.h +52 -0
  589. data/ext/alphatau/native/sdl/src/joystick/haiku/SDL_haikujoystick.cc +272 -0
  590. data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_ps4.c +545 -0
  591. data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_switch.c +905 -0
  592. data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_xbox360.c +461 -0
  593. data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_xboxone.c +318 -0
  594. data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapijoystick.c +1021 -0
  595. data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapijoystick_c.h +72 -0
  596. data/ext/alphatau/native/sdl/src/joystick/iphoneos/SDL_sysjoystick.m +727 -0
  597. data/ext/alphatau/native/sdl/src/joystick/iphoneos/SDL_sysjoystick_c.h +57 -0
  598. data/ext/alphatau/native/sdl/src/joystick/linux/SDL_sysjoystick.c +1116 -0
  599. data/ext/alphatau/native/sdl/src/joystick/linux/SDL_sysjoystick_c.h +64 -0
  600. data/ext/alphatau/native/sdl/src/joystick/psp/SDL_sysjoystick.c +264 -0
  601. data/ext/alphatau/native/sdl/src/joystick/sort_controllers.py +78 -0
  602. data/ext/alphatau/native/sdl/src/joystick/steam/SDL_steamcontroller.c +52 -0
  603. data/ext/alphatau/native/sdl/src/joystick/steam/SDL_steamcontroller.h +33 -0
  604. data/ext/alphatau/native/sdl/src/joystick/windows/SDL_dinputjoystick.c +1155 -0
  605. data/ext/alphatau/native/sdl/src/joystick/windows/SDL_dinputjoystick_c.h +31 -0
  606. data/ext/alphatau/native/sdl/src/joystick/windows/SDL_mmjoystick.c +452 -0
  607. data/ext/alphatau/native/sdl/src/joystick/windows/SDL_windowsjoystick.c +558 -0
  608. data/ext/alphatau/native/sdl/src/joystick/windows/SDL_windowsjoystick_c.h +95 -0
  609. data/ext/alphatau/native/sdl/src/joystick/windows/SDL_xinputjoystick.c +558 -0
  610. data/ext/alphatau/native/sdl/src/joystick/windows/SDL_xinputjoystick_c.h +34 -0
  611. data/ext/alphatau/native/sdl/src/libm/e_atan2.c +134 -0
  612. data/ext/alphatau/native/sdl/src/libm/e_exp.c +187 -0
  613. data/ext/alphatau/native/sdl/src/libm/e_fmod.c +144 -0
  614. data/ext/alphatau/native/sdl/src/libm/e_log.c +152 -0
  615. data/ext/alphatau/native/sdl/src/libm/e_log10.c +106 -0
  616. data/ext/alphatau/native/sdl/src/libm/e_pow.c +343 -0
  617. data/ext/alphatau/native/sdl/src/libm/e_rem_pio2.c +161 -0
  618. data/ext/alphatau/native/sdl/src/libm/e_sqrt.c +457 -0
  619. data/ext/alphatau/native/sdl/src/libm/k_cos.c +82 -0
  620. data/ext/alphatau/native/sdl/src/libm/k_rem_pio2.c +317 -0
  621. data/ext/alphatau/native/sdl/src/libm/k_sin.c +65 -0
  622. data/ext/alphatau/native/sdl/src/libm/k_tan.c +118 -0
  623. data/ext/alphatau/native/sdl/src/libm/math_libm.h +41 -0
  624. data/ext/alphatau/native/sdl/src/libm/math_private.h +227 -0
  625. data/ext/alphatau/native/sdl/src/libm/s_atan.c +114 -0
  626. data/ext/alphatau/native/sdl/src/libm/s_copysign.c +29 -0
  627. data/ext/alphatau/native/sdl/src/libm/s_cos.c +73 -0
  628. data/ext/alphatau/native/sdl/src/libm/s_fabs.c +29 -0
  629. data/ext/alphatau/native/sdl/src/libm/s_floor.c +71 -0
  630. data/ext/alphatau/native/sdl/src/libm/s_scalbn.c +69 -0
  631. data/ext/alphatau/native/sdl/src/libm/s_sin.c +73 -0
  632. data/ext/alphatau/native/sdl/src/libm/s_tan.c +67 -0
  633. data/ext/alphatau/native/sdl/src/loadso/dlopen/SDL_sysloadso.c +88 -0
  634. data/ext/alphatau/native/sdl/src/loadso/dummy/SDL_sysloadso.c +54 -0
  635. data/ext/alphatau/native/sdl/src/loadso/windows/SDL_sysloadso.c +80 -0
  636. data/ext/alphatau/native/sdl/src/main/android/SDL_android_main.c +7 -0
  637. data/ext/alphatau/native/sdl/src/main/dummy/SDL_dummy_main.c +28 -0
  638. data/ext/alphatau/native/sdl/src/main/haiku/SDL_BApp.h +399 -0
  639. data/ext/alphatau/native/sdl/src/main/haiku/SDL_BeApp.cc +157 -0
  640. data/ext/alphatau/native/sdl/src/main/haiku/SDL_BeApp.h +38 -0
  641. data/ext/alphatau/native/sdl/src/main/nacl/SDL_nacl_main.c +93 -0
  642. data/ext/alphatau/native/sdl/src/main/psp/SDL_psp_main.c +70 -0
  643. data/ext/alphatau/native/sdl/src/main/windows/SDL_windows_main.c +207 -0
  644. data/ext/alphatau/native/sdl/src/main/windows/version.rc +38 -0
  645. data/ext/alphatau/native/sdl/src/main/winrt/SDL2-WinRTResource_BlankCursor.cur +0 -0
  646. data/ext/alphatau/native/sdl/src/main/winrt/SDL2-WinRTResources.rc +3 -0
  647. data/ext/alphatau/native/sdl/src/main/winrt/SDL_winrt_main_NonXAML.cpp +54 -0
  648. data/ext/alphatau/native/sdl/src/power/SDL_power.c +116 -0
  649. data/ext/alphatau/native/sdl/src/power/SDL_syspower.h +47 -0
  650. data/ext/alphatau/native/sdl/src/power/android/SDL_syspower.c +64 -0
  651. data/ext/alphatau/native/sdl/src/power/emscripten/SDL_syspower.c +62 -0
  652. data/ext/alphatau/native/sdl/src/power/haiku/SDL_syspower.c +128 -0
  653. data/ext/alphatau/native/sdl/src/power/linux/SDL_syspower.c +642 -0
  654. data/ext/alphatau/native/sdl/src/power/macosx/SDL_syspower.c +192 -0
  655. data/ext/alphatau/native/sdl/src/power/psp/SDL_syspower.c +68 -0
  656. data/ext/alphatau/native/sdl/src/power/uikit/SDL_syspower.h +32 -0
  657. data/ext/alphatau/native/sdl/src/power/uikit/SDL_syspower.m +113 -0
  658. data/ext/alphatau/native/sdl/src/power/windows/SDL_syspower.c +76 -0
  659. data/ext/alphatau/native/sdl/src/power/winrt/SDL_syspower.cpp +44 -0
  660. data/ext/alphatau/native/sdl/src/render/SDL_d3dmath.c +136 -0
  661. data/ext/alphatau/native/sdl/src/render/SDL_d3dmath.h +72 -0
  662. data/ext/alphatau/native/sdl/src/render/SDL_render.c +2292 -0
  663. data/ext/alphatau/native/sdl/src/render/SDL_sysrender.h +214 -0
  664. data/ext/alphatau/native/sdl/src/render/SDL_yuv_sw.c +414 -0
  665. data/ext/alphatau/native/sdl/src/render/SDL_yuv_sw_c.h +67 -0
  666. data/ext/alphatau/native/sdl/src/render/direct3d/SDL_render_d3d.c +1813 -0
  667. data/ext/alphatau/native/sdl/src/render/direct3d/SDL_shaders_d3d.c +274 -0
  668. data/ext/alphatau/native/sdl/src/render/direct3d/SDL_shaders_d3d.h +34 -0
  669. data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_render_d3d11.c +2559 -0
  670. data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_render_winrt.cpp +116 -0
  671. data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_render_winrt.h +40 -0
  672. data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_shaders_d3d11.c +1957 -0
  673. data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_shaders_d3d11.h +43 -0
  674. data/ext/alphatau/native/sdl/src/render/metal/SDL_render_metal.m +1428 -0
  675. data/ext/alphatau/native/sdl/src/render/metal/SDL_shaders_metal.metal +109 -0
  676. data/ext/alphatau/native/sdl/src/render/metal/SDL_shaders_metal_ios.h +1899 -0
  677. data/ext/alphatau/native/sdl/src/render/metal/SDL_shaders_metal_osx.h +1903 -0
  678. data/ext/alphatau/native/sdl/src/render/metal/build-metal-shaders.sh +18 -0
  679. data/ext/alphatau/native/sdl/src/render/opengl/SDL_glfuncs.h +478 -0
  680. data/ext/alphatau/native/sdl/src/render/opengl/SDL_render_gl.c +1678 -0
  681. data/ext/alphatau/native/sdl/src/render/opengl/SDL_shaders_gl.c +524 -0
  682. data/ext/alphatau/native/sdl/src/render/opengl/SDL_shaders_gl.h +47 -0
  683. data/ext/alphatau/native/sdl/src/render/opengles/SDL_glesfuncs.h +65 -0
  684. data/ext/alphatau/native/sdl/src/render/opengles/SDL_render_gles.c +1278 -0
  685. data/ext/alphatau/native/sdl/src/render/opengles2/SDL_gles2funcs.h +80 -0
  686. data/ext/alphatau/native/sdl/src/render/opengles2/SDL_render_gles2.c +2256 -0
  687. data/ext/alphatau/native/sdl/src/render/opengles2/SDL_shaders_gles2.c +569 -0
  688. data/ext/alphatau/native/sdl/src/render/opengles2/SDL_shaders_gles2.h +70 -0
  689. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/Makefile +41 -0
  690. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gl2_h_into_gles2_stubcall_overs_c.sno +181 -0
  691. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gl2_h_into_gles2_stubcall_overs_h.sno +116 -0
  692. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gl2_h_into_gles2funcs_h.sno +82 -0
  693. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gles2funcs_into_gles2_define_overs_h.sno +42 -0
  694. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/gl2.h +686 -0
  695. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/readme.txt +70 -0
  696. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/testgles2.c +725 -0
  697. data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/triangle.c +147 -0
  698. data/ext/alphatau/native/sdl/src/render/psp/SDL_render_psp.c +1016 -0
  699. data/ext/alphatau/native/sdl/src/render/software/SDL_blendfillrect.c +336 -0
  700. data/ext/alphatau/native/sdl/src/render/software/SDL_blendfillrect.h +27 -0
  701. data/ext/alphatau/native/sdl/src/render/software/SDL_blendline.c +777 -0
  702. data/ext/alphatau/native/sdl/src/render/software/SDL_blendline.h +27 -0
  703. data/ext/alphatau/native/sdl/src/render/software/SDL_blendpoint.c +341 -0
  704. data/ext/alphatau/native/sdl/src/render/software/SDL_blendpoint.h +27 -0
  705. data/ext/alphatau/native/sdl/src/render/software/SDL_draw.h +576 -0
  706. data/ext/alphatau/native/sdl/src/render/software/SDL_drawline.c +209 -0
  707. data/ext/alphatau/native/sdl/src/render/software/SDL_drawline.h +27 -0
  708. data/ext/alphatau/native/sdl/src/render/software/SDL_drawpoint.c +114 -0
  709. data/ext/alphatau/native/sdl/src/render/software/SDL_drawpoint.h +27 -0
  710. data/ext/alphatau/native/sdl/src/render/software/SDL_render_sw.c +882 -0
  711. data/ext/alphatau/native/sdl/src/render/software/SDL_render_sw_c.h +24 -0
  712. data/ext/alphatau/native/sdl/src/render/software/SDL_rotate.c +530 -0
  713. data/ext/alphatau/native/sdl/src/render/software/SDL_rotate.h +28 -0
  714. data/ext/alphatau/native/sdl/src/sensor/SDL_sensor.c +546 -0
  715. data/ext/alphatau/native/sdl/src/sensor/SDL_sensor_c.h +38 -0
  716. data/ext/alphatau/native/sdl/src/sensor/SDL_syssensor.h +99 -0
  717. data/ext/alphatau/native/sdl/src/sensor/android/SDL_androidsensor.c +211 -0
  718. data/ext/alphatau/native/sdl/src/sensor/android/SDL_androidsensor.h +31 -0
  719. data/ext/alphatau/native/sdl/src/sensor/coremotion/SDL_coremotionsensor.h +30 -0
  720. data/ext/alphatau/native/sdl/src/sensor/coremotion/SDL_coremotionsensor.m +234 -0
  721. data/ext/alphatau/native/sdl/src/sensor/dummy/SDL_dummysensor.c +110 -0
  722. data/ext/alphatau/native/sdl/src/sensor/dummy/SDL_dummysensor.h +23 -0
  723. data/ext/alphatau/native/sdl/src/stdlib/SDL_getenv.c +315 -0
  724. data/ext/alphatau/native/sdl/src/stdlib/SDL_iconv.c +934 -0
  725. data/ext/alphatau/native/sdl/src/stdlib/SDL_malloc.c +5376 -0
  726. data/ext/alphatau/native/sdl/src/stdlib/SDL_qsort.c +534 -0
  727. data/ext/alphatau/native/sdl/src/stdlib/SDL_stdlib.c +1155 -0
  728. data/ext/alphatau/native/sdl/src/stdlib/SDL_string.c +1737 -0
  729. data/ext/alphatau/native/sdl/src/test/SDL_test_assert.c +152 -0
  730. data/ext/alphatau/native/sdl/src/test/SDL_test_common.c +1826 -0
  731. data/ext/alphatau/native/sdl/src/test/SDL_test_compare.c +117 -0
  732. data/ext/alphatau/native/sdl/src/test/SDL_test_crc32.c +166 -0
  733. data/ext/alphatau/native/sdl/src/test/SDL_test_font.c +3250 -0
  734. data/ext/alphatau/native/sdl/src/test/SDL_test_fuzzer.c +534 -0
  735. data/ext/alphatau/native/sdl/src/test/SDL_test_harness.c +683 -0
  736. data/ext/alphatau/native/sdl/src/test/SDL_test_imageBlit.c +1559 -0
  737. data/ext/alphatau/native/sdl/src/test/SDL_test_imageBlitBlend.c +2845 -0
  738. data/ext/alphatau/native/sdl/src/test/SDL_test_imageFace.c +247 -0
  739. data/ext/alphatau/native/sdl/src/test/SDL_test_imagePrimitives.c +514 -0
  740. data/ext/alphatau/native/sdl/src/test/SDL_test_imagePrimitivesBlend.c +696 -0
  741. data/ext/alphatau/native/sdl/src/test/SDL_test_log.c +118 -0
  742. data/ext/alphatau/native/sdl/src/test/SDL_test_md5.c +338 -0
  743. data/ext/alphatau/native/sdl/src/test/SDL_test_memory.c +274 -0
  744. data/ext/alphatau/native/sdl/src/test/SDL_test_random.c +96 -0
  745. data/ext/alphatau/native/sdl/src/thread/SDL_systhread.h +70 -0
  746. data/ext/alphatau/native/sdl/src/thread/SDL_thread.c +503 -0
  747. data/ext/alphatau/native/sdl/src/thread/SDL_thread_c.h +95 -0
  748. data/ext/alphatau/native/sdl/src/thread/generic/SDL_syscond.c +220 -0
  749. data/ext/alphatau/native/sdl/src/thread/generic/SDL_sysmutex.c +165 -0
  750. data/ext/alphatau/native/sdl/src/thread/generic/SDL_sysmutex_c.h +22 -0
  751. data/ext/alphatau/native/sdl/src/thread/generic/SDL_syssem.c +217 -0
  752. data/ext/alphatau/native/sdl/src/thread/generic/SDL_systhread.c +71 -0
  753. data/ext/alphatau/native/sdl/src/thread/generic/SDL_systhread_c.h +26 -0
  754. data/ext/alphatau/native/sdl/src/thread/generic/SDL_systls.c +38 -0
  755. data/ext/alphatau/native/sdl/src/thread/psp/SDL_syscond.c +224 -0
  756. data/ext/alphatau/native/sdl/src/thread/psp/SDL_sysmutex.c +136 -0
  757. data/ext/alphatau/native/sdl/src/thread/psp/SDL_sysmutex_c.h +22 -0
  758. data/ext/alphatau/native/sdl/src/thread/psp/SDL_syssem.c +161 -0
  759. data/ext/alphatau/native/sdl/src/thread/psp/SDL_systhread.c +114 -0
  760. data/ext/alphatau/native/sdl/src/thread/psp/SDL_systhread_c.h +24 -0
  761. data/ext/alphatau/native/sdl/src/thread/pthread/SDL_syscond.c +158 -0
  762. data/ext/alphatau/native/sdl/src/thread/pthread/SDL_sysmutex.c +195 -0
  763. data/ext/alphatau/native/sdl/src/thread/pthread/SDL_sysmutex_c.h +32 -0
  764. data/ext/alphatau/native/sdl/src/thread/pthread/SDL_syssem.c +209 -0
  765. data/ext/alphatau/native/sdl/src/thread/pthread/SDL_systhread.c +324 -0
  766. data/ext/alphatau/native/sdl/src/thread/pthread/SDL_systhread_c.h +27 -0
  767. data/ext/alphatau/native/sdl/src/thread/pthread/SDL_systls.c +70 -0
  768. data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_syscond.cpp +164 -0
  769. data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_sysmutex.cpp +111 -0
  770. data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_sysmutex_c.h +30 -0
  771. data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_systhread.cpp +168 -0
  772. data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_systhread_c.h +26 -0
  773. data/ext/alphatau/native/sdl/src/thread/windows/SDL_sysmutex.c +110 -0
  774. data/ext/alphatau/native/sdl/src/thread/windows/SDL_syssem.c +152 -0
  775. data/ext/alphatau/native/sdl/src/thread/windows/SDL_systhread.c +260 -0
  776. data/ext/alphatau/native/sdl/src/thread/windows/SDL_systhread_c.h +32 -0
  777. data/ext/alphatau/native/sdl/src/thread/windows/SDL_systls.c +72 -0
  778. data/ext/alphatau/native/sdl/src/timer/SDL_timer.c +373 -0
  779. data/ext/alphatau/native/sdl/src/timer/SDL_timer_c.h +34 -0
  780. data/ext/alphatau/native/sdl/src/timer/dummy/SDL_systimer.c +75 -0
  781. data/ext/alphatau/native/sdl/src/timer/haiku/SDL_systimer.c +80 -0
  782. data/ext/alphatau/native/sdl/src/timer/psp/SDL_systimer.c +91 -0
  783. data/ext/alphatau/native/sdl/src/timer/unix/SDL_systimer.c +232 -0
  784. data/ext/alphatau/native/sdl/src/timer/windows/SDL_systimer.c +200 -0
  785. data/ext/alphatau/native/sdl/src/video/SDL_RLEaccel.c +1581 -0
  786. data/ext/alphatau/native/sdl/src/video/SDL_RLEaccel_c.h +31 -0
  787. data/ext/alphatau/native/sdl/src/video/SDL_blit.c +296 -0
  788. data/ext/alphatau/native/sdl/src/video/SDL_blit.h +553 -0
  789. data/ext/alphatau/native/sdl/src/video/SDL_blit_0.c +483 -0
  790. data/ext/alphatau/native/sdl/src/video/SDL_blit_1.c +552 -0
  791. data/ext/alphatau/native/sdl/src/video/SDL_blit_A.c +1388 -0
  792. data/ext/alphatau/native/sdl/src/video/SDL_blit_N.c +2647 -0
  793. data/ext/alphatau/native/sdl/src/video/SDL_blit_auto.c +7419 -0
  794. data/ext/alphatau/native/sdl/src/video/SDL_blit_auto.h +30 -0
  795. data/ext/alphatau/native/sdl/src/video/SDL_blit_copy.c +162 -0
  796. data/ext/alphatau/native/sdl/src/video/SDL_blit_copy.h +24 -0
  797. data/ext/alphatau/native/sdl/src/video/SDL_blit_slow.c +164 -0
  798. data/ext/alphatau/native/sdl/src/video/SDL_blit_slow.h +25 -0
  799. data/ext/alphatau/native/sdl/src/video/SDL_bmp.c +702 -0
  800. data/ext/alphatau/native/sdl/src/video/SDL_clipboard.c +90 -0
  801. data/ext/alphatau/native/sdl/src/video/SDL_egl.c +899 -0
  802. data/ext/alphatau/native/sdl/src/video/SDL_egl_c.h +149 -0
  803. data/ext/alphatau/native/sdl/src/video/SDL_fillrect.c +343 -0
  804. data/ext/alphatau/native/sdl/src/video/SDL_pixels.c +1125 -0
  805. data/ext/alphatau/native/sdl/src/video/SDL_pixels_c.h +40 -0
  806. data/ext/alphatau/native/sdl/src/video/SDL_rect.c +531 -0
  807. data/ext/alphatau/native/sdl/src/video/SDL_rect_c.h +25 -0
  808. data/ext/alphatau/native/sdl/src/video/SDL_shape.c +309 -0
  809. data/ext/alphatau/native/sdl/src/video/SDL_shape_internals.h +69 -0
  810. data/ext/alphatau/native/sdl/src/video/SDL_stretch.c +353 -0
  811. data/ext/alphatau/native/sdl/src/video/SDL_surface.c +1232 -0
  812. data/ext/alphatau/native/sdl/src/video/SDL_sysvideo.h +467 -0
  813. data/ext/alphatau/native/sdl/src/video/SDL_video.c +4160 -0
  814. data/ext/alphatau/native/sdl/src/video/SDL_vulkan_internal.h +91 -0
  815. data/ext/alphatau/native/sdl/src/video/SDL_vulkan_utils.c +172 -0
  816. data/ext/alphatau/native/sdl/src/video/SDL_yuv.c +1834 -0
  817. data/ext/alphatau/native/sdl/src/video/SDL_yuv_c.h +30 -0
  818. data/ext/alphatau/native/sdl/src/video/android/SDL_androidclipboard.c +48 -0
  819. data/ext/alphatau/native/sdl/src/video/android/SDL_androidclipboard.h +32 -0
  820. data/ext/alphatau/native/sdl/src/video/android/SDL_androidevents.c +123 -0
  821. data/ext/alphatau/native/sdl/src/video/android/SDL_androidevents.h +27 -0
  822. data/ext/alphatau/native/sdl/src/video/android/SDL_androidgl.c +62 -0
  823. data/ext/alphatau/native/sdl/src/video/android/SDL_androidgl.h +34 -0
  824. data/ext/alphatau/native/sdl/src/video/android/SDL_androidkeyboard.c +391 -0
  825. data/ext/alphatau/native/sdl/src/video/android/SDL_androidkeyboard.h +36 -0
  826. data/ext/alphatau/native/sdl/src/video/android/SDL_androidmessagebox.c +37 -0
  827. data/ext/alphatau/native/sdl/src/video/android/SDL_androidmessagebox.h +29 -0
  828. data/ext/alphatau/native/sdl/src/video/android/SDL_androidmouse.c +266 -0
  829. data/ext/alphatau/native/sdl/src/video/android/SDL_androidmouse.h +33 -0
  830. data/ext/alphatau/native/sdl/src/video/android/SDL_androidtouch.c +151 -0
  831. data/ext/alphatau/native/sdl/src/video/android/SDL_androidtouch.h +29 -0
  832. data/ext/alphatau/native/sdl/src/video/android/SDL_androidvideo.c +259 -0
  833. data/ext/alphatau/native/sdl/src/video/android/SDL_androidvideo.h +51 -0
  834. data/ext/alphatau/native/sdl/src/video/android/SDL_androidvulkan.c +175 -0
  835. data/ext/alphatau/native/sdl/src/video/android/SDL_androidvulkan.h +52 -0
  836. data/ext/alphatau/native/sdl/src/video/android/SDL_androidwindow.c +175 -0
  837. data/ext/alphatau/native/sdl/src/video/android/SDL_androidwindow.h +45 -0
  838. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaclipboard.h +36 -0
  839. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaclipboard.m +103 -0
  840. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaevents.h +32 -0
  841. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaevents.m +483 -0
  842. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoakeyboard.h +36 -0
  843. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoakeyboard.m +720 -0
  844. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamessagebox.h +29 -0
  845. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamessagebox.m +145 -0
  846. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoametalview.h +63 -0
  847. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoametalview.m +134 -0
  848. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamodes.h +46 -0
  849. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamodes.m +490 -0
  850. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamouse.h +52 -0
  851. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamouse.m +477 -0
  852. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamousetap.h +34 -0
  853. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamousetap.m +279 -0
  854. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengl.h +68 -0
  855. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengl.m +428 -0
  856. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengles.h +49 -0
  857. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengles.m +132 -0
  858. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoashape.h +45 -0
  859. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoashape.m +113 -0
  860. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavideo.h +118 -0
  861. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavideo.m +254 -0
  862. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavulkan.h +55 -0
  863. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavulkan.m +231 -0
  864. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoawindow.h +155 -0
  865. data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoawindow.m +1885 -0
  866. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_WM.c +413 -0
  867. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_WM.h +56 -0
  868. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_dyn.c +117 -0
  869. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_dyn.h +41 -0
  870. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_events.c +748 -0
  871. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_events.h +34 -0
  872. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_modes.c +414 -0
  873. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_modes.h +59 -0
  874. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_mouse.c +389 -0
  875. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_mouse.h +44 -0
  876. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_opengl.c +332 -0
  877. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_opengl.h +64 -0
  878. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_render.c +1335 -0
  879. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_render.h +25 -0
  880. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_shape.c +131 -0
  881. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_shape.h +38 -0
  882. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_video.c +418 -0
  883. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_video.h +170 -0
  884. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_window.c +565 -0
  885. data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_window.h +82 -0
  886. data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullevents.c +41 -0
  887. data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullevents_c.h +27 -0
  888. data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullframebuffer.c +89 -0
  889. data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullframebuffer_c.h +27 -0
  890. data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullvideo.c +144 -0
  891. data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullvideo.h +30 -0
  892. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenevents.c +716 -0
  893. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenevents.h +40 -0
  894. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenframebuffer.c +178 -0
  895. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenframebuffer.h +32 -0
  896. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenmouse.c +275 -0
  897. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenmouse.h +42 -0
  898. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenopengles.c +119 -0
  899. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenopengles.h +49 -0
  900. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenvideo.c +354 -0
  901. data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenvideo.h +58 -0
  902. data/ext/alphatau/native/sdl/src/video/haiku/SDL_BWin.h +679 -0
  903. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bclipboard.cc +95 -0
  904. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bclipboard.h +33 -0
  905. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bevents.cc +41 -0
  906. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bevents.h +39 -0
  907. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bframebuffer.cc +259 -0
  908. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bframebuffer.h +47 -0
  909. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bkeyboard.cc +190 -0
  910. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bkeyboard.h +44 -0
  911. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bmodes.cc +333 -0
  912. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bmodes.h +48 -0
  913. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bopengl.cc +176 -0
  914. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bopengl.h +55 -0
  915. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bvideo.cc +178 -0
  916. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bvideo.h +44 -0
  917. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bwindow.cc +233 -0
  918. data/ext/alphatau/native/sdl/src/video/haiku/SDL_bwindow.h +55 -0
  919. data/ext/alphatau/native/sdl/src/video/khronos/EGL/egl.h +303 -0
  920. data/ext/alphatau/native/sdl/src/video/khronos/EGL/eglext.h +1241 -0
  921. data/ext/alphatau/native/sdl/src/video/khronos/EGL/eglplatform.h +132 -0
  922. data/ext/alphatau/native/sdl/src/video/khronos/GLES2/gl2.h +675 -0
  923. data/ext/alphatau/native/sdl/src/video/khronos/GLES2/gl2ext.h +3505 -0
  924. data/ext/alphatau/native/sdl/src/video/khronos/GLES2/gl2platform.h +38 -0
  925. data/ext/alphatau/native/sdl/src/video/khronos/KHR/khrplatform.h +284 -0
  926. data/ext/alphatau/native/sdl/src/video/khronos/vulkan/vk_platform.h +120 -0
  927. data/ext/alphatau/native/sdl/src/video/khronos/vulkan/vulkan.h +6458 -0
  928. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmdyn.c +171 -0
  929. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmdyn.h +53 -0
  930. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmevents.c +42 -0
  931. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmevents.h +31 -0
  932. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmmouse.c +501 -0
  933. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmmouse.h +45 -0
  934. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmopengles.c +189 -0
  935. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmopengles.h +48 -0
  936. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmsym.h +99 -0
  937. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmvideo.c +664 -0
  938. data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmvideo.h +124 -0
  939. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirdyn.c +170 -0
  940. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirdyn.h +53 -0
  941. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirevents.c +321 -0
  942. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirevents.h +37 -0
  943. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirframebuffer.c +134 -0
  944. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirframebuffer.h +47 -0
  945. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirmouse.c +292 -0
  946. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirmouse.h +37 -0
  947. data/ext/alphatau/native/sdl/src/video/mir/SDL_miropengl.c +78 -0
  948. data/ext/alphatau/native/sdl/src/video/mir/SDL_miropengl.h +53 -0
  949. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirsym.h +143 -0
  950. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvideo.c +423 -0
  951. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvideo.h +49 -0
  952. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvulkan.c +176 -0
  953. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvulkan.h +52 -0
  954. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirwindow.c +374 -0
  955. data/ext/alphatau/native/sdl/src/video/mir/SDL_mirwindow.h +93 -0
  956. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclevents.c +438 -0
  957. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclevents_c.h +30 -0
  958. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclglue.c +24 -0
  959. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclopengles.c +174 -0
  960. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclopengles.h +38 -0
  961. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclvideo.c +183 -0
  962. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclvideo.h +67 -0
  963. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclwindow.c +79 -0
  964. data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclwindow.h +32 -0
  965. data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora.c +838 -0
  966. data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora.h +101 -0
  967. data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora_events.c +38 -0
  968. data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora_events.h +25 -0
  969. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspevents.c +290 -0
  970. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspevents_c.h +31 -0
  971. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspgl.c +210 -0
  972. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspgl_c.h +54 -0
  973. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspmouse.c +41 -0
  974. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspmouse_c.h +24 -0
  975. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspvideo.c +333 -0
  976. data/ext/alphatau/native/sdl/src/video/psp/SDL_pspvideo.h +102 -0
  977. data/ext/alphatau/native/sdl/src/video/qnx/gl.c +285 -0
  978. data/ext/alphatau/native/sdl/src/video/qnx/keyboard.c +133 -0
  979. data/ext/alphatau/native/sdl/src/video/qnx/sdl_qnx.h +48 -0
  980. data/ext/alphatau/native/sdl/src/video/qnx/video.c +364 -0
  981. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpievents.c +45 -0
  982. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpievents_c.h +31 -0
  983. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpimouse.c +386 -0
  984. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpimouse.h +43 -0
  985. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpiopengles.c +71 -0
  986. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpiopengles.h +49 -0
  987. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpivideo.c +442 -0
  988. data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpivideo.h +104 -0
  989. data/ext/alphatau/native/sdl/src/video/sdlgenblit.pl +535 -0
  990. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitappdelegate.h +47 -0
  991. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitappdelegate.m +516 -0
  992. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitclipboard.h +35 -0
  993. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitclipboard.m +111 -0
  994. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitevents.h +30 -0
  995. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitevents.m +73 -0
  996. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmessagebox.h +31 -0
  997. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmessagebox.m +208 -0
  998. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmetalview.h +58 -0
  999. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmetalview.m +131 -0
  1000. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmodes.h +54 -0
  1001. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmodes.m +378 -0
  1002. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopengles.h +40 -0
  1003. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopengles.m +250 -0
  1004. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopenglview.h +60 -0
  1005. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopenglview.m +384 -0
  1006. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvideo.h +46 -0
  1007. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvideo.m +249 -0
  1008. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitview.h +41 -0
  1009. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitview.m +328 -0
  1010. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitviewcontroller.h +91 -0
  1011. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitviewcontroller.m +532 -0
  1012. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvulkan.h +54 -0
  1013. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvulkan.m +222 -0
  1014. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitwindow.h +56 -0
  1015. data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitwindow.m +465 -0
  1016. data/ext/alphatau/native/sdl/src/video/uikit/keyinfotable.h +174 -0
  1017. data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteopengles.c +47 -0
  1018. data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteopengles.h +48 -0
  1019. data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteplatform.c +54 -0
  1020. data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteplatform.h +47 -0
  1021. data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivantevideo.c +409 -0
  1022. data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivantevideo.h +91 -0
  1023. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandclipboard.c +123 -0
  1024. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandclipboard.h +32 -0
  1025. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddatamanager.c +468 -0
  1026. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddatamanager.h +103 -0
  1027. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddyn.c +178 -0
  1028. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddyn.h +107 -0
  1029. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandevents.c +1134 -0
  1030. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandevents_c.h +51 -0
  1031. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandmouse.c +396 -0
  1032. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandmouse.h +31 -0
  1033. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandopengles.c +93 -0
  1034. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandopengles.h +49 -0
  1035. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandsym.h +127 -0
  1036. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandtouch.c +265 -0
  1037. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandtouch.h +352 -0
  1038. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvideo.c +517 -0
  1039. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvideo.h +85 -0
  1040. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvulkan.c +176 -0
  1041. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvulkan.h +52 -0
  1042. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandwindow.c +684 -0
  1043. data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandwindow.h +88 -0
  1044. data/ext/alphatau/native/sdl/src/video/windows/SDL_msctf.h +242 -0
  1045. data/ext/alphatau/native/sdl/src/video/windows/SDL_vkeys.h +76 -0
  1046. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsclipboard.c +160 -0
  1047. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsclipboard.h +36 -0
  1048. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsevents.c +1229 -0
  1049. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsevents.h +36 -0
  1050. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsframebuffer.c +127 -0
  1051. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsframebuffer.h +27 -0
  1052. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowskeyboard.c +1579 -0
  1053. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowskeyboard.h +40 -0
  1054. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmessagebox.c +905 -0
  1055. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmessagebox.h +29 -0
  1056. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmodes.c +407 -0
  1057. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmodes.h +47 -0
  1058. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmouse.c +322 -0
  1059. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmouse.h +33 -0
  1060. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengl.c +895 -0
  1061. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengl.h +142 -0
  1062. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengles.c +131 -0
  1063. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengles.h +49 -0
  1064. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsshape.c +110 -0
  1065. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsshape.h +40 -0
  1066. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowstaskdialog.h +156 -0
  1067. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvideo.c +442 -0
  1068. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvideo.h +199 -0
  1069. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvulkan.c +176 -0
  1070. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvulkan.h +52 -0
  1071. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowswindow.c +992 -0
  1072. data/ext/alphatau/native/sdl/src/video/windows/SDL_windowswindow.h +86 -0
  1073. data/ext/alphatau/native/sdl/src/video/windows/wmmsg.h +1052 -0
  1074. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtevents.cpp +154 -0
  1075. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtevents_c.h +82 -0
  1076. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtgamebar.cpp +196 -0
  1077. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtgamebar_cpp.h +35 -0
  1078. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtkeyboard.cpp +430 -0
  1079. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmessagebox.cpp +112 -0
  1080. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmessagebox.h +29 -0
  1081. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmouse.cpp +224 -0
  1082. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmouse_c.h +40 -0
  1083. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtopengles.cpp +203 -0
  1084. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtopengles.h +70 -0
  1085. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtpointerinput.cpp +415 -0
  1086. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtvideo.cpp +842 -0
  1087. data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtvideo_cpp.h +106 -0
  1088. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11clipboard.c +199 -0
  1089. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11clipboard.h +33 -0
  1090. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11dyn.c +212 -0
  1091. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11dyn.h +111 -0
  1092. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11events.c +1500 -0
  1093. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11events.h +31 -0
  1094. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11framebuffer.c +257 -0
  1095. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11framebuffer.h +31 -0
  1096. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11keyboard.c +543 -0
  1097. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11keyboard.h +36 -0
  1098. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11messagebox.c +853 -0
  1099. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11messagebox.h +28 -0
  1100. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11modes.c +1112 -0
  1101. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11modes.h +85 -0
  1102. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11mouse.c +448 -0
  1103. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11mouse.h +31 -0
  1104. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengl.c +946 -0
  1105. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengl.h +84 -0
  1106. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengles.c +109 -0
  1107. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengles.h +56 -0
  1108. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11shape.c +115 -0
  1109. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11shape.h +39 -0
  1110. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11sym.h +337 -0
  1111. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11touch.c +54 -0
  1112. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11touch.h +32 -0
  1113. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11video.c +497 -0
  1114. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11video.h +156 -0
  1115. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11vulkan.c +243 -0
  1116. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11vulkan.h +48 -0
  1117. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11window.c +1619 -0
  1118. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11window.h +111 -0
  1119. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11xinput2.c +313 -0
  1120. data/ext/alphatau/native/sdl/src/video/x11/SDL_x11xinput2.h +42 -0
  1121. data/ext/alphatau/native/sdl/src/video/x11/edid-parse.c +754 -0
  1122. data/ext/alphatau/native/sdl/src/video/x11/edid.h +167 -0
  1123. data/ext/alphatau/native/sdl/src/video/x11/imKStoUCS.c +350 -0
  1124. data/ext/alphatau/native/sdl/src/video/x11/imKStoUCS.h +32 -0
  1125. data/ext/alphatau/native/sdl/src/video/yuv2rgb/LICENSE +27 -0
  1126. data/ext/alphatau/native/sdl/src/video/yuv2rgb/README.md +63 -0
  1127. data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb.c +687 -0
  1128. data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb.h +381 -0
  1129. data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb_sse_func.h +498 -0
  1130. data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb_std_func.h +228 -0
  1131. data/ext/alphatau/native/sdl/test/CMakeLists.txt +122 -0
  1132. data/ext/alphatau/native/sdl/test/COPYING +8 -0
  1133. data/ext/alphatau/native/sdl/test/Makefile.in +328 -0
  1134. data/ext/alphatau/native/sdl/test/README +47 -0
  1135. data/ext/alphatau/native/sdl/test/acinclude.m4 +359 -0
  1136. data/ext/alphatau/native/sdl/test/aclocal.m4 +359 -0
  1137. data/ext/alphatau/native/sdl/test/autogen.sh +12 -0
  1138. data/ext/alphatau/native/sdl/test/axis.bmp +0 -0
  1139. data/ext/alphatau/native/sdl/test/button.bmp +0 -0
  1140. data/ext/alphatau/native/sdl/test/checkkeys.c +248 -0
  1141. data/ext/alphatau/native/sdl/test/configure +5124 -0
  1142. data/ext/alphatau/native/sdl/test/configure.in +191 -0
  1143. data/ext/alphatau/native/sdl/test/controllermap.bmp +0 -0
  1144. data/ext/alphatau/native/sdl/test/controllermap.c +781 -0
  1145. data/ext/alphatau/native/sdl/test/emscripten/joystick-pre.js +25 -0
  1146. data/ext/alphatau/native/sdl/test/gcc-fat.sh +110 -0
  1147. data/ext/alphatau/native/sdl/test/icon.bmp +0 -0
  1148. data/ext/alphatau/native/sdl/test/loopwave.c +179 -0
  1149. data/ext/alphatau/native/sdl/test/loopwavequeue.c +149 -0
  1150. data/ext/alphatau/native/sdl/test/moose.dat +0 -0
  1151. data/ext/alphatau/native/sdl/test/nacl/Makefile +63 -0
  1152. data/ext/alphatau/native/sdl/test/nacl/background.js +40 -0
  1153. data/ext/alphatau/native/sdl/test/nacl/common.js +474 -0
  1154. data/ext/alphatau/native/sdl/test/nacl/index.html +21 -0
  1155. data/ext/alphatau/native/sdl/test/nacl/manifest.json +22 -0
  1156. data/ext/alphatau/native/sdl/test/picture.xbm +14 -0
  1157. data/ext/alphatau/native/sdl/test/relative_mode.markdown +58 -0
  1158. data/ext/alphatau/native/sdl/test/sample.bmp +0 -0
  1159. data/ext/alphatau/native/sdl/test/sample.wav +0 -0
  1160. data/ext/alphatau/native/sdl/test/shapes/p01_shape24.bmp +0 -0
  1161. data/ext/alphatau/native/sdl/test/shapes/p01_shape32alpha.bmp +0 -0
  1162. data/ext/alphatau/native/sdl/test/shapes/p01_shape8.bmp +0 -0
  1163. data/ext/alphatau/native/sdl/test/shapes/p02_shape24.bmp +0 -0
  1164. data/ext/alphatau/native/sdl/test/shapes/p02_shape32alpha.bmp +0 -0
  1165. data/ext/alphatau/native/sdl/test/shapes/p02_shape8.bmp +0 -0
  1166. data/ext/alphatau/native/sdl/test/shapes/p03_shape24.bmp +0 -0
  1167. data/ext/alphatau/native/sdl/test/shapes/p03_shape8.bmp +0 -0
  1168. data/ext/alphatau/native/sdl/test/shapes/p04_shape1.bmp +0 -0
  1169. data/ext/alphatau/native/sdl/test/shapes/p04_shape24.bmp +0 -0
  1170. data/ext/alphatau/native/sdl/test/shapes/p04_shape32alpha.bmp +0 -0
  1171. data/ext/alphatau/native/sdl/test/shapes/p04_shape8.bmp +0 -0
  1172. data/ext/alphatau/native/sdl/test/shapes/p05_shape8.bmp +0 -0
  1173. data/ext/alphatau/native/sdl/test/shapes/p06_shape1alpha.bmp +0 -0
  1174. data/ext/alphatau/native/sdl/test/shapes/p06_shape24.bmp +0 -0
  1175. data/ext/alphatau/native/sdl/test/shapes/p06_shape32alpha.bmp +0 -0
  1176. data/ext/alphatau/native/sdl/test/shapes/p06_shape8.bmp +0 -0
  1177. data/ext/alphatau/native/sdl/test/shapes/p07_shape24.bmp +0 -0
  1178. data/ext/alphatau/native/sdl/test/shapes/p07_shape32alpha.bmp +0 -0
  1179. data/ext/alphatau/native/sdl/test/shapes/p07_shape8.bmp +0 -0
  1180. data/ext/alphatau/native/sdl/test/shapes/p08_shape24.bmp +0 -0
  1181. data/ext/alphatau/native/sdl/test/shapes/p08_shape32alpha.bmp +0 -0
  1182. data/ext/alphatau/native/sdl/test/shapes/p08_shape8.bmp +0 -0
  1183. data/ext/alphatau/native/sdl/test/shapes/p09_shape24.bmp +0 -0
  1184. data/ext/alphatau/native/sdl/test/shapes/p09_shape32alpha.bmp +0 -0
  1185. data/ext/alphatau/native/sdl/test/shapes/p09_shape8.bmp +0 -0
  1186. data/ext/alphatau/native/sdl/test/shapes/p10_shape1.bmp +0 -0
  1187. data/ext/alphatau/native/sdl/test/shapes/p10_shape24.bmp +0 -0
  1188. data/ext/alphatau/native/sdl/test/shapes/p10_shape32alpha.bmp +0 -0
  1189. data/ext/alphatau/native/sdl/test/shapes/p10_shape8.bmp +0 -0
  1190. data/ext/alphatau/native/sdl/test/shapes/p11_shape24.bmp +0 -0
  1191. data/ext/alphatau/native/sdl/test/shapes/p11_shape32alpha.bmp +0 -0
  1192. data/ext/alphatau/native/sdl/test/shapes/p11_shape8.bmp +0 -0
  1193. data/ext/alphatau/native/sdl/test/shapes/p12_shape24.bmp +0 -0
  1194. data/ext/alphatau/native/sdl/test/shapes/p12_shape8.bmp +0 -0
  1195. data/ext/alphatau/native/sdl/test/shapes/p13_shape24.bmp +0 -0
  1196. data/ext/alphatau/native/sdl/test/shapes/p13_shape32alpha.bmp +0 -0
  1197. data/ext/alphatau/native/sdl/test/shapes/p13_shape8.bmp +0 -0
  1198. data/ext/alphatau/native/sdl/test/shapes/p14_shape24.bmp +0 -0
  1199. data/ext/alphatau/native/sdl/test/shapes/p14_shape8.bmp +0 -0
  1200. data/ext/alphatau/native/sdl/test/shapes/p15_shape24.bmp +0 -0
  1201. data/ext/alphatau/native/sdl/test/shapes/p15_shape32alpha.bmp +0 -0
  1202. data/ext/alphatau/native/sdl/test/shapes/p15_shape8.bmp +0 -0
  1203. data/ext/alphatau/native/sdl/test/shapes/p16_shape1.bmp +0 -0
  1204. data/ext/alphatau/native/sdl/test/shapes/p16_shape24.bmp +0 -0
  1205. data/ext/alphatau/native/sdl/test/shapes/p16_shape8.bmp +0 -0
  1206. data/ext/alphatau/native/sdl/test/shapes/trollface_24.bmp +0 -0
  1207. data/ext/alphatau/native/sdl/test/shapes/trollface_32alpha.bmp +0 -0
  1208. data/ext/alphatau/native/sdl/test/testatomic.c +727 -0
  1209. data/ext/alphatau/native/sdl/test/testaudiocapture.c +165 -0
  1210. data/ext/alphatau/native/sdl/test/testaudiohotplug.c +203 -0
  1211. data/ext/alphatau/native/sdl/test/testaudioinfo.c +74 -0
  1212. data/ext/alphatau/native/sdl/test/testautomation.c +124 -0
  1213. data/ext/alphatau/native/sdl/test/testautomation_audio.c +1038 -0
  1214. data/ext/alphatau/native/sdl/test/testautomation_clipboard.c +184 -0
  1215. data/ext/alphatau/native/sdl/test/testautomation_events.c +201 -0
  1216. data/ext/alphatau/native/sdl/test/testautomation_hints.c +168 -0
  1217. data/ext/alphatau/native/sdl/test/testautomation_keyboard.c +713 -0
  1218. data/ext/alphatau/native/sdl/test/testautomation_main.c +157 -0
  1219. data/ext/alphatau/native/sdl/test/testautomation_mouse.c +606 -0
  1220. data/ext/alphatau/native/sdl/test/testautomation_pixels.c +529 -0
  1221. data/ext/alphatau/native/sdl/test/testautomation_platform.c +584 -0
  1222. data/ext/alphatau/native/sdl/test/testautomation_rect.c +1696 -0
  1223. data/ext/alphatau/native/sdl/test/testautomation_render.c +1099 -0
  1224. data/ext/alphatau/native/sdl/test/testautomation_rwops.c +748 -0
  1225. data/ext/alphatau/native/sdl/test/testautomation_sdltest.c +1319 -0
  1226. data/ext/alphatau/native/sdl/test/testautomation_stdlib.c +319 -0
  1227. data/ext/alphatau/native/sdl/test/testautomation_suites.h +54 -0
  1228. data/ext/alphatau/native/sdl/test/testautomation_surface.c +647 -0
  1229. data/ext/alphatau/native/sdl/test/testautomation_syswm.c +61 -0
  1230. data/ext/alphatau/native/sdl/test/testautomation_timer.c +201 -0
  1231. data/ext/alphatau/native/sdl/test/testautomation_video.c +1811 -0
  1232. data/ext/alphatau/native/sdl/test/testbounds.c +40 -0
  1233. data/ext/alphatau/native/sdl/test/testcustomcursor.c +259 -0
  1234. data/ext/alphatau/native/sdl/test/testdisplayinfo.c +96 -0
  1235. data/ext/alphatau/native/sdl/test/testdraw2.c +305 -0
  1236. data/ext/alphatau/native/sdl/test/testdrawchessboard.c +147 -0
  1237. data/ext/alphatau/native/sdl/test/testdropfile.c +98 -0
  1238. data/ext/alphatau/native/sdl/test/testerror.c +76 -0
  1239. data/ext/alphatau/native/sdl/test/testfile.c +283 -0
  1240. data/ext/alphatau/native/sdl/test/testfilesystem.c +60 -0
  1241. data/ext/alphatau/native/sdl/test/testgamecontroller.c +375 -0
  1242. data/ext/alphatau/native/sdl/test/testgesture.c +309 -0
  1243. data/ext/alphatau/native/sdl/test/testgl2.c +416 -0
  1244. data/ext/alphatau/native/sdl/test/testgles.c +355 -0
  1245. data/ext/alphatau/native/sdl/test/testgles2.c +732 -0
  1246. data/ext/alphatau/native/sdl/test/testhaptic.c +369 -0
  1247. data/ext/alphatau/native/sdl/test/testhittesting.c +134 -0
  1248. data/ext/alphatau/native/sdl/test/testhotplug.c +162 -0
  1249. data/ext/alphatau/native/sdl/test/testiconv.c +88 -0
  1250. data/ext/alphatau/native/sdl/test/testime.c +801 -0
  1251. data/ext/alphatau/native/sdl/test/testintersections.c +363 -0
  1252. data/ext/alphatau/native/sdl/test/testjoystick.c +387 -0
  1253. data/ext/alphatau/native/sdl/test/testkeys.c +40 -0
  1254. data/ext/alphatau/native/sdl/test/testloadso.c +82 -0
  1255. data/ext/alphatau/native/sdl/test/testlock.c +128 -0
  1256. data/ext/alphatau/native/sdl/test/testmessage.c +193 -0
  1257. data/ext/alphatau/native/sdl/test/testmultiaudio.c +199 -0
  1258. data/ext/alphatau/native/sdl/test/testnative.c +237 -0
  1259. data/ext/alphatau/native/sdl/test/testnative.h +46 -0
  1260. data/ext/alphatau/native/sdl/test/testnativecocoa.m +51 -0
  1261. data/ext/alphatau/native/sdl/test/testnativew32.c +86 -0
  1262. data/ext/alphatau/native/sdl/test/testnativex11.c +53 -0
  1263. data/ext/alphatau/native/sdl/test/testoverlay2.c +408 -0
  1264. data/ext/alphatau/native/sdl/test/testplatform.c +442 -0
  1265. data/ext/alphatau/native/sdl/test/testpower.c +80 -0
  1266. data/ext/alphatau/native/sdl/test/testqsort.c +108 -0
  1267. data/ext/alphatau/native/sdl/test/testrelative.c +126 -0
  1268. data/ext/alphatau/native/sdl/test/testrendercopyex.c +233 -0
  1269. data/ext/alphatau/native/sdl/test/testrendertarget.c +335 -0
  1270. data/ext/alphatau/native/sdl/test/testresample.c +120 -0
  1271. data/ext/alphatau/native/sdl/test/testrumble.c +153 -0
  1272. data/ext/alphatau/native/sdl/test/testscale.c +224 -0
  1273. data/ext/alphatau/native/sdl/test/testsem.c +130 -0
  1274. data/ext/alphatau/native/sdl/test/testsensor.c +117 -0
  1275. data/ext/alphatau/native/sdl/test/testshader.c +500 -0
  1276. data/ext/alphatau/native/sdl/test/testshape.c +200 -0
  1277. data/ext/alphatau/native/sdl/test/testsprite2.c +409 -0
  1278. data/ext/alphatau/native/sdl/test/testspriteminimal.c +194 -0
  1279. data/ext/alphatau/native/sdl/test/teststreaming.c +190 -0
  1280. data/ext/alphatau/native/sdl/test/testthread.c +130 -0
  1281. data/ext/alphatau/native/sdl/test/testtimer.c +122 -0
  1282. data/ext/alphatau/native/sdl/test/testver.c +47 -0
  1283. data/ext/alphatau/native/sdl/test/testviewport.c +217 -0
  1284. data/ext/alphatau/native/sdl/test/testvulkan.c +1201 -0
  1285. data/ext/alphatau/native/sdl/test/testwm2.c +174 -0
  1286. data/ext/alphatau/native/sdl/test/testyuv.bmp +0 -0
  1287. data/ext/alphatau/native/sdl/test/testyuv.c +455 -0
  1288. data/ext/alphatau/native/sdl/test/testyuv_cvt.c +300 -0
  1289. data/ext/alphatau/native/sdl/test/testyuv_cvt.h +16 -0
  1290. data/ext/alphatau/native/sdl/test/torturethread.c +113 -0
  1291. data/ext/alphatau/native/sdl/test/utf8.txt +287 -0
  1292. data/ext/alphatau/native/sdl/visualtest/COPYING.txt +18 -0
  1293. data/ext/alphatau/native/sdl/visualtest/Makefile.in +37 -0
  1294. data/ext/alphatau/native/sdl/visualtest/README.txt +214 -0
  1295. data/ext/alphatau/native/sdl/visualtest/acinclude.m4 +359 -0
  1296. data/ext/alphatau/native/sdl/visualtest/autogen.sh +12 -0
  1297. data/ext/alphatau/native/sdl/visualtest/compile +1 -0
  1298. data/ext/alphatau/native/sdl/visualtest/config.h +23 -0
  1299. data/ext/alphatau/native/sdl/visualtest/config.h.in +22 -0
  1300. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.actions +3 -0
  1301. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.config +5 -0
  1302. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.parameters +5 -0
  1303. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.actions +1 -0
  1304. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.config +5 -0
  1305. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.parameters +24 -0
  1306. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.actions +3 -0
  1307. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.config +5 -0
  1308. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.parameters +5 -0
  1309. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_geometry/testsprite2_geometry.actions +3 -0
  1310. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_geometry/testsprite2_geometry.config +5 -0
  1311. data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_geometry/testsprite2_geometry.parameters +5 -0
  1312. data/ext/alphatau/native/sdl/visualtest/configure +5203 -0
  1313. data/ext/alphatau/native/sdl/visualtest/configure.in +166 -0
  1314. data/ext/alphatau/native/sdl/visualtest/depcomp +1 -0
  1315. data/ext/alphatau/native/sdl/visualtest/docs/Doxyfile +1936 -0
  1316. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_action_configparser.h +149 -0
  1317. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_exhaustive_variator.h +64 -0
  1318. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_harness_argparser.h +75 -0
  1319. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_mischelper.h +28 -0
  1320. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_parsehelper.h +46 -0
  1321. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_process.h +112 -0
  1322. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_random_variator.h +61 -0
  1323. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_rwhelper.h +87 -0
  1324. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_screenshot.h +52 -0
  1325. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_sut_configparser.h +105 -0
  1326. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_variator_common.h +122 -0
  1327. data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_variators.h +66 -0
  1328. data/ext/alphatau/native/sdl/visualtest/install-sh +1 -0
  1329. data/ext/alphatau/native/sdl/visualtest/launch_harness.cmd +2 -0
  1330. data/ext/alphatau/native/sdl/visualtest/launch_harness.sh +6 -0
  1331. data/ext/alphatau/native/sdl/visualtest/missing +1 -0
  1332. data/ext/alphatau/native/sdl/visualtest/src/action_configparser.c +396 -0
  1333. data/ext/alphatau/native/sdl/visualtest/src/harness_argparser.c +358 -0
  1334. data/ext/alphatau/native/sdl/visualtest/src/linux/linux_process.c +199 -0
  1335. data/ext/alphatau/native/sdl/visualtest/src/mischelper.c +28 -0
  1336. data/ext/alphatau/native/sdl/visualtest/src/parsehelper.c +231 -0
  1337. data/ext/alphatau/native/sdl/visualtest/src/rwhelper.c +131 -0
  1338. data/ext/alphatau/native/sdl/visualtest/src/screenshot.c +136 -0
  1339. data/ext/alphatau/native/sdl/visualtest/src/sut_configparser.c +232 -0
  1340. data/ext/alphatau/native/sdl/visualtest/src/testharness.c +533 -0
  1341. data/ext/alphatau/native/sdl/visualtest/src/variator_common.c +225 -0
  1342. data/ext/alphatau/native/sdl/visualtest/src/variator_exhaustive.c +132 -0
  1343. data/ext/alphatau/native/sdl/visualtest/src/variator_random.c +111 -0
  1344. data/ext/alphatau/native/sdl/visualtest/src/variators.c +93 -0
  1345. data/ext/alphatau/native/sdl/visualtest/src/windows/windows_process.c +284 -0
  1346. data/ext/alphatau/native/sdl/visualtest/src/windows/windows_screenshot.c +349 -0
  1347. data/ext/alphatau/native/sdl/visualtest/stamp-h1 +1 -0
  1348. data/ext/alphatau/native/sdl/visualtest/testsprite2_sample.actions +3 -0
  1349. data/ext/alphatau/native/sdl/visualtest/testsprite2_sample.config +6 -0
  1350. data/ext/alphatau/native/sdl/visualtest/testsprite2_sample.parameters +29 -0
  1351. data/ext/alphatau/native/sdl/visualtest/unittest/testquit.actions +1 -0
  1352. data/ext/alphatau/native/sdl/visualtest/unittest/testquit.c +101 -0
  1353. data/ext/alphatau/native/sdl/visualtest/unittest/testquit.config +5 -0
  1354. data/ext/alphatau/native/sdl/visualtest/unittest/testquit.parameters +3 -0
  1355. data/ext/alphatau/native/sdl/wayland-protocols/pointer-constraints-unstable-v1.xml +339 -0
  1356. data/ext/alphatau/native/sdl/wayland-protocols/relative-pointer-unstable-v1.xml +136 -0
  1357. data/ext/alphatau/native/sdl/wayland-protocols/wayland.xml +2746 -0
  1358. data/ext/alphatau/native/sdl/wayland-protocols/xdg-shell-unstable-v6.xml +1044 -0
  1359. data/ext/alphatau/native/sdl/wayland-protocols/xdg-shell.xml +1120 -0
  1360. data/lib/alphatau.rb +12 -0
  1361. data/lib/alphatau/version.rb +3 -0
  1362. metadata +1465 -0
@@ -0,0 +1,1696 @@
1
+ /**
2
+ * Original code: automated SDL rect test written by Edgar Simo "bobbens"
3
+ * New/updated tests: aschiffler at ferzkopp dot net
4
+ */
5
+
6
+ #include <stdio.h>
7
+
8
+ #include "SDL.h"
9
+ #include "SDL_test.h"
10
+
11
+ /* ================= Test Case Implementation ================== */
12
+
13
+ /* Helper functions */
14
+
15
+ /* !
16
+ * \brief Private helper to check SDL_IntersectRectAndLine results
17
+ */
18
+ void _validateIntersectRectAndLineResults(
19
+ SDL_bool intersection, SDL_bool expectedIntersection,
20
+ SDL_Rect *rect, SDL_Rect * refRect,
21
+ int x1, int y1, int x2, int y2,
22
+ int x1Ref, int y1Ref, int x2Ref, int y2Ref)
23
+ {
24
+ SDLTest_AssertCheck(intersection == expectedIntersection,
25
+ "Check for correct intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)",
26
+ (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
27
+ (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
28
+ refRect->x, refRect->y, refRect->w, refRect->h,
29
+ x1Ref, y1Ref, x2Ref, y2Ref);
30
+ SDLTest_AssertCheck(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h,
31
+ "Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
32
+ rect->x, rect->y, rect->w, rect->h,
33
+ refRect->x, refRect->y, refRect->w, refRect->h);
34
+ SDLTest_AssertCheck(x1 == x1Ref && y1 == y1Ref && x2 == x2Ref && y2 == y2Ref,
35
+ "Check if line was incorrectly clipped or modified: got (%d,%d - %d,%d) expected (%d,%d - %d,%d)",
36
+ x1, y1, x2, y2,
37
+ x1Ref, y1Ref, x2Ref, y2Ref);
38
+ }
39
+
40
+ /* Test case functions */
41
+
42
+ /* !
43
+ * \brief Tests SDL_IntersectRectAndLine() clipping cases
44
+ *
45
+ * \sa
46
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
47
+ */
48
+ int
49
+ rect_testIntersectRectAndLine (void *arg)
50
+ {
51
+ SDL_Rect refRect = { 0, 0, 32, 32 };
52
+ SDL_Rect rect;
53
+ int x1, y1;
54
+ int x2, y2;
55
+ SDL_bool intersected;
56
+
57
+ int xLeft = -SDLTest_RandomIntegerInRange(1, refRect.w);
58
+ int xRight = refRect.w + SDLTest_RandomIntegerInRange(1, refRect.w);
59
+ int yTop = -SDLTest_RandomIntegerInRange(1, refRect.h);
60
+ int yBottom = refRect.h + SDLTest_RandomIntegerInRange(1, refRect.h);
61
+
62
+ x1 = xLeft;
63
+ y1 = 15;
64
+ x2 = xRight;
65
+ y2 = 15;
66
+ rect = refRect;
67
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
68
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 15, 31, 15);
69
+
70
+ x1 = 15;
71
+ y1 = yTop;
72
+ x2 = 15;
73
+ y2 = yBottom;
74
+ rect = refRect;
75
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
76
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 15, 0, 15, 31);
77
+
78
+ x1 = -refRect.w;
79
+ y1 = -refRect.h;
80
+ x2 = 2*refRect.w;
81
+ y2 = 2*refRect.h;
82
+ rect = refRect;
83
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
84
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 0, 31, 31);
85
+
86
+ x1 = 2*refRect.w;
87
+ y1 = 2*refRect.h;
88
+ x2 = -refRect.w;
89
+ y2 = -refRect.h;
90
+ rect = refRect;
91
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
92
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 31, 0, 0);
93
+
94
+ x1 = -1;
95
+ y1 = 32;
96
+ x2 = 32;
97
+ y2 = -1;
98
+ rect = refRect;
99
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
100
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 31, 31, 0);
101
+
102
+ x1 = 32;
103
+ y1 = -1;
104
+ x2 = -1;
105
+ y2 = 32;
106
+ rect = refRect;
107
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
108
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 0, 0, 31);
109
+
110
+ return TEST_COMPLETED;
111
+ }
112
+
113
+ /* !
114
+ * \brief Tests SDL_IntersectRectAndLine() non-clipping case line inside
115
+ *
116
+ * \sa
117
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
118
+ */
119
+ int
120
+ rect_testIntersectRectAndLineInside (void *arg)
121
+ {
122
+ SDL_Rect refRect = { 0, 0, 32, 32 };
123
+ SDL_Rect rect;
124
+ int x1, y1;
125
+ int x2, y2;
126
+ SDL_bool intersected;
127
+
128
+ int xmin = refRect.x;
129
+ int xmax = refRect.x + refRect.w - 1;
130
+ int ymin = refRect.y;
131
+ int ymax = refRect.y + refRect.h - 1;
132
+ int x1Ref = SDLTest_RandomIntegerInRange(xmin + 1, xmax - 1);
133
+ int y1Ref = SDLTest_RandomIntegerInRange(ymin + 1, ymax - 1);
134
+ int x2Ref = SDLTest_RandomIntegerInRange(xmin + 1, xmax - 1);
135
+ int y2Ref = SDLTest_RandomIntegerInRange(ymin + 1, ymax - 1);
136
+
137
+ x1 = x1Ref;
138
+ y1 = y1Ref;
139
+ x2 = x2Ref;
140
+ y2 = y2Ref;
141
+ rect = refRect;
142
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
143
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref);
144
+
145
+ x1 = x1Ref;
146
+ y1 = y1Ref;
147
+ x2 = xmax;
148
+ y2 = ymax;
149
+ rect = refRect;
150
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
151
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, xmax, ymax);
152
+
153
+ x1 = xmin;
154
+ y1 = ymin;
155
+ x2 = x2Ref;
156
+ y2 = y2Ref;
157
+ rect = refRect;
158
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
159
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymin, x2Ref, y2Ref);
160
+
161
+ x1 = xmin;
162
+ y1 = ymin;
163
+ x2 = xmax;
164
+ y2 = ymax;
165
+ rect = refRect;
166
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
167
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymin, xmax, ymax);
168
+
169
+ x1 = xmin;
170
+ y1 = ymax;
171
+ x2 = xmax;
172
+ y2 = ymin;
173
+ rect = refRect;
174
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
175
+ _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymax, xmax, ymin);
176
+
177
+ return TEST_COMPLETED;
178
+ }
179
+
180
+ /* !
181
+ * \brief Tests SDL_IntersectRectAndLine() non-clipping cases outside
182
+ *
183
+ * \sa
184
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
185
+ */
186
+ int
187
+ rect_testIntersectRectAndLineOutside (void *arg)
188
+ {
189
+ SDL_Rect refRect = { 0, 0, 32, 32 };
190
+ SDL_Rect rect;
191
+ int x1, y1;
192
+ int x2, y2;
193
+ SDL_bool intersected;
194
+
195
+ int xLeft = -SDLTest_RandomIntegerInRange(1, refRect.w);
196
+ int xRight = refRect.w + SDLTest_RandomIntegerInRange(1, refRect.w);
197
+ int yTop = -SDLTest_RandomIntegerInRange(1, refRect.h);
198
+ int yBottom = refRect.h + SDLTest_RandomIntegerInRange(1, refRect.h);
199
+
200
+ x1 = xLeft;
201
+ y1 = 0;
202
+ x2 = xLeft;
203
+ y2 = 31;
204
+ rect = refRect;
205
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
206
+ _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, xLeft, 0, xLeft, 31);
207
+
208
+ x1 = xRight;
209
+ y1 = 0;
210
+ x2 = xRight;
211
+ y2 = 31;
212
+ rect = refRect;
213
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
214
+ _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, xRight, 0, xRight, 31);
215
+
216
+ x1 = 0;
217
+ y1 = yTop;
218
+ x2 = 31;
219
+ y2 = yTop;
220
+ rect = refRect;
221
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
222
+ _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yTop, 31, yTop);
223
+
224
+ x1 = 0;
225
+ y1 = yBottom;
226
+ x2 = 31;
227
+ y2 = yBottom;
228
+ rect = refRect;
229
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
230
+ _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yBottom, 31, yBottom);
231
+
232
+ return TEST_COMPLETED;
233
+ }
234
+
235
+ /* !
236
+ * \brief Tests SDL_IntersectRectAndLine() with empty rectangle
237
+ *
238
+ * \sa
239
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
240
+ */
241
+ int
242
+ rect_testIntersectRectAndLineEmpty (void *arg)
243
+ {
244
+ SDL_Rect refRect;
245
+ SDL_Rect rect;
246
+ int x1, y1, x1Ref, y1Ref;
247
+ int x2, y2, x2Ref, y2Ref;
248
+ SDL_bool intersected;
249
+
250
+ refRect.x = SDLTest_RandomIntegerInRange(1, 1024);
251
+ refRect.y = SDLTest_RandomIntegerInRange(1, 1024);
252
+ refRect.w = 0;
253
+ refRect.h = 0;
254
+ x1Ref = refRect.x;
255
+ y1Ref = refRect.y;
256
+ x2Ref = SDLTest_RandomIntegerInRange(1, 1024);
257
+ y2Ref = SDLTest_RandomIntegerInRange(1, 1024);
258
+
259
+ x1 = x1Ref;
260
+ y1 = y1Ref;
261
+ x2 = x2Ref;
262
+ y2 = y2Ref;
263
+ rect = refRect;
264
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
265
+ _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref);
266
+
267
+ return TEST_COMPLETED;
268
+ }
269
+
270
+ /* !
271
+ * \brief Negative tests against SDL_IntersectRectAndLine() with invalid parameters
272
+ *
273
+ * \sa
274
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
275
+ */
276
+ int
277
+ rect_testIntersectRectAndLineParam (void *arg)
278
+ {
279
+ SDL_Rect rect = { 0, 0, 32, 32 };
280
+ int x1 = rect.w / 2;
281
+ int y1 = rect.h / 2;
282
+ int x2 = x1;
283
+ int y2 = 2 * rect.h;
284
+ SDL_bool intersected;
285
+
286
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
287
+ SDLTest_AssertCheck(intersected == SDL_TRUE, "Check that intersection result was SDL_TRUE");
288
+
289
+ intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, &x1, &y1, &x2, &y2);
290
+ SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
291
+ intersected = SDL_IntersectRectAndLine(&rect, (int *)NULL, &y1, &x2, &y2);
292
+ SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL");
293
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, (int *)NULL, &x2, &y2);
294
+ SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when 3rd parameter is NULL");
295
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, (int *)NULL, &y2);
296
+ SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when 4th parameter is NULL");
297
+ intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, (int *)NULL);
298
+ SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when 5th parameter is NULL");
299
+ intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);
300
+ SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
301
+
302
+ return TEST_COMPLETED;
303
+ }
304
+
305
+ /* !
306
+ * \brief Private helper to check SDL_HasIntersection results
307
+ */
308
+ void _validateHasIntersectionResults(
309
+ SDL_bool intersection, SDL_bool expectedIntersection,
310
+ SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB)
311
+ {
312
+ SDLTest_AssertCheck(intersection == expectedIntersection,
313
+ "Check intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)",
314
+ (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
315
+ (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
316
+ rectA->x, rectA->y, rectA->w, rectA->h,
317
+ rectB->x, rectB->y, rectB->w, rectB->h);
318
+ SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,
319
+ "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
320
+ rectA->x, rectA->y, rectA->w, rectA->h,
321
+ refRectA->x, refRectA->y, refRectA->w, refRectA->h);
322
+ SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h,
323
+ "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
324
+ rectB->x, rectB->y, rectB->w, rectB->h,
325
+ refRectB->x, refRectB->y, refRectB->w, refRectB->h);
326
+ }
327
+
328
+ /* !
329
+ * \brief Private helper to check SDL_IntersectRect results
330
+ */
331
+ void _validateIntersectRectResults(
332
+ SDL_bool intersection, SDL_bool expectedIntersection,
333
+ SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,
334
+ SDL_Rect *result, SDL_Rect *expectedResult)
335
+ {
336
+ _validateHasIntersectionResults(intersection, expectedIntersection, rectA, rectB, refRectA, refRectB);
337
+ if (result && expectedResult) {
338
+ SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h,
339
+ "Check that intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
340
+ rectA->x, rectA->y, rectA->w, rectA->h,
341
+ rectB->x, rectB->y, rectB->w, rectB->h,
342
+ result->x, result->y, result->w, result->h,
343
+ expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h);
344
+ }
345
+ }
346
+
347
+ /* !
348
+ * \brief Private helper to check SDL_UnionRect results
349
+ */
350
+ void _validateUnionRectResults(
351
+ SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,
352
+ SDL_Rect *result, SDL_Rect *expectedResult)
353
+ {
354
+ SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,
355
+ "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
356
+ rectA->x, rectA->y, rectA->w, rectA->h,
357
+ refRectA->x, refRectA->y, refRectA->w, refRectA->h);
358
+ SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h,
359
+ "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
360
+ rectB->x, rectB->y, rectB->w, rectB->h,
361
+ refRectB->x, refRectB->y, refRectB->w, refRectB->h);
362
+ SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h,
363
+ "Check that union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
364
+ rectA->x, rectA->y, rectA->w, rectA->h,
365
+ rectB->x, rectB->y, rectB->w, rectB->h,
366
+ result->x, result->y, result->w, result->h,
367
+ expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h);
368
+ }
369
+
370
+ /* !
371
+ * \brief Private helper to check SDL_RectEmpty results
372
+ */
373
+ void _validateRectEmptyResults(
374
+ SDL_bool empty, SDL_bool expectedEmpty,
375
+ SDL_Rect *rect, SDL_Rect *refRect)
376
+ {
377
+ SDLTest_AssertCheck(empty == expectedEmpty,
378
+ "Check for correct empty result: expected %s, got %s testing (%d,%d,%d,%d)",
379
+ (expectedEmpty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
380
+ (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
381
+ rect->x, rect->y, rect->w, rect->h);
382
+ SDLTest_AssertCheck(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h,
383
+ "Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
384
+ rect->x, rect->y, rect->w, rect->h,
385
+ refRect->x, refRect->y, refRect->w, refRect->h);
386
+ }
387
+
388
+ /* !
389
+ * \brief Private helper to check SDL_RectEquals results
390
+ */
391
+ void _validateRectEqualsResults(
392
+ SDL_bool equals, SDL_bool expectedEquals,
393
+ SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB)
394
+ {
395
+ SDLTest_AssertCheck(equals == expectedEquals,
396
+ "Check for correct equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d)",
397
+ (expectedEquals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
398
+ (equals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
399
+ rectA->x, rectA->y, rectA->w, rectA->h,
400
+ rectB->x, rectB->y, rectB->w, rectB->h);
401
+ SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,
402
+ "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
403
+ rectA->x, rectA->y, rectA->w, rectA->h,
404
+ refRectA->x, refRectA->y, refRectA->w, refRectA->h);
405
+ SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h,
406
+ "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
407
+ rectB->x, rectB->y, rectB->w, rectB->h,
408
+ refRectB->x, refRectB->y, refRectB->w, refRectB->h);
409
+ }
410
+
411
+ /* !
412
+ * \brief Tests SDL_IntersectRect() with B fully inside A
413
+ *
414
+ * \sa
415
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect
416
+ */
417
+ int rect_testIntersectRectInside (void *arg)
418
+ {
419
+ SDL_Rect refRectA = { 0, 0, 32, 32 };
420
+ SDL_Rect refRectB;
421
+ SDL_Rect rectA;
422
+ SDL_Rect rectB;
423
+ SDL_Rect result;
424
+ SDL_bool intersection;
425
+
426
+ /* rectB fully contained in rectA */
427
+ refRectB.x = 0;
428
+ refRectB.y = 0;
429
+ refRectB.w = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);
430
+ refRectB.h = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);
431
+ rectA = refRectA;
432
+ rectB = refRectB;
433
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
434
+ _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectB);
435
+
436
+ return TEST_COMPLETED;
437
+ }
438
+
439
+ /* !
440
+ * \brief Tests SDL_IntersectRect() with B fully outside A
441
+ *
442
+ * \sa
443
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect
444
+ */
445
+ int rect_testIntersectRectOutside (void *arg)
446
+ {
447
+ SDL_Rect refRectA = { 0, 0, 32, 32 };
448
+ SDL_Rect refRectB;
449
+ SDL_Rect rectA;
450
+ SDL_Rect rectB;
451
+ SDL_Rect result;
452
+ SDL_bool intersection;
453
+
454
+ /* rectB fully outside of rectA */
455
+ refRectB.x = refRectA.x + refRectA.w + SDLTest_RandomIntegerInRange(1, 10);
456
+ refRectB.y = refRectA.y + refRectA.h + SDLTest_RandomIntegerInRange(1, 10);
457
+ refRectB.w = refRectA.w;
458
+ refRectB.h = refRectA.h;
459
+ rectA = refRectA;
460
+ rectB = refRectB;
461
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
462
+ _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
463
+
464
+ return TEST_COMPLETED;
465
+ }
466
+
467
+ /* !
468
+ * \brief Tests SDL_IntersectRect() with B partially intersecting A
469
+ *
470
+ * \sa
471
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect
472
+ */
473
+ int rect_testIntersectRectPartial (void *arg)
474
+ {
475
+ SDL_Rect refRectA = { 0, 0, 32, 32 };
476
+ SDL_Rect refRectB;
477
+ SDL_Rect rectA;
478
+ SDL_Rect rectB;
479
+ SDL_Rect result;
480
+ SDL_Rect expectedResult;
481
+ SDL_bool intersection;
482
+
483
+ /* rectB partially contained in rectA */
484
+ refRectB.x = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);
485
+ refRectB.y = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);
486
+ refRectB.w = refRectA.w;
487
+ refRectB.h = refRectA.h;
488
+ rectA = refRectA;
489
+ rectB = refRectB;
490
+ expectedResult.x = refRectB.x;
491
+ expectedResult.y = refRectB.y;
492
+ expectedResult.w = refRectA.w - refRectB.x;
493
+ expectedResult.h = refRectA.h - refRectB.y;
494
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
495
+ _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
496
+
497
+ /* rectB right edge */
498
+ refRectB.x = rectA.w - 1;
499
+ refRectB.y = rectA.y;
500
+ refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);
501
+ refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);
502
+ rectA = refRectA;
503
+ rectB = refRectB;
504
+ expectedResult.x = refRectB.x;
505
+ expectedResult.y = refRectB.y;
506
+ expectedResult.w = 1;
507
+ expectedResult.h = refRectB.h;
508
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
509
+ _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
510
+
511
+ /* rectB left edge */
512
+ refRectB.x = 1 - rectA.w;
513
+ refRectB.y = rectA.y;
514
+ refRectB.w = refRectA.w;
515
+ refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);
516
+ rectA = refRectA;
517
+ rectB = refRectB;
518
+ expectedResult.x = 0;
519
+ expectedResult.y = refRectB.y;
520
+ expectedResult.w = 1;
521
+ expectedResult.h = refRectB.h;
522
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
523
+ _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
524
+
525
+ /* rectB bottom edge */
526
+ refRectB.x = rectA.x;
527
+ refRectB.y = rectA.h - 1;
528
+ refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);
529
+ refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);
530
+ rectA = refRectA;
531
+ rectB = refRectB;
532
+ expectedResult.x = refRectB.x;
533
+ expectedResult.y = refRectB.y;
534
+ expectedResult.w = refRectB.w;
535
+ expectedResult.h = 1;
536
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
537
+ _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
538
+
539
+ /* rectB top edge */
540
+ refRectB.x = rectA.x;
541
+ refRectB.y = 1 - rectA.h;
542
+ refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);
543
+ refRectB.h = rectA.h;
544
+ rectA = refRectA;
545
+ rectB = refRectB;
546
+ expectedResult.x = refRectB.x;
547
+ expectedResult.y = 0;
548
+ expectedResult.w = refRectB.w;
549
+ expectedResult.h = 1;
550
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
551
+ _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
552
+
553
+ return TEST_COMPLETED;
554
+ }
555
+
556
+ /* !
557
+ * \brief Tests SDL_IntersectRect() with 1x1 pixel sized rectangles
558
+ *
559
+ * \sa
560
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect
561
+ */
562
+ int rect_testIntersectRectPoint (void *arg)
563
+ {
564
+ SDL_Rect refRectA = { 0, 0, 1, 1 };
565
+ SDL_Rect refRectB = { 0, 0, 1, 1 };
566
+ SDL_Rect rectA;
567
+ SDL_Rect rectB;
568
+ SDL_Rect result;
569
+ SDL_bool intersection;
570
+ int offsetX, offsetY;
571
+
572
+ /* intersecting pixels */
573
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
574
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
575
+ refRectB.x = refRectA.x;
576
+ refRectB.y = refRectA.y;
577
+ rectA = refRectA;
578
+ rectB = refRectB;
579
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
580
+ _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectA);
581
+
582
+ /* non-intersecting pixels cases */
583
+ for (offsetX = -1; offsetX <= 1; offsetX++) {
584
+ for (offsetY = -1; offsetY <= 1; offsetY++) {
585
+ if (offsetX != 0 || offsetY != 0) {
586
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
587
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
588
+ refRectB.x = refRectA.x;
589
+ refRectB.y = refRectA.y;
590
+ refRectB.x += offsetX;
591
+ refRectB.y += offsetY;
592
+ rectA = refRectA;
593
+ rectB = refRectB;
594
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
595
+ _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
596
+ }
597
+ }
598
+ }
599
+
600
+ return TEST_COMPLETED;
601
+ }
602
+
603
+ /* !
604
+ * \brief Tests SDL_IntersectRect() with empty rectangles
605
+ *
606
+ * \sa
607
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect
608
+ */
609
+ int rect_testIntersectRectEmpty (void *arg)
610
+ {
611
+ SDL_Rect refRectA;
612
+ SDL_Rect refRectB;
613
+ SDL_Rect rectA;
614
+ SDL_Rect rectB;
615
+ SDL_Rect result;
616
+ SDL_bool intersection;
617
+ SDL_bool empty;
618
+
619
+ /* Rect A empty */
620
+ result.w = SDLTest_RandomIntegerInRange(1, 100);
621
+ result.h = SDLTest_RandomIntegerInRange(1, 100);
622
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
623
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
624
+ refRectA.w = SDLTest_RandomIntegerInRange(1, 100);
625
+ refRectA.h = SDLTest_RandomIntegerInRange(1, 100);
626
+ refRectB = refRectA;
627
+ refRectA.w = 0;
628
+ refRectA.h = 0;
629
+ rectA = refRectA;
630
+ rectB = refRectB;
631
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
632
+ _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
633
+ empty = (SDL_bool)SDL_RectEmpty(&result);
634
+ SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
635
+
636
+ /* Rect B empty */
637
+ result.w = SDLTest_RandomIntegerInRange(1, 100);
638
+ result.h = SDLTest_RandomIntegerInRange(1, 100);
639
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
640
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
641
+ refRectA.w = SDLTest_RandomIntegerInRange(1, 100);
642
+ refRectA.h = SDLTest_RandomIntegerInRange(1, 100);
643
+ refRectB = refRectA;
644
+ refRectB.w = 0;
645
+ refRectB.h = 0;
646
+ rectA = refRectA;
647
+ rectB = refRectB;
648
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
649
+ _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
650
+ empty = (SDL_bool)SDL_RectEmpty(&result);
651
+ SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
652
+
653
+ /* Rect A and B empty */
654
+ result.w = SDLTest_RandomIntegerInRange(1, 100);
655
+ result.h = SDLTest_RandomIntegerInRange(1, 100);
656
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
657
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
658
+ refRectA.w = SDLTest_RandomIntegerInRange(1, 100);
659
+ refRectA.h = SDLTest_RandomIntegerInRange(1, 100);
660
+ refRectB = refRectA;
661
+ refRectA.w = 0;
662
+ refRectA.h = 0;
663
+ refRectB.w = 0;
664
+ refRectB.h = 0;
665
+ rectA = refRectA;
666
+ rectB = refRectB;
667
+ intersection = SDL_IntersectRect(&rectA, &rectB, &result);
668
+ _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
669
+ empty = (SDL_bool)SDL_RectEmpty(&result);
670
+ SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
671
+
672
+ return TEST_COMPLETED;
673
+ }
674
+
675
+ /* !
676
+ * \brief Negative tests against SDL_IntersectRect() with invalid parameters
677
+ *
678
+ * \sa
679
+ * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect
680
+ */
681
+ int rect_testIntersectRectParam(void *arg)
682
+ {
683
+ SDL_Rect rectA;
684
+ SDL_Rect rectB;
685
+ SDL_Rect result;
686
+ SDL_bool intersection;
687
+
688
+ /* invalid parameter combinations */
689
+ intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, &result);
690
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
691
+ intersection = SDL_IntersectRect(&rectA, (SDL_Rect *)NULL, &result);
692
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL");
693
+ intersection = SDL_IntersectRect(&rectA, &rectB, (SDL_Rect *)NULL);
694
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 3st parameter is NULL");
695
+ intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, &result);
696
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameters are NULL");
697
+ intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL);
698
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 3rd parameters are NULL ");
699
+ intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
700
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
701
+
702
+ return TEST_COMPLETED;
703
+ }
704
+
705
+ /* !
706
+ * \brief Tests SDL_HasIntersection() with B fully inside A
707
+ *
708
+ * \sa
709
+ * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection
710
+ */
711
+ int rect_testHasIntersectionInside (void *arg)
712
+ {
713
+ SDL_Rect refRectA = { 0, 0, 32, 32 };
714
+ SDL_Rect refRectB;
715
+ SDL_Rect rectA;
716
+ SDL_Rect rectB;
717
+ SDL_bool intersection;
718
+
719
+ /* rectB fully contained in rectA */
720
+ refRectB.x = 0;
721
+ refRectB.y = 0;
722
+ refRectB.w = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);
723
+ refRectB.h = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);
724
+ rectA = refRectA;
725
+ rectB = refRectB;
726
+ intersection = SDL_HasIntersection(&rectA, &rectB);
727
+ _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
728
+
729
+ return TEST_COMPLETED;
730
+ }
731
+
732
+ /* !
733
+ * \brief Tests SDL_HasIntersection() with B fully outside A
734
+ *
735
+ * \sa
736
+ * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection
737
+ */
738
+ int rect_testHasIntersectionOutside (void *arg)
739
+ {
740
+ SDL_Rect refRectA = { 0, 0, 32, 32 };
741
+ SDL_Rect refRectB;
742
+ SDL_Rect rectA;
743
+ SDL_Rect rectB;
744
+ SDL_bool intersection;
745
+
746
+ /* rectB fully outside of rectA */
747
+ refRectB.x = refRectA.x + refRectA.w + SDLTest_RandomIntegerInRange(1, 10);
748
+ refRectB.y = refRectA.y + refRectA.h + SDLTest_RandomIntegerInRange(1, 10);
749
+ refRectB.w = refRectA.w;
750
+ refRectB.h = refRectA.h;
751
+ rectA = refRectA;
752
+ rectB = refRectB;
753
+ intersection = SDL_HasIntersection(&rectA, &rectB);
754
+ _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);
755
+
756
+ return TEST_COMPLETED;
757
+ }
758
+
759
+ /* !
760
+ * \brief Tests SDL_HasIntersection() with B partially intersecting A
761
+ *
762
+ * \sa
763
+ * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection
764
+ */
765
+ int rect_testHasIntersectionPartial (void *arg)
766
+ {
767
+ SDL_Rect refRectA = { 0, 0, 32, 32 };
768
+ SDL_Rect refRectB;
769
+ SDL_Rect rectA;
770
+ SDL_Rect rectB;
771
+ SDL_bool intersection;
772
+
773
+ /* rectB partially contained in rectA */
774
+ refRectB.x = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);
775
+ refRectB.y = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);
776
+ refRectB.w = refRectA.w;
777
+ refRectB.h = refRectA.h;
778
+ rectA = refRectA;
779
+ rectB = refRectB;
780
+ intersection = SDL_HasIntersection(&rectA, &rectB);
781
+ _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
782
+
783
+ /* rectB right edge */
784
+ refRectB.x = rectA.w - 1;
785
+ refRectB.y = rectA.y;
786
+ refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);
787
+ refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);
788
+ rectA = refRectA;
789
+ rectB = refRectB;
790
+ intersection = SDL_HasIntersection(&rectA, &rectB);
791
+ _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
792
+
793
+ /* rectB left edge */
794
+ refRectB.x = 1 - rectA.w;
795
+ refRectB.y = rectA.y;
796
+ refRectB.w = refRectA.w;
797
+ refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);
798
+ rectA = refRectA;
799
+ rectB = refRectB;
800
+ intersection = SDL_HasIntersection(&rectA, &rectB);
801
+ _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
802
+
803
+ /* rectB bottom edge */
804
+ refRectB.x = rectA.x;
805
+ refRectB.y = rectA.h - 1;
806
+ refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);
807
+ refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);
808
+ rectA = refRectA;
809
+ rectB = refRectB;
810
+ intersection = SDL_HasIntersection(&rectA, &rectB);
811
+ _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
812
+
813
+ /* rectB top edge */
814
+ refRectB.x = rectA.x;
815
+ refRectB.y = 1 - rectA.h;
816
+ refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);
817
+ refRectB.h = rectA.h;
818
+ rectA = refRectA;
819
+ rectB = refRectB;
820
+ intersection = SDL_HasIntersection(&rectA, &rectB);
821
+ _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
822
+
823
+ return TEST_COMPLETED;
824
+ }
825
+
826
+ /* !
827
+ * \brief Tests SDL_HasIntersection() with 1x1 pixel sized rectangles
828
+ *
829
+ * \sa
830
+ * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection
831
+ */
832
+ int rect_testHasIntersectionPoint (void *arg)
833
+ {
834
+ SDL_Rect refRectA = { 0, 0, 1, 1 };
835
+ SDL_Rect refRectB = { 0, 0, 1, 1 };
836
+ SDL_Rect rectA;
837
+ SDL_Rect rectB;
838
+ SDL_bool intersection;
839
+ int offsetX, offsetY;
840
+
841
+ /* intersecting pixels */
842
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
843
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
844
+ refRectB.x = refRectA.x;
845
+ refRectB.y = refRectA.y;
846
+ rectA = refRectA;
847
+ rectB = refRectB;
848
+ intersection = SDL_HasIntersection(&rectA, &rectB);
849
+ _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
850
+
851
+ /* non-intersecting pixels cases */
852
+ for (offsetX = -1; offsetX <= 1; offsetX++) {
853
+ for (offsetY = -1; offsetY <= 1; offsetY++) {
854
+ if (offsetX != 0 || offsetY != 0) {
855
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
856
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
857
+ refRectB.x = refRectA.x;
858
+ refRectB.y = refRectA.y;
859
+ refRectB.x += offsetX;
860
+ refRectB.y += offsetY;
861
+ rectA = refRectA;
862
+ rectB = refRectB;
863
+ intersection = SDL_HasIntersection(&rectA, &rectB);
864
+ _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);
865
+ }
866
+ }
867
+ }
868
+
869
+ return TEST_COMPLETED;
870
+ }
871
+
872
+ /* !
873
+ * \brief Tests SDL_HasIntersection() with empty rectangles
874
+ *
875
+ * \sa
876
+ * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection
877
+ */
878
+ int rect_testHasIntersectionEmpty (void *arg)
879
+ {
880
+ SDL_Rect refRectA;
881
+ SDL_Rect refRectB;
882
+ SDL_Rect rectA;
883
+ SDL_Rect rectB;
884
+ SDL_bool intersection;
885
+
886
+ /* Rect A empty */
887
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
888
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
889
+ refRectA.w = SDLTest_RandomIntegerInRange(1, 100);
890
+ refRectA.h = SDLTest_RandomIntegerInRange(1, 100);
891
+ refRectB = refRectA;
892
+ refRectA.w = 0;
893
+ refRectA.h = 0;
894
+ rectA = refRectA;
895
+ rectB = refRectB;
896
+ intersection = SDL_HasIntersection(&rectA, &rectB);
897
+ _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);
898
+
899
+ /* Rect B empty */
900
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
901
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
902
+ refRectA.w = SDLTest_RandomIntegerInRange(1, 100);
903
+ refRectA.h = SDLTest_RandomIntegerInRange(1, 100);
904
+ refRectB = refRectA;
905
+ refRectB.w = 0;
906
+ refRectB.h = 0;
907
+ rectA = refRectA;
908
+ rectB = refRectB;
909
+ intersection = SDL_HasIntersection(&rectA, &rectB);
910
+ _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);
911
+
912
+ /* Rect A and B empty */
913
+ refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
914
+ refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
915
+ refRectA.w = SDLTest_RandomIntegerInRange(1, 100);
916
+ refRectA.h = SDLTest_RandomIntegerInRange(1, 100);
917
+ refRectB = refRectA;
918
+ refRectA.w = 0;
919
+ refRectA.h = 0;
920
+ refRectB.w = 0;
921
+ refRectB.h = 0;
922
+ rectA = refRectA;
923
+ rectB = refRectB;
924
+ intersection = SDL_HasIntersection(&rectA, &rectB);
925
+ _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);
926
+
927
+ return TEST_COMPLETED;
928
+ }
929
+
930
+ /* !
931
+ * \brief Negative tests against SDL_HasIntersection() with invalid parameters
932
+ *
933
+ * \sa
934
+ * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection
935
+ */
936
+ int rect_testHasIntersectionParam(void *arg)
937
+ {
938
+ SDL_Rect rectA;
939
+ SDL_Rect rectB;
940
+ SDL_bool intersection;
941
+
942
+ /* invalid parameter combinations */
943
+ intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB);
944
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
945
+ intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL);
946
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL");
947
+ intersection = SDL_HasIntersection((SDL_Rect *)NULL, (SDL_Rect *)NULL);
948
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
949
+
950
+ return TEST_COMPLETED;
951
+ }
952
+
953
+ /* !
954
+ * \brief Test SDL_EnclosePoints() without clipping
955
+ *
956
+ * \sa
957
+ * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints
958
+ */
959
+ int rect_testEnclosePoints(void *arg)
960
+ {
961
+ const int numPoints = 16;
962
+ SDL_Point refPoints[16];
963
+ SDL_Point points[16];
964
+ SDL_Rect result;
965
+ SDL_bool anyEnclosed;
966
+ SDL_bool anyEnclosedNoResult;
967
+ SDL_bool expectedEnclosed = SDL_TRUE;
968
+ int newx, newy;
969
+ int minx = 0, maxx = 0, miny = 0, maxy = 0;
970
+ int i;
971
+
972
+ /* Create input data, tracking result */
973
+ for (i=0; i<numPoints; i++) {
974
+ newx = SDLTest_RandomIntegerInRange(-1024, 1024);
975
+ newy = SDLTest_RandomIntegerInRange(-1024, 1024);
976
+ refPoints[i].x = newx;
977
+ refPoints[i].y = newy;
978
+ points[i].x = newx;
979
+ points[i].y = newy;
980
+ if (i==0) {
981
+ minx = newx;
982
+ maxx = newx;
983
+ miny = newy;
984
+ maxy = newy;
985
+ } else {
986
+ if (newx < minx) minx = newx;
987
+ if (newx > maxx) maxx = newx;
988
+ if (newy < miny) miny = newy;
989
+ if (newy > maxy) maxy = newy;
990
+ }
991
+ }
992
+
993
+ /* Call function and validate - special case: no result requested */
994
+ anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL);
995
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
996
+ "Check expected return value %s, got %s",
997
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
998
+ (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
999
+ for (i=0; i<numPoints; i++) {
1000
+ SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
1001
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
1002
+ i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
1003
+ }
1004
+
1005
+ /* Call function and validate */
1006
+ anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, &result);
1007
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
1008
+ "Check return value %s, got %s",
1009
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
1010
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
1011
+ for (i=0; i<numPoints; i++) {
1012
+ SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
1013
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
1014
+ i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
1015
+ }
1016
+ SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),
1017
+ "Resulting enclosing rectangle incorrect: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)",
1018
+ minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);
1019
+
1020
+ return TEST_COMPLETED;
1021
+ }
1022
+
1023
+ /* !
1024
+ * \brief Test SDL_EnclosePoints() with repeated input points
1025
+ *
1026
+ * \sa
1027
+ * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints
1028
+ */
1029
+ int rect_testEnclosePointsRepeatedInput(void *arg)
1030
+ {
1031
+ const int numPoints = 8;
1032
+ const int halfPoints = 4;
1033
+ SDL_Point refPoints[8];
1034
+ SDL_Point points[8];
1035
+ SDL_Rect result;
1036
+ SDL_bool anyEnclosed;
1037
+ SDL_bool anyEnclosedNoResult;
1038
+ SDL_bool expectedEnclosed = SDL_TRUE;
1039
+ int newx, newy;
1040
+ int minx = 0, maxx = 0, miny = 0, maxy = 0;
1041
+ int i;
1042
+
1043
+ /* Create input data, tracking result */
1044
+ for (i=0; i<numPoints; i++) {
1045
+ if (i < halfPoints) {
1046
+ newx = SDLTest_RandomIntegerInRange(-1024, 1024);
1047
+ newy = SDLTest_RandomIntegerInRange(-1024, 1024);
1048
+ } else {
1049
+ newx = refPoints[i-halfPoints].x;
1050
+ newy = refPoints[i-halfPoints].y;
1051
+ }
1052
+ refPoints[i].x = newx;
1053
+ refPoints[i].y = newy;
1054
+ points[i].x = newx;
1055
+ points[i].y = newy;
1056
+ if (i==0) {
1057
+ minx = newx;
1058
+ maxx = newx;
1059
+ miny = newy;
1060
+ maxy = newy;
1061
+ } else {
1062
+ if (newx < minx) minx = newx;
1063
+ if (newx > maxx) maxx = newx;
1064
+ if (newy < miny) miny = newy;
1065
+ if (newy > maxy) maxy = newy;
1066
+ }
1067
+ }
1068
+
1069
+ /* Call function and validate - special case: no result requested */
1070
+ anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL);
1071
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
1072
+ "Check return value %s, got %s",
1073
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
1074
+ (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
1075
+ for (i=0; i<numPoints; i++) {
1076
+ SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
1077
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
1078
+ i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
1079
+ }
1080
+
1081
+ /* Call function and validate */
1082
+ anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, &result);
1083
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
1084
+ "Check return value %s, got %s",
1085
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
1086
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
1087
+ for (i=0; i<numPoints; i++) {
1088
+ SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
1089
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
1090
+ i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
1091
+ }
1092
+ SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),
1093
+ "Check resulting enclosing rectangle: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)",
1094
+ minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);
1095
+
1096
+ return TEST_COMPLETED;
1097
+ }
1098
+
1099
+ /* !
1100
+ * \brief Test SDL_EnclosePoints() with clipping
1101
+ *
1102
+ * \sa
1103
+ * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints
1104
+ */
1105
+ int rect_testEnclosePointsWithClipping(void *arg)
1106
+ {
1107
+ const int numPoints = 16;
1108
+ SDL_Point refPoints[16];
1109
+ SDL_Point points[16];
1110
+ SDL_Rect refClip;
1111
+ SDL_Rect clip;
1112
+ SDL_Rect result;
1113
+ SDL_bool anyEnclosed;
1114
+ SDL_bool anyEnclosedNoResult;
1115
+ SDL_bool expectedEnclosed = SDL_FALSE;
1116
+ int newx, newy;
1117
+ int minx = 0, maxx = 0, miny = 0, maxy = 0;
1118
+ int i;
1119
+
1120
+ /* Setup clipping rectangle */
1121
+ refClip.x = SDLTest_RandomIntegerInRange(-1024, 1024);
1122
+ refClip.y = SDLTest_RandomIntegerInRange(-1024, 1024);
1123
+ refClip.w = SDLTest_RandomIntegerInRange(1, 1024);
1124
+ refClip.h = SDLTest_RandomIntegerInRange(1, 1024);
1125
+
1126
+ /* Create input data, tracking result */
1127
+ for (i=0; i<numPoints; i++) {
1128
+ newx = SDLTest_RandomIntegerInRange(-1024, 1024);
1129
+ newy = SDLTest_RandomIntegerInRange(-1024, 1024);
1130
+ refPoints[i].x = newx;
1131
+ refPoints[i].y = newy;
1132
+ points[i].x = newx;
1133
+ points[i].y = newy;
1134
+ if ((newx>=refClip.x) && (newx<(refClip.x + refClip.w)) &&
1135
+ (newy>=refClip.y) && (newy<(refClip.y + refClip.h))) {
1136
+ if (expectedEnclosed==SDL_FALSE) {
1137
+ minx = newx;
1138
+ maxx = newx;
1139
+ miny = newy;
1140
+ maxy = newy;
1141
+ } else {
1142
+ if (newx < minx) minx = newx;
1143
+ if (newx > maxx) maxx = newx;
1144
+ if (newy < miny) miny = newy;
1145
+ if (newy > maxy) maxy = newy;
1146
+ }
1147
+ expectedEnclosed = SDL_TRUE;
1148
+ }
1149
+ }
1150
+
1151
+ /* Call function and validate - special case: no result requested */
1152
+ clip = refClip;
1153
+ anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, (SDL_Rect *)NULL);
1154
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
1155
+ "Expected return value %s, got %s",
1156
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
1157
+ (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
1158
+ for (i=0; i<numPoints; i++) {
1159
+ SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
1160
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
1161
+ i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
1162
+ }
1163
+ SDLTest_AssertCheck(refClip.x==clip.x && refClip.y==clip.y && refClip.w==clip.w && refClip.h==clip.h,
1164
+ "Check that source clipping rectangle was not modified");
1165
+
1166
+ /* Call function and validate */
1167
+ anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, &result);
1168
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
1169
+ "Check return value %s, got %s",
1170
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
1171
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
1172
+ for (i=0; i<numPoints; i++) {
1173
+ SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
1174
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
1175
+ i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
1176
+ }
1177
+ SDLTest_AssertCheck(refClip.x==clip.x && refClip.y==clip.y && refClip.w==clip.w && refClip.h==clip.h,
1178
+ "Check that source clipping rectangle was not modified");
1179
+ if (expectedEnclosed==SDL_TRUE) {
1180
+ SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),
1181
+ "Check resulting enclosing rectangle: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)",
1182
+ minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);
1183
+ }
1184
+
1185
+ /* Empty clipping rectangle */
1186
+ clip.w = 0;
1187
+ clip.h = 0;
1188
+ expectedEnclosed = SDL_FALSE;
1189
+ anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, &result);
1190
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
1191
+ "Check return value %s, got %s",
1192
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
1193
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
1194
+
1195
+ return TEST_COMPLETED;
1196
+ }
1197
+
1198
+ /* !
1199
+ * \brief Negative tests against SDL_EnclosePoints() with invalid parameters
1200
+ *
1201
+ * \sa
1202
+ * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints
1203
+ */
1204
+ int rect_testEnclosePointsParam(void *arg)
1205
+ {
1206
+ SDL_Point points[1];
1207
+ int count;
1208
+ SDL_Rect clip;
1209
+ SDL_Rect result;
1210
+ SDL_bool anyEnclosed;
1211
+
1212
+ /* invalid parameter combinations */
1213
+ anyEnclosed = SDL_EnclosePoints((SDL_Point *)NULL, 1, (const SDL_Rect *)&clip, &result);
1214
+ SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 1st parameter is NULL");
1215
+ anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, 0, (const SDL_Rect *)&clip, &result);
1216
+ SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 2nd parameter is 0");
1217
+ count = SDLTest_RandomIntegerInRange(-100, -1);
1218
+ anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, count, (const SDL_Rect *)&clip, &result);
1219
+ SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 2nd parameter is %i (negative)", count);
1220
+ anyEnclosed = SDL_EnclosePoints((SDL_Point *)NULL, 0, (const SDL_Rect *)&clip, &result);
1221
+ SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 1st parameter is NULL and 2nd parameter was 0");
1222
+
1223
+ return TEST_COMPLETED;
1224
+ }
1225
+
1226
+ /* !
1227
+ * \brief Tests SDL_UnionRect() where rect B is outside rect A
1228
+ *
1229
+ * \sa
1230
+ * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect
1231
+ */
1232
+ int rect_testUnionRectOutside(void *arg)
1233
+ {
1234
+ SDL_Rect refRectA, refRectB;
1235
+ SDL_Rect rectA, rectB;
1236
+ SDL_Rect expectedResult;
1237
+ SDL_Rect result;
1238
+ int minx, maxx, miny, maxy;
1239
+ int dx, dy;
1240
+
1241
+ /* Union 1x1 outside */
1242
+ for (dx = -1; dx < 2; dx++) {
1243
+ for (dy = -1; dy < 2; dy++) {
1244
+ if ((dx != 0) || (dy != 0)) {
1245
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1246
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1247
+ refRectA.w=1;
1248
+ refRectA.h=1;
1249
+ refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024) + dx*2048;
1250
+ refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024) + dx*2048;
1251
+ refRectB.w=1;
1252
+ refRectB.h=1;
1253
+ minx = (refRectA.x<refRectB.x) ? refRectA.x : refRectB.x;
1254
+ maxx = (refRectA.x>refRectB.x) ? refRectA.x : refRectB.x;
1255
+ miny = (refRectA.y<refRectB.y) ? refRectA.y : refRectB.y;
1256
+ maxy = (refRectA.y>refRectB.y) ? refRectA.y : refRectB.y;
1257
+ expectedResult.x = minx;
1258
+ expectedResult.y = miny;
1259
+ expectedResult.w = maxx - minx + 1;
1260
+ expectedResult.h = maxy - miny + 1;
1261
+ rectA = refRectA;
1262
+ rectB = refRectB;
1263
+ SDL_UnionRect(&rectA, &rectB, &result);
1264
+ _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
1265
+ }
1266
+ }
1267
+ }
1268
+
1269
+ /* Union outside overlap */
1270
+ for (dx = -1; dx < 2; dx++) {
1271
+ for (dy = -1; dy < 2; dy++) {
1272
+ if ((dx != 0) || (dy != 0)) {
1273
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1274
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1275
+ refRectA.w=SDLTest_RandomIntegerInRange(256, 512);
1276
+ refRectA.h=SDLTest_RandomIntegerInRange(256, 512);
1277
+ refRectB.x=refRectA.x + 1 + dx*2;
1278
+ refRectB.y=refRectA.y + 1 + dy*2;
1279
+ refRectB.w=refRectA.w - 2;
1280
+ refRectB.h=refRectA.h - 2;
1281
+ expectedResult = refRectA;
1282
+ if (dx == -1) expectedResult.x--;
1283
+ if (dy == -1) expectedResult.y--;
1284
+ if ((dx == 1) || (dx == -1)) expectedResult.w++;
1285
+ if ((dy == 1) || (dy == -1)) expectedResult.h++;
1286
+ rectA = refRectA;
1287
+ rectB = refRectB;
1288
+ SDL_UnionRect(&rectA, &rectB, &result);
1289
+ _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
1290
+ }
1291
+ }
1292
+ }
1293
+
1294
+ return TEST_COMPLETED;
1295
+ }
1296
+
1297
+ /* !
1298
+ * \brief Tests SDL_UnionRect() where rect A or rect B are empty
1299
+ *
1300
+ * \sa
1301
+ * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect
1302
+ */
1303
+ int rect_testUnionRectEmpty(void *arg)
1304
+ {
1305
+ SDL_Rect refRectA, refRectB;
1306
+ SDL_Rect rectA, rectB;
1307
+ SDL_Rect expectedResult;
1308
+ SDL_Rect result;
1309
+
1310
+ /* A empty */
1311
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1312
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1313
+ refRectA.w=0;
1314
+ refRectA.h=0;
1315
+ refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1316
+ refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1317
+ refRectB.w=SDLTest_RandomIntegerInRange(1, 1024);
1318
+ refRectB.h=SDLTest_RandomIntegerInRange(1, 1024);
1319
+ expectedResult = refRectB;
1320
+ rectA = refRectA;
1321
+ rectB = refRectB;
1322
+ SDL_UnionRect(&rectA, &rectB, &result);
1323
+ _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
1324
+
1325
+ /* B empty */
1326
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1327
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1328
+ refRectA.w=SDLTest_RandomIntegerInRange(1, 1024);
1329
+ refRectA.h=SDLTest_RandomIntegerInRange(1, 1024);
1330
+ refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1331
+ refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1332
+ refRectB.w=0;
1333
+ refRectB.h=0;
1334
+ expectedResult = refRectA;
1335
+ rectA = refRectA;
1336
+ rectB = refRectB;
1337
+ SDL_UnionRect(&rectA, &rectB, &result);
1338
+ _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
1339
+
1340
+ /* A and B empty */
1341
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1342
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1343
+ refRectA.w=0;
1344
+ refRectA.h=0;
1345
+ refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1346
+ refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1347
+ refRectB.w=0;
1348
+ refRectB.h=0;
1349
+ result.x=0;
1350
+ result.y=0;
1351
+ result.w=0;
1352
+ result.h=0;
1353
+ expectedResult = result;
1354
+ rectA = refRectA;
1355
+ rectB = refRectB;
1356
+ SDL_UnionRect(&rectA, &rectB, &result);
1357
+ _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
1358
+
1359
+ return TEST_COMPLETED;
1360
+ }
1361
+
1362
+ /* !
1363
+ * \brief Tests SDL_UnionRect() where rect B is inside rect A
1364
+ *
1365
+ * \sa
1366
+ * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect
1367
+ */
1368
+ int rect_testUnionRectInside(void *arg)
1369
+ {
1370
+ SDL_Rect refRectA, refRectB;
1371
+ SDL_Rect rectA, rectB;
1372
+ SDL_Rect expectedResult;
1373
+ SDL_Rect result;
1374
+ int dx, dy;
1375
+
1376
+ /* Union 1x1 with itself */
1377
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1378
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1379
+ refRectA.w=1;
1380
+ refRectA.h=1;
1381
+ expectedResult = refRectA;
1382
+ rectA = refRectA;
1383
+ SDL_UnionRect(&rectA, &rectA, &result);
1384
+ _validateUnionRectResults(&rectA, &rectA, &refRectA, &refRectA, &result, &expectedResult);
1385
+
1386
+ /* Union 1x1 somewhere inside */
1387
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1388
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1389
+ refRectA.w=SDLTest_RandomIntegerInRange(256, 1024);
1390
+ refRectA.h=SDLTest_RandomIntegerInRange(256, 1024);
1391
+ refRectB.x=refRectA.x + 1 + SDLTest_RandomIntegerInRange(1, refRectA.w - 2);
1392
+ refRectB.y=refRectA.y + 1 + SDLTest_RandomIntegerInRange(1, refRectA.h - 2);
1393
+ refRectB.w=1;
1394
+ refRectB.h=1;
1395
+ expectedResult = refRectA;
1396
+ rectA = refRectA;
1397
+ rectB = refRectB;
1398
+ SDL_UnionRect(&rectA, &rectB, &result);
1399
+ _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
1400
+
1401
+ /* Union inside with edges modified */
1402
+ for (dx = -1; dx < 2; dx++) {
1403
+ for (dy = -1; dy < 2; dy++) {
1404
+ if ((dx != 0) || (dy != 0)) {
1405
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1406
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1407
+ refRectA.w=SDLTest_RandomIntegerInRange(256, 1024);
1408
+ refRectA.h=SDLTest_RandomIntegerInRange(256, 1024);
1409
+ refRectB = refRectA;
1410
+ if (dx == -1) refRectB.x++;
1411
+ if ((dx == 1) || (dx == -1)) refRectB.w--;
1412
+ if (dy == -1) refRectB.y++;
1413
+ if ((dy == 1) || (dy == -1)) refRectB.h--;
1414
+ expectedResult = refRectA;
1415
+ rectA = refRectA;
1416
+ rectB = refRectB;
1417
+ SDL_UnionRect(&rectA, &rectB, &result);
1418
+ _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
1419
+ }
1420
+ }
1421
+ }
1422
+
1423
+ return TEST_COMPLETED;
1424
+ }
1425
+
1426
+ /* !
1427
+ * \brief Negative tests against SDL_UnionRect() with invalid parameters
1428
+ *
1429
+ * \sa
1430
+ * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect
1431
+ */
1432
+ int rect_testUnionRectParam(void *arg)
1433
+ {
1434
+ SDL_Rect rectA, rectB;
1435
+ SDL_Rect result;
1436
+
1437
+ /* invalid parameter combinations */
1438
+ SDL_UnionRect((SDL_Rect *)NULL, &rectB, &result);
1439
+ SDLTest_AssertPass("Check that function returns when 1st parameter is NULL");
1440
+ SDL_UnionRect(&rectA, (SDL_Rect *)NULL, &result);
1441
+ SDLTest_AssertPass("Check that function returns when 2nd parameter is NULL");
1442
+ SDL_UnionRect(&rectA, &rectB, (SDL_Rect *)NULL);
1443
+ SDLTest_AssertPass("Check that function returns when 3rd parameter is NULL");
1444
+ SDL_UnionRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL);
1445
+ SDLTest_AssertPass("Check that function returns when 1st and 3rd parameter are NULL");
1446
+ SDL_UnionRect(&rectA, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
1447
+ SDLTest_AssertPass("Check that function returns when 2nd and 3rd parameter are NULL");
1448
+ SDL_UnionRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
1449
+ SDLTest_AssertPass("Check that function returns when all parameters are NULL");
1450
+
1451
+ return TEST_COMPLETED;
1452
+ }
1453
+
1454
+ /* !
1455
+ * \brief Tests SDL_RectEmpty() with various inputs
1456
+ *
1457
+ * \sa
1458
+ * http://wiki.libsdl.org/moin.cgi/SDL_RectEmpty
1459
+ */
1460
+ int rect_testRectEmpty(void *arg)
1461
+ {
1462
+ SDL_Rect refRect;
1463
+ SDL_Rect rect;
1464
+ SDL_bool expectedResult;
1465
+ SDL_bool result;
1466
+ int w, h;
1467
+
1468
+ /* Non-empty case */
1469
+ refRect.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1470
+ refRect.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1471
+ refRect.w=SDLTest_RandomIntegerInRange(256, 1024);
1472
+ refRect.h=SDLTest_RandomIntegerInRange(256, 1024);
1473
+ expectedResult = SDL_FALSE;
1474
+ rect = refRect;
1475
+ result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect);
1476
+ _validateRectEmptyResults(result, expectedResult, &rect, &refRect);
1477
+
1478
+ /* Empty case */
1479
+ for (w=-1; w<2; w++) {
1480
+ for (h=-1; h<2; h++) {
1481
+ if ((w != 1) || (h != 1)) {
1482
+ refRect.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1483
+ refRect.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1484
+ refRect.w=w;
1485
+ refRect.h=h;
1486
+ expectedResult = SDL_TRUE;
1487
+ rect = refRect;
1488
+ result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect);
1489
+ _validateRectEmptyResults(result, expectedResult, &rect, &refRect);
1490
+ }
1491
+ }
1492
+ }
1493
+
1494
+ return TEST_COMPLETED;
1495
+ }
1496
+
1497
+ /* !
1498
+ * \brief Negative tests against SDL_RectEmpty() with invalid parameters
1499
+ *
1500
+ * \sa
1501
+ * http://wiki.libsdl.org/moin.cgi/SDL_RectEmpty
1502
+ */
1503
+ int rect_testRectEmptyParam(void *arg)
1504
+ {
1505
+ SDL_bool result;
1506
+
1507
+ /* invalid parameter combinations */
1508
+ result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)NULL);
1509
+ SDLTest_AssertCheck(result == SDL_TRUE, "Check that function returns TRUE when 1st parameter is NULL");
1510
+
1511
+ return TEST_COMPLETED;
1512
+ }
1513
+
1514
+ /* !
1515
+ * \brief Tests SDL_RectEquals() with various inputs
1516
+ *
1517
+ * \sa
1518
+ * http://wiki.libsdl.org/moin.cgi/SDL_RectEquals
1519
+ */
1520
+ int rect_testRectEquals(void *arg)
1521
+ {
1522
+ SDL_Rect refRectA;
1523
+ SDL_Rect refRectB;
1524
+ SDL_Rect rectA;
1525
+ SDL_Rect rectB;
1526
+ SDL_bool expectedResult;
1527
+ SDL_bool result;
1528
+
1529
+ /* Equals */
1530
+ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1531
+ refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1532
+ refRectA.w=SDLTest_RandomIntegerInRange(1, 1024);
1533
+ refRectA.h=SDLTest_RandomIntegerInRange(1, 1024);
1534
+ refRectB = refRectA;
1535
+ expectedResult = SDL_TRUE;
1536
+ rectA = refRectA;
1537
+ rectB = refRectB;
1538
+ result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)&rectB);
1539
+ _validateRectEqualsResults(result, expectedResult, &rectA, &rectB, &refRectA, &refRectB);
1540
+
1541
+ return TEST_COMPLETED;
1542
+ }
1543
+
1544
+ /* !
1545
+ * \brief Negative tests against SDL_RectEquals() with invalid parameters
1546
+ *
1547
+ * \sa
1548
+ * http://wiki.libsdl.org/moin.cgi/SDL_RectEquals
1549
+ */
1550
+ int rect_testRectEqualsParam(void *arg)
1551
+ {
1552
+ SDL_Rect rectA;
1553
+ SDL_Rect rectB;
1554
+ SDL_bool result;
1555
+
1556
+ /* data setup */
1557
+ rectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1558
+ rectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1559
+ rectA.w=SDLTest_RandomIntegerInRange(1, 1024);
1560
+ rectA.h=SDLTest_RandomIntegerInRange(1, 1024);
1561
+ rectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);
1562
+ rectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);
1563
+ rectB.w=SDLTest_RandomIntegerInRange(1, 1024);
1564
+ rectB.h=SDLTest_RandomIntegerInRange(1, 1024);
1565
+
1566
+ /* invalid parameter combinations */
1567
+ result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)&rectB);
1568
+ SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
1569
+ result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)NULL);
1570
+ SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL");
1571
+ result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)NULL);
1572
+ SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL");
1573
+
1574
+ return TEST_COMPLETED;
1575
+ }
1576
+
1577
+ /* ================= Test References ================== */
1578
+
1579
+ /* Rect test cases */
1580
+
1581
+ /* SDL_IntersectRectAndLine */
1582
+ static const SDLTest_TestCaseReference rectTest1 =
1583
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLine,"rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED };
1584
+
1585
+ static const SDLTest_TestCaseReference rectTest2 =
1586
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED };
1587
+
1588
+ static const SDLTest_TestCaseReference rectTest3 =
1589
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED };
1590
+
1591
+ static const SDLTest_TestCaseReference rectTest4 =
1592
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED };
1593
+
1594
+ static const SDLTest_TestCaseReference rectTest5 =
1595
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED };
1596
+
1597
+ /* SDL_IntersectRect */
1598
+ static const SDLTest_TestCaseReference rectTest6 =
1599
+ { (SDLTest_TestCaseFp)rect_testIntersectRectInside, "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED };
1600
+
1601
+ static const SDLTest_TestCaseReference rectTest7 =
1602
+ { (SDLTest_TestCaseFp)rect_testIntersectRectOutside, "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED };
1603
+
1604
+ static const SDLTest_TestCaseReference rectTest8 =
1605
+ { (SDLTest_TestCaseFp)rect_testIntersectRectPartial, "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED };
1606
+
1607
+ static const SDLTest_TestCaseReference rectTest9 =
1608
+ { (SDLTest_TestCaseFp)rect_testIntersectRectPoint, "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED };
1609
+
1610
+ static const SDLTest_TestCaseReference rectTest10 =
1611
+ { (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED };
1612
+
1613
+ static const SDLTest_TestCaseReference rectTest11 =
1614
+ { (SDLTest_TestCaseFp)rect_testIntersectRectParam, "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED };
1615
+
1616
+ /* SDL_HasIntersection */
1617
+ static const SDLTest_TestCaseReference rectTest12 =
1618
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionInside, "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED };
1619
+
1620
+ static const SDLTest_TestCaseReference rectTest13 =
1621
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED };
1622
+
1623
+ static const SDLTest_TestCaseReference rectTest14 =
1624
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionPartial,"rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED };
1625
+
1626
+ static const SDLTest_TestCaseReference rectTest15 =
1627
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED };
1628
+
1629
+ static const SDLTest_TestCaseReference rectTest16 =
1630
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED };
1631
+
1632
+ static const SDLTest_TestCaseReference rectTest17 =
1633
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionParam, "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED };
1634
+
1635
+ /* SDL_EnclosePoints */
1636
+ static const SDLTest_TestCaseReference rectTest18 =
1637
+ { (SDLTest_TestCaseFp)rect_testEnclosePoints, "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED };
1638
+
1639
+ static const SDLTest_TestCaseReference rectTest19 =
1640
+ { (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED };
1641
+
1642
+ static const SDLTest_TestCaseReference rectTest20 =
1643
+ { (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED };
1644
+
1645
+ static const SDLTest_TestCaseReference rectTest21 =
1646
+ { (SDLTest_TestCaseFp)rect_testEnclosePointsParam, "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED };
1647
+
1648
+ /* SDL_UnionRect */
1649
+ static const SDLTest_TestCaseReference rectTest22 =
1650
+ { (SDLTest_TestCaseFp)rect_testUnionRectInside, "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED };
1651
+
1652
+ static const SDLTest_TestCaseReference rectTest23 =
1653
+ { (SDLTest_TestCaseFp)rect_testUnionRectOutside, "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED };
1654
+
1655
+ static const SDLTest_TestCaseReference rectTest24 =
1656
+ { (SDLTest_TestCaseFp)rect_testUnionRectEmpty, "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED };
1657
+
1658
+ static const SDLTest_TestCaseReference rectTest25 =
1659
+ { (SDLTest_TestCaseFp)rect_testUnionRectParam, "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED };
1660
+
1661
+ /* SDL_RectEmpty */
1662
+ static const SDLTest_TestCaseReference rectTest26 =
1663
+ { (SDLTest_TestCaseFp)rect_testRectEmpty, "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED };
1664
+
1665
+ static const SDLTest_TestCaseReference rectTest27 =
1666
+ { (SDLTest_TestCaseFp)rect_testRectEmptyParam, "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED };
1667
+
1668
+ /* SDL_RectEquals */
1669
+
1670
+ static const SDLTest_TestCaseReference rectTest28 =
1671
+ { (SDLTest_TestCaseFp)rect_testRectEquals, "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED };
1672
+
1673
+ static const SDLTest_TestCaseReference rectTest29 =
1674
+ { (SDLTest_TestCaseFp)rect_testRectEqualsParam, "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED };
1675
+
1676
+
1677
+ /* !
1678
+ * \brief Sequence of Rect test cases; functions that handle simple rectangles including overlaps and merges.
1679
+ *
1680
+ * \sa
1681
+ * http://wiki.libsdl.org/moin.cgi/CategoryRect
1682
+ */
1683
+ static const SDLTest_TestCaseReference *rectTests[] = {
1684
+ &rectTest1, &rectTest2, &rectTest3, &rectTest4, &rectTest5, &rectTest6, &rectTest7, &rectTest8, &rectTest9, &rectTest10, &rectTest11, &rectTest12, &rectTest13, &rectTest14,
1685
+ &rectTest15, &rectTest16, &rectTest17, &rectTest18, &rectTest19, &rectTest20, &rectTest21, &rectTest22, &rectTest23, &rectTest24, &rectTest25, &rectTest26, &rectTest27,
1686
+ &rectTest28, &rectTest29, NULL
1687
+ };
1688
+
1689
+
1690
+ /* Rect test suite (global) */
1691
+ SDLTest_TestSuiteReference rectTestSuite = {
1692
+ "Rect",
1693
+ NULL,
1694
+ rectTests,
1695
+ NULL
1696
+ };