gosu 0.7.14 → 0.7.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. data/COPYING.txt +1 -2
  2. data/Gosu/Graphics.hpp +6 -0
  3. data/Gosu/Image.hpp +4 -0
  4. data/Gosu/Version.hpp +2 -2
  5. data/GosuImpl/Audio/ALChannelManagement.hpp +3 -3
  6. data/GosuImpl/Audio/AudioOpenAL.mm +11 -19
  7. data/GosuImpl/Audio/AudioToolboxFile.hpp +2 -1
  8. data/GosuImpl/Graphics/Common.hpp +3 -0
  9. data/GosuImpl/Graphics/DrawOp.hpp +105 -29
  10. data/GosuImpl/Graphics/GosuView.hpp +6 -0
  11. data/GosuImpl/Graphics/GosuView.mm +34 -1
  12. data/GosuImpl/Graphics/Graphics.cpp +57 -17
  13. data/GosuImpl/Graphics/Image.cpp +5 -0
  14. data/GosuImpl/Graphics/LargeImageData.cpp +1 -1
  15. data/GosuImpl/Graphics/Macro.hpp +79 -0
  16. data/GosuImpl/Graphics/TexChunk.cpp +3 -3
  17. data/GosuImpl/Graphics/TexChunk.hpp +2 -2
  18. data/GosuImpl/Graphics/TextMac.cpp +6 -0
  19. data/GosuImpl/Graphics/TextTouch.mm +49 -14
  20. data/GosuImpl/Graphics/Texture.cpp +2 -2
  21. data/GosuImpl/Graphics/Texture.hpp +3 -2
  22. data/GosuImpl/InputMac.mm +2 -0
  23. data/GosuImpl/RubyGosu.swg +15 -4
  24. data/GosuImpl/RubyGosu_wrap.cxx +85 -6
  25. data/GosuImpl/Sockets/CommSocket.cpp +304 -304
  26. data/GosuImpl/Sockets/Socket.cpp +1 -1
  27. data/GosuImpl/WindowMac.mm +3 -0
  28. data/GosuImpl/WindowTouch.mm +1 -0
  29. data/Rakefile +13 -5
  30. data/mac/Gosu.xcodeproj/jlnr.pbxuser +292 -280
  31. data/mac/Gosu.xcodeproj/jlnr.perspectivev3 +46 -48
  32. data/mac/Gosu.xcodeproj/project.pbxproj +58 -18
  33. data/reference/cpp/_audio_8hpp-source.html +2 -1
  34. data/reference/cpp/_audio_8hpp.html +11 -4
  35. data/reference/cpp/_audio_8hpp_source.html +178 -0
  36. data/reference/cpp/_auto_link_8hpp-source.html +1 -0
  37. data/reference/cpp/_auto_link_8hpp.html +5 -4
  38. data/reference/cpp/_auto_link_8hpp_source.html +85 -0
  39. data/reference/cpp/_bitmap_8hpp-source.html +9 -8
  40. data/reference/cpp/_bitmap_8hpp.html +11 -4
  41. data/reference/cpp/_bitmap_8hpp_source.html +131 -0
  42. data/reference/cpp/_buttons_mac_8hpp-source.html +124 -123
  43. data/reference/cpp/_buttons_mac_8hpp.html +10 -3
  44. data/reference/cpp/_buttons_mac_8hpp_source.html +206 -0
  45. data/reference/cpp/_color_8hpp-source.html +18 -17
  46. data/reference/cpp/_color_8hpp.html +16 -4
  47. data/reference/cpp/_color_8hpp_source.html +216 -0
  48. data/reference/cpp/_directories_8hpp-source.html +5 -4
  49. data/reference/cpp/_directories_8hpp.html +11 -4
  50. data/reference/cpp/_directories_8hpp_source.html +89 -0
  51. data/reference/cpp/_font_8hpp-source.html +8 -7
  52. data/reference/cpp/_font_8hpp.html +11 -4
  53. data/reference/cpp/_font_8hpp_source.html +116 -0
  54. data/reference/cpp/_fwd_8hpp-source.html +1 -0
  55. data/reference/cpp/_fwd_8hpp.html +11 -4
  56. data/reference/cpp/_fwd_8hpp_source.html +99 -0
  57. data/reference/cpp/_gosu_8hpp-source.html +1 -0
  58. data/reference/cpp/_gosu_8hpp.html +5 -4
  59. data/reference/cpp/_gosu_8hpp_source.html +97 -0
  60. data/reference/cpp/_graphics_8hpp-source.html +7 -6
  61. data/reference/cpp/_graphics_8hpp.html +11 -4
  62. data/reference/cpp/_graphics_8hpp_source.html +138 -0
  63. data/reference/cpp/_graphics_base_8hpp-source.html +22 -21
  64. data/reference/cpp/_graphics_base_8hpp.html +15 -8
  65. data/reference/cpp/_graphics_base_8hpp_source.html +116 -0
  66. data/reference/cpp/_i_o_8hpp-source.html +16 -15
  67. data/reference/cpp/_i_o_8hpp.html +13 -6
  68. data/reference/cpp/_i_o_8hpp_source.html +302 -0
  69. data/reference/cpp/_image_8hpp-source.html +23 -22
  70. data/reference/cpp/_image_8hpp.html +11 -4
  71. data/reference/cpp/_image_8hpp_source.html +176 -0
  72. data/reference/cpp/_image_data_8hpp-source.html +2 -1
  73. data/reference/cpp/_image_data_8hpp.html +11 -4
  74. data/reference/cpp/_image_data_8hpp_source.html +109 -0
  75. data/reference/cpp/_input_8hpp-source.html +6 -5
  76. data/reference/cpp/_input_8hpp.html +11 -4
  77. data/reference/cpp/_input_8hpp_source.html +183 -0
  78. data/reference/cpp/_math_8hpp-source.html +26 -25
  79. data/reference/cpp/_math_8hpp.html +11 -4
  80. data/reference/cpp/_math_8hpp_source.html +157 -0
  81. data/reference/cpp/_platform_8hpp-source.html +5 -4
  82. data/reference/cpp/_platform_8hpp.html +14 -7
  83. data/reference/cpp/_platform_8hpp_source.html +134 -0
  84. data/reference/cpp/_rot_flip_8hpp-source.html +30 -29
  85. data/reference/cpp/_rot_flip_8hpp.html +12 -5
  86. data/reference/cpp/_rot_flip_8hpp_source.html +185 -0
  87. data/reference/cpp/_sockets_8hpp-source.html +25 -24
  88. data/reference/cpp/_sockets_8hpp.html +14 -7
  89. data/reference/cpp/_sockets_8hpp_source.html +175 -0
  90. data/reference/cpp/_text_8hpp-source.html +7 -6
  91. data/reference/cpp/_text_8hpp.html +11 -4
  92. data/reference/cpp/_text_8hpp_source.html +103 -0
  93. data/reference/cpp/_text_input_8hpp-source.html +1 -0
  94. data/reference/cpp/_text_input_8hpp.html +11 -4
  95. data/reference/cpp/_text_input_8hpp_source.html +111 -0
  96. data/reference/cpp/_timing_8hpp-source.html +3 -2
  97. data/reference/cpp/_timing_8hpp.html +11 -4
  98. data/reference/cpp/_timing_8hpp_source.html +83 -0
  99. data/reference/cpp/_utility_8hpp-source.html +5 -4
  100. data/reference/cpp/_utility_8hpp.html +11 -4
  101. data/reference/cpp/_utility_8hpp_source.html +90 -0
  102. data/reference/cpp/_version_8hpp-source.html +1 -0
  103. data/reference/cpp/_version_8hpp.html +7 -6
  104. data/reference/cpp/_version_8hpp_source.html +78 -0
  105. data/reference/cpp/_win_utility_8hpp-source.html +13 -12
  106. data/reference/cpp/_win_utility_8hpp.html +18 -6
  107. data/reference/cpp/_win_utility_8hpp_source.html +126 -0
  108. data/reference/cpp/_window_8hpp-source.html +6 -5
  109. data/reference/cpp/_window_8hpp.html +12 -5
  110. data/reference/cpp/_window_8hpp_source.html +158 -0
  111. data/reference/cpp/annotated.html +3 -2
  112. data/reference/cpp/class_gosu_1_1_audio-members.html +2 -1
  113. data/reference/cpp/class_gosu_1_1_audio.html +5 -4
  114. data/reference/cpp/class_gosu_1_1_bitmap-members.html +2 -1
  115. data/reference/cpp/class_gosu_1_1_bitmap.html +17 -12
  116. data/reference/cpp/class_gosu_1_1_buffer-members.html +2 -1
  117. data/reference/cpp/class_gosu_1_1_buffer.html +12 -13
  118. data/reference/cpp/class_gosu_1_1_button-members.html +2 -1
  119. data/reference/cpp/class_gosu_1_1_button.html +13 -10
  120. data/reference/cpp/class_gosu_1_1_color-members.html +2 -1
  121. data/reference/cpp/class_gosu_1_1_color.html +29 -26
  122. data/reference/cpp/class_gosu_1_1_comm_socket-members.html +2 -1
  123. data/reference/cpp/class_gosu_1_1_comm_socket.html +23 -22
  124. data/reference/cpp/class_gosu_1_1_file-members.html +2 -1
  125. data/reference/cpp/class_gosu_1_1_file.html +7 -6
  126. data/reference/cpp/class_gosu_1_1_font-members.html +2 -1
  127. data/reference/cpp/class_gosu_1_1_font.html +17 -16
  128. data/reference/cpp/class_gosu_1_1_graphics-members.html +4 -1
  129. data/reference/cpp/class_gosu_1_1_graphics.html +68 -19
  130. data/reference/cpp/class_gosu_1_1_image-members.html +3 -1
  131. data/reference/cpp/class_gosu_1_1_image.html +49 -23
  132. data/reference/cpp/class_gosu_1_1_image_data-members.html +2 -1
  133. data/reference/cpp/class_gosu_1_1_image_data.html +9 -8
  134. data/reference/cpp/class_gosu_1_1_input-members.html +2 -1
  135. data/reference/cpp/class_gosu_1_1_input.html +7 -6
  136. data/reference/cpp/class_gosu_1_1_listener_socket-members.html +2 -1
  137. data/reference/cpp/class_gosu_1_1_listener_socket.html +12 -11
  138. data/reference/cpp/class_gosu_1_1_message_socket-members.html +2 -1
  139. data/reference/cpp/class_gosu_1_1_message_socket.html +19 -18
  140. data/reference/cpp/class_gosu_1_1_reader-members.html +2 -1
  141. data/reference/cpp/class_gosu_1_1_reader.html +18 -17
  142. data/reference/cpp/class_gosu_1_1_resource-members.html +2 -1
  143. data/reference/cpp/class_gosu_1_1_resource.html +10 -9
  144. data/reference/cpp/class_gosu_1_1_rot_flip-members.html +2 -1
  145. data/reference/cpp/class_gosu_1_1_rot_flip.html +24 -19
  146. data/reference/cpp/class_gosu_1_1_sample-members.html +2 -1
  147. data/reference/cpp/class_gosu_1_1_sample.html +5 -4
  148. data/reference/cpp/class_gosu_1_1_sample_instance-members.html +2 -1
  149. data/reference/cpp/class_gosu_1_1_sample_instance.html +5 -4
  150. data/reference/cpp/class_gosu_1_1_song-members.html +2 -1
  151. data/reference/cpp/class_gosu_1_1_song.html +6 -5
  152. data/reference/cpp/class_gosu_1_1_text_input-members.html +2 -1
  153. data/reference/cpp/class_gosu_1_1_text_input.html +6 -5
  154. data/reference/cpp/class_gosu_1_1_window-members.html +2 -1
  155. data/reference/cpp/class_gosu_1_1_window.html +12 -11
  156. data/reference/cpp/class_gosu_1_1_writer-members.html +2 -1
  157. data/reference/cpp/class_gosu_1_1_writer.html +15 -14
  158. data/reference/cpp/classes.html +11 -10
  159. data/reference/cpp/files.html +28 -27
  160. data/reference/cpp/functions.html +2 -1
  161. data/reference/cpp/functions_0x62.html +5 -2
  162. data/reference/cpp/functions_0x63.html +2 -1
  163. data/reference/cpp/functions_0x64.html +2 -1
  164. data/reference/cpp/functions_0x65.html +4 -1
  165. data/reference/cpp/functions_0x66.html +2 -1
  166. data/reference/cpp/functions_0x67.html +5 -2
  167. data/reference/cpp/functions_0x68.html +2 -1
  168. data/reference/cpp/functions_0x69.html +2 -1
  169. data/reference/cpp/functions_0x6b.html +2 -1
  170. data/reference/cpp/functions_0x6c.html +2 -1
  171. data/reference/cpp/functions_0x6d.html +2 -1
  172. data/reference/cpp/functions_0x6e.html +2 -1
  173. data/reference/cpp/functions_0x6f.html +2 -1
  174. data/reference/cpp/functions_0x70.html +2 -1
  175. data/reference/cpp/functions_0x72.html +2 -1
  176. data/reference/cpp/functions_0x73.html +2 -1
  177. data/reference/cpp/functions_0x74.html +4 -3
  178. data/reference/cpp/functions_0x75.html +2 -1
  179. data/reference/cpp/functions_0x76.html +2 -1
  180. data/reference/cpp/functions_0x77.html +2 -1
  181. data/reference/cpp/functions_0x78.html +2 -1
  182. data/reference/cpp/functions_0x79.html +2 -1
  183. data/reference/cpp/functions_0x7e.html +2 -1
  184. data/reference/cpp/functions_enum.html +2 -1
  185. data/reference/cpp/functions_eval.html +2 -1
  186. data/reference/cpp/functions_func.html +2 -1
  187. data/reference/cpp/functions_func_0x62.html +5 -2
  188. data/reference/cpp/functions_func_0x63.html +2 -1
  189. data/reference/cpp/functions_func_0x64.html +2 -1
  190. data/reference/cpp/functions_func_0x65.html +4 -1
  191. data/reference/cpp/functions_func_0x66.html +2 -1
  192. data/reference/cpp/functions_func_0x67.html +5 -2
  193. data/reference/cpp/functions_func_0x68.html +2 -1
  194. data/reference/cpp/functions_func_0x69.html +2 -1
  195. data/reference/cpp/functions_func_0x6b.html +2 -1
  196. data/reference/cpp/functions_func_0x6c.html +2 -1
  197. data/reference/cpp/functions_func_0x6d.html +2 -1
  198. data/reference/cpp/functions_func_0x6e.html +2 -1
  199. data/reference/cpp/functions_func_0x6f.html +2 -1
  200. data/reference/cpp/functions_func_0x70.html +2 -1
  201. data/reference/cpp/functions_func_0x72.html +2 -1
  202. data/reference/cpp/functions_func_0x73.html +2 -1
  203. data/reference/cpp/functions_func_0x74.html +4 -3
  204. data/reference/cpp/functions_func_0x75.html +2 -1
  205. data/reference/cpp/functions_func_0x76.html +2 -1
  206. data/reference/cpp/functions_func_0x77.html +2 -1
  207. data/reference/cpp/functions_func_0x7e.html +2 -1
  208. data/reference/cpp/functions_type.html +2 -1
  209. data/reference/cpp/functions_vars.html +2 -1
  210. data/reference/cpp/globals.html +2 -1
  211. data/reference/cpp/globals_defs.html +2 -1
  212. data/reference/cpp/hierarchy.html +2 -1
  213. data/reference/cpp/index.html +3 -2
  214. data/reference/cpp/namespace_gosu.html +3314 -0
  215. data/reference/cpp/namespace_gosu_1_1_colors.html +274 -0
  216. data/reference/cpp/namespace_gosu_1_1_win.html +354 -0
  217. data/reference/cpp/namespacemembers.html +135 -0
  218. data/reference/cpp/namespacemembers_0x62.html +143 -0
  219. data/reference/cpp/namespacemembers_0x63.html +125 -0
  220. data/reference/cpp/namespacemembers_0x64.html +119 -0
  221. data/reference/cpp/namespacemembers_0x66.html +129 -0
  222. data/reference/cpp/namespacemembers_0x67.html +165 -0
  223. data/reference/cpp/namespacemembers_0x68.html +113 -0
  224. data/reference/cpp/namespacemembers_0x69.html +117 -0
  225. data/reference/cpp/namespacemembers_0x6b.html +289 -0
  226. data/reference/cpp/namespacemembers_0x6c.html +119 -0
  227. data/reference/cpp/namespacemembers_0x6d.html +131 -0
  228. data/reference/cpp/namespacemembers_0x6e.html +127 -0
  229. data/reference/cpp/namespacemembers_0x6f.html +121 -0
  230. data/reference/cpp/namespacemembers_0x70.html +115 -0
  231. data/reference/cpp/namespacemembers_0x71.html +113 -0
  232. data/reference/cpp/namespacemembers_0x72.html +165 -0
  233. data/reference/cpp/namespacemembers_0x73.html +135 -0
  234. data/reference/cpp/namespacemembers_0x74.html +129 -0
  235. data/reference/cpp/namespacemembers_0x75.html +117 -0
  236. data/reference/cpp/namespacemembers_0x77.html +117 -0
  237. data/reference/cpp/namespacemembers_0x79.html +113 -0
  238. data/reference/cpp/namespacemembers_0x7a.html +115 -0
  239. data/reference/cpp/namespacemembers_enum.html +103 -0
  240. data/reference/cpp/namespacemembers_eval.html +443 -0
  241. data/reference/cpp/namespacemembers_func.html +269 -0
  242. data/reference/cpp/namespacemembers_type.html +93 -0
  243. data/reference/cpp/namespacemembers_vars.html +115 -0
  244. data/reference/cpp/namespaces.html +76 -0
  245. data/reference/cpp/struct_gosu_1_1_g_l_tex_info-members.html +2 -1
  246. data/reference/cpp/struct_gosu_1_1_g_l_tex_info.html +10 -9
  247. data/reference/cpp/struct_gosu_1_1_touch-members.html +2 -1
  248. data/reference/cpp/struct_gosu_1_1_touch.html +8 -7
  249. data/reference/rdoc/classes/Gosu.html +16 -29
  250. data/reference/rdoc/classes/Gosu.src/M000003.html +0 -0
  251. data/reference/rdoc/classes/Gosu.src/M000004.html +0 -0
  252. data/reference/rdoc/classes/Gosu.src/M000005.html +0 -0
  253. data/reference/rdoc/classes/Gosu.src/M000006.html +0 -0
  254. data/reference/rdoc/classes/Gosu.src/M000007.html +0 -0
  255. data/reference/rdoc/classes/Gosu.src/M000008.html +0 -0
  256. data/reference/rdoc/classes/Gosu.src/M000009.html +0 -0
  257. data/reference/rdoc/classes/Gosu.src/M000010.html +0 -0
  258. data/reference/rdoc/classes/Gosu.src/M000011.html +0 -0
  259. data/reference/rdoc/classes/Gosu.src/M000012.html +0 -0
  260. data/reference/rdoc/classes/Gosu/Color.html +16 -17
  261. data/reference/rdoc/classes/Gosu/Color.src/M000016.html +0 -0
  262. data/reference/rdoc/classes/Gosu/Color.src/M000017.html +0 -0
  263. data/reference/rdoc/classes/Gosu/Color.src/M000018.html +0 -0
  264. data/reference/rdoc/classes/Gosu/Color.src/M000019.html +0 -0
  265. data/reference/rdoc/classes/Gosu/Font.html +16 -19
  266. data/reference/rdoc/classes/Gosu/Font.src/M000029.html +0 -0
  267. data/reference/rdoc/classes/Gosu/Font.src/M000030.html +0 -0
  268. data/reference/rdoc/classes/Gosu/Font.src/M000031.html +0 -0
  269. data/reference/rdoc/classes/Gosu/Font.src/M000032.html +0 -0
  270. data/reference/rdoc/classes/Gosu/Font.src/M000033.html +0 -0
  271. data/reference/rdoc/classes/Gosu/GLTexInfo.html +24 -16
  272. data/reference/rdoc/classes/Gosu/Image.html +16 -27
  273. data/reference/rdoc/classes/Gosu/Image.src/M000020.html +0 -0
  274. data/reference/rdoc/classes/Gosu/Image.src/M000021.html +0 -0
  275. data/reference/rdoc/classes/Gosu/Image.src/M000022.html +0 -0
  276. data/reference/rdoc/classes/Gosu/Image.src/M000023.html +0 -0
  277. data/reference/rdoc/classes/Gosu/Image.src/M000024.html +0 -0
  278. data/reference/rdoc/classes/Gosu/Image.src/M000025.html +0 -0
  279. data/reference/rdoc/classes/Gosu/Image.src/M000026.html +0 -0
  280. data/reference/rdoc/classes/Gosu/Image.src/M000027.html +0 -0
  281. data/reference/rdoc/classes/Gosu/Image.src/M000028.html +0 -0
  282. data/reference/rdoc/classes/Gosu/Sample.html +16 -15
  283. data/reference/rdoc/classes/Gosu/Sample.src/M000013.html +0 -0
  284. data/reference/rdoc/classes/Gosu/Sample.src/M000014.html +0 -0
  285. data/reference/rdoc/classes/Gosu/Sample.src/M000015.html +0 -0
  286. data/reference/rdoc/classes/Gosu/SampleInstance.html +16 -19
  287. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000051.html +0 -0
  288. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000052.html +0 -0
  289. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000053.html +0 -0
  290. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000054.html +0 -0
  291. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000055.html +0 -0
  292. data/reference/rdoc/classes/Gosu/Song.html +16 -23
  293. data/reference/rdoc/classes/Gosu/Song.src/M000056.html +0 -0
  294. data/reference/rdoc/classes/Gosu/Song.src/M000057.html +0 -0
  295. data/reference/rdoc/classes/Gosu/Song.src/M000058.html +0 -0
  296. data/reference/rdoc/classes/Gosu/Song.src/M000059.html +0 -0
  297. data/reference/rdoc/classes/Gosu/Song.src/M000060.html +0 -0
  298. data/reference/rdoc/classes/Gosu/Song.src/M000061.html +0 -0
  299. data/reference/rdoc/classes/Gosu/Song.src/M000062.html +0 -0
  300. data/reference/rdoc/classes/Gosu/TextInput.html +16 -9
  301. data/reference/rdoc/classes/Gosu/Window.html +16 -51
  302. data/reference/rdoc/classes/Gosu/Window.src/M000034.html +0 -0
  303. data/reference/rdoc/classes/Gosu/Window.src/M000035.html +0 -0
  304. data/reference/rdoc/classes/Gosu/Window.src/M000036.html +0 -0
  305. data/reference/rdoc/classes/Gosu/Window.src/M000037.html +0 -0
  306. data/reference/rdoc/classes/Gosu/Window.src/M000038.html +0 -0
  307. data/reference/rdoc/classes/Gosu/Window.src/M000039.html +0 -0
  308. data/reference/rdoc/classes/Gosu/Window.src/M000040.html +0 -0
  309. data/reference/rdoc/classes/Gosu/Window.src/M000041.html +0 -0
  310. data/reference/rdoc/classes/Gosu/Window.src/M000042.html +0 -0
  311. data/reference/rdoc/classes/Gosu/Window.src/M000043.html +0 -0
  312. data/reference/rdoc/classes/Gosu/Window.src/M000044.html +0 -0
  313. data/reference/rdoc/classes/Gosu/Window.src/M000045.html +0 -0
  314. data/reference/rdoc/classes/Gosu/Window.src/M000046.html +0 -0
  315. data/reference/rdoc/classes/Gosu/Window.src/M000047.html +0 -0
  316. data/reference/rdoc/classes/Gosu/Window.src/M000048.html +0 -0
  317. data/reference/rdoc/classes/Gosu/Window.src/M000049.html +0 -0
  318. data/reference/rdoc/classes/Gosu/Window.src/M000050.html +0 -0
  319. data/reference/rdoc/classes/Numeric.html +16 -13
  320. data/reference/rdoc/classes/Numeric.src/M000001.html +0 -0
  321. data/reference/rdoc/classes/Numeric.src/M000002.html +0 -0
  322. data/reference/rdoc/created.rid +1 -1
  323. data/reference/rdoc/files/COPYING_txt.html +17 -12
  324. data/reference/rdoc/files/README_txt.html +16 -10
  325. data/reference/rdoc/files/reference/{DeploymentOnOSX_rdoc.html → Deployment on OS X_rdoc.html } +17 -11
  326. data/reference/rdoc/files/reference/{DeploymentOnWindows_rdoc.html → Deployment on Windows_rdoc.html } +17 -11
  327. data/reference/rdoc/files/reference/{DrawingWithColors_rdoc.html → Drawing with Colors_rdoc.html } +23 -17
  328. data/reference/rdoc/files/reference/{OrderOfCorners_rdoc.html → Order of Corners_rdoc.html } +18 -12
  329. data/reference/rdoc/files/reference/Tileability_rdoc.html +16 -10
  330. data/reference/rdoc/files/reference/{ZOrdering_rdoc.html → Z Ordering_rdoc.html } +18 -12
  331. data/reference/rdoc/files/reference/gosu_rb.html +16 -10
  332. data/reference/rdoc/fr_file_index.html +5 -5
  333. data/reference/rdoc/index.html +1 -1
  334. data/reference/rdoc/rdoc-style.css +4 -0
  335. metadata +129 -9
