gosu 0.15.2 → 1.1.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) hide show
  1. checksums.yaml +4 -4
  2. data/dependencies/SDL/include/SDL.h +138 -0
  3. data/dependencies/SDL/include/SDL_assert.h +293 -0
  4. data/dependencies/SDL/include/SDL_atomic.h +295 -0
  5. data/dependencies/SDL/include/SDL_audio.h +859 -0
  6. data/dependencies/SDL/include/SDL_bits.h +121 -0
  7. data/dependencies/SDL/include/SDL_blendmode.h +123 -0
  8. data/dependencies/SDL/include/SDL_clipboard.h +71 -0
  9. data/dependencies/SDL/include/SDL_config.h +55 -0
  10. data/dependencies/SDL/include/SDL_config_android.h +182 -0
  11. data/dependencies/SDL/include/SDL_config_iphoneos.h +207 -0
  12. data/dependencies/SDL/include/SDL_config_macosx.h +266 -0
  13. data/dependencies/SDL/include/SDL_config_minimal.h +85 -0
  14. data/dependencies/SDL/include/SDL_config_os2.h +188 -0
  15. data/dependencies/SDL/include/SDL_config_pandora.h +135 -0
  16. data/dependencies/SDL/include/SDL_config_psp.h +165 -0
  17. data/dependencies/SDL/include/SDL_config_windows.h +288 -0
  18. data/dependencies/SDL/include/SDL_config_winrt.h +243 -0
  19. data/dependencies/SDL/include/SDL_config_wiz.h +149 -0
  20. data/dependencies/SDL/include/SDL_copying.h +20 -0
  21. data/dependencies/SDL/include/SDL_cpuinfo.h +299 -0
  22. data/dependencies/SDL/include/SDL_egl.h +1676 -0
  23. data/dependencies/SDL/include/SDL_endian.h +263 -0
  24. data/dependencies/SDL/include/SDL_error.h +112 -0
  25. data/dependencies/SDL/include/SDL_events.h +827 -0
  26. data/dependencies/SDL/include/SDL_filesystem.h +136 -0
  27. data/dependencies/SDL/include/SDL_gamecontroller.h +541 -0
  28. data/dependencies/SDL/include/SDL_gesture.h +87 -0
  29. data/dependencies/SDL/include/SDL_haptic.h +1247 -0
  30. data/dependencies/SDL/include/SDL_hints.h +1578 -0
  31. data/dependencies/SDL/include/SDL_joystick.h +499 -0
  32. data/dependencies/SDL/include/SDL_keyboard.h +217 -0
  33. data/dependencies/SDL/include/SDL_keycode.h +351 -0
  34. data/dependencies/SDL/include/SDL_loadso.h +81 -0
  35. data/dependencies/SDL/include/SDL_locale.h +101 -0
  36. data/dependencies/SDL/include/SDL_log.h +211 -0
  37. data/dependencies/SDL/include/SDL_main.h +180 -0
  38. data/dependencies/SDL/include/SDL_messagebox.h +146 -0
  39. data/dependencies/SDL/include/SDL_metal.h +117 -0
  40. data/dependencies/SDL/include/SDL_misc.h +75 -0
  41. data/dependencies/SDL/include/SDL_mouse.h +302 -0
  42. data/dependencies/SDL/include/SDL_mutex.h +251 -0
  43. data/dependencies/SDL/include/SDL_name.h +33 -0
  44. data/dependencies/SDL/include/SDL_opengl.h +2183 -0
  45. data/dependencies/SDL/include/SDL_opengl_glext.h +11180 -0
  46. data/dependencies/SDL/include/SDL_opengles.h +39 -0
  47. data/dependencies/SDL/include/SDL_opengles2.h +52 -0
  48. data/dependencies/SDL/include/SDL_opengles2_gl2.h +621 -0
  49. data/dependencies/SDL/include/SDL_opengles2_gl2ext.h +2050 -0
  50. data/dependencies/SDL/include/SDL_opengles2_gl2platform.h +30 -0
  51. data/dependencies/SDL/include/SDL_opengles2_khrplatform.h +282 -0
  52. data/dependencies/SDL/include/SDL_pixels.h +479 -0
  53. data/dependencies/SDL/include/SDL_platform.h +198 -0
  54. data/dependencies/SDL/include/SDL_power.h +75 -0
  55. data/dependencies/SDL/include/SDL_quit.h +58 -0
  56. data/dependencies/SDL/include/SDL_rect.h +174 -0
  57. data/dependencies/SDL/include/SDL_render.h +1158 -0
  58. data/dependencies/SDL/include/SDL_revision.h +2 -0
  59. data/dependencies/SDL/include/SDL_rwops.h +283 -0
  60. data/dependencies/SDL/include/SDL_scancode.h +413 -0
  61. data/dependencies/SDL/include/SDL_sensor.h +267 -0
  62. data/dependencies/SDL/include/SDL_shape.h +144 -0
  63. data/dependencies/SDL/include/SDL_stdinc.h +647 -0
  64. data/dependencies/SDL/include/SDL_surface.h +563 -0
  65. data/dependencies/SDL/include/SDL_system.h +325 -0
  66. data/dependencies/SDL/include/SDL_syswm.h +354 -0
  67. data/dependencies/SDL/include/SDL_test.h +69 -0
  68. data/dependencies/SDL/include/SDL_test_assert.h +105 -0
  69. data/dependencies/SDL/include/SDL_test_common.h +218 -0
  70. data/dependencies/SDL/include/SDL_test_compare.h +69 -0
  71. data/dependencies/SDL/include/SDL_test_crc32.h +124 -0
  72. data/dependencies/SDL/include/SDL_test_font.h +81 -0
  73. data/dependencies/SDL/include/SDL_test_fuzzer.h +384 -0
  74. data/dependencies/SDL/include/SDL_test_harness.h +134 -0
  75. data/dependencies/SDL/include/SDL_test_images.h +78 -0
  76. data/dependencies/SDL/include/SDL_test_log.h +67 -0
  77. data/dependencies/SDL/include/SDL_test_md5.h +129 -0
  78. data/dependencies/SDL/include/SDL_test_memory.h +63 -0
  79. data/dependencies/SDL/include/SDL_test_random.h +115 -0
  80. data/dependencies/SDL/include/SDL_thread.h +366 -0
  81. data/dependencies/SDL/include/SDL_timer.h +115 -0
  82. data/dependencies/SDL/include/SDL_touch.h +102 -0
  83. data/dependencies/SDL/include/SDL_types.h +29 -0
  84. data/dependencies/SDL/include/SDL_version.h +162 -0
  85. data/dependencies/SDL/include/SDL_video.h +1282 -0
  86. data/dependencies/SDL/include/SDL_vulkan.h +276 -0
  87. data/dependencies/SDL/include/begin_code.h +166 -0
  88. data/dependencies/SDL/include/close_code.h +40 -0
  89. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  90. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  91. data/dependencies/SDL_sound/SDL_sound.c +795 -0
  92. data/dependencies/SDL_sound/SDL_sound.h +725 -0
  93. data/dependencies/SDL_sound/SDL_sound_aiff.c +537 -0
  94. data/dependencies/SDL_sound/SDL_sound_au.c +352 -0
  95. data/dependencies/SDL_sound/SDL_sound_coreaudio.c +747 -0
  96. data/dependencies/SDL_sound/SDL_sound_flac.c +182 -0
  97. data/dependencies/SDL_sound/SDL_sound_internal.h +304 -0
  98. data/dependencies/SDL_sound/SDL_sound_modplug.c +228 -0
  99. data/dependencies/SDL_sound/SDL_sound_mp3.c +184 -0
  100. data/dependencies/SDL_sound/SDL_sound_raw.c +164 -0
  101. data/dependencies/SDL_sound/SDL_sound_shn.c +1309 -0
  102. data/dependencies/SDL_sound/SDL_sound_voc.c +550 -0
  103. data/dependencies/SDL_sound/SDL_sound_vorbis.c +223 -0
  104. data/dependencies/SDL_sound/SDL_sound_wav.c +783 -0
  105. data/dependencies/SDL_sound/dr_flac.h +5906 -0
  106. data/dependencies/SDL_sound/dr_mp3.h +2832 -0
  107. data/dependencies/SDL_sound/libmodplug/fastmix.c +1748 -0
  108. data/dependencies/SDL_sound/libmodplug/libmodplug.h +1001 -0
  109. data/dependencies/SDL_sound/libmodplug/load_669.c +188 -0
  110. data/dependencies/SDL_sound/libmodplug/load_abc.c +4725 -0
  111. data/dependencies/SDL_sound/libmodplug/load_amf.c +403 -0
  112. data/dependencies/SDL_sound/libmodplug/load_ams.c +587 -0
  113. data/dependencies/SDL_sound/libmodplug/load_dbm.c +357 -0
  114. data/dependencies/SDL_sound/libmodplug/load_dmf.c +531 -0
  115. data/dependencies/SDL_sound/libmodplug/load_dsm.c +232 -0
  116. data/dependencies/SDL_sound/libmodplug/load_far.c +253 -0
  117. data/dependencies/SDL_sound/libmodplug/load_it.c +796 -0
  118. data/dependencies/SDL_sound/libmodplug/load_mdl.c +488 -0
  119. data/dependencies/SDL_sound/libmodplug/load_med.c +757 -0
  120. data/dependencies/SDL_sound/libmodplug/load_mid.c +1405 -0
  121. data/dependencies/SDL_sound/libmodplug/load_mod.c +269 -0
  122. data/dependencies/SDL_sound/libmodplug/load_mt2.c +546 -0
  123. data/dependencies/SDL_sound/libmodplug/load_mtm.c +142 -0
  124. data/dependencies/SDL_sound/libmodplug/load_okt.c +192 -0
  125. data/dependencies/SDL_sound/libmodplug/load_pat.c +1143 -0
  126. data/dependencies/SDL_sound/libmodplug/load_pat.h +25 -0
  127. data/dependencies/SDL_sound/libmodplug/load_psm.c +350 -0
  128. data/dependencies/SDL_sound/libmodplug/load_ptm.c +204 -0
  129. data/dependencies/SDL_sound/libmodplug/load_s3m.c +325 -0
  130. data/dependencies/SDL_sound/libmodplug/load_stm.c +180 -0
  131. data/dependencies/SDL_sound/libmodplug/load_ult.c +206 -0
  132. data/dependencies/SDL_sound/libmodplug/load_umx.c +51 -0
  133. data/dependencies/SDL_sound/libmodplug/load_xm.c +554 -0
  134. data/dependencies/SDL_sound/libmodplug/mmcmp.c +382 -0
  135. data/dependencies/SDL_sound/libmodplug/modplug.c +170 -0
  136. data/dependencies/SDL_sound/libmodplug/modplug.h +90 -0
  137. data/dependencies/SDL_sound/libmodplug/snd_dsp.c +301 -0
  138. data/dependencies/SDL_sound/libmodplug/snd_flt.c +63 -0
  139. data/dependencies/SDL_sound/libmodplug/snd_fx.c +2350 -0
  140. data/dependencies/SDL_sound/libmodplug/sndfile.c +1169 -0
  141. data/dependencies/SDL_sound/libmodplug/sndmix.c +1034 -0
  142. data/dependencies/SDL_sound/libmodplug/tables.h +371 -0
  143. data/{src/stb_vorbis.c → dependencies/SDL_sound/stb_vorbis.h} +143 -78
  144. data/dependencies/al_soft/AL/al.h +655 -0
  145. data/dependencies/al_soft/AL/alc.h +270 -0
  146. data/dependencies/al_soft/AL/alext.h +585 -0
  147. data/dependencies/al_soft/AL/efx-creative.h +3 -0
  148. data/dependencies/al_soft/AL/efx-presets.h +402 -0
  149. data/dependencies/al_soft/AL/efx.h +762 -0
  150. data/dependencies/al_soft/x64/libOpenAL32.dll.a +0 -0
  151. data/dependencies/al_soft/x86/libOpenAL32.dll.a +0 -0
  152. data/{src → dependencies/stb}/stb_image.h +330 -127
  153. data/{src → dependencies/stb}/stb_image_write.h +156 -85
  154. data/{src → dependencies/stb}/stb_truetype.h +192 -69
  155. data/{src → dependencies/utf8proc}/utf8proc.c +0 -0
  156. data/{src → dependencies/utf8proc}/utf8proc.h +0 -0
  157. data/{src → dependencies/utf8proc}/utf8proc_data.h +0 -0
  158. data/ext/gosu/extconf.rb +53 -39
  159. data/{Gosu → include/Gosu}/Audio.hpp +6 -8
  160. data/include/Gosu/Bitmap.hpp +100 -0
  161. data/{Gosu → include/Gosu}/Buttons.hpp +104 -44
  162. data/{Gosu → include/Gosu}/Color.hpp +0 -0
  163. data/{Gosu → include/Gosu}/Directories.hpp +0 -0
  164. data/{Gosu → include/Gosu}/Font.hpp +1 -1
  165. data/{Gosu → include/Gosu}/Fwd.hpp +0 -5
  166. data/{Gosu → include/Gosu}/Gosu.hpp +0 -0
  167. data/{Gosu → include/Gosu}/Graphics.hpp +0 -0
  168. data/{Gosu → include/Gosu}/GraphicsBase.hpp +0 -0
  169. data/{Gosu → include/Gosu}/IO.hpp +0 -0
  170. data/{Gosu → include/Gosu}/Image.hpp +7 -6
  171. data/{Gosu → include/Gosu}/ImageData.hpp +0 -0
  172. data/{Gosu → include/Gosu}/Input.hpp +39 -51
  173. data/{Gosu → include/Gosu}/Inspection.hpp +0 -0
  174. data/{Gosu → include/Gosu}/Math.hpp +0 -0
  175. data/{Gosu → include/Gosu}/Platform.hpp +0 -0
  176. data/{Gosu → include/Gosu}/Text.hpp +0 -0
  177. data/{Gosu → include/Gosu}/TextInput.hpp +0 -0
  178. data/{Gosu → include/Gosu}/Timing.hpp +0 -0
  179. data/{Gosu → include/Gosu}/Utility.hpp +15 -4
  180. data/{Gosu → include/Gosu}/Version.hpp +3 -3
  181. data/{Gosu → include/Gosu}/Window.hpp +46 -34
  182. data/lib/OpenAL32.dll +0 -0
  183. data/lib/SDL2.dll +0 -0
  184. data/lib/gosu.rb +0 -3
  185. data/lib/gosu/patches.rb +0 -23
  186. data/lib/gosu/preview.rb +1 -3
  187. data/lib/gosu/swig_patches.rb +14 -12
  188. data/lib64/OpenAL32.dll +0 -0
  189. data/lib64/SDL2.dll +0 -0
  190. data/rdoc/gosu.rb +112 -23
  191. data/src/Audio.cpp +50 -224
  192. data/src/AudioFile.hpp +20 -37
  193. data/src/AudioFileAudioToolbox.cpp +237 -0
  194. data/src/AudioFileSDLSound.cpp +147 -0
  195. data/src/AudioImpl.cpp +3 -12
  196. data/src/AudioImpl.hpp +3 -1
  197. data/src/Bitmap.cpp +85 -83
  198. data/src/BitmapIO.cpp +52 -58
  199. data/src/Font.cpp +3 -1
  200. data/src/Graphics.cpp +7 -4
  201. data/src/Image.cpp +13 -16
  202. data/src/Input.cpp +412 -164
  203. data/src/LargeImageData.cpp +1 -1
  204. data/src/MarkupParser.cpp +2 -1
  205. data/src/Resolution.cpp +8 -8
  206. data/src/RubyGosu.cxx +1017 -196
  207. data/src/RubyGosu.h +4 -2
  208. data/src/TexChunk.cpp +1 -1
  209. data/src/TextBuilder.cpp +3 -1
  210. data/src/Texture.cpp +1 -1
  211. data/src/TrueTypeFont.cpp +1 -1
  212. data/src/TrueTypeFontWin.cpp +3 -3
  213. data/src/Utility.cpp +11 -7
  214. data/src/Window.cpp +90 -62
  215. data/src/WindowUIKit.cpp +21 -9
  216. metadata +194 -65
  217. data/Gosu/AutoLink.hpp +0 -14
  218. data/Gosu/Bitmap.hpp +0 -113
  219. data/Gosu/Channel.h +0 -25
  220. data/Gosu/Color.h +0 -38
  221. data/Gosu/Font.h +0 -36
  222. data/Gosu/Gosu.h +0 -79
  223. data/Gosu/Image.h +0 -54
  224. data/Gosu/Sample.h +0 -19
  225. data/Gosu/Song.h +0 -24
  226. data/Gosu/TextInput.h +0 -30
  227. data/Gosu/Window.h +0 -61
  228. data/lib/gosu/zen.rb +0 -89
  229. data/src/AudioToolboxFile.hpp +0 -210
  230. data/src/ChannelWrapper.cpp +0 -50
  231. data/src/ColorWrapper.cpp +0 -126
  232. data/src/Constants.cpp +0 -287
  233. data/src/FontWrapper.cpp +0 -74
  234. data/src/GosuWrapper.cpp +0 -232
  235. data/src/ImageWrapper.cpp +0 -168
  236. data/src/MPEGFile.hpp +0 -90
  237. data/src/OggFile.hpp +0 -92
  238. data/src/SampleWrapper.cpp +0 -30
  239. data/src/SndFile.hpp +0 -174
  240. data/src/SongWrapper.cpp +0 -52
  241. data/src/TextInputWrapper.cpp +0 -101
  242. data/src/WinMain.cpp +0 -64
  243. data/src/WindowWrapper.cpp +0 -289
