gosu 1.1.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. checksums.yaml +4 -4
  2. data/COPYING +1 -1
  3. data/dependencies/SDL/include/SDL.h +108 -14
  4. data/dependencies/SDL/include/SDL_assert.h +81 -50
  5. data/dependencies/SDL/include/SDL_atomic.h +135 -35
  6. data/dependencies/SDL/include/SDL_audio.h +960 -355
  7. data/dependencies/SDL/include/SDL_bits.h +11 -6
  8. data/dependencies/SDL/include/SDL_blendmode.h +91 -14
  9. data/dependencies/SDL/include/SDL_clipboard.h +30 -7
  10. data/dependencies/SDL/include/SDL_config.h +277 -27
  11. data/dependencies/SDL/include/SDL_config_android.h +13 -38
  12. data/dependencies/SDL/include/SDL_config_iphoneos.h +21 -62
  13. data/dependencies/SDL/include/SDL_config_macosx.h +23 -92
  14. data/dependencies/SDL/include/SDL_config_minimal.h +1 -4
  15. data/dependencies/SDL/include/SDL_config_pandora.h +15 -22
  16. data/dependencies/SDL/include/SDL_config_psp.h +16 -37
  17. data/dependencies/SDL/include/SDL_config_windows.h +28 -91
  18. data/dependencies/SDL/include/SDL_config_winrt.h +33 -61
  19. data/dependencies/SDL/include/SDL_config_wiz.h +28 -56
  20. data/dependencies/SDL/include/SDL_copying.h +1 -1
  21. data/dependencies/SDL/include/SDL_cpuinfo.h +331 -71
  22. data/dependencies/SDL/include/SDL_egl.h +906 -280
  23. data/dependencies/SDL/include/SDL_endian.h +101 -47
  24. data/dependencies/SDL/include/SDL_error.h +70 -19
  25. data/dependencies/SDL/include/SDL_events.h +387 -79
  26. data/dependencies/SDL/include/SDL_filesystem.h +73 -64
  27. data/dependencies/SDL/include/SDL_gamecontroller.h +585 -125
  28. data/dependencies/SDL/include/SDL_gesture.h +36 -6
  29. data/dependencies/SDL/include/SDL_haptic.h +304 -210
  30. data/dependencies/SDL/include/SDL_hidapi.h +451 -0
  31. data/dependencies/SDL/include/SDL_hints.h +1286 -897
  32. data/dependencies/SDL/include/SDL_joystick.h +577 -130
  33. data/dependencies/SDL/include/SDL_keyboard.h +162 -63
  34. data/dependencies/SDL/include/SDL_keycode.h +7 -5
  35. data/dependencies/SDL/include/SDL_loadso.h +42 -8
  36. data/dependencies/SDL/include/SDL_locale.h +34 -32
  37. data/dependencies/SDL/include/SDL_log.h +212 -19
  38. data/dependencies/SDL/include/SDL_main.h +72 -17
  39. data/dependencies/SDL/include/SDL_messagebox.h +70 -23
  40. data/dependencies/SDL/include/SDL_metal.h +27 -32
  41. data/dependencies/SDL/include/SDL_misc.h +19 -15
  42. data/dependencies/SDL/include/SDL_mouse.h +262 -110
  43. data/dependencies/SDL/include/SDL_mutex.h +286 -66
  44. data/dependencies/SDL/include/SDL_name.h +1 -1
  45. data/dependencies/SDL/include/SDL_opengl.h +1 -1
  46. data/dependencies/SDL/include/SDL_opengles.h +1 -1
  47. data/dependencies/SDL/include/SDL_opengles2.h +2 -2
  48. data/dependencies/SDL/include/SDL_pixels.h +199 -34
  49. data/dependencies/SDL/include/SDL_platform.h +39 -2
  50. data/dependencies/SDL/include/SDL_power.h +23 -10
  51. data/dependencies/SDL/include/SDL_quit.h +1 -1
  52. data/dependencies/SDL/include/SDL_rect.h +78 -28
  53. data/dependencies/SDL/include/SDL_render.h +1204 -472
  54. data/dependencies/SDL/include/SDL_revision.h +2 -2
  55. data/dependencies/SDL/include/SDL_rwops.h +605 -33
  56. data/dependencies/SDL/include/SDL_scancode.h +1 -1
  57. data/dependencies/SDL/include/SDL_sensor.h +76 -42
  58. data/dependencies/SDL/include/SDL_shape.h +38 -27
  59. data/dependencies/SDL/include/SDL_stdinc.h +96 -24
  60. data/dependencies/SDL/include/SDL_surface.h +571 -139
  61. data/dependencies/SDL/include/SDL_system.h +339 -101
  62. data/dependencies/SDL/include/SDL_syswm.h +50 -20
  63. data/dependencies/SDL/include/SDL_test.h +1 -1
  64. data/dependencies/SDL/include/SDL_test_assert.h +2 -2
  65. data/dependencies/SDL/include/SDL_test_common.h +23 -6
  66. data/dependencies/SDL/include/SDL_test_compare.h +1 -1
  67. data/dependencies/SDL/include/SDL_test_crc32.h +1 -1
  68. data/dependencies/SDL/include/SDL_test_font.h +3 -3
  69. data/dependencies/SDL/include/SDL_test_fuzzer.h +28 -26
  70. data/dependencies/SDL/include/SDL_test_harness.h +6 -6
  71. data/dependencies/SDL/include/SDL_test_images.h +1 -1
  72. data/dependencies/SDL/include/SDL_test_log.h +1 -1
  73. data/dependencies/SDL/include/SDL_test_md5.h +1 -1
  74. data/dependencies/SDL/include/SDL_test_memory.h +1 -1
  75. data/dependencies/SDL/include/SDL_test_random.h +2 -2
  76. data/dependencies/SDL/include/SDL_thread.h +226 -128
  77. data/dependencies/SDL/include/SDL_timer.h +129 -22
  78. data/dependencies/SDL/include/SDL_touch.h +48 -8
  79. data/dependencies/SDL/include/SDL_types.h +1 -1
  80. data/dependencies/SDL/include/SDL_version.h +72 -46
  81. data/dependencies/SDL/include/SDL_video.h +1266 -460
  82. data/dependencies/SDL/include/SDL_vulkan.h +100 -161
  83. data/dependencies/SDL/include/begin_code.h +22 -1
  84. data/dependencies/SDL/include/close_code.h +1 -1
  85. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  86. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  87. data/dependencies/SDL_sound/SDL_sound.c +83 -7
  88. data/dependencies/SDL_sound/SDL_sound.h +4 -4
  89. data/dependencies/SDL_sound/SDL_sound_aiff.c +9 -12
  90. data/dependencies/SDL_sound/SDL_sound_au.c +7 -7
  91. data/dependencies/SDL_sound/SDL_sound_coreaudio.c +3 -3
  92. data/dependencies/SDL_sound/SDL_sound_flac.c +1 -1
  93. data/dependencies/SDL_sound/SDL_sound_internal.h +17 -10
  94. data/dependencies/SDL_sound/SDL_sound_modplug.c +25 -27
  95. data/dependencies/SDL_sound/SDL_sound_mp3.c +5 -17
  96. data/dependencies/SDL_sound/SDL_sound_raw.c +11 -11
  97. data/dependencies/SDL_sound/SDL_sound_shn.c +8 -7
  98. data/dependencies/SDL_sound/SDL_sound_voc.c +6 -4
  99. data/dependencies/SDL_sound/SDL_sound_vorbis.c +6 -11
  100. data/dependencies/SDL_sound/SDL_sound_wav.c +35 -29
  101. data/dependencies/SDL_sound/dr_flac.h +618 -220
  102. data/dependencies/SDL_sound/dr_mp3.h +263 -94
  103. data/dependencies/SDL_sound/libmodplug/fastmix.c +58 -64
  104. data/dependencies/SDL_sound/libmodplug/libmodplug.h +25 -103
  105. data/dependencies/SDL_sound/libmodplug/load_669.c +14 -17
  106. data/dependencies/SDL_sound/libmodplug/load_amf.c +11 -7
  107. data/dependencies/SDL_sound/libmodplug/load_ams.c +65 -22
  108. data/dependencies/SDL_sound/libmodplug/load_dbm.c +8 -4
  109. data/dependencies/SDL_sound/libmodplug/load_dmf.c +55 -25
  110. data/dependencies/SDL_sound/libmodplug/load_far.c +9 -13
  111. data/dependencies/SDL_sound/libmodplug/load_gdm.c +448 -0
  112. data/dependencies/SDL_sound/libmodplug/load_it.c +45 -49
  113. data/dependencies/SDL_sound/libmodplug/load_mdl.c +80 -53
  114. data/dependencies/SDL_sound/libmodplug/load_med.c +20 -12
  115. data/dependencies/SDL_sound/libmodplug/load_mod.c +40 -15
  116. data/dependencies/SDL_sound/libmodplug/load_mt2.c +29 -17
  117. data/dependencies/SDL_sound/libmodplug/load_okt.c +12 -8
  118. data/dependencies/SDL_sound/libmodplug/load_psm.c +101 -78
  119. data/dependencies/SDL_sound/libmodplug/load_ptm.c +18 -17
  120. data/dependencies/SDL_sound/libmodplug/load_s3m.c +9 -7
  121. data/dependencies/SDL_sound/libmodplug/load_stm.c +3 -2
  122. data/dependencies/SDL_sound/libmodplug/load_ult.c +2 -2
  123. data/dependencies/SDL_sound/libmodplug/load_umx.c +315 -35
  124. data/dependencies/SDL_sound/libmodplug/load_xm.c +25 -21
  125. data/dependencies/SDL_sound/libmodplug/mmcmp.c +295 -149
  126. data/dependencies/SDL_sound/libmodplug/modplug.c +7 -123
  127. data/dependencies/SDL_sound/libmodplug/modplug.h +32 -29
  128. data/dependencies/SDL_sound/libmodplug/snd_dsp.c +0 -1
  129. data/dependencies/SDL_sound/libmodplug/snd_flt.c +2 -2
  130. data/dependencies/SDL_sound/libmodplug/snd_fx.c +24 -18
  131. data/dependencies/SDL_sound/libmodplug/sndfile.c +55 -156
  132. data/dependencies/SDL_sound/libmodplug/sndmix.c +7 -12
  133. data/dependencies/SDL_sound/libmodplug/tables.h +10 -15
  134. data/dependencies/SDL_sound/stb_vorbis.h +508 -325
  135. data/dependencies/{al_soft → mojoAL}/AL/al.h +38 -30
  136. data/dependencies/{al_soft → mojoAL}/AL/alc.h +27 -56
  137. data/dependencies/mojoAL/mojoal.c +4594 -0
  138. data/ext/gosu/extconf.rb +33 -30
  139. data/include/Gosu/Audio.hpp +70 -85
  140. data/include/Gosu/Color.hpp +63 -107
  141. data/include/Gosu/Font.hpp +44 -50
  142. data/include/Gosu/Fwd.hpp +1 -1
  143. data/include/Gosu/Graphics.hpp +64 -75
  144. data/include/Gosu/GraphicsBase.hpp +32 -39
  145. data/include/Gosu/Image.hpp +56 -62
  146. data/include/Gosu/ImageData.hpp +23 -27
  147. data/include/Gosu/Inspection.hpp +1 -4
  148. data/include/Gosu/Math.hpp +4 -16
  149. data/include/Gosu/Platform.hpp +1 -51
  150. data/include/Gosu/Text.hpp +37 -40
  151. data/include/Gosu/TextInput.hpp +34 -40
  152. data/include/Gosu/Utility.hpp +10 -8
  153. data/include/Gosu/Version.hpp +1 -1
  154. data/include/Gosu/Window.hpp +73 -70
  155. data/lib/SDL2.dll +0 -0
  156. data/lib/gosu/compat.rb +28 -37
  157. data/lib/gosu/swig_patches.rb +31 -3
  158. data/lib/gosu.rb +2 -2
  159. data/lib64/SDL2.dll +0 -0
  160. data/rdoc/gosu.rb +9 -1
  161. data/src/Audio.cpp +86 -86
  162. data/src/AudioFile.hpp +6 -6
  163. data/src/AudioFileAudioToolbox.cpp +1 -1
  164. data/src/AudioFileSDLSound.cpp +1 -1
  165. data/src/AudioImpl.hpp +5 -5
  166. data/src/Bitmap.cpp +13 -13
  167. data/src/BitmapIO.cpp +0 -20
  168. data/src/BlockAllocator.cpp +2 -1
  169. data/src/Channel.cpp +22 -20
  170. data/src/Color.cpp +62 -55
  171. data/src/EmptyImageData.hpp +16 -18
  172. data/src/FileUnix.cpp +1 -1
  173. data/src/FileWin.cpp +1 -1
  174. data/src/Font.cpp +52 -57
  175. data/src/GosuViewController.cpp +2 -0
  176. data/src/Graphics.cpp +135 -143
  177. data/src/Image.cpp +42 -42
  178. data/src/Input.cpp +1 -1
  179. data/src/InputUIKit.cpp +1 -1
  180. data/src/LargeImageData.cpp +120 -113
  181. data/src/LargeImageData.hpp +18 -16
  182. data/src/Log.hpp +6 -6
  183. data/src/Macro.cpp +124 -169
  184. data/src/Macro.hpp +11 -11
  185. data/src/Math.cpp +8 -1
  186. data/src/RenderState.hpp +5 -5
  187. data/src/Resolution.cpp +114 -61
  188. data/src/RubyGosu.cxx +470 -501
  189. data/src/RubyGosu.h +3 -2
  190. data/src/TexChunk.cpp +50 -41
  191. data/src/TexChunk.hpp +22 -22
  192. data/src/Text.cpp +58 -59
  193. data/src/TextBuilder.cpp +60 -57
  194. data/src/TextBuilder.hpp +20 -20
  195. data/src/TextInput.cpp +127 -135
  196. data/src/TrueTypeFont.cpp +108 -108
  197. data/src/TrueTypeFont.hpp +39 -38
  198. data/src/TrueTypeFontApple.cpp +27 -23
  199. data/src/TrueTypeFontUnix.cpp +21 -26
  200. data/src/TrueTypeFontWin.cpp +30 -30
  201. data/src/Utility.cpp +82 -23
  202. data/src/WinUtility.hpp +2 -1
  203. data/src/Window.cpp +103 -86
  204. data/src/WindowUIKit.cpp +48 -51
  205. metadata +8 -20
  206. data/dependencies/SDL/include/SDL_config_os2.h +0 -188
  207. data/dependencies/SDL_sound/libmodplug/load_abc.c +0 -4725
  208. data/dependencies/SDL_sound/libmodplug/load_mid.c +0 -1405
  209. data/dependencies/SDL_sound/libmodplug/load_pat.c +0 -1143
  210. data/dependencies/SDL_sound/libmodplug/load_pat.h +0 -25
  211. data/dependencies/al_soft/AL/alext.h +0 -585
  212. data/dependencies/al_soft/AL/efx-creative.h +0 -3
  213. data/dependencies/al_soft/AL/efx-presets.h +0 -402
  214. data/dependencies/al_soft/AL/efx.h +0 -762
  215. data/dependencies/al_soft/x64/libOpenAL32.dll.a +0 -0
  216. data/dependencies/al_soft/x86/libOpenAL32.dll.a +0 -0
  217. data/lib/OpenAL32.dll +0 -0
  218. data/lib64/OpenAL32.dll +0 -0
  219. data/src/UtilityApple.cpp +0 -16
  220. data/src/UtilityWin.cpp +0 -17