@@ -26,6 +26,5 @@ http://www.libgosu.org/
26
26
 
27
27
  ***
28
28
 
29
- This does NOT apply to fmod.dll shipped with the Windows version of Gosu,
30
- or the bytecode of FMOD contained in Gosu.framework and gosu.bundle on OS X.
29
+ This does NOT apply to fmod.dll shipped with the Windows version of Gosu.
31
30
  FMOD is a property of Firelight Technologies Pty, Ltd., see www.fmod.org.
@@ -54,6 +54,12 @@ namespace Gosu
54
54
  void beginClipping(int x, int y, unsigned width, unsigned height);
55
55
  //! Disables clipping.
56
56
  void endClipping();
57
+
58
+ //! Starts recording a macro. Cannot be nested.
59
+ void beginRecording();
60
+ //! Finishes building the macro and returns it as a drawable object.
61
+ //! Most usually, the return value is passed to Image::Image().
62
+ std::auto_ptr<Gosu::ImageData> endRecording();
57
63
 
58
64
  //! Draws a line from one point to another (last pixel exclusive).
59
65
  void drawLine(double x1, double y1, Color c1,
@@ -8,6 +8,7 @@
8
8
  #include <Gosu/Bitmap.hpp>
9
9
  #include <Gosu/RotFlip.hpp>
10
10
  #include <boost/scoped_ptr.hpp>
11
+ #include <memory>
11
12
 
12
13
  namespace Gosu
13
14
  {
@@ -42,6 +43,9 @@ namespace Gosu
42
43
  Image(Graphics& graphics, const Bitmap& source, unsigned srcX,
43
44
  unsigned srcY, unsigned srcWidth, unsigned srcHeight,
44
45
  bool tileable = false);
46
+
47
+ //! Creates an Image from a user-supplied instance of the ImageData interface.
48
+ explicit Image(std::auto_ptr<ImageData> data);
45
49
 
46
50
  ~Image();
47
51
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #define GOSU_MAJOR_VERSION 0
5
5
  #define GOSU_MINOR_VERSION 7
6
- #define GOSU_POINT_VERSION 14
7
- #define GOSU_VERSION "0.7.14"
6
+ #define GOSU_POINT_VERSION 15
7
+ #define GOSU_VERSION "0.7.15"
8
8
 
9
9
  #endif
@@ -12,9 +12,9 @@ namespace Gosu
12
12
  static ALCcontext* alContext;
13
13
 
14
14
  enum { NUM_SOURCES = 32 }; // This is what the iPhone supports, I hear.
15
- NSUInteger alSources[NUM_SOURCES];
16
- NSUInteger currentToken;
17
- NSUInteger currentTokens[NUM_SOURCES];
15
+ ALuint alSources[NUM_SOURCES];
16
+ ALuint currentToken;
17
+ ALuint currentTokens[NUM_SOURCES];
18
18
 
19
19
  public:
20
20
  enum { NO_TOKEN = -1, NO_SOURCE = -1, NO_FREE_CHANNEL = -1 };
@@ -22,14 +22,6 @@
22
22
  #include <OpenAL/al.h>
23
23
  #include <OpenAL/alc.h>
24
24
 
25
- #if __LP64__ || NS_BUILD_32_LIKE_64
26
- typedef long NSInteger;
27
- typedef unsigned long NSUInteger;
28
- #else
29
- typedef int NSInteger;
30
- typedef unsigned int NSUInteger;
31
- #endif
32
-
33
25
  using namespace std;
34
26
 
35
27
  namespace
@@ -94,7 +86,7 @@ Gosu::SampleInstance::SampleInstance(int handle, int extra)
94
86
 
95
87
  bool Gosu::SampleInstance::playing() const
96
88
  {
97
- NSUInteger source = alChannelManagement->sourceIfStillPlaying(handle, extra);
89
+ ALuint source = alChannelManagement->sourceIfStillPlaying(handle, extra);
98
90
  if (source == ALChannelManagement::NO_SOURCE)
99
91
  return false;
100
92
  ALint state;
@@ -104,7 +96,7 @@ bool Gosu::SampleInstance::playing() const
104
96
 
105
97
  bool Gosu::SampleInstance::paused() const
106
98
  {
107
- NSUInteger source = alChannelManagement->sourceIfStillPlaying(handle, extra);
99
+ ALuint source = alChannelManagement->sourceIfStillPlaying(handle, extra);
108
100
  if (source == ALChannelManagement::NO_SOURCE)
109
101
  return false;
110
102
  ALint state;
@@ -114,7 +106,7 @@ bool Gosu::SampleInstance::paused() const
114
106
 
115
107
  void Gosu::SampleInstance::pause()
116
108
  {
117
- NSUInteger source = alChannelManagement->sourceIfStillPlaying(handle, extra);
109
+ ALuint source = alChannelManagement->sourceIfStillPlaying(handle, extra);
118
110
  if (source == ALChannelManagement::NO_SOURCE)
119
111
  return;
120
112
  alSourcePause(source);
@@ -122,7 +114,7 @@ void Gosu::SampleInstance::pause()
122
114
 
123
115
  void Gosu::SampleInstance::resume()
124
116
  {
125
- NSUInteger source = alChannelManagement->sourceIfStillPlaying(handle, extra);
117
+ ALuint source = alChannelManagement->sourceIfStillPlaying(handle, extra);
126
118
  if (source == ALChannelManagement::NO_SOURCE)
127
119
  return;
128
120
  ALint state;
@@ -133,7 +125,7 @@ void Gosu::SampleInstance::resume()
133
125
 
134
126
  void Gosu::SampleInstance::stop()
135
127
  {
136
- NSUInteger source = alChannelManagement->sourceIfStillPlaying(handle, extra);
128
+ ALuint source = alChannelManagement->sourceIfStillPlaying(handle, extra);
137
129
  if (source == ALChannelManagement::NO_SOURCE)
138
130
  return;
139
131
  alSourceStop(source);
@@ -141,7 +133,7 @@ void Gosu::SampleInstance::stop()
141
133
 
142
134
  void Gosu::SampleInstance::changeVolume(double volume)
143
135
  {
144
- NSUInteger source = alChannelManagement->sourceIfStillPlaying(handle, extra);
136
+ ALuint source = alChannelManagement->sourceIfStillPlaying(handle, extra);
145
137
  if (source == ALChannelManagement::NO_SOURCE)
146
138
  return;
147
139
  alSourcef(source, AL_GAIN, volume);
@@ -166,7 +158,7 @@ void Gosu::SampleInstance::changeSpeed(double speed)
166
158
 
167
159
  struct Gosu::Sample::SampleData : boost::noncopyable
168
160
  {
169
- NSUInteger buffer, source;
161
+ ALuint buffer, source;
170
162
 
171
163
  SampleData(AudioFile& audioFile)
172
164
  {
@@ -285,7 +277,7 @@ public:
285
277
  class Gosu::Song::StreamData : public BaseData
286
278
  {
287
279
  boost::scoped_ptr<AudioFile> file;
288
- NSUInteger buffers[2];
280
+ ALuint buffers[2];
289
281
 
290
282
  void applyVolume()
291
283
  {
@@ -299,7 +291,7 @@ class Gosu::Song::StreamData : public BaseData
299
291
  return alChannelManagement->sourceForSongs();
300
292
  }
301
293
 
302
- bool streamToBuffer(NSUInteger buffer)
294
+ bool streamToBuffer(ALuint buffer)
303
295
  {
304
296
  #ifdef GOSU_IS_IPHONE
305
297
  static const unsigned BUFFER_SIZE = 4096 * 4;
@@ -371,7 +363,7 @@ public:
371
363
  {
372
364
  alSourceStop(source);
373
365
 
374
- NSUInteger buffer;
366
+ ALuint buffer;
375
367
 
376
368
  // The number of QUEUED buffers apparently includes the number of
377
369
  // PROCESSED ones, so getting rid of the QUEUED ones is enough.
@@ -417,7 +409,7 @@ public:
417
409
  {
418
410
  int source = lookupSource();
419
411
 
420
- NSUInteger buffer;
412
+ ALuint buffer;
421
413
  int queued, processed;
422
414
  bool active = true;
423
415
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  #include <GosuImpl/Audio/AudioFile.hpp>
5
5
  #include <AudioToolbox/AudioToolbox.h>
6
+ #include <AudioToolbox/AudioConverter.h>
6
7
  #include <AudioToolbox/ExtendedAudioFile.h>
7
8
  #include <OpenAL/al.h>
8
9
  #include <Gosu/IO.hpp>
@@ -200,7 +201,7 @@ namespace Gosu
200
201
  CHECK_OS(ExtAudioFileSeek(file_, 0 + seekOffset_));
201
202
  }
202
203
 
203
- std::size_t readData(void* dest, UInt32 length)
204
+ std::size_t readData(void* dest, size_t length)
204
205
  {
205
206
  AudioBufferList abl;
206
207
  abl.mNumberBuffers = 1;
@@ -16,6 +16,7 @@
16
16
  #endif
17
17
 
18
18
  #include <algorithm>
19
+ #include <vector>
19
20
 
20
21
  namespace Gosu
21
22
  {
@@ -23,6 +24,8 @@ namespace Gosu
23
24
  class TexChunk;
24
25
  struct DrawOp;
25
26
  class DrawOpQueue;
27
+ typedef std::vector<DrawOpQueue> DrawOpQueueStack;
28
+ class Macro;
26
29
 
27
30
  template<typename T>
28
31
  bool isPToTheLeftOfAB(T xa, T ya,
@@ -5,13 +5,23 @@
5
5
  #include <Gosu/Color.hpp>
6
6
  #include <GosuImpl/Graphics/Common.hpp>
7
7
  #include <GosuImpl/Graphics/TexChunk.hpp>
8
+ #include <boost/bind.hpp>
8
9
  #include <boost/cstdint.hpp>
10
+ #include <algorithm>
9
11
  #include <set>
10
12
 
11
13
  namespace Gosu
12
14
  {
13
15
  const GLuint NO_TEXTURE = static_cast<GLuint>(-1);
14
16
 
17
+ struct ArrayVertex
18
+ {
19
+ GLfloat texCoords[2];
20
+ boost::uint32_t color;
21
+ GLfloat vertices[3];
22
+ };
23
+ typedef std::vector<ArrayVertex> VertexArray;
24
+
15
25
  struct DrawOp
16
26
  {
17
27
  int clipX, clipY;
@@ -34,7 +44,7 @@ namespace Gosu
34
44
  DrawOp() { clipWidth = 0xffffffff; usedVertices = 0; chunk = 0; }
35
45
 
36
46
  #ifndef GOSU_IS_IPHONE
37
- void perform(GLuint& currentTexName) const
47
+ void perform(GLuint& currentTexName, const void*) const
38
48
  {
39
49
  if (clipWidth != 0xffffffff)
40
50
  {
@@ -101,11 +111,17 @@ namespace Gosu
101
111
  glDisable(GL_SCISSOR_TEST);
102
112
  }
103
113
  #else
104
- void perform(unsigned& currentTexName) const
114
+ void perform(unsigned& currentTexName, const DrawOp* next) const
105
115
  {
106
- static GLfloat spriteVertices[8];
107
- static GLfloat spriteTexcoords[8];
108
- static boost::uint32_t spriteColors[4];
116
+ if (usedVertices != 4)
117
+ return; // No triangles, no lines on iPhone
118
+
119
+ static const unsigned MAX_AUTOGROUP = 24;
120
+
121
+ static int spriteCounter = 0;
122
+ static GLfloat spriteVertices[12 * MAX_AUTOGROUP];
123
+ static GLfloat spriteTexcoords[12 * MAX_AUTOGROUP];
124
+ static boost::uint32_t spriteColors[6 * MAX_AUTOGROUP];
109
125
 
110
126
  // iPhone specific setup
111
127
  static bool isSetup = false;
@@ -121,7 +137,7 @@ namespace Gosu
121
137
 
122
138
  isSetup = true;
123
139
  }
124
-
140
+
125
141
  if (clipWidth != 0xffffffff)
126
142
  {
127
143
  glEnable(GL_SCISSOR_TEST);
@@ -144,10 +160,19 @@ namespace Gosu
144
160
 
145
161
  double left, top, right, bottom;
146
162
  chunk->getCoords(left, top, right, bottom);
147
- spriteTexcoords[0] = left, spriteTexcoords[1] = top;
148
- spriteTexcoords[2] = right, spriteTexcoords[3] = top;
149
- spriteTexcoords[4] = left, spriteTexcoords[5] = bottom;
150
- spriteTexcoords[6] = right, spriteTexcoords[7] = bottom;
163
+ spriteTexcoords[spriteCounter*12 + 0] = left;
164
+ spriteTexcoords[spriteCounter*12 + 1] = top;
165
+ spriteTexcoords[spriteCounter*12 + 2] = right;
166
+ spriteTexcoords[spriteCounter*12 + 3] = top;
167
+ spriteTexcoords[spriteCounter*12 + 4] = left;
168
+ spriteTexcoords[spriteCounter*12 + 5] = bottom;
169
+
170
+ spriteTexcoords[spriteCounter*12 + 6] = right;
171
+ spriteTexcoords[spriteCounter*12 + 7] = top;
172
+ spriteTexcoords[spriteCounter*12 + 8] = left;
173
+ spriteTexcoords[spriteCounter*12 + 9] = bottom;
174
+ spriteTexcoords[spriteCounter*12 + 10] = right;
175
+ spriteTexcoords[spriteCounter*12 + 11] = bottom;
151
176
 
152
177
  currentTexName = chunk->texName();
153
178
  }
@@ -157,20 +182,30 @@ namespace Gosu
157
182
  currentTexName = NO_TEXTURE;
158
183
  }
159
184
 
160
- for (int i = 0; i < usedVertices; ++i)
185
+ for (int i = 0; i < 3; ++i)
161
186
  {
162
- spriteVertices[i*2] = vertices[i].x;
163
- spriteVertices[i*2+1] = vertices[i].y;
164
- spriteColors[i] = vertices[i].c.abgr();
187
+ spriteVertices[spriteCounter*12 + i*2] = vertices[i].x;
188
+ spriteVertices[spriteCounter*12 + i*2+1] = vertices[i].y;
189
+ spriteColors[spriteCounter*6 + i] = vertices[i].c.abgr();
190
+ }
191
+ for (int i = 0; i < 3; ++i)
192
+ {
193
+ spriteVertices[spriteCounter*12 + 6 + i*2] = vertices[i + 1].x;
194
+ spriteVertices[spriteCounter*12 + 6 + i*2+1] = vertices[i + 1].y;
195
+ spriteColors[spriteCounter*6 + 3 + i] = vertices[i + 1].c.abgr();
196
+ }
197
+
198
+ ++spriteCounter;
199
+ if (spriteCounter == MAX_AUTOGROUP or next == 0 or
200
+ chunk == 0 or next->chunk == 0 or
201
+ next->chunk->texName() != chunk->texName() or next->mode != mode or
202
+ clipWidth != 0xffffffff or next->clipWidth != 0xffffffff)
203
+ {
204
+ glDrawArrays(GL_TRIANGLES, 0, 6 * spriteCounter);
205
+ //if (spriteCounter > 1)
206
+ // printf("grouped %d quads\n", spriteCounter);
207
+ spriteCounter = 0;
165
208
  }
166
-
167
- if (usedVertices == 2)
168
- glDrawArrays(GL_LINES, 0, 2);
169
- else if (usedVertices == 3)
170
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
171
- else if (usedVertices == 4)
172
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
173
-
174
209
 
175
210
  if (clipWidth != 0xffffffff)
176
211
  glDisable(GL_SCISSOR_TEST);
@@ -182,6 +217,28 @@ namespace Gosu
182
217
  }
183
218
  #endif
184
219
 
220
+ void compileTo(VertexArray& va) const
221
+ {
222
+ ArrayVertex result[4];
223
+
224
+ for (int i = 0; i < 4; ++i)
225
+ {
226
+ result[i].vertices[0] = vertices[i].x;
227
+ result[i].vertices[1] = vertices[i].y;
228
+ result[i].vertices[2] = 0;
229
+ result[i].color = vertices[i].c.abgr();
230
+ }
231
+
232
+ double left, top, right, bottom;
233
+ chunk->getCoords(left, top, right, bottom);
234
+ result[0].texCoords[0] = left, result[0].texCoords[1] = top;
235
+ result[1].texCoords[0] = right, result[1].texCoords[1] = top;
236
+ result[2].texCoords[0] = right, result[2].texCoords[1] = bottom;
237
+ result[3].texCoords[0] = left, result[3].texCoords[1] = bottom;
238
+
239
+ va.insert(va.end(), result, result + 4);
240
+ }
241
+
185
242
  bool operator<(const DrawOp& other) const
186
243
  {
187
244
  return z < other.z;
@@ -200,6 +257,15 @@ namespace Gosu
200
257
  {
201
258
  }
202
259
 
260
+ void swap(DrawOpQueue& other)
261
+ {
262
+ std::swap(clipX, other.clipX);
263
+ std::swap(clipY, other.clipY);
264
+ std::swap(clipWidth, other.clipWidth);
265
+ std::swap(clipHeight, other.clipHeight);
266
+ set.swap(other.set);
267
+ }
268
+
203
269
  void addDrawOp(DrawOp op, ZPos z)
204
270
  {
205
271
  if (clipWidth != 0xffffffff)
@@ -213,7 +279,7 @@ namespace Gosu
213
279
  if (z == zImmediate)
214
280
  {
215
281
  GLuint currentTexName = NO_TEXTURE;
216
- op.perform(currentTexName);
282
+ op.perform(currentTexName, 0);
217
283
  if (currentTexName != NO_TEXTURE)
218
284
  glDisable(GL_TEXTURE_2D);
219
285
  }
@@ -235,24 +301,34 @@ namespace Gosu
235
301
  clipWidth = 0xffffffff;
236
302
  }
237
303
 
238
- void performDrawOps()
304
+ void performDrawOps() const
239
305
  {
240
306
  GLuint currentTexName = NO_TEXTURE;
241
307
 
242
- std::multiset<DrawOp>::iterator cur = set.begin(), end = set.end();
308
+ std::multiset<DrawOp>::const_iterator last, cur = set.begin(), end = set.end();
243
309
  while (cur != end)
244
310
  {
245
- cur->perform(currentTexName);
311
+ last = cur;
246
312
  ++cur;
313
+ last->perform(currentTexName, cur == end ? 0 : &*cur);
247
314
  }
248
- set.clear();
249
315
 
250
316
  if (currentTexName != NO_TEXTURE)
251
317
  glDisable(GL_TEXTURE_2D);
252
318
  }
319
+
320
+ void clear()
321
+ {
322
+ set.clear();
323
+ }
324
+
325
+ void compileTo(VertexArray& va) const
326
+ {
327
+ va.resize(set.size());
328
+ std::for_each(set.begin(), set.end(),
329
+ boost::bind(&DrawOp::compileTo, _1, boost::ref(va)));
330
+ }
253
331
  };
254
332
  }
255
333
 
256
334
  #endif
257
-
258
-
@@ -23,6 +23,12 @@
23
23
  }
24
24
 
25
25
  - (const Gosu::Touches&)currentTouches;
26
+
26
27
  - (void)drawView;
27
28
 
29
+ // This method is necessary because if pressing a LOT of touches, some
30
+ // of them may end up not being sent to touchesEnded(), which is confusing
31
+ // to application programmers.
32
+ - (void)removeDeadTouches;
33
+
28
34
  @end
@@ -12,7 +12,7 @@ namespace {
12
12
  {
13
13
  Gosu::Touches result;
14
14
  for (UITouch* uiTouch in touches)
15
- {
15
+ {
16
16
  CGPoint point = [uiTouch locationInView: view];
17
17
  Gosu::Touch touch = { uiTouch, point.y, [view bounds].size.width - point.x };
18
18
  result.push_back(touch);
@@ -113,6 +113,8 @@ namespace {
113
113
  }
114
114
 
115
115
  - (void)dealloc {
116
+ delete currentTouchesVector;
117
+ [currentTouches release];
116
118
  [EAGLContext setCurrentContext:nil];
117
119
  [context release];
118
120
  [super dealloc];
@@ -148,6 +150,37 @@ namespace {
148
150
  windowInstance().touchesEnded(translateTouches(touches, self));
149
151
  }
150
152
 
153
+ - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
154
+ // TODO: Should be differentiated on the Gosu side.
155
+ [self touchesEnded: touches withEvent: event];
156
+ }
157
+
158
+ - (void)removeDeadTouches {
159
+ NSMutableSet* deadTouches = 0;
160
+
161
+ for (UITouch* touch in currentTouches)
162
+ {
163
+ UITouchPhase phase = [touch phase];
164
+ if (phase == UITouchPhaseBegan ||
165
+ phase == UITouchPhaseMoved ||
166
+ phase == UITouchPhaseStationary)
167
+ continue;
168
+
169
+ // Something was deleted, we will need the set.
170
+ if (deadTouches == 0)
171
+ deadTouches = [[NSMutableSet alloc] init];
172
+ [deadTouches addObject:touch];
173
+ }
174
+
175
+ // Has something been deleted?
176
+ if (deadTouches)
177
+ {
178
+ delete currentTouchesVector;
179
+ [currentTouches minusSet: deadTouches];
180
+ windowInstance().touchesEnded(translateTouches(deadTouches, self));
181
+ }
182
+ }
183
+
151
184
  - (bool)isMultipleTouchEnabled {
152
185
  return YES;
153
186
  }