@@ -185,7 +185,7 @@ Gosu::Bitmap Gosu::LargeImageData::to_bitmap() const
185
185
  int x = 0;
186
186
  for (int tx = 0; tx < tiles_x; ++tx) {
187
187
  ImageData& tile = *tiles[ty * tiles_x + tx];
188
- bitmap.insert(tile.to_bitmap(), x, y);
188
+ bitmap.insert(x, y, tile.to_bitmap());
189
189
  x += tile.width();
190
190
  }
191
191
  y += tiles[ty * tiles_x]->height();
@@ -1,6 +1,7 @@
1
1
  #include "MarkupParser.hpp"
2
2
  #include <Gosu/Utility.hpp>
3
- #include "utf8proc.h"
3
+
4
+ #include <utf8proc.h>
4
5
 
5
6
  #include <cstring>
6
7
  using namespace std;
@@ -18,12 +18,12 @@ static SDL_DisplayMode display_mode(Gosu::Window* window)
18
18
  return result;
19
19
  }
20
20
 
21
- unsigned Gosu::screen_width(Window* window)
21
+ int Gosu::screen_width(Window* window)
22
22
  {
23
23
  return display_mode(window).w;
24
24
  }
25
25
 
26
- unsigned Gosu::screen_height(Window* window)
26
+ int Gosu::screen_height(Window* window)
27
27
  {
28
28
  return display_mode(window).h;
29
29
  }
@@ -41,12 +41,12 @@ static NSSize max_window_size(Gosu::Window* window)
41
41
  return [NSWindow contentRectForFrameRect:screen_frame styleMask:style].size;
42
42
  }
43
43
 
44
- unsigned Gosu::available_width(Window* window)
44
+ int Gosu::available_width(Window* window)
45
45
  {
46
46
  return max_window_size(window).width;
47
47
  }
48
48
 
49
- unsigned Gosu::available_height(Window* window)
49
+ int Gosu::available_height(Window* window)
50
50
  {
51
51
  return max_window_size(window).height;
52
52
  }
@@ -90,12 +90,12 @@ static SIZE max_window_size(Gosu::Window* window)
90
90
  return size;
91
91
  }
92
92
 
93
- unsigned Gosu::available_width(Window* window)
93
+ int Gosu::available_width(Window* window)
94
94
  {
95
95
  return max_window_size(window).cx;
96
96
  }
97
97
 
98
- unsigned Gosu::available_height(Window* window)
98
+ int Gosu::available_height(Window* window)
99
99
  {
100
100
  return max_window_size(window).cy;
101
101
  }
@@ -104,12 +104,12 @@ unsigned Gosu::available_height(Window* window)
104
104
  #ifdef GOSU_IS_X
105
105
  // Pessimistic fallback implementation for available_width / available_height.
106
106
  // TODO: Look at this NET_WORKAREA based implementation: https://github.com/glfw/glfw/pull/989/files
107
- unsigned Gosu::available_width(Window* window)
107
+ int Gosu::available_width(Window* window)
108
108
  {
109
109
  return static_cast<unsigned>(Gosu::screen_width(window) * 0.9);
110
110
  }
111
111
 
112
- unsigned Gosu::available_height(Window* window)
112
+ int Gosu::available_height(Window* window)
113
113
  {
114
114
  return static_cast<unsigned>(Gosu::screen_height(window) * 0.8);
115
115
  }
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 4.0.2
3
+ * Version 4.1.0
4
4
  *
5
5
  * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -1613,6 +1613,8 @@ SWIGRUNTIMEINLINE char *
1613
1613
  SWIG_Ruby_MangleStr(VALUE obj)
1614
1614
  {
1615
1615
  VALUE stype = rb_iv_get(obj, "@__swigtype__");
1616
+ if (NIL_P(stype))
1617
+ return NULL;
1616
1618
  return StringValuePtr(stype);
1617
1619
  }
1618
1620
 
@@ -2172,22 +2174,21 @@ namespace Swig {
2172
2174
 
2173
2175
  /* -------- TYPES TABLE (BEGIN) -------- */
2174
2176
 
2175
- #define SWIGTYPE_p_Gosu__Button swig_types[0]
2176
- #define SWIGTYPE_p_Gosu__Channel swig_types[1]
2177
- #define SWIGTYPE_p_Gosu__Color swig_types[2]
2178
- #define SWIGTYPE_p_Gosu__Font swig_types[3]
2179
- #define SWIGTYPE_p_Gosu__GLTexInfo swig_types[4]
2180
- #define SWIGTYPE_p_Gosu__Image swig_types[5]
2181
- #define SWIGTYPE_p_Gosu__Sample swig_types[6]
2182
- #define SWIGTYPE_p_Gosu__Song swig_types[7]
2183
- #define SWIGTYPE_p_Gosu__TextInput swig_types[8]
2184
- #define SWIGTYPE_p_Gosu__Window swig_types[9]
2185
- #define SWIGTYPE_p_char swig_types[10]
2186
- #define SWIGTYPE_p_double swig_types[11]
2187
- #define SWIGTYPE_p_std__arrayT_double_16_t swig_types[12]
2188
- #define SWIGTYPE_p_std__string swig_types[13]
2189
- static swig_type_info *swig_types[15];
2190
- static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
2177
+ #define SWIGTYPE_p_Gosu__Channel swig_types[0]
2178
+ #define SWIGTYPE_p_Gosu__Color swig_types[1]
2179
+ #define SWIGTYPE_p_Gosu__Font swig_types[2]
2180
+ #define SWIGTYPE_p_Gosu__GLTexInfo swig_types[3]
2181
+ #define SWIGTYPE_p_Gosu__Image swig_types[4]
2182
+ #define SWIGTYPE_p_Gosu__Sample swig_types[5]
2183
+ #define SWIGTYPE_p_Gosu__Song swig_types[6]
2184
+ #define SWIGTYPE_p_Gosu__TextInput swig_types[7]
2185
+ #define SWIGTYPE_p_Gosu__Window swig_types[8]
2186
+ #define SWIGTYPE_p_char swig_types[9]
2187
+ #define SWIGTYPE_p_double swig_types[10]
2188
+ #define SWIGTYPE_p_std__arrayT_double_16_t swig_types[11]
2189
+ #define SWIGTYPE_p_std__string swig_types[12]
2190
+ static swig_type_info *swig_types[14];
2191
+ static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
2191
2192
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2192
2193
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2193
2194
 
@@ -2202,7 +2203,7 @@ static VALUE mGosu;
2202
2203
  #define SWIG_RUBY_THREAD_END_BLOCK
2203
2204
 
2204
2205
 
2205
- #define SWIGVERSION 0x040002
2206
+ #define SWIGVERSION 0x040100
2206
2207
  #define SWIG_VERSION SWIGVERSION
2207
2208
 
2208
2209
 
@@ -2265,20 +2266,21 @@ namespace Gosu
2265
2266
  rb_funcall(block, rb_intern("call"), 0);
2266
2267
  }
2267
2268
 
2268
- void load_bitmap(Bitmap& bitmap, VALUE val)
2269
+ void load_bitmap(Gosu::Bitmap& bitmap, VALUE val)
2269
2270
  {
2270
2271
  // Try to treat as filename first.
2271
2272
  if (rb_respond_to(val, rb_intern("to_str"))) {
2272
2273
  VALUE to_str = rb_funcall(val, rb_intern("to_str"), 0);
2273
2274
  const char* filename = StringValuePtr(to_str);
2274
- load_image_file(bitmap, filename);
2275
+ bitmap = Gosu::load_image_file(filename);
2275
2276
  return;
2276
2277
  }
2277
2278
 
2278
2279
  // Otherwise, try to call .to_blob on it (works with RMagick, TexPlay etc).
2279
2280
  VALUE conversion = rb_str_new2("to_blob { self.format = 'RGBA'; self.depth = 8 }");
2280
2281
  VALUE blob = rb_obj_instance_eval(1, &conversion, val);
2281
- rb_check_safe_obj(blob);
2282
+ Check_Type(blob, T_STRING);
2283
+
2282
2284
  int width = NUM2ULONG(rb_funcall(val, rb_intern("columns"), 0));
2283
2285
  int height = NUM2ULONG(rb_funcall(val, rb_intern("rows"), 0));
2284
2286
 
@@ -2326,6 +2328,23 @@ namespace Gosu
2326
2328
  {
2327
2329
  return Gosu::Input::down(btn);
2328
2330
  }
2331
+
2332
+ VALUE button_name(Gosu::Button btn)
2333
+ {
2334
+ std::string result = Gosu::Input::button_name(btn);
2335
+ return result.empty() ? Qnil : rb_str_new2(result.c_str());
2336
+ }
2337
+
2338
+ VALUE gamepad_name(int index)
2339
+ {
2340
+ std::string result = Gosu::Input::gamepad_name(index);
2341
+ return result.empty() ? Qnil : rb_str_new2(result.c_str());
2342
+ }
2343
+
2344
+ double axis(Gosu::Button btn)
2345
+ {
2346
+ return Gosu::Input::axis(btn);
2347
+ }
2329
2348
  }
2330
2349
 
2331
2350
  // Global graphics functions
@@ -2500,7 +2519,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
2500
2519
  }
2501
2520
 
2502
2521
 