data/lib/OpenAL32.dll DELETED
Binary file
data/lib64/OpenAL32.dll DELETED
Binary file
data/src/UtilityApple.cpp DELETED
@@ -1,16 +0,0 @@
1
- #include <Gosu/Platform.hpp>
2
- #if defined(GOSU_IS_MAC)
3
-
4
- #import <Gosu/Utility.hpp>
5
- #import <Foundation/Foundation.h>
6
- using namespace std;
7
-
8
- string Gosu::language()
9
- {
10
- @autoreleasepool {
11
- NSString* language = [NSLocale preferredLanguages][0];
12
- return language.UTF8String ?: "en";
13
- }
14
- }
15
-
16
- #endif
data/src/UtilityWin.cpp DELETED
@@ -1,17 +0,0 @@
1
- #include <Gosu/Platform.hpp>
2
- #if defined(GOSU_IS_WIN)
3
-
4
- #include <Gosu/Utility.hpp>
5
- #include "WinUtility.hpp"
6
- #include <windows.h>
7
- using namespace std;
8
-
9
- string Gosu::language()
10
- {
11
- LCID lcid = GetUserDefaultLCID();
12
- char buffer[9];
13
- winapi_check(GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, buffer, sizeof buffer));
14
- return buffer;
15
- }
16
-
17
- #endif