2503
- /*@SWIG:/usr/local/Cellar/swig/HEAD-7051753/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2522
+ /*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2504
2523
  SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE arg)
2505
2524
  {
2506
2525
  VALUE *args = (VALUE *)arg;
@@ -2543,7 +2562,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
2543
2562
  #include <string>
2544
2563
 
2545
2564
 
2546
- /*@SWIG:/usr/local/Cellar/swig/HEAD-7051753/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2565
+ /*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2547
2566
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
2548
2567
  {
2549
2568
  VALUE *args = (VALUE *)arg;
@@ -2749,7 +2768,7 @@ SWIG_AsPtr_std_string (VALUE obj, std::string **val)
2749
2768
  }
2750
2769
 
2751
2770
 
2752
- /*@SWIG:/usr/local/Cellar/swig/HEAD-7051753/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2771
+ /*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2753
2772
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
2754
2773
  {
2755
2774
  VALUE *args = (VALUE *)arg;
@@ -2837,11 +2856,19 @@ SWIGINTERN Gosu::Font *new_Gosu_Font__SWIG_1(int height,VALUE options=0){
2837
2856
 
2838
2857
  return new Gosu::Font(height, font_name, font_flags);
2839
2858
  }
2859
+ SWIGINTERN double Gosu_Font_text_width(Gosu::Font *self,std::string const &markup,double scale_x=1.0){
2860
+ static bool issued_warning = false;
2861
+ if (scale_x != 1.0 && !issued_warning) {
2862
+ issued_warning = true;
2863
+ rb_warn("The second argument to Gosu::Font#text_width is deprecated, multiply the result instead");
2864
+ }
2865
+ return self->text_width(markup) * scale_x;
2866
+ }
2840
2867
  SWIGINTERN double Gosu_Font_markup_width(Gosu::Font *self,std::string const &markup,double scale_x=1.0){
2841
2868
  static bool issued_warning = false;
2842
2869
  if (scale_x != 1.0 && !issued_warning) {
2843
2870
  issued_warning = true;
2844
- rb_warn("The second argument to Font#markup_width and Font#text_width is deprecated, multiply the result instead");
2871
+ rb_warn("The second argument to Gosu::Font#markup_width is deprecated, multiply the result instead");
2845
2872
  }
2846
2873
  return self->markup_width(markup) * scale_x;
2847
2874
  }
@@ -2849,8 +2876,8 @@ SWIGINTERN Gosu::Image *new_Gosu_Image(VALUE source,VALUE options=0){
2849
2876
  Gosu::Bitmap bmp;
2850
2877
  Gosu::load_bitmap(bmp, source);
2851
2878
 
2852
- unsigned src_x = 0, src_y = 0;
2853
- unsigned src_width = bmp.width(), src_height = bmp.height();
2879
+ int src_x = 0, src_y = 0;
2880
+ int src_width = bmp.width(), src_height = bmp.height();
2854
2881
  unsigned flags = 0;
2855
2882
 
2856
2883
  if (options) {
@@ -2907,7 +2934,81 @@ SWIGINTERN Gosu::Image *Gosu_Image_subimage(Gosu::Image *self,int x,int y,int w,
2907
2934
  std::unique_ptr<Gosu::ImageData> image_data = self->data().subimage(x, y, w, h);
2908
2935
  return image_data.get() ? new Gosu::Image(std::move(image_data)) : nullptr;
2909
2936
  }
2910
- SWIGINTERN Gosu::Image *Gosu_Image_from_text(std::string const &markup,double font_height,VALUE options=0){
2937
+ SWIGINTERN Gosu::Image *Gosu_Image_from_text(std::string const &text,double font_height,VALUE options=0){
2938
+ std::string font = Gosu::default_font_name();
2939
+ int width = -1;
2940
+ double spacing = 0;
2941
+ Gosu::Alignment align = Gosu::AL_LEFT;
2942
+ unsigned image_flags = 0;
2943
+ unsigned font_flags = 0;
2944
+
2945
+ if (options) {
2946
+ Check_Type(options, T_HASH);
2947
+
2948
+ VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL);
2949
+ int keys_size = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL));
2950
+
2951
+ for (int i = 0; i < keys_size; ++i) {
2952
+ VALUE key = rb_ary_entry(keys, i);
2953
+ const char* key_string = Gosu::cstr_from_symbol(key);
2954
+
2955
+ VALUE value = rb_hash_aref(options, key);
2956
+ if (!strcmp(key_string, "font")) {
2957
+ font = StringValuePtr(value);
2958
+ }
2959
+ else if (!strcmp(key_string, "bold")) {
2960
+ if (RTEST(value)) font_flags |= Gosu::FF_BOLD;
2961
+ }
2962
+ else if (!strcmp(key_string, "italic")) {
2963
+ if (RTEST(value)) font_flags |= Gosu::FF_ITALIC;
2964
+ }
2965
+ else if (!strcmp(key_string, "underline")) {
2966
+ if (RTEST(value)) font_flags |= Gosu::FF_UNDERLINE;
2967
+ }
2968
+ else if (!strcmp(key_string, "align")) {
2969
+ const char* cstr = Gosu::cstr_from_symbol(value);
2970
+
2971
+ if (!strcmp(cstr, "left")) {
2972
+ align = Gosu::AL_LEFT;
2973
+ }
2974
+ else if (!strcmp(cstr, "center")) {
2975
+ align = Gosu::AL_CENTER;
2976
+ }
2977
+ else if (!strcmp(cstr, "right")) {
2978
+ align = Gosu::AL_RIGHT;
2979
+ }
2980
+ else if (!strcmp(cstr, "justify")) {
2981
+ align = Gosu::AL_JUSTIFY;
2982
+ }
2983
+ else {
2984
+ rb_raise(rb_eArgError, "Argument passed to :align must be a valid text "
2985
+ "alignment (:left, :center, :right, :justify)");
2986
+ }
2987
+ }
2988
+ else if (!strcmp(key_string, "width")) {
2989
+ width = NUM2INT(value);
2990
+ }
2991
+ else if (!strcmp(key_string, "spacing")) {
2992
+ spacing = NUM2DBL(value);
2993
+ }
2994
+ else if (!strcmp(key_string, "retro")) {
2995
+ if (RTEST(value)) image_flags |= Gosu::IF_RETRO;
2996
+ }
2997
+ else {
2998
+ static bool issued_warning = false;
2999
+ if (!issued_warning) {
3000
+ issued_warning = true;
3001
+ rb_warn("Unknown keyword argument: :%s", key_string);
3002
+ }
3003
+ }
3004
+ }
3005
+ }
3006
+
3007
+ Gosu::Bitmap bitmap = Gosu::layout_text(text, font, font_height, spacing, width,
3008
+ align, font_flags);
3009
+ return new Gosu::Image(bitmap, image_flags);
3010
+ }
3011
+ SWIGINTERN Gosu::Image *Gosu_Image_from_markup(std::string const &markup,double font_height,VALUE options=0){
2911
3012
  std::string font = Gosu::default_font_name();
2912
3013
  int width = -1;
2913
3014
  double spacing = 0;
@@ -3047,10 +3148,10 @@ SWIGINTERN VALUE Gosu_Image_to_blob(Gosu::Image const *self){
3047
3148
  auto size = bmp.width() * bmp.height() * sizeof(Gosu::Color);
3048
3149
  return rb_str_new(reinterpret_cast<const char*>(bmp.data()), size);
3049
3150
  }
3050
- SWIGINTERN unsigned int Gosu_Image_columns(Gosu::Image const *self){
3151
+ SWIGINTERN int Gosu_Image_columns(Gosu::Image const *self){
3051
3152
  return self->width();
3052
3153
  }
3053
- SWIGINTERN unsigned int Gosu_Image_rows(Gosu::Image const *self){
3154
+ SWIGINTERN int Gosu_Image_rows(Gosu::Image const *self){
3054
3155
  return self->height();
3055
3156
  }
3056
3157
  SWIGINTERN void Gosu_Image_save(Gosu::Image const *self,std::string const &filename){
@@ -3199,7 +3300,7 @@ std::string SwigDirector_TextInput::filter(std::string text) const {
3199
3300
  }
3200
3301
 
3201
3302
 
3202
- SwigDirector_Window::SwigDirector_Window(VALUE self, unsigned int width, unsigned int height, bool fullscreen, double update_interval, bool resizable): Gosu::Window(width, height, fullscreen, update_interval, resizable), Swig::Director(self) {
3303
+ SwigDirector_Window::SwigDirector_Window(VALUE self,int width,int height,unsigned int window_flags,double update_interval): Gosu::Window(width, height, window_flags, update_interval), Swig::Director(self) {
3203
3304
 
3204
3305
  }
3205
3306
 
@@ -3300,7 +3401,7 @@ void SwigDirector_Window::button_down(Gosu::Button arg0) {
3300
3401
  VALUE SWIGUNUSED result;
3301
3402
 
3302
3403
  {
3303
- obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM((&arg0)->id());
3404
+ obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(arg0);
3304
3405
  }
3305
3406
  result = rb_funcall(swig_get_self(), rb_intern("protected_button_down"), 1,obj0);
3306
3407
  }
@@ -3311,18 +3412,36 @@ void SwigDirector_Window::button_up(Gosu::Button arg0) {
3311
3412
  VALUE SWIGUNUSED result;
3312
3413
 
3313
3414
  {
3314
- obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM((&arg0)->id());
3415
+ obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(arg0);
3315
3416
  }
3316
3417
  result = rb_funcall(swig_get_self(), rb_intern("protected_button_up"), 1,obj0);
3317
3418
  }
3318
3419
 
3319
3420
 
3421
+ void SwigDirector_Window::gamepad_connected(int index) {
3422
+ VALUE obj0 = Qnil ;
3423
+ VALUE SWIGUNUSED result;
3424
+
3425
+ obj0 = SWIG_From_int(static_cast< int >(index));
3426
+ result = rb_funcall(swig_get_self(), rb_intern("protected_gamepad_connected"), 1,obj0);
3427
+ }
3428
+
3429
+
3430
+ void SwigDirector_Window::gamepad_disconnected(int index) {
3431
+ VALUE obj0 = Qnil ;
3432
+ VALUE SWIGUNUSED result;
3433
+
3434
+ obj0 = SWIG_From_int(static_cast< int >(index));
3435
+ result = rb_funcall(swig_get_self(), rb_intern("protected_gamepad_disconnected"), 1,obj0);
3436
+ }
3437
+
3438
+
3320
3439
  void SwigDirector_Window::drop(std::string const &filename) {
3321
3440
  VALUE obj0 = Qnil ;
3322
3441
  VALUE SWIGUNUSED result;
3323
3442
 
3324
3443
  obj0 = SWIG_From_std_string(static_cast< std::string >(filename));
3325
- result = rb_funcall(swig_get_self(), rb_intern("drop"), 1,obj0);
3444
+ result = rb_funcall(swig_get_self(), rb_intern("protected_drop"), 1,obj0);
3326
3445
  }
3327
3446
 
3328
3447
 
@@ -3789,25 +3908,6 @@ fail:
3789
3908
  }
3790
3909
 
3791
3910
 
3792
- SWIGINTERN VALUE
3793
- _wrap__release_all_openal_resources(int argc, VALUE *argv, VALUE self) {
3794
- if ((argc < 0) || (argc > 0)) {
3795
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3796
- }
3797
- {
3798
- try {
3799
- Gosu::al_shutdown();
3800
- }
3801
- catch (const std::exception& e) {
3802
- SWIG_exception(SWIG_RuntimeError, e.what());
3803
- }
3804
- }
3805
- return Qnil;
3806
- fail:
3807
- return Qnil;
3808
- }
3809
-
3810
-
3811
3911
  static swig_class SwigClassColor;
3812
3912
 
3813
3913
  SWIGINTERN VALUE
@@ -5263,6 +5363,134 @@ fail:
5263
5363
  }
5264
5364
 
5265
5365
 
5366
+ SWIGINTERN VALUE
5367
+ _wrap_Font_draw_text(int argc, VALUE *argv, VALUE self) {
5368
+ Gosu::Font *arg1 = (Gosu::Font *) 0 ;
5369
+ std::string *arg2 = 0 ;
5370
+ double arg3 ;
5371
+ double arg4 ;
5372
+ Gosu::ZPos arg5 ;
5373
+ double arg6 = (double) 1 ;
5374
+ double arg7 = (double) 1 ;
5375
+ Gosu::Color arg8 = (Gosu::Color) Gosu::Color::WHITE ;
5376
+ Gosu::AlphaMode arg9 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
5377
+ void *argp1 = 0 ;
5378
+ int res1 = 0 ;
5379
+ int res2 = SWIG_OLDOBJ ;
5380
+ double val3 ;
5381
+ int ecode3 = 0 ;
5382
+ double val4 ;
5383
+ int ecode4 = 0 ;
5384
+ double val5 ;
5385
+ int ecode5 = 0 ;
5386
+ double val6 ;
5387
+ int ecode6 = 0 ;
5388
+ double val7 ;
5389
+ int ecode7 = 0 ;
5390
+
5391
+ if ((argc < 4) || (argc > 8)) {
5392
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5393
+ }
5394
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
5395
+ if (!SWIG_IsOK(res1)) {
5396
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_text", 1, self ));
5397
+ }
5398
+ arg1 = reinterpret_cast< Gosu::Font * >(argp1);
5399
+ {
5400
+ std::string *ptr = (std::string *)0;
5401
+ res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
5402
+ if (!SWIG_IsOK(res2)) {
5403
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_text", 2, argv[0] ));
5404
+ }
5405
+ if (!ptr) {
5406
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_text", 2, argv[0]));
5407
+ }
5408
+ arg2 = ptr;
5409
+ }
5410
+ ecode3 = SWIG_AsVal_double(argv[1], &val3);
5411
+ if (!SWIG_IsOK(ecode3)) {
5412
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_text", 3, argv[1] ));
5413
+ }
5414
+ arg3 = static_cast< double >(val3);
5415
+ ecode4 = SWIG_AsVal_double(argv[2], &val4);
5416
+ if (!SWIG_IsOK(ecode4)) {
5417
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_text", 4, argv[2] ));
5418
+ }
5419
+ arg4 = static_cast< double >(val4);
5420
+ ecode5 = SWIG_AsVal_double(argv[3], &val5);
5421
+ if (!SWIG_IsOK(ecode5)) {
5422
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_text", 5, argv[3] ));
5423
+ }
5424
+ arg5 = static_cast< Gosu::ZPos >(val5);
5425
+ if (argc > 4) {
5426
+ ecode6 = SWIG_AsVal_double(argv[4], &val6);
5427
+ if (!SWIG_IsOK(ecode6)) {
5428
+ SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_text", 6, argv[4] ));
5429
+ }
5430
+ arg6 = static_cast< double >(val6);
5431
+ }
5432
+ if (argc > 5) {
5433
+ ecode7 = SWIG_AsVal_double(argv[5], &val7);
5434
+ if (!SWIG_IsOK(ecode7)) {
5435
+ SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_text", 7, argv[5] ));
5436
+ }
5437
+ arg7 = static_cast< double >(val7);
5438
+ }
5439
+ if (argc > 6) {
5440
+ {
5441
+ if (TYPE(argv[6]) == T_FIXNUM || TYPE(argv[6]) == T_BIGNUM) {
5442
+ arg8 = Gosu::Color(NUM2ULONG(argv[6]));
5443
+ }
5444
+ else {
5445
+ void* ptr;
5446
+ int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_Gosu__Color, 0);
5447
+ if (!SWIG_IsOK(res)) {
5448
+ SWIG_exception_fail(SWIG_ValueError, "invalid value");
5449
+ }
5450
+ else if (ptr == nullptr) {
5451
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
5452
+ }
5453
+ else {
5454
+ arg8 = *reinterpret_cast<Gosu::Color*>(ptr);
5455
+ }
5456
+ }
5457
+ }
5458
+ }
5459
+ if (argc > 7) {
5460
+ {
5461
+ const char* cstr = Gosu::cstr_from_symbol(argv[7]);
5462
+
5463
+ if (!strcmp(cstr, "default")) {
5464
+ arg9 = Gosu::AM_DEFAULT;
5465
+ }
5466
+ else if (!strcmp(cstr, "add") || !strcmp(cstr, "additive")) {
5467
+ arg9 = Gosu::AM_ADD;
5468
+ }
5469
+ else if (!strcmp(cstr, "multiply")) {
5470
+ arg9 = Gosu::AM_MULTIPLY;
5471
+ }
5472
+ else {
5473
+ SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode (expected one of :default, :add, "
5474
+ ":multiply)");
5475
+ }
5476
+ }
5477
+ }
5478
+ {
5479
+ try {
5480
+ ((Gosu::Font const *)arg1)->draw_text((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
5481
+ }
5482
+ catch (const std::exception& e) {
5483
+ SWIG_exception(SWIG_RuntimeError, e.what());
5484
+ }
5485
+ }
5486
+ if (SWIG_IsNewObj(res2)) delete arg2;
5487
+ return Qnil;
5488
+ fail:
5489
+ if (SWIG_IsNewObj(res2)) delete arg2;
5490
+ return Qnil;
5491
+ }
5492
+
5493
+
5266
5494
  SWIGINTERN VALUE
5267
5495
  _wrap_Font_draw_markup(int argc, VALUE *argv, VALUE self) {
5268
5496
  Gosu::Font *arg1 = (Gosu::Font *) 0 ;
@@ -5392,7 +5620,7 @@ fail:
5392
5620
 
5393
5621
 
5394
5622
  SWIGINTERN VALUE
5395
- _wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
5623
+ _wrap_Font_draw_text_rel(int argc, VALUE *argv, VALUE self) {
5396
5624
  Gosu::Font *arg1 = (Gosu::Font *) 0 ;
5397
5625
  std::string *arg2 = 0 ;
5398
5626
  double arg3 ;
@@ -5427,56 +5655,56 @@ _wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
5427
5655
  }
5428
5656
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
5429
5657
  if (!SWIG_IsOK(res1)) {
5430
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_markup_rel", 1, self ));
5658
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_text_rel", 1, self ));
5431
5659
  }
5432
5660
  arg1 = reinterpret_cast< Gosu::Font * >(argp1);
5433
5661
  {
5434
5662
  std::string *ptr = (std::string *)0;
5435
5663
  res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
5436
5664
  if (!SWIG_IsOK(res2)) {
5437
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_markup_rel", 2, argv[0] ));
5665
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_text_rel", 2, argv[0] ));
5438
5666
  }
5439
5667
  if (!ptr) {
5440
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_markup_rel", 2, argv[0]));
5668
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_text_rel", 2, argv[0]));
5441
5669
  }
5442
5670
  arg2 = ptr;
5443
5671
  }
5444
5672
  ecode3 = SWIG_AsVal_double(argv[1], &val3);
5445
5673
  if (!SWIG_IsOK(ecode3)) {
5446
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_markup_rel", 3, argv[1] ));
5674
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_text_rel", 3, argv[1] ));
5447
5675
  }
5448
5676
  arg3 = static_cast< double >(val3);
5449
5677
  ecode4 = SWIG_AsVal_double(argv[2], &val4);
5450
5678
  if (!SWIG_IsOK(ecode4)) {
5451
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_markup_rel", 4, argv[2] ));
5679
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_text_rel", 4, argv[2] ));
5452
5680
  }
5453
5681
  arg4 = static_cast< double >(val4);
5454
5682
  ecode5 = SWIG_AsVal_double(argv[3], &val5);
5455
5683
  if (!SWIG_IsOK(ecode5)) {
5456
- SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_markup_rel", 5, argv[3] ));
5684
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_text_rel", 5, argv[3] ));
5457
5685
  }
5458
5686
  arg5 = static_cast< Gosu::ZPos >(val5);
5459
5687
  ecode6 = SWIG_AsVal_double(argv[4], &val6);
5460
5688
  if (!SWIG_IsOK(ecode6)) {
5461
- SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_markup_rel", 6, argv[4] ));
5689
+ SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_text_rel", 6, argv[4] ));
5462
5690
  }
5463
5691
  arg6 = static_cast< double >(val6);
5464
5692
  ecode7 = SWIG_AsVal_double(argv[5], &val7);
5465
5693
  if (!SWIG_IsOK(ecode7)) {
5466
- SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_markup_rel", 7, argv[5] ));
5694
+ SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_text_rel", 7, argv[5] ));
5467
5695
  }
5468
5696
  arg7 = static_cast< double >(val7);
5469
5697
  if (argc > 6) {
5470
5698
  ecode8 = SWIG_AsVal_double(argv[6], &val8);
5471
5699
  if (!SWIG_IsOK(ecode8)) {
5472
- SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","draw_markup_rel", 8, argv[6] ));
5700
+ SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","draw_text_rel", 8, argv[6] ));
5473
5701
  }
5474
5702
  arg8 = static_cast< double >(val8);
5475
5703
  }
5476
5704
  if (argc > 7) {
5477
5705
  ecode9 = SWIG_AsVal_double(argv[7], &val9);
5478
5706
  if (!SWIG_IsOK(ecode9)) {
5479
- SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","draw_markup_rel", 9, argv[7] ));
5707
+ SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","draw_text_rel", 9, argv[7] ));
5480
5708
  }
5481
5709
  arg9 = static_cast< double >(val9);
5482
5710
  }
@@ -5521,7 +5749,7 @@ _wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
5521
5749
  }
5522
5750
  {
5523
5751
  try {
5524
- ((Gosu::Font const *)arg1)->draw_markup_rel((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
5752
+ ((Gosu::Font const *)arg1)->draw_text_rel((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
5525
5753
  }
5526
5754
  catch (const std::exception& e) {
5527
5755
  SWIG_exception(SWIG_RuntimeError, e.what());
@@ -5536,18 +5764,162 @@ fail:
5536
5764
 
5537
5765
 
5538
5766
  SWIGINTERN VALUE
5539
- _wrap_Font_set_image(int argc, VALUE *argv, VALUE self) {
5767
+ _wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
5540
5768
  Gosu::Font *arg1 = (Gosu::Font *) 0 ;
5541
- std::string arg2 ;
5542
- Gosu::Image *arg3 = 0 ;
5543
- void *argp1 = 0 ;
5544
- int res1 = 0 ;
5545
- void *argp3 ;
5546
- int res3 = 0 ;
5547
-
5548
- if ((argc < 2) || (argc > 2)) {
5549
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5550
- }
5769
+ std::string *arg2 = 0 ;
5770
+ double arg3 ;
5771
+ double arg4 ;
5772
+ Gosu::ZPos arg5 ;
5773
+ double arg6 ;
5774
+ double arg7 ;
5775
+ double arg8 = (double) 1 ;
5776
+ double arg9 = (double) 1 ;
5777
+ Gosu::Color arg10 = (Gosu::Color) Gosu::Color::WHITE ;
5778
+ Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
5779
+ void *argp1 = 0 ;
5780
+ int res1 = 0 ;
5781
+ int res2 = SWIG_OLDOBJ ;
5782
+ double val3 ;
5783
+ int ecode3 = 0 ;
5784
+ double val4 ;
5785
+ int ecode4 = 0 ;
5786
+ double val5 ;
5787
+ int ecode5 = 0 ;
5788
+ double val6 ;
5789
+ int ecode6 = 0 ;
5790
+ double val7 ;
5791
+ int ecode7 = 0 ;
5792
+ double val8 ;
5793
+ int ecode8 = 0 ;
5794
+ double val9 ;
5795
+ int ecode9 = 0 ;
5796
+
5797
+ if ((argc < 6) || (argc > 10)) {
5798
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
5799
+ }
5800
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
5801
+ if (!SWIG_IsOK(res1)) {
5802
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_markup_rel", 1, self ));
5803
+ }
5804
+ arg1 = reinterpret_cast< Gosu::Font * >(argp1);
5805
+ {
5806
+ std::string *ptr = (std::string *)0;
5807
+ res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
5808
+ if (!SWIG_IsOK(res2)) {
5809
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_markup_rel", 2, argv[0] ));
5810
+ }
5811
+ if (!ptr) {
5812
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_markup_rel", 2, argv[0]));
5813
+ }
5814
+ arg2 = ptr;
5815
+ }
5816
+ ecode3 = SWIG_AsVal_double(argv[1], &val3);
5817
+ if (!SWIG_IsOK(ecode3)) {
5818
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_markup_rel", 3, argv[1] ));
5819
+ }
5820
+ arg3 = static_cast< double >(val3);
5821
+ ecode4 = SWIG_AsVal_double(argv[2], &val4);
5822
+ if (!SWIG_IsOK(ecode4)) {
5823
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_markup_rel", 4, argv[2] ));
5824
+ }
5825
+ arg4 = static_cast< double >(val4);
5826
+ ecode5 = SWIG_AsVal_double(argv[3], &val5);
5827
+ if (!SWIG_IsOK(ecode5)) {
5828
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_markup_rel", 5, argv[3] ));
5829
+ }
5830
+ arg5 = static_cast< Gosu::ZPos >(val5);
5831
+ ecode6 = SWIG_AsVal_double(argv[4], &val6);
5832
+ if (!SWIG_IsOK(ecode6)) {
5833
+ SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_markup_rel", 6, argv[4] ));
5834
+ }
5835
+ arg6 = static_cast< double >(val6);
5836
+ ecode7 = SWIG_AsVal_double(argv[5], &val7);
5837
+ if (!SWIG_IsOK(ecode7)) {
5838
+ SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_markup_rel", 7, argv[5] ));
5839
+ }
5840
+ arg7 = static_cast< double >(val7);
5841
+ if (argc > 6) {
5842
+ ecode8 = SWIG_AsVal_double(argv[6], &val8);
5843
+ if (!SWIG_IsOK(ecode8)) {
5844
+ SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","draw_markup_rel", 8, argv[6] ));
5845
+ }
5846
+ arg8 = static_cast< double >(val8);
5847
+ }
5848
+ if (argc > 7) {
5849
+ ecode9 = SWIG_AsVal_double(argv[7], &val9);
5850
+ if (!SWIG_IsOK(ecode9)) {
5851
+ SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","draw_markup_rel", 9, argv[7] ));
5852
+ }
5853
+ arg9 = static_cast< double >(val9);
5854
+ }
5855
+ if (argc > 8) {
5856
+ {
5857
+ if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) {
5858
+ arg10 = Gosu::Color(NUM2ULONG(argv[8]));
5859
+ }
5860
+ else {
5861
+ void* ptr;
5862
+ int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
5863
+ if (!SWIG_IsOK(res)) {
5864
+ SWIG_exception_fail(SWIG_ValueError, "invalid value");
5865
+ }
5866
+ else if (ptr == nullptr) {
5867
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
5868
+ }
5869
+ else {
5870
+ arg10 = *reinterpret_cast<Gosu::Color*>(ptr);
5871
+ }
5872
+ }
5873
+ }
5874
+ }
5875
+ if (argc > 9) {
5876
+ {
5877
+ const char* cstr = Gosu::cstr_from_symbol(argv[9]);
5878
+
5879
+ if (!strcmp(cstr, "default")) {
5880
+ arg11 = Gosu::AM_DEFAULT;
5881
+ }
5882
+ else if (!strcmp(cstr, "add") || !strcmp(cstr, "additive")) {
5883
+ arg11 = Gosu::AM_ADD;
5884
+ }
5885
+ else if (!strcmp(cstr, "multiply")) {
5886
+ arg11 = Gosu::AM_MULTIPLY;
5887
+ }
5888
+ else {
5889
+ SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode (expected one of :default, :add, "
5890
+ ":multiply)");
5891
+ }
5892
+ }
5893
+ }
5894
+ {
5895
+ try {
5896
+ ((Gosu::Font const *)arg1)->draw_markup_rel((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
5897
+ }
5898
+ catch (const std::exception& e) {
5899
+ SWIG_exception(SWIG_RuntimeError, e.what());
5900
+ }
5901
+ }
5902
+ if (SWIG_IsNewObj(res2)) delete arg2;
5903
+ return Qnil;
5904
+ fail:
5905
+ if (SWIG_IsNewObj(res2)) delete arg2;
5906
+ return Qnil;
5907
+ }
5908
+
5909
+
5910
+ SWIGINTERN VALUE
5911
+ _wrap_Font_set_image(int argc, VALUE *argv, VALUE self) {
5912
+ Gosu::Font *arg1 = (Gosu::Font *) 0 ;
5913
+ std::string arg2 ;
5914
+ Gosu::Image *arg3 = 0 ;
5915
+ void *argp1 = 0 ;
5916
+ int res1 = 0 ;
5917
+ void *argp3 ;
5918
+ int res3 = 0 ;
5919
+
5920
+ if ((argc < 2) || (argc > 2)) {
5921
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5922
+ }
5551
5923
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
5552
5924
  if (!SWIG_IsOK(res1)) {
5553
5925
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font *","set_image", 1, self ));
@@ -5748,6 +6120,62 @@ fail:
5748
6120
  }
5749
6121
 
5750
6122
 
6123
+ SWIGINTERN VALUE
6124
+ _wrap_Font_text_width(int argc, VALUE *argv, VALUE self) {
6125
+ Gosu::Font *arg1 = (Gosu::Font *) 0 ;
6126
+ std::string *arg2 = 0 ;
6127
+ double arg3 = (double) 1.0 ;
6128
+ void *argp1 = 0 ;
6129
+ int res1 = 0 ;
6130
+ int res2 = SWIG_OLDOBJ ;
6131
+ double val3 ;
6132
+ int ecode3 = 0 ;
6133
+ double result;
6134
+ VALUE vresult = Qnil;
6135
+
6136
+ if ((argc < 1) || (argc > 2)) {
6137
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6138
+ }
6139
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
6140
+ if (!SWIG_IsOK(res1)) {
6141
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font *","text_width", 1, self ));
6142
+ }
6143
+ arg1 = reinterpret_cast< Gosu::Font * >(argp1);
6144
+ {
6145
+ std::string *ptr = (std::string *)0;
6146
+ res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
6147
+ if (!SWIG_IsOK(res2)) {
6148
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","text_width", 2, argv[0] ));
6149
+ }
6150
+ if (!ptr) {
6151
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","text_width", 2, argv[0]));
6152
+ }
6153
+ arg2 = ptr;
6154
+ }
6155
+ if (argc > 1) {
6156
+ ecode3 = SWIG_AsVal_double(argv[1], &val3);
6157
+ if (!SWIG_IsOK(ecode3)) {
6158
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","text_width", 3, argv[1] ));
6159
+ }
6160
+ arg3 = static_cast< double >(val3);
6161
+ }
6162
+ {
6163
+ try {
6164
+ result = (double)Gosu_Font_text_width(arg1,(std::string const &)*arg2,arg3);
6165
+ }
6166
+ catch (const std::exception& e) {
6167
+ SWIG_exception(SWIG_RuntimeError, e.what());
6168
+ }
6169
+ }
6170
+ vresult = SWIG_From_double(static_cast< double >(result));
6171
+ if (SWIG_IsNewObj(res2)) delete arg2;
6172
+ return vresult;
6173
+ fail:
6174
+ if (SWIG_IsNewObj(res2)) delete arg2;
6175
+ return Qnil;
6176
+ }
6177
+
6178
+
5751
6179
  SWIGINTERN VALUE
5752
6180
  _wrap_Font_markup_width(int argc, VALUE *argv, VALUE self) {
5753
6181
  Gosu::Font *arg1 = (Gosu::Font *) 0 ;
@@ -6193,7 +6621,7 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
6193
6621
  Gosu::Image *arg1 = (Gosu::Image *) 0 ;
6194
6622
  double arg2 ;
6195
6623
  double arg3 ;
6196
- Gosu::ZPos arg4 ;
6624
+ Gosu::ZPos arg4 = (Gosu::ZPos) 0 ;
6197
6625
  double arg5 = (double) 1 ;
6198
6626
  double arg6 = (double) 1 ;
6199
6627
  Gosu::Color arg7 = (Gosu::Color) Gosu::Color::WHITE ;
@@ -6211,8 +6639,8 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
6211
6639
  double val6 ;
6212
6640
  int ecode6 = 0 ;
6213
6641
 
6214
- if ((argc < 3) || (argc > 7)) {
6215
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6642
+ if ((argc < 2) || (argc > 7)) {
6643
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6216
6644
  }
6217
6645
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
6218
6646
  if (!SWIG_IsOK(res1)) {
@@ -6229,11 +6657,13 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
6229
6657
  SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw", 3, argv[1] ));
6230
6658
  }
6231
6659
  arg3 = static_cast< double >(val3);
6232
- ecode4 = SWIG_AsVal_double(argv[2], &val4);
6233
- if (!SWIG_IsOK(ecode4)) {
6234
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw", 4, argv[2] ));
6235
- }
6236
- arg4 = static_cast< Gosu::ZPos >(val4);
6660
+ if (argc > 2) {
6661
+ ecode4 = SWIG_AsVal_double(argv[2], &val4);
6662
+ if (!SWIG_IsOK(ecode4)) {
6663
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw", 4, argv[2] ));
6664
+ }
6665
+ arg4 = static_cast< Gosu::ZPos >(val4);
6666
+ }
6237
6667
  if (argc > 3) {
6238
6668
  ecode5 = SWIG_AsVal_double(argv[3], &val5);
6239
6669
  if (!SWIG_IsOK(ecode5)) {
@@ -6470,8 +6900,8 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
6470
6900
  Gosu::Image *arg1 = (Gosu::Image *) 0 ;
6471
6901
  double arg2 ;
6472
6902
  double arg3 ;
6473
- Gosu::ZPos arg4 ;
6474
- double arg5 ;
6903
+ Gosu::ZPos arg4 = (Gosu::ZPos) 0 ;
6904
+ double arg5 = (double) 0 ;
6475
6905
  double arg6 = (double) 0.5 ;
6476
6906
  double arg7 = (double) 0.5 ;
6477
6907
  double arg8 = (double) 1 ;
@@ -6497,8 +6927,8 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
6497
6927
  double val9 ;
6498
6928
  int ecode9 = 0 ;
6499
6929
 
6500
- if ((argc < 4) || (argc > 10)) {
6501
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
6930
+ if ((argc < 2) || (argc > 10)) {
6931
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6502
6932
  }
6503
6933
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
6504
6934
  if (!SWIG_IsOK(res1)) {
@@ -6515,16 +6945,20 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
6515
6945
  SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_rot", 3, argv[1] ));
6516
6946
  }
6517
6947
  arg3 = static_cast< double >(val3);
6518
- ecode4 = SWIG_AsVal_double(argv[2], &val4);
6519
- if (!SWIG_IsOK(ecode4)) {
6520
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_rot", 4, argv[2] ));
6521
- }
6522
- arg4 = static_cast< Gosu::ZPos >(val4);
6523
- ecode5 = SWIG_AsVal_double(argv[3], &val5);
6524
- if (!SWIG_IsOK(ecode5)) {
6525
- SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","draw_rot", 5, argv[3] ));
6526
- }
6527
- arg5 = static_cast< double >(val5);
6948
+ if (argc > 2) {
6949
+ ecode4 = SWIG_AsVal_double(argv[2], &val4);
6950
+ if (!SWIG_IsOK(ecode4)) {
6951
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_rot", 4, argv[2] ));
6952
+ }
6953
+ arg4 = static_cast< Gosu::ZPos >(val4);
6954
+ }
6955
+ if (argc > 3) {
6956
+ ecode5 = SWIG_AsVal_double(argv[3], &val5);
6957
+ if (!SWIG_IsOK(ecode5)) {
6958
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","draw_rot", 5, argv[3] ));
6959
+ }
6960
+ arg5 = static_cast< double >(val5);
6961
+ }
6528
6962
  if (argc > 4) {
6529
6963
  ecode6 = SWIG_AsVal_double(argv[4], &val6);
6530
6964
  if (!SWIG_IsOK(ecode6)) {
@@ -6991,6 +7425,56 @@ fail:
6991
7425
  }
6992
7426
 
6993
7427
 
7428
+ SWIGINTERN VALUE
7429
+ _wrap_Image_from_markup(int argc, VALUE *argv, VALUE self) {
7430
+ std::string *arg1 = 0 ;
7431
+ double arg2 ;
7432
+ VALUE arg3 = (VALUE) 0 ;
7433
+ int res1 = SWIG_OLDOBJ ;
7434
+ double val2 ;
7435
+ int ecode2 = 0 ;
7436
+ Gosu::Image *result = 0 ;
7437
+ VALUE vresult = Qnil;
7438
+
7439
+ if ((argc < 2) || (argc > 3)) {
7440
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7441
+ }
7442
+ {
7443
+ std::string *ptr = (std::string *)0;
7444
+ res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
7445
+ if (!SWIG_IsOK(res1)) {
7446
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Gosu_Image_from_markup", 1, argv[0] ));
7447
+ }
7448
+ if (!ptr) {
7449
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Gosu_Image_from_markup", 1, argv[0]));
7450
+ }
7451
+ arg1 = ptr;
7452
+ }
7453
+ ecode2 = SWIG_AsVal_double(argv[1], &val2);
7454
+ if (!SWIG_IsOK(ecode2)) {
7455
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu_Image_from_markup", 2, argv[1] ));
7456
+ }
7457
+ arg2 = static_cast< double >(val2);
7458
+ if (argc > 2) {
7459
+ arg3 = argv[2];
7460
+ }
7461
+ {
7462
+ try {
7463
+ result = (Gosu::Image *)Gosu_Image_from_markup((std::string const &)*arg1,arg2,arg3);
7464
+ }
7465
+ catch (const std::exception& e) {
7466
+ SWIG_exception(SWIG_RuntimeError, e.what());
7467
+ }
7468
+ }
7469
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN | 0 );
7470
+ if (SWIG_IsNewObj(res1)) delete arg1;
7471
+ return vresult;
7472
+ fail:
7473
+ if (SWIG_IsNewObj(res1)) delete arg1;
7474
+ return Qnil;
7475
+ }
7476
+
7477
+
6994
7478
  SWIGINTERN VALUE
6995
7479
  _wrap_Image_load_tiles__SWIG_0(int argc, VALUE *argv, VALUE self) {
6996
7480
  VALUE arg1 = (VALUE) 0 ;
@@ -7221,7 +7705,7 @@ _wrap_Image_columns(int argc, VALUE *argv, VALUE self) {
7221
7705
  Gosu::Image *arg1 = (Gosu::Image *) 0 ;
7222
7706
  void *argp1 = 0 ;
7223
7707
  int res1 = 0 ;
7224
- unsigned int result;
7708
+ int result;
7225
7709
  VALUE vresult = Qnil;
7226
7710
 
7227
7711
  if ((argc < 0) || (argc > 0)) {
@@ -7234,13 +7718,13 @@ _wrap_Image_columns(int argc, VALUE *argv, VALUE self) {
7234
7718
  arg1 = reinterpret_cast< Gosu::Image * >(argp1);
7235
7719
  {
7236
7720
  try {
7237
- result = (unsigned int)Gosu_Image_columns((Gosu::Image const *)arg1);
7721
+ result = (int)Gosu_Image_columns((Gosu::Image const *)arg1);
7238
7722
  }
7239
7723
  catch (const std::exception& e) {
7240
7724
  SWIG_exception(SWIG_RuntimeError, e.what());
7241
7725
  }
7242
7726
  }
7243
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
7727
+ vresult = SWIG_From_int(static_cast< int >(result));
7244
7728
  return vresult;
7245
7729
  fail:
7246
7730
  return Qnil;
@@ -7252,7 +7736,7 @@ _wrap_Image_rows(int argc, VALUE *argv, VALUE self) {
7252
7736
  Gosu::Image *arg1 = (Gosu::Image *) 0 ;
7253
7737
  void *argp1 = 0 ;
7254
7738
  int res1 = 0 ;
7255
- unsigned int result;
7739
+ int result;
7256
7740
  VALUE vresult = Qnil;
7257
7741
 
7258
7742
  if ((argc < 0) || (argc > 0)) {
@@ -7265,13 +7749,13 @@ _wrap_Image_rows(int argc, VALUE *argv, VALUE self) {
7265
7749
  arg1 = reinterpret_cast< Gosu::Image * >(argp1);
7266
7750
  {
7267
7751
  try {
7268
- result = (unsigned int)Gosu_Image_rows((Gosu::Image const *)arg1);
7752
+ result = (int)Gosu_Image_rows((Gosu::Image const *)arg1);
7269
7753
  }
7270
7754
  catch (const std::exception& e) {
7271
7755
  SWIG_exception(SWIG_RuntimeError, e.what());
7272
7756
  }
7273
7757
  }
7274
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
7758
+ vresult = SWIG_From_int(static_cast< int >(result));
7275
7759
  return vresult;
7276
7760
  fail:
7277
7761
  return Qnil;
@@ -8714,44 +9198,41 @@ _wrap_Window_allocate(int argc, VALUE *argv, VALUE self)
8714
9198
  SWIGINTERN VALUE
8715
9199
  _wrap_new_Window(int argc, VALUE *argv, VALUE self) {
8716
9200
  VALUE arg1 = (VALUE) 0 ;
8717
- unsigned int arg2 ;
8718
- unsigned int arg3 ;
8719
- bool arg4 = (bool) false ;
9201
+ int arg2 ;
9202
+ int arg3 ;
9203
+ unsigned int arg4 = (unsigned int) Gosu::WF_WINDOWED ;
8720
9204
  double arg5 = (double) 16.666666 ;
8721
- bool arg6 = (bool) false ;
8722
- unsigned int val2 ;
9205
+ int val2 ;
8723
9206
  int ecode2 = 0 ;
8724
- unsigned int val3 ;
9207
+ int val3 ;
8725
9208
  int ecode3 = 0 ;
8726
- bool val4 ;
9209
+ unsigned int val4 ;
8727
9210
  int ecode4 = 0 ;
8728
9211
  double val5 ;
8729
9212
  int ecode5 = 0 ;
8730
- bool val6 ;
8731
- int ecode6 = 0 ;
8732
9213
  const char *classname SWIGUNUSED = "Gosu::Window";
8733
9214
  Gosu::Window *result = 0 ;
8734
9215
 
8735
- if ((argc < 2) || (argc > 5)) {
9216
+ if ((argc < 2) || (argc > 4)) {
8736
9217
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
8737
9218
  }
8738
9219
  arg1 = self;
8739
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
9220
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
8740
9221
  if (!SWIG_IsOK(ecode2)) {
8741
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Window", 2, argv[0] ));
9222
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Window", 2, argv[0] ));
8742
9223
  }
8743
- arg2 = static_cast< unsigned int >(val2);
8744
- ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
9224
+ arg2 = static_cast< int >(val2);
9225
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
8745
9226
  if (!SWIG_IsOK(ecode3)) {
8746
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","Window", 3, argv[1] ));
9227
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Window", 3, argv[1] ));
8747
9228
  }
8748
- arg3 = static_cast< unsigned int >(val3);
9229
+ arg3 = static_cast< int >(val3);
8749
9230
  if (argc > 2) {
8750
- ecode4 = SWIG_AsVal_bool(argv[2], &val4);
9231
+ ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
8751
9232
  if (!SWIG_IsOK(ecode4)) {
8752
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","Window", 4, argv[2] ));
9233
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "unsigned int","Window", 4, argv[2] ));
8753
9234
  }
8754
- arg4 = static_cast< bool >(val4);
9235
+ arg4 = static_cast< unsigned int >(val4);
8755
9236
  }
8756
9237
  if (argc > 3) {
8757
9238
  ecode5 = SWIG_AsVal_double(argv[3], &val5);
@@ -8760,20 +9241,13 @@ _wrap_new_Window(int argc, VALUE *argv, VALUE self) {
8760
9241
  }
8761
9242
  arg5 = static_cast< double >(val5);
8762
9243
  }
8763
- if (argc > 4) {
8764
- ecode6 = SWIG_AsVal_bool(argv[4], &val6);
8765
- if (!SWIG_IsOK(ecode6)) {
8766
- SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "bool","Window", 6, argv[4] ));
8767
- }
8768
- arg6 = static_cast< bool >(val6);
8769
- }
8770
9244
  {
8771
9245
  try {
8772
9246
  if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
8773
9247
  /* subclassed */
8774
- result = (Gosu::Window *)new SwigDirector_Window(arg1,arg2,arg3,arg4,arg5,arg6);
9248
+ result = (Gosu::Window *)new SwigDirector_Window(arg1,arg2,arg3,arg4,arg5);
8775
9249
  } else {
8776
- result = (Gosu::Window *)new Gosu::Window(arg2,arg3,arg4,arg5,arg6);
9250
+ result = (Gosu::Window *)new Gosu::Window(arg2,arg3,arg4,arg5);
8777
9251
  }
8778
9252
 
8779
9253
  DATA_PTR(self) = result;
@@ -8801,7 +9275,7 @@ _wrap_Window_width(int argc, VALUE *argv, VALUE self) {
8801
9275
  Gosu::Window *arg1 = (Gosu::Window *) 0 ;
8802
9276
  void *argp1 = 0 ;
8803
9277
  int res1 = 0 ;
8804
- unsigned int result;
9278
+ int result;
8805
9279
  VALUE vresult = Qnil;
8806
9280
 
8807
9281
  if ((argc < 0) || (argc > 0)) {
@@ -8814,13 +9288,13 @@ _wrap_Window_width(int argc, VALUE *argv, VALUE self) {
8814
9288
  arg1 = reinterpret_cast< Gosu::Window * >(argp1);
8815
9289
  {
8816
9290
  try {
8817
- result = (unsigned int)((Gosu::Window const *)arg1)->width();
9291
+ result = (int)((Gosu::Window const *)arg1)->width();
8818
9292
  }
8819
9293
  catch (const std::exception& e) {
8820
9294
  SWIG_exception(SWIG_RuntimeError, e.what());
8821
9295
  }
8822
9296
  }
8823
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
9297
+ vresult = SWIG_From_int(static_cast< int >(result));
8824
9298
  return vresult;
8825
9299
  fail:
8826
9300
  return Qnil;
@@ -8832,34 +9306,132 @@ _wrap_Window_height(int argc, VALUE *argv, VALUE self) {
8832
9306
  Gosu::Window *arg1 = (Gosu::Window *) 0 ;
8833
9307
  void *argp1 = 0 ;
8834
9308
  int res1 = 0 ;
8835
- unsigned int result;
9309
+ int result;
9310
+ VALUE vresult = Qnil;
9311
+
9312
+ if ((argc < 0) || (argc > 0)) {
9313
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
9314
+ }
9315
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
9316
+ if (!SWIG_IsOK(res1)) {
9317
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","height", 1, self ));
9318
+ }
9319
+ arg1 = reinterpret_cast< Gosu::Window * >(argp1);
9320
+ {
9321
+ try {
9322
+ result = (int)((Gosu::Window const *)arg1)->height();
9323
+ }
9324
+ catch (const std::exception& e) {
9325
+ SWIG_exception(SWIG_RuntimeError, e.what());
9326
+ }
9327
+ }
9328
+ vresult = SWIG_From_int(static_cast< int >(result));
9329
+ return vresult;
9330
+ fail:
9331
+ return Qnil;
9332
+ }
9333
+
9334
+
9335
+ SWIGINTERN VALUE
9336
+ _wrap_Window_fullscreenq___(int argc, VALUE *argv, VALUE self) {
9337
+ Gosu::Window *arg1 = (Gosu::Window *) 0 ;
9338
+ void *argp1 = 0 ;
9339
+ int res1 = 0 ;
9340
+ bool result;
8836
9341
  VALUE vresult = Qnil;
8837
9342
 
8838
- if ((argc < 0) || (argc > 0)) {
8839
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
9343
+ if ((argc < 0) || (argc > 0)) {
9344
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
9345
+ }
9346
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
9347
+ if (!SWIG_IsOK(res1)) {
9348
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","fullscreen", 1, self ));
9349
+ }
9350
+ arg1 = reinterpret_cast< Gosu::Window * >(argp1);
9351
+ {
9352
+ try {
9353
+ result = (bool)((Gosu::Window const *)arg1)->fullscreen();
9354
+ }
9355
+ catch (const std::exception& e) {
9356
+ SWIG_exception(SWIG_RuntimeError, e.what());
9357
+ }
9358
+ }
9359
+ vresult = SWIG_From_bool(static_cast< bool >(result));
9360
+ return vresult;
9361
+ fail:
9362
+ return Qnil;
9363
+ }
9364
+
9365
+
9366
+ SWIGINTERN VALUE
9367
+ _wrap_Window_resizableq___(int argc, VALUE *argv, VALUE self) {
9368
+ Gosu::Window *arg1 = (Gosu::Window *) 0 ;
9369
+ void *argp1 = 0 ;
9370
+ int res1 = 0 ;
9371
+ bool result;
9372
+ VALUE vresult = Qnil;
9373
+
9374
+ if ((argc < 0) || (argc > 0)) {
9375
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
9376
+ }
9377
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
9378
+ if (!SWIG_IsOK(res1)) {
9379
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","resizable", 1, self ));
9380
+ }
9381
+ arg1 = reinterpret_cast< Gosu::Window * >(argp1);
9382
+ {
9383
+ try {
9384
+ result = (bool)((Gosu::Window const *)arg1)->resizable();
9385
+ }
9386
+ catch (const std::exception& e) {
9387
+ SWIG_exception(SWIG_RuntimeError, e.what());
9388
+ }
9389
+ }
9390
+ vresult = SWIG_From_bool(static_cast< bool >(result));
9391
+ return vresult;
9392
+ fail:
9393
+ return Qnil;
9394
+ }
9395
+
9396
+
9397
+ SWIGINTERN VALUE
9398
+ _wrap_Window_resizablee___(int argc, VALUE *argv, VALUE self) {
9399
+ Gosu::Window *arg1 = (Gosu::Window *) 0 ;
9400
+ bool arg2 ;
9401
+ void *argp1 = 0 ;
9402
+ int res1 = 0 ;
9403
+ bool val2 ;
9404
+ int ecode2 = 0 ;
9405
+
9406
+ if ((argc < 1) || (argc > 1)) {
9407
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8840
9408
  }
8841
9409
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
8842
9410
  if (!SWIG_IsOK(res1)) {
8843
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","height", 1, self ));
9411
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","set_resizable", 1, self ));
8844
9412
  }
8845
9413
  arg1 = reinterpret_cast< Gosu::Window * >(argp1);
9414
+ ecode2 = SWIG_AsVal_bool(argv[0], &val2);
9415
+ if (!SWIG_IsOK(ecode2)) {
9416
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","set_resizable", 2, argv[0] ));
9417
+ }
9418
+ arg2 = static_cast< bool >(val2);
8846
9419
  {
8847
9420
  try {
8848
- result = (unsigned int)((Gosu::Window const *)arg1)->height();
9421
+ (arg1)->set_resizable(arg2);
8849
9422
  }
8850
9423
  catch (const std::exception& e) {
8851
9424
  SWIG_exception(SWIG_RuntimeError, e.what());
8852
9425
  }
8853
9426
  }
8854
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
8855
- return vresult;
9427
+ return Qnil;
8856
9428
  fail:
8857
9429
  return Qnil;
8858
9430
  }
8859
9431
 
8860
9432
 
8861
9433
  SWIGINTERN VALUE
8862
- _wrap_Window_fullscreenq___(int argc, VALUE *argv, VALUE self) {
9434
+ _wrap_Window_borderlessq___(int argc, VALUE *argv, VALUE self) {
8863
9435
  Gosu::Window *arg1 = (Gosu::Window *) 0 ;
8864
9436
  void *argp1 = 0 ;
8865
9437
  int res1 = 0 ;
@@ -8871,12 +9443,12 @@ _wrap_Window_fullscreenq___(int argc, VALUE *argv, VALUE self) {
8871
9443
  }
8872
9444
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
8873
9445
  if (!SWIG_IsOK(res1)) {
8874
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","fullscreen", 1, self ));
9446
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","borderless", 1, self ));
8875
9447
  }
8876
9448
  arg1 = reinterpret_cast< Gosu::Window * >(argp1);
8877
9449
  {
8878
9450
  try {
8879
- result = (bool)((Gosu::Window const *)arg1)->fullscreen();
9451
+ result = (bool)((Gosu::Window const *)arg1)->borderless();
8880
9452
  }
8881
9453
  catch (const std::exception& e) {
8882
9454
  SWIG_exception(SWIG_RuntimeError, e.what());
@@ -8890,31 +9462,36 @@ fail:
8890
9462
 
8891
9463
 
8892
9464
  SWIGINTERN VALUE
8893
- _wrap_Window_resizableq___(int argc, VALUE *argv, VALUE self) {
9465
+ _wrap_Window_borderlesse___(int argc, VALUE *argv, VALUE self) {
8894
9466
  Gosu::Window *arg1 = (Gosu::Window *) 0 ;
9467
+ bool arg2 ;
8895
9468
  void *argp1 = 0 ;
8896
9469
  int res1 = 0 ;
8897
- bool result;
8898
- VALUE vresult = Qnil;
9470
+ bool val2 ;
9471
+ int ecode2 = 0 ;
8899
9472
 
8900
- if ((argc < 0) || (argc > 0)) {
8901
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
9473
+ if ((argc < 1) || (argc > 1)) {
9474
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8902
9475
  }
8903
9476
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
8904
9477
  if (!SWIG_IsOK(res1)) {
8905
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","resizable", 1, self ));
9478
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","set_borderless", 1, self ));
8906
9479
  }
8907
9480
  arg1 = reinterpret_cast< Gosu::Window * >(argp1);
9481
+ ecode2 = SWIG_AsVal_bool(argv[0], &val2);
9482
+ if (!SWIG_IsOK(ecode2)) {
9483
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","set_borderless", 2, argv[0] ));
9484
+ }
9485
+ arg2 = static_cast< bool >(val2);
8908
9486
  {
8909
9487
  try {
8910
- result = (bool)((Gosu::Window const *)arg1)->resizable();
9488
+ (arg1)->set_borderless(arg2);
8911
9489
  }
8912
9490
  catch (const std::exception& e) {
8913
9491
  SWIG_exception(SWIG_RuntimeError, e.what());
8914
9492
  }
8915
9493
  }
8916
- vresult = SWIG_From_bool(static_cast< bool >(result));
8917
- return vresult;
9494
+ return Qnil;
8918
9495
  fail:
8919
9496
  return Qnil;
8920
9497
  }
@@ -9529,6 +10106,104 @@ fail:
9529
10106
  }
9530
10107
 
9531
10108
 
10109
+ SWIGINTERN VALUE
10110
+ _wrap_Window_gamepad_connected(int argc, VALUE *argv, VALUE self) {
10111
+ Gosu::Window *arg1 = (Gosu::Window *) 0 ;
10112
+ int arg2 ;
10113
+ void *argp1 = 0 ;
10114
+ int res1 = 0 ;
10115
+ int val2 ;
10116
+ int ecode2 = 0 ;
10117
+ Swig::Director *director = 0;
10118
+ bool upcall = false;
10119
+
10120
+ if ((argc < 1) || (argc > 1)) {
10121
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10122
+ }
10123
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
10124
+ if (!SWIG_IsOK(res1)) {
10125
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","gamepad_connected", 1, self ));
10126
+ }
10127
+ arg1 = reinterpret_cast< Gosu::Window * >(argp1);
10128
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
10129
+ if (!SWIG_IsOK(ecode2)) {
10130
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gamepad_connected", 2, argv[0] ));
10131
+ }
10132
+ arg2 = static_cast< int >(val2);
10133
+ director = dynamic_cast<Swig::Director *>(arg1);
10134
+ upcall = (director && (director->swig_get_self() == self));
10135
+ try {
10136
+ {
10137
+ try {
10138
+ if (upcall) {
10139
+ (arg1)->Gosu::Window::gamepad_connected(arg2);
10140
+ } else {
10141
+ (arg1)->gamepad_connected(arg2);
10142
+ }
10143
+ }
10144
+ catch (const std::exception& e) {
10145
+ SWIG_exception(SWIG_RuntimeError, e.what());
10146
+ }
10147
+ }
10148
+ } catch (Swig::DirectorException& e) {
10149
+ rb_exc_raise(e.getError());
10150
+ SWIG_fail;
10151
+ }
10152
+ return Qnil;
10153
+ fail:
10154
+ return Qnil;
10155
+ }
10156
+
10157
+
10158
+ SWIGINTERN VALUE
10159
+ _wrap_Window_gamepad_disconnected(int argc, VALUE *argv, VALUE self) {
10160
+ Gosu::Window *arg1 = (Gosu::Window *) 0 ;
10161
+ int arg2 ;
10162
+ void *argp1 = 0 ;
10163
+ int res1 = 0 ;
10164
+ int val2 ;
10165
+ int ecode2 = 0 ;
10166
+ Swig::Director *director = 0;
10167
+ bool upcall = false;
10168
+
10169
+ if ((argc < 1) || (argc > 1)) {
10170
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10171
+ }
10172
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
10173
+ if (!SWIG_IsOK(res1)) {
10174
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","gamepad_disconnected", 1, self ));
10175
+ }
10176
+ arg1 = reinterpret_cast< Gosu::Window * >(argp1);
10177
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
10178
+ if (!SWIG_IsOK(ecode2)) {
10179
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gamepad_disconnected", 2, argv[0] ));
10180
+ }
10181
+ arg2 = static_cast< int >(val2);
10182
+ director = dynamic_cast<Swig::Director *>(arg1);
10183
+ upcall = (director && (director->swig_get_self() == self));
10184
+ try {
10185
+ {
10186
+ try {
10187
+ if (upcall) {
10188
+ (arg1)->Gosu::Window::gamepad_disconnected(arg2);
10189
+ } else {
10190
+ (arg1)->gamepad_disconnected(arg2);
10191
+ }
10192
+ }
10193
+ catch (const std::exception& e) {
10194
+ SWIG_exception(SWIG_RuntimeError, e.what());
10195
+ }
10196
+ }
10197
+ } catch (Swig::DirectorException& e) {
10198
+ rb_exc_raise(e.getError());
10199
+ SWIG_fail;
10200
+ }
10201
+ return Qnil;
10202
+ fail:
10203
+ return Qnil;
10204
+ }
10205
+
10206
+
9532
10207
  SWIGINTERN VALUE
9533
10208
  _wrap_Window_drop(int argc, VALUE *argv, VALUE self) {
9534
10209
  Gosu::Window *arg1 = (Gosu::Window *) 0 ;
@@ -10002,7 +10677,7 @@ _wrap_screen_width(int argc, VALUE *argv, VALUE self) {
10002
10677
  Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
10003
10678
  void *argp1 = 0 ;
10004
10679
  int res1 = 0 ;
10005
- unsigned int result;
10680
+ int result;
10006
10681
  VALUE vresult = Qnil;
10007
10682
 
10008
10683
  if ((argc < 0) || (argc > 1)) {
@@ -10017,13 +10692,13 @@ _wrap_screen_width(int argc, VALUE *argv, VALUE self) {
10017
10692
  }
10018
10693
  {
10019
10694
  try {
10020
- result = (unsigned int)Gosu::screen_width(arg1);
10695
+ result = (int)Gosu::screen_width(arg1);
10021
10696
  }
10022
10697
  catch (const std::exception& e) {
10023
10698
  SWIG_exception(SWIG_RuntimeError, e.what());
10024
10699
  }
10025
10700
  }
10026
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
10701
+ vresult = SWIG_From_int(static_cast< int >(result));
10027
10702
  return vresult;
10028
10703
  fail:
10029
10704
  return Qnil;
@@ -10035,7 +10710,7 @@ _wrap_screen_height(int argc, VALUE *argv, VALUE self) {
10035
10710
  Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
10036
10711
  void *argp1 = 0 ;
10037
10712
  int res1 = 0 ;
10038
- unsigned int result;
10713
+ int result;
10039
10714
  VALUE vresult = Qnil;
10040
10715
 
10041
10716
  if ((argc < 0) || (argc > 1)) {
@@ -10050,13 +10725,13 @@ _wrap_screen_height(int argc, VALUE *argv, VALUE self) {
10050
10725
  }
10051
10726
  {
10052
10727
  try {
10053
- result = (unsigned int)Gosu::screen_height(arg1);
10728
+ result = (int)Gosu::screen_height(arg1);
10054
10729
  }
10055
10730
  catch (const std::exception& e) {
10056
10731
  SWIG_exception(SWIG_RuntimeError, e.what());
10057
10732
  }
10058
10733
  }
10059
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
10734
+ vresult = SWIG_From_int(static_cast< int >(result));
10060
10735
  return vresult;
10061
10736
  fail:
10062
10737
  return Qnil;
@@ -10068,7 +10743,7 @@ _wrap_available_width(int argc, VALUE *argv, VALUE self) {
10068
10743
  Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
10069
10744
  void *argp1 = 0 ;
10070
10745
  int res1 = 0 ;
10071
- unsigned int result;
10746
+ int result;
10072
10747
  VALUE vresult = Qnil;
10073
10748
 
10074
10749
  if ((argc < 0) || (argc > 1)) {
@@ -10083,13 +10758,13 @@ _wrap_available_width(int argc, VALUE *argv, VALUE self) {
10083
10758
  }
10084
10759
  {
10085
10760
  try {
10086
- result = (unsigned int)Gosu::available_width(arg1);
10761
+ result = (int)Gosu::available_width(arg1);
10087
10762
  }
10088
10763
  catch (const std::exception& e) {
10089
10764
  SWIG_exception(SWIG_RuntimeError, e.what());
10090
10765
  }
10091
10766
  }
10092
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
10767
+ vresult = SWIG_From_int(static_cast< int >(result));
10093
10768
  return vresult;
10094
10769
  fail:
10095
10770
  return Qnil;
@@ -10101,7 +10776,7 @@ _wrap_available_height(int argc, VALUE *argv, VALUE self) {
10101
10776
  Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
10102
10777
  void *argp1 = 0 ;
10103
10778
  int res1 = 0 ;
10104
- unsigned int result;
10779
+ int result;
10105
10780
  VALUE vresult = Qnil;
10106
10781
 
10107
10782
  if ((argc < 0) || (argc > 1)) {
@@ -10116,13 +10791,13 @@ _wrap_available_height(int argc, VALUE *argv, VALUE self) {
10116
10791
  }
10117
10792
  {
10118
10793
  try {
10119
- result = (unsigned int)Gosu::available_height(arg1);
10794
+ result = (int)Gosu::available_height(arg1);
10120
10795
  }
10121
10796
  catch (const std::exception& e) {
10122
10797
  SWIG_exception(SWIG_RuntimeError, e.what());
10123
10798
  }
10124
10799
  }
10125
- vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
10800
+ vresult = SWIG_From_int(static_cast< int >(result));
10126
10801
  return vresult;
10127
10802
  fail:
10128
10803
  return Qnil;
@@ -10149,14 +10824,14 @@ _wrap_char_to_button_id(int argc, VALUE *argv, VALUE self) {
10149
10824
  }
10150
10825
  {
10151
10826
  try {
10152
- result = Gosu::char_to_button_id(arg1);
10827
+ result = (Gosu::Button)Gosu::char_to_button_id(arg1);
10153
10828
  }
10154
10829
  catch (const std::exception& e) {
10155
10830
  SWIG_exception(SWIG_RuntimeError, e.what());
10156
10831
  }
10157
10832
  }
10158
10833
  {
10159
- vresult = result == Gosu::NO_BUTTON ? Qnil : LONG2NUM((&result)->id());
10834
+ vresult = result == Gosu::NO_BUTTON ? Qnil : LONG2NUM(result);
10160
10835
  }
10161
10836
  return vresult;
10162
10837
  fail:
@@ -10218,6 +10893,91 @@ fail:
10218
10893
  }
10219
10894
 
10220
10895
 
10896
+ SWIGINTERN VALUE
10897
+ _wrap_button_name(int argc, VALUE *argv, VALUE self) {
10898
+ Gosu::Button arg1 ;
10899
+ VALUE result;
10900
+ VALUE vresult = Qnil;
10901
+
10902
+ if ((argc < 1) || (argc > 1)) {
10903
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10904
+ }
10905
+ {
10906
+ arg1 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
10907
+ }
10908
+ {
10909
+ try {
10910
+ result = (VALUE)Gosu::button_name(arg1);
10911
+ }
10912
+ catch (const std::exception& e) {
10913
+ SWIG_exception(SWIG_RuntimeError, e.what());
10914
+ }
10915
+ }
10916
+ vresult = result;
10917
+ return vresult;
10918
+ fail:
10919
+ return Qnil;
10920
+ }
10921
+
10922
+
10923
+ SWIGINTERN VALUE
10924
+ _wrap_gamepad_name(int argc, VALUE *argv, VALUE self) {
10925
+ int arg1 ;
10926
+ int val1 ;
10927
+ int ecode1 = 0 ;
10928
+ VALUE result;
10929
+ VALUE vresult = Qnil;
10930
+
10931
+ if ((argc < 1) || (argc > 1)) {
10932
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10933
+ }
10934
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
10935
+ if (!SWIG_IsOK(ecode1)) {
10936
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Gosu::gamepad_name", 1, argv[0] ));
10937
+ }
10938
+ arg1 = static_cast< int >(val1);
10939
+ {
10940
+ try {
10941
+ result = (VALUE)Gosu::gamepad_name(arg1);
10942
+ }
10943
+ catch (const std::exception& e) {
10944
+ SWIG_exception(SWIG_RuntimeError, e.what());
10945
+ }
10946
+ }
10947
+ vresult = result;
10948
+ return vresult;
10949
+ fail:
10950
+ return Qnil;
10951
+ }
10952
+
10953
+
10954
+ SWIGINTERN VALUE
10955
+ _wrap_axis(int argc, VALUE *argv, VALUE self) {
10956
+ Gosu::Button arg1 ;
10957
+ double result;
10958
+ VALUE vresult = Qnil;
10959
+
10960
+ if ((argc < 1) || (argc > 1)) {
10961
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
10962
+ }
10963
+ {
10964
+ arg1 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
10965
+ }
10966
+ {
10967
+ try {
10968
+ result = (double)Gosu::axis(arg1);
10969
+ }
10970
+ catch (const std::exception& e) {
10971
+ SWIG_exception(SWIG_RuntimeError, e.what());
10972
+ }
10973
+ }
10974
+ vresult = SWIG_From_double(static_cast< double >(result));
10975
+ return vresult;
10976
+ fail:
10977
+ return Qnil;
10978
+ }
10979
+
10980
+
10221
10981
  SWIGINTERN VALUE
10222
10982
  _wrap_draw_line(int argc, VALUE *argv, VALUE self) {
10223
10983
  double arg1 ;
@@ -11443,7 +12203,6 @@ fail:
11443
12203
 
11444
12204
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
11445
12205
 
11446
- static swig_type_info _swigt__p_Gosu__Button = {"_p_Gosu__Button", "Gosu::Button *", 0, 0, (void*)0, 0};
11447
12206
  static swig_type_info _swigt__p_Gosu__Channel = {"_p_Gosu__Channel", "Gosu::Channel *", 0, 0, (void*)0, 0};
11448
12207
  static swig_type_info _swigt__p_Gosu__Color = {"_p_Gosu__Color", "Gosu::Color *", 0, 0, (void*)0, 0};
11449
12208
  static swig_type_info _swigt__p_Gosu__Font = {"_p_Gosu__Font", "Gosu::Font *", 0, 0, (void*)0, 0};
@@ -11459,7 +12218,6 @@ static swig_type_info _swigt__p_std__arrayT_double_16_t = {"_p_std__arrayT_doubl
11459
12218
  static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
11460
12219
 
11461
12220
  static swig_type_info *swig_type_initial[] = {
11462
- &_swigt__p_Gosu__Button,
11463
12221
  &_swigt__p_Gosu__Channel,
11464
12222
  &_swigt__p_Gosu__Color,
11465
12223
  &_swigt__p_Gosu__Font,
@@ -11475,7 +12233,6 @@ static swig_type_info *swig_type_initial[] = {
11475
12233
  &_swigt__p_std__string,
11476
12234
  };
11477
12235
 
11478
- static swig_cast_info _swigc__p_Gosu__Button[] = { {&_swigt__p_Gosu__Button, 0, 0, 0},{0, 0, 0, 0}};
11479
12236
  static swig_cast_info _swigc__p_Gosu__Channel[] = { {&_swigt__p_Gosu__Channel, 0, 0, 0},{0, 0, 0, 0}};
11480
12237
  static swig_cast_info _swigc__p_Gosu__Color[] = { {&_swigt__p_Gosu__Color, 0, 0, 0},{0, 0, 0, 0}};
11481
12238
  static swig_cast_info _swigc__p_Gosu__Font[] = { {&_swigt__p_Gosu__Font, 0, 0, 0},{0, 0, 0, 0}};
@@ -11491,7 +12248,6 @@ static swig_cast_info _swigc__p_std__arrayT_double_16_t[] = { {&_swigt__p_std__
11491
12248
  static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
11492
12249
 
11493
12250
  static swig_cast_info *swig_cast_initial[] = {
11494
- _swigc__p_Gosu__Button,
11495
12251
  _swigc__p_Gosu__Channel,
11496
12252
  _swigc__p_Gosu__Color,
11497
12253
  _swigc__p_Gosu__Font,
@@ -11761,9 +12517,9 @@ SWIGEXPORT void Init_gosu(void) {
11761
12517
  SWIG_RubyInitializeTrackings();
11762
12518
  rb_define_const(mGosu, "VERSION", SWIG_From_std_string(static_cast< std::string >(Gosu::VERSION)));
11763
12519
  rb_define_const(mGosu, "LICENSES", SWIG_From_std_string(static_cast< std::string >(Gosu::LICENSES)));
11764
- rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
11765
- rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(15)));
11766
- rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(1)));
12520
+ rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(1)));
12521
+ rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(1)));
12522
+ rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(0)));
11767
12523
  rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
11768
12524
  rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
11769
12525
  rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1);
@@ -11778,7 +12534,6 @@ SWIGEXPORT void Init_gosu(void) {
11778
12534
  rb_define_const(mGosu, "MAX_TEXTURE_SIZE", SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Gosu::MAX_TEXTURE_SIZE)));
11779
12535
  rb_define_module_function(mGosu, "language", VALUEFUNC(_wrap_language), -1);
11780
12536
  rb_define_module_function(mGosu, "enable_undocumented_retrofication", VALUEFUNC(_wrap_enable_undocumented_retrofication), -1);
11781
- rb_define_module_function(mGosu, "_release_all_openal_resources", VALUEFUNC(_wrap__release_all_openal_resources), -1);
11782
12537
 
11783
12538
  SwigClassColor.klass = rb_define_class_under(mGosu, "Color", rb_cObject);
11784
12539
  SWIG_TypeClientData(SWIGTYPE_p_Gosu__Color, (void *) &SwigClassColor);
@@ -11822,9 +12577,12 @@ SWIGEXPORT void Init_gosu(void) {
11822
12577
  rb_define_method(SwigClassFont.klass, "name", VALUEFUNC(_wrap_Font_name), -1);
11823
12578
  rb_define_method(SwigClassFont.klass, "height", VALUEFUNC(_wrap_Font_height), -1);
11824
12579
  rb_define_method(SwigClassFont.klass, "flags", VALUEFUNC(_wrap_Font_flags), -1);
12580
+ rb_define_method(SwigClassFont.klass, "draw_text", VALUEFUNC(_wrap_Font_draw_text), -1);
11825
12581
  rb_define_method(SwigClassFont.klass, "draw_markup", VALUEFUNC(_wrap_Font_draw_markup), -1);
12582
+ rb_define_method(SwigClassFont.klass, "draw_text_rel", VALUEFUNC(_wrap_Font_draw_text_rel), -1);
11826
12583
  rb_define_method(SwigClassFont.klass, "draw_markup_rel", VALUEFUNC(_wrap_Font_draw_markup_rel), -1);
11827
12584
  rb_define_method(SwigClassFont.klass, "set_image", VALUEFUNC(_wrap_Font_set_image), -1);
12585
+ rb_define_method(SwigClassFont.klass, "text_width", VALUEFUNC(_wrap_Font_text_width), -1);
11828
12586
  rb_define_method(SwigClassFont.klass, "markup_width", VALUEFUNC(_wrap_Font_markup_width), -1);
11829
12587
  SwigClassFont.mark = 0;
11830
12588
  SwigClassFont.destroy = (void (*)(void *)) free_Gosu_Font;
@@ -11861,6 +12619,7 @@ SWIGEXPORT void Init_gosu(void) {
11861
12619
  rb_define_method(SwigClassImage.klass, "gl_tex_info", VALUEFUNC(_wrap_Image_gl_tex_info), -1);
11862
12620
  rb_define_method(SwigClassImage.klass, "subimage", VALUEFUNC(_wrap_Image_subimage), -1);
11863
12621
  rb_define_singleton_method(SwigClassImage.klass, "from_text", VALUEFUNC(_wrap_Image_from_text), -1);
12622
+ rb_define_singleton_method(SwigClassImage.klass, "from_markup", VALUEFUNC(_wrap_Image_from_markup), -1);
11864
12623
  rb_define_singleton_method(SwigClassImage.klass, "load_tiles", VALUEFUNC(_wrap_Image_load_tiles), -1);
11865
12624
  rb_define_method(SwigClassImage.klass, "to_blob", VALUEFUNC(_wrap_Image_to_blob), -1);
11866
12625
  rb_define_method(SwigClassImage.klass, "columns", VALUEFUNC(_wrap_Image_columns), -1);
@@ -11956,6 +12715,9 @@ SWIGEXPORT void Init_gosu(void) {
11956
12715
  rb_define_const(mGosu, "KB_DOWN", SWIG_From_int(static_cast< int >(Gosu::KB_DOWN)));
11957
12716
  rb_define_const(mGosu, "KB_HOME", SWIG_From_int(static_cast< int >(Gosu::KB_HOME)));
11958
12717
  rb_define_const(mGosu, "KB_END", SWIG_From_int(static_cast< int >(Gosu::KB_END)));
12718
+ rb_define_const(mGosu, "KB_PRINT_SCREEN", SWIG_From_int(static_cast< int >(Gosu::KB_PRINT_SCREEN)));
12719
+ rb_define_const(mGosu, "KB_SCROLL_LOCK", SWIG_From_int(static_cast< int >(Gosu::KB_SCROLL_LOCK)));
12720
+ rb_define_const(mGosu, "KB_PAUSE", SWIG_From_int(static_cast< int >(Gosu::KB_PAUSE)));
11959
12721
  rb_define_const(mGosu, "KB_INSERT", SWIG_From_int(static_cast< int >(Gosu::KB_INSERT)));
11960
12722
  rb_define_const(mGosu, "KB_DELETE", SWIG_From_int(static_cast< int >(Gosu::KB_DELETE)));
11961
12723
  rb_define_const(mGosu, "KB_PAGE_UP", SWIG_From_int(static_cast< int >(Gosu::KB_PAGE_UP)));
@@ -11972,6 +12734,7 @@ SWIGEXPORT void Init_gosu(void) {
11972
12734
  rb_define_const(mGosu, "KB_COMMA", SWIG_From_int(static_cast< int >(Gosu::KB_COMMA)));
11973
12735
  rb_define_const(mGosu, "KB_PERIOD", SWIG_From_int(static_cast< int >(Gosu::KB_PERIOD)));
11974
12736
  rb_define_const(mGosu, "KB_SLASH", SWIG_From_int(static_cast< int >(Gosu::KB_SLASH)));
12737
+ rb_define_const(mGosu, "KB_CAPS_LOCK", SWIG_From_int(static_cast< int >(Gosu::KB_CAPS_LOCK)));
11975
12738
  rb_define_const(mGosu, "KB_A", SWIG_From_int(static_cast< int >(Gosu::KB_A)));
11976
12739
  rb_define_const(mGosu, "KB_B", SWIG_From_int(static_cast< int >(Gosu::KB_B)));
11977
12740
  rb_define_const(mGosu, "KB_C", SWIG_From_int(static_cast< int >(Gosu::KB_C)));
@@ -12027,10 +12790,10 @@ SWIGEXPORT void Init_gosu(void) {
12027
12790
  rb_define_const(mGosu, "MS_OTHER_5", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_5)));
12028
12791
  rb_define_const(mGosu, "MS_OTHER_6", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_6)));
12029
12792
  rb_define_const(mGosu, "MS_OTHER_7", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_7)));
12030
- rb_define_const(mGosu, "GP_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT)));
12031
- rb_define_const(mGosu, "GP_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT)));
12032
- rb_define_const(mGosu, "GP_UP", SWIG_From_int(static_cast< int >(Gosu::GP_UP)));
12033
- rb_define_const(mGosu, "GP_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_DOWN)));
12793
+ rb_define_const(mGosu, "GP_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_LEFT)));
12794
+ rb_define_const(mGosu, "GP_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_RIGHT)));
12795
+ rb_define_const(mGosu, "GP_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_UP)));
12796
+ rb_define_const(mGosu, "GP_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_DOWN)));
12034
12797
  rb_define_const(mGosu, "GP_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_0)));
12035
12798
  rb_define_const(mGosu, "GP_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_1)));
12036
12799
  rb_define_const(mGosu, "GP_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_2)));
@@ -12047,10 +12810,10 @@ SWIGEXPORT void Init_gosu(void) {
12047
12810
  rb_define_const(mGosu, "GP_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_13)));
12048
12811
  rb_define_const(mGosu, "GP_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_14)));
12049
12812
  rb_define_const(mGosu, "GP_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_15)));
12050
- rb_define_const(mGosu, "GP_0_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT)));
12051
- rb_define_const(mGosu, "GP_0_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT)));
12052
- rb_define_const(mGosu, "GP_0_UP", SWIG_From_int(static_cast< int >(Gosu::GP_0_UP)));
12053
- rb_define_const(mGosu, "GP_0_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_0_DOWN)));
12813
+ rb_define_const(mGosu, "GP_0_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_LEFT)));
12814
+ rb_define_const(mGosu, "GP_0_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_RIGHT)));
12815
+ rb_define_const(mGosu, "GP_0_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_UP)));
12816
+ rb_define_const(mGosu, "GP_0_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_DOWN)));
12054
12817
  rb_define_const(mGosu, "GP_0_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_0)));
12055
12818
  rb_define_const(mGosu, "GP_0_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_1)));
12056
12819
  rb_define_const(mGosu, "GP_0_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_2)));
@@ -12067,10 +12830,10 @@ SWIGEXPORT void Init_gosu(void) {
12067
12830
  rb_define_const(mGosu, "GP_0_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_13)));
12068
12831
  rb_define_const(mGosu, "GP_0_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_14)));
12069
12832
  rb_define_const(mGosu, "GP_0_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_15)));
12070
- rb_define_const(mGosu, "GP_1_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT)));
12071
- rb_define_const(mGosu, "GP_1_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT)));
12072
- rb_define_const(mGosu, "GP_1_UP", SWIG_From_int(static_cast< int >(Gosu::GP_1_UP)));
12073
- rb_define_const(mGosu, "GP_1_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_1_DOWN)));
12833
+ rb_define_const(mGosu, "GP_1_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_LEFT)));
12834
+ rb_define_const(mGosu, "GP_1_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_RIGHT)));
12835
+ rb_define_const(mGosu, "GP_1_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_UP)));
12836
+ rb_define_const(mGosu, "GP_1_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_DOWN)));
12074
12837
  rb_define_const(mGosu, "GP_1_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_0)));
12075
12838
  rb_define_const(mGosu, "GP_1_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_1)));
12076
12839
  rb_define_const(mGosu, "GP_1_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_2)));
@@ -12087,10 +12850,10 @@ SWIGEXPORT void Init_gosu(void) {
12087
12850
  rb_define_const(mGosu, "GP_1_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_13)));
12088
12851
  rb_define_const(mGosu, "GP_1_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_14)));
12089
12852
  rb_define_const(mGosu, "GP_1_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_15)));
12090
- rb_define_const(mGosu, "GP_2_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT)));
12091
- rb_define_const(mGosu, "GP_2_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT)));
12092
- rb_define_const(mGosu, "GP_2_UP", SWIG_From_int(static_cast< int >(Gosu::GP_2_UP)));
12093
- rb_define_const(mGosu, "GP_2_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_2_DOWN)));
12853
+ rb_define_const(mGosu, "GP_2_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_LEFT)));
12854
+ rb_define_const(mGosu, "GP_2_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_RIGHT)));
12855
+ rb_define_const(mGosu, "GP_2_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_UP)));
12856
+ rb_define_const(mGosu, "GP_2_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_DOWN)));
12094
12857
  rb_define_const(mGosu, "GP_2_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_0)));
12095
12858
  rb_define_const(mGosu, "GP_2_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_1)));
12096
12859
  rb_define_const(mGosu, "GP_2_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_2)));
@@ -12107,10 +12870,10 @@ SWIGEXPORT void Init_gosu(void) {
12107
12870
  rb_define_const(mGosu, "GP_2_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_13)));
12108
12871
  rb_define_const(mGosu, "GP_2_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_14)));
12109
12872
  rb_define_const(mGosu, "GP_2_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_15)));
12110
- rb_define_const(mGosu, "GP_3_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT)));
12111
- rb_define_const(mGosu, "GP_3_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT)));
12112
- rb_define_const(mGosu, "GP_3_UP", SWIG_From_int(static_cast< int >(Gosu::GP_3_UP)));
12113
- rb_define_const(mGosu, "GP_3_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_3_DOWN)));
12873
+ rb_define_const(mGosu, "GP_3_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_LEFT)));
12874
+ rb_define_const(mGosu, "GP_3_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_RIGHT)));
12875
+ rb_define_const(mGosu, "GP_3_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_UP)));
12876
+ rb_define_const(mGosu, "GP_3_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_DOWN)));
12114
12877
  rb_define_const(mGosu, "GP_3_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_0)));
12115
12878
  rb_define_const(mGosu, "GP_3_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_1)));
12116
12879
  rb_define_const(mGosu, "GP_3_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_2)));
@@ -12127,6 +12890,56 @@ SWIGEXPORT void Init_gosu(void) {
12127
12890
  rb_define_const(mGosu, "GP_3_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_13)));
12128
12891
  rb_define_const(mGosu, "GP_3_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_14)));
12129
12892
  rb_define_const(mGosu, "GP_3_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_15)));
12893
+ rb_define_const(mGosu, "GP_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT)));
12894
+ rb_define_const(mGosu, "GP_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT)));
12895
+ rb_define_const(mGosu, "GP_UP", SWIG_From_int(static_cast< int >(Gosu::GP_UP)));
12896
+ rb_define_const(mGosu, "GP_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_DOWN)));
12897
+ rb_define_const(mGosu, "GP_0_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT)));
12898
+ rb_define_const(mGosu, "GP_0_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT)));
12899
+ rb_define_const(mGosu, "GP_0_UP", SWIG_From_int(static_cast< int >(Gosu::GP_0_UP)));
12900
+ rb_define_const(mGosu, "GP_0_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_0_DOWN)));
12901
+ rb_define_const(mGosu, "GP_1_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT)));
12902
+ rb_define_const(mGosu, "GP_1_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT)));
12903
+ rb_define_const(mGosu, "GP_1_UP", SWIG_From_int(static_cast< int >(Gosu::GP_1_UP)));
12904
+ rb_define_const(mGosu, "GP_1_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_1_DOWN)));
12905
+ rb_define_const(mGosu, "GP_2_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT)));
12906
+ rb_define_const(mGosu, "GP_2_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT)));
12907
+ rb_define_const(mGosu, "GP_2_UP", SWIG_From_int(static_cast< int >(Gosu::GP_2_UP)));
12908
+ rb_define_const(mGosu, "GP_2_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_2_DOWN)));
12909
+ rb_define_const(mGosu, "GP_3_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT)));
12910
+ rb_define_const(mGosu, "GP_3_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT)));
12911
+ rb_define_const(mGosu, "GP_3_UP", SWIG_From_int(static_cast< int >(Gosu::GP_3_UP)));
12912
+ rb_define_const(mGosu, "GP_3_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_3_DOWN)));
12913
+ rb_define_const(mGosu, "GP_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_STICK_X_AXIS)));
12914
+ rb_define_const(mGosu, "GP_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_STICK_Y_AXIS)));
12915
+ rb_define_const(mGosu, "GP_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_STICK_X_AXIS)));
12916
+ rb_define_const(mGosu, "GP_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_STICK_Y_AXIS)));
12917
+ rb_define_const(mGosu, "GP_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_TRIGGER_AXIS)));
12918
+ rb_define_const(mGosu, "GP_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_TRIGGER_AXIS)));
12919
+ rb_define_const(mGosu, "GP_0_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_STICK_X_AXIS)));
12920
+ rb_define_const(mGosu, "GP_0_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_STICK_Y_AXIS)));
12921
+ rb_define_const(mGosu, "GP_0_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_STICK_X_AXIS)));
12922
+ rb_define_const(mGosu, "GP_0_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_STICK_Y_AXIS)));
12923
+ rb_define_const(mGosu, "GP_0_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_TRIGGER_AXIS)));
12924
+ rb_define_const(mGosu, "GP_0_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_TRIGGER_AXIS)));
12925
+ rb_define_const(mGosu, "GP_1_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_STICK_X_AXIS)));
12926
+ rb_define_const(mGosu, "GP_1_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_STICK_Y_AXIS)));
12927
+ rb_define_const(mGosu, "GP_1_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_STICK_X_AXIS)));
12928
+ rb_define_const(mGosu, "GP_1_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_STICK_Y_AXIS)));
12929
+ rb_define_const(mGosu, "GP_1_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_TRIGGER_AXIS)));
12930
+ rb_define_const(mGosu, "GP_1_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_TRIGGER_AXIS)));
12931
+ rb_define_const(mGosu, "GP_2_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_STICK_X_AXIS)));
12932
+ rb_define_const(mGosu, "GP_2_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_STICK_Y_AXIS)));
12933
+ rb_define_const(mGosu, "GP_2_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_STICK_X_AXIS)));
12934
+ rb_define_const(mGosu, "GP_2_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_STICK_Y_AXIS)));
12935
+ rb_define_const(mGosu, "GP_2_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_TRIGGER_AXIS)));
12936
+ rb_define_const(mGosu, "GP_2_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_TRIGGER_AXIS)));
12937
+ rb_define_const(mGosu, "GP_3_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_STICK_X_AXIS)));
12938
+ rb_define_const(mGosu, "GP_3_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_STICK_Y_AXIS)));
12939
+ rb_define_const(mGosu, "GP_3_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_STICK_X_AXIS)));
12940
+ rb_define_const(mGosu, "GP_3_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_STICK_Y_AXIS)));
12941
+ rb_define_const(mGosu, "GP_3_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_TRIGGER_AXIS)));
12942
+ rb_define_const(mGosu, "GP_3_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_TRIGGER_AXIS)));
12130
12943
 
12131
12944
  // Call srand() so that Gosu::random() is actually random in Ruby scripts
12132
12945
  std::srand(static_cast<unsigned>(std::time(0)));
@@ -12161,6 +12974,9 @@ SWIGEXPORT void Init_gosu(void) {
12161
12974
  rb_define_method(SwigClassWindow.klass, "height", VALUEFUNC(_wrap_Window_height), -1);
12162
12975
  rb_define_method(SwigClassWindow.klass, "fullscreen?", VALUEFUNC(_wrap_Window_fullscreenq___), -1);
12163
12976
  rb_define_method(SwigClassWindow.klass, "resizable?", VALUEFUNC(_wrap_Window_resizableq___), -1);
12977
+ rb_define_method(SwigClassWindow.klass, "resizable=", VALUEFUNC(_wrap_Window_resizablee___), -1);
12978
+ rb_define_method(SwigClassWindow.klass, "borderless?", VALUEFUNC(_wrap_Window_borderlessq___), -1);
12979
+ rb_define_method(SwigClassWindow.klass, "borderless=", VALUEFUNC(_wrap_Window_borderlesse___), -1);
12164
12980
  rb_define_method(SwigClassWindow.klass, "update_interval", VALUEFUNC(_wrap_Window_update_interval), -1);
12165
12981
  rb_define_method(SwigClassWindow.klass, "update_interval=", VALUEFUNC(_wrap_Window_update_intervale___), -1);
12166
12982
  rb_define_method(SwigClassWindow.klass, "caption", VALUEFUNC(_wrap_Window_caption), -1);
@@ -12176,6 +12992,8 @@ SWIGEXPORT void Init_gosu(void) {
12176
12992
  rb_define_method(SwigClassWindow.klass, "release_memory", VALUEFUNC(_wrap_Window_release_memory), -1);
12177
12993
  rb_define_method(SwigClassWindow.klass, "button_down", VALUEFUNC(_wrap_Window_button_down), -1);
12178
12994
  rb_define_method(SwigClassWindow.klass, "button_up", VALUEFUNC(_wrap_Window_button_up), -1);
12995
+ rb_define_method(SwigClassWindow.klass, "gamepad_connected", VALUEFUNC(_wrap_Window_gamepad_connected), -1);
12996
+ rb_define_method(SwigClassWindow.klass, "gamepad_disconnected", VALUEFUNC(_wrap_Window_gamepad_disconnected), -1);
12179
12997
  rb_define_method(SwigClassWindow.klass, "drop", VALUEFUNC(_wrap_Window_drop), -1);
12180
12998
  rb_define_method(SwigClassWindow.klass, "width=", VALUEFUNC(_wrap_Window_widthe___), -1);
12181
12999
  rb_define_method(SwigClassWindow.klass, "height=", VALUEFUNC(_wrap_Window_heighte___), -1);
@@ -12198,6 +13016,9 @@ SWIGEXPORT void Init_gosu(void) {
12198
13016
  rb_define_module_function(mGosu, "char_to_button_id", VALUEFUNC(_wrap_char_to_button_id), -1);
12199
13017
  rb_define_module_function(mGosu, "button_id_to_char", VALUEFUNC(_wrap_button_id_to_char), -1);
12200
13018
  rb_define_module_function(mGosu, "button_down?", VALUEFUNC(_wrap_button_downq___), -1);
13019
+ rb_define_module_function(mGosu, "button_name", VALUEFUNC(_wrap_button_name), -1);
13020
+ rb_define_module_function(mGosu, "gamepad_name", VALUEFUNC(_wrap_gamepad_name), -1);
13021
+ rb_define_module_function(mGosu, "axis", VALUEFUNC(_wrap_axis), -1);
12201
13022
  rb_define_module_function(mGosu, "draw_line", VALUEFUNC(_wrap_draw_line), -1);
12202
13023
  rb_define_module_function(mGosu, "draw_triangle", VALUEFUNC(_wrap_draw_triangle), -1);
12203
13024
  rb_define_module_function(mGosu, "draw_quad", VALUEFUNC(_wrap_draw_quad), -1);