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.
- data/COPYING.txt +1 -2
- data/Gosu/Graphics.hpp +6 -0
- data/Gosu/Image.hpp +4 -0
- data/Gosu/Version.hpp +2 -2
- data/GosuImpl/Audio/ALChannelManagement.hpp +3 -3
- data/GosuImpl/Audio/AudioOpenAL.mm +11 -19
- data/GosuImpl/Audio/AudioToolboxFile.hpp +2 -1
- data/GosuImpl/Graphics/Common.hpp +3 -0
- data/GosuImpl/Graphics/DrawOp.hpp +105 -29
- data/GosuImpl/Graphics/GosuView.hpp +6 -0
- data/GosuImpl/Graphics/GosuView.mm +34 -1
- data/GosuImpl/Graphics/Graphics.cpp +57 -17
- data/GosuImpl/Graphics/Image.cpp +5 -0
- data/GosuImpl/Graphics/LargeImageData.cpp +1 -1
- data/GosuImpl/Graphics/Macro.hpp +79 -0
- data/GosuImpl/Graphics/TexChunk.cpp +3 -3
- data/GosuImpl/Graphics/TexChunk.hpp +2 -2
- data/GosuImpl/Graphics/TextMac.cpp +6 -0
- data/GosuImpl/Graphics/TextTouch.mm +49 -14
- data/GosuImpl/Graphics/Texture.cpp +2 -2
- data/GosuImpl/Graphics/Texture.hpp +3 -2
- data/GosuImpl/InputMac.mm +2 -0
- data/GosuImpl/RubyGosu.swg +15 -4
- data/GosuImpl/RubyGosu_wrap.cxx +85 -6
- data/GosuImpl/Sockets/CommSocket.cpp +304 -304
- data/GosuImpl/Sockets/Socket.cpp +1 -1
- data/GosuImpl/WindowMac.mm +3 -0
- data/GosuImpl/WindowTouch.mm +1 -0
- data/Rakefile +13 -5
- data/mac/Gosu.xcodeproj/jlnr.pbxuser +292 -280
- data/mac/Gosu.xcodeproj/jlnr.perspectivev3 +46 -48
- data/mac/Gosu.xcodeproj/project.pbxproj +58 -18
- data/reference/cpp/_audio_8hpp-source.html +2 -1
- data/reference/cpp/_audio_8hpp.html +11 -4
- data/reference/cpp/_audio_8hpp_source.html +178 -0
- data/reference/cpp/_auto_link_8hpp-source.html +1 -0
- data/reference/cpp/_auto_link_8hpp.html +5 -4
- data/reference/cpp/_auto_link_8hpp_source.html +85 -0
- data/reference/cpp/_bitmap_8hpp-source.html +9 -8
- data/reference/cpp/_bitmap_8hpp.html +11 -4
- data/reference/cpp/_bitmap_8hpp_source.html +131 -0
- data/reference/cpp/_buttons_mac_8hpp-source.html +124 -123
- data/reference/cpp/_buttons_mac_8hpp.html +10 -3
- data/reference/cpp/_buttons_mac_8hpp_source.html +206 -0
- data/reference/cpp/_color_8hpp-source.html +18 -17
- data/reference/cpp/_color_8hpp.html +16 -4
- data/reference/cpp/_color_8hpp_source.html +216 -0
- data/reference/cpp/_directories_8hpp-source.html +5 -4
- data/reference/cpp/_directories_8hpp.html +11 -4
- data/reference/cpp/_directories_8hpp_source.html +89 -0
- data/reference/cpp/_font_8hpp-source.html +8 -7
- data/reference/cpp/_font_8hpp.html +11 -4
- data/reference/cpp/_font_8hpp_source.html +116 -0
- data/reference/cpp/_fwd_8hpp-source.html +1 -0
- data/reference/cpp/_fwd_8hpp.html +11 -4
- data/reference/cpp/_fwd_8hpp_source.html +99 -0
- data/reference/cpp/_gosu_8hpp-source.html +1 -0
- data/reference/cpp/_gosu_8hpp.html +5 -4
- data/reference/cpp/_gosu_8hpp_source.html +97 -0
- data/reference/cpp/_graphics_8hpp-source.html +7 -6
- data/reference/cpp/_graphics_8hpp.html +11 -4
- data/reference/cpp/_graphics_8hpp_source.html +138 -0
- data/reference/cpp/_graphics_base_8hpp-source.html +22 -21
- data/reference/cpp/_graphics_base_8hpp.html +15 -8
- data/reference/cpp/_graphics_base_8hpp_source.html +116 -0
- data/reference/cpp/_i_o_8hpp-source.html +16 -15
- data/reference/cpp/_i_o_8hpp.html +13 -6
- data/reference/cpp/_i_o_8hpp_source.html +302 -0
- data/reference/cpp/_image_8hpp-source.html +23 -22
- data/reference/cpp/_image_8hpp.html +11 -4
- data/reference/cpp/_image_8hpp_source.html +176 -0
- data/reference/cpp/_image_data_8hpp-source.html +2 -1
- data/reference/cpp/_image_data_8hpp.html +11 -4
- data/reference/cpp/_image_data_8hpp_source.html +109 -0
- data/reference/cpp/_input_8hpp-source.html +6 -5
- data/reference/cpp/_input_8hpp.html +11 -4
- data/reference/cpp/_input_8hpp_source.html +183 -0
- data/reference/cpp/_math_8hpp-source.html +26 -25
- data/reference/cpp/_math_8hpp.html +11 -4
- data/reference/cpp/_math_8hpp_source.html +157 -0
- data/reference/cpp/_platform_8hpp-source.html +5 -4
- data/reference/cpp/_platform_8hpp.html +14 -7
- data/reference/cpp/_platform_8hpp_source.html +134 -0
- data/reference/cpp/_rot_flip_8hpp-source.html +30 -29
- data/reference/cpp/_rot_flip_8hpp.html +12 -5
- data/reference/cpp/_rot_flip_8hpp_source.html +185 -0
- data/reference/cpp/_sockets_8hpp-source.html +25 -24
- data/reference/cpp/_sockets_8hpp.html +14 -7
- data/reference/cpp/_sockets_8hpp_source.html +175 -0
- data/reference/cpp/_text_8hpp-source.html +7 -6
- data/reference/cpp/_text_8hpp.html +11 -4
- data/reference/cpp/_text_8hpp_source.html +103 -0
- data/reference/cpp/_text_input_8hpp-source.html +1 -0
- data/reference/cpp/_text_input_8hpp.html +11 -4
- data/reference/cpp/_text_input_8hpp_source.html +111 -0
- data/reference/cpp/_timing_8hpp-source.html +3 -2
- data/reference/cpp/_timing_8hpp.html +11 -4
- data/reference/cpp/_timing_8hpp_source.html +83 -0
- data/reference/cpp/_utility_8hpp-source.html +5 -4
- data/reference/cpp/_utility_8hpp.html +11 -4
- data/reference/cpp/_utility_8hpp_source.html +90 -0
- data/reference/cpp/_version_8hpp-source.html +1 -0
- data/reference/cpp/_version_8hpp.html +7 -6
- data/reference/cpp/_version_8hpp_source.html +78 -0
- data/reference/cpp/_win_utility_8hpp-source.html +13 -12
- data/reference/cpp/_win_utility_8hpp.html +18 -6
- data/reference/cpp/_win_utility_8hpp_source.html +126 -0
- data/reference/cpp/_window_8hpp-source.html +6 -5
- data/reference/cpp/_window_8hpp.html +12 -5
- data/reference/cpp/_window_8hpp_source.html +158 -0
- data/reference/cpp/annotated.html +3 -2
- data/reference/cpp/class_gosu_1_1_audio-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_audio.html +5 -4
- data/reference/cpp/class_gosu_1_1_bitmap-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_bitmap.html +17 -12
- data/reference/cpp/class_gosu_1_1_buffer-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_buffer.html +12 -13
- data/reference/cpp/class_gosu_1_1_button-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_button.html +13 -10
- data/reference/cpp/class_gosu_1_1_color-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_color.html +29 -26
- data/reference/cpp/class_gosu_1_1_comm_socket-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_comm_socket.html +23 -22
- data/reference/cpp/class_gosu_1_1_file-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_file.html +7 -6
- data/reference/cpp/class_gosu_1_1_font-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_font.html +17 -16
- data/reference/cpp/class_gosu_1_1_graphics-members.html +4 -1
- data/reference/cpp/class_gosu_1_1_graphics.html +68 -19
- data/reference/cpp/class_gosu_1_1_image-members.html +3 -1
- data/reference/cpp/class_gosu_1_1_image.html +49 -23
- data/reference/cpp/class_gosu_1_1_image_data-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_image_data.html +9 -8
- data/reference/cpp/class_gosu_1_1_input-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_input.html +7 -6
- data/reference/cpp/class_gosu_1_1_listener_socket-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_listener_socket.html +12 -11
- data/reference/cpp/class_gosu_1_1_message_socket-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_message_socket.html +19 -18
- data/reference/cpp/class_gosu_1_1_reader-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_reader.html +18 -17
- data/reference/cpp/class_gosu_1_1_resource-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_resource.html +10 -9
- data/reference/cpp/class_gosu_1_1_rot_flip-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_rot_flip.html +24 -19
- data/reference/cpp/class_gosu_1_1_sample-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_sample.html +5 -4
- data/reference/cpp/class_gosu_1_1_sample_instance-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_sample_instance.html +5 -4
- data/reference/cpp/class_gosu_1_1_song-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_song.html +6 -5
- data/reference/cpp/class_gosu_1_1_text_input-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_text_input.html +6 -5
- data/reference/cpp/class_gosu_1_1_window-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_window.html +12 -11
- data/reference/cpp/class_gosu_1_1_writer-members.html +2 -1
- data/reference/cpp/class_gosu_1_1_writer.html +15 -14
- data/reference/cpp/classes.html +11 -10
- data/reference/cpp/files.html +28 -27
- data/reference/cpp/functions.html +2 -1
- data/reference/cpp/functions_0x62.html +5 -2
- data/reference/cpp/functions_0x63.html +2 -1
- data/reference/cpp/functions_0x64.html +2 -1
- data/reference/cpp/functions_0x65.html +4 -1
- data/reference/cpp/functions_0x66.html +2 -1
- data/reference/cpp/functions_0x67.html +5 -2
- data/reference/cpp/functions_0x68.html +2 -1
- data/reference/cpp/functions_0x69.html +2 -1
- data/reference/cpp/functions_0x6b.html +2 -1
- data/reference/cpp/functions_0x6c.html +2 -1
- data/reference/cpp/functions_0x6d.html +2 -1
- data/reference/cpp/functions_0x6e.html +2 -1
- data/reference/cpp/functions_0x6f.html +2 -1
- data/reference/cpp/functions_0x70.html +2 -1
- data/reference/cpp/functions_0x72.html +2 -1
- data/reference/cpp/functions_0x73.html +2 -1
- data/reference/cpp/functions_0x74.html +4 -3
- data/reference/cpp/functions_0x75.html +2 -1
- data/reference/cpp/functions_0x76.html +2 -1
- data/reference/cpp/functions_0x77.html +2 -1
- data/reference/cpp/functions_0x78.html +2 -1
- data/reference/cpp/functions_0x79.html +2 -1
- data/reference/cpp/functions_0x7e.html +2 -1
- data/reference/cpp/functions_enum.html +2 -1
- data/reference/cpp/functions_eval.html +2 -1
- data/reference/cpp/functions_func.html +2 -1
- data/reference/cpp/functions_func_0x62.html +5 -2
- data/reference/cpp/functions_func_0x63.html +2 -1
- data/reference/cpp/functions_func_0x64.html +2 -1
- data/reference/cpp/functions_func_0x65.html +4 -1
- data/reference/cpp/functions_func_0x66.html +2 -1
- data/reference/cpp/functions_func_0x67.html +5 -2
- data/reference/cpp/functions_func_0x68.html +2 -1
- data/reference/cpp/functions_func_0x69.html +2 -1
- data/reference/cpp/functions_func_0x6b.html +2 -1
- data/reference/cpp/functions_func_0x6c.html +2 -1
- data/reference/cpp/functions_func_0x6d.html +2 -1
- data/reference/cpp/functions_func_0x6e.html +2 -1
- data/reference/cpp/functions_func_0x6f.html +2 -1
- data/reference/cpp/functions_func_0x70.html +2 -1
- data/reference/cpp/functions_func_0x72.html +2 -1
- data/reference/cpp/functions_func_0x73.html +2 -1
- data/reference/cpp/functions_func_0x74.html +4 -3
- data/reference/cpp/functions_func_0x75.html +2 -1
- data/reference/cpp/functions_func_0x76.html +2 -1
- data/reference/cpp/functions_func_0x77.html +2 -1
- data/reference/cpp/functions_func_0x7e.html +2 -1
- data/reference/cpp/functions_type.html +2 -1
- data/reference/cpp/functions_vars.html +2 -1
- data/reference/cpp/globals.html +2 -1
- data/reference/cpp/globals_defs.html +2 -1
- data/reference/cpp/hierarchy.html +2 -1
- data/reference/cpp/index.html +3 -2
- data/reference/cpp/namespace_gosu.html +3314 -0
- data/reference/cpp/namespace_gosu_1_1_colors.html +274 -0
- data/reference/cpp/namespace_gosu_1_1_win.html +354 -0
- data/reference/cpp/namespacemembers.html +135 -0
- data/reference/cpp/namespacemembers_0x62.html +143 -0
- data/reference/cpp/namespacemembers_0x63.html +125 -0
- data/reference/cpp/namespacemembers_0x64.html +119 -0
- data/reference/cpp/namespacemembers_0x66.html +129 -0
- data/reference/cpp/namespacemembers_0x67.html +165 -0
- data/reference/cpp/namespacemembers_0x68.html +113 -0
- data/reference/cpp/namespacemembers_0x69.html +117 -0
- data/reference/cpp/namespacemembers_0x6b.html +289 -0
- data/reference/cpp/namespacemembers_0x6c.html +119 -0
- data/reference/cpp/namespacemembers_0x6d.html +131 -0
- data/reference/cpp/namespacemembers_0x6e.html +127 -0
- data/reference/cpp/namespacemembers_0x6f.html +121 -0
- data/reference/cpp/namespacemembers_0x70.html +115 -0
- data/reference/cpp/namespacemembers_0x71.html +113 -0
- data/reference/cpp/namespacemembers_0x72.html +165 -0
- data/reference/cpp/namespacemembers_0x73.html +135 -0
- data/reference/cpp/namespacemembers_0x74.html +129 -0
- data/reference/cpp/namespacemembers_0x75.html +117 -0
- data/reference/cpp/namespacemembers_0x77.html +117 -0
- data/reference/cpp/namespacemembers_0x79.html +113 -0
- data/reference/cpp/namespacemembers_0x7a.html +115 -0
- data/reference/cpp/namespacemembers_enum.html +103 -0
- data/reference/cpp/namespacemembers_eval.html +443 -0
- data/reference/cpp/namespacemembers_func.html +269 -0
- data/reference/cpp/namespacemembers_type.html +93 -0
- data/reference/cpp/namespacemembers_vars.html +115 -0
- data/reference/cpp/namespaces.html +76 -0
- data/reference/cpp/struct_gosu_1_1_g_l_tex_info-members.html +2 -1
- data/reference/cpp/struct_gosu_1_1_g_l_tex_info.html +10 -9
- data/reference/cpp/struct_gosu_1_1_touch-members.html +2 -1
- data/reference/cpp/struct_gosu_1_1_touch.html +8 -7
- data/reference/rdoc/classes/Gosu.html +16 -29
- data/reference/rdoc/classes/Gosu.src/M000003.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000004.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000005.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000006.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000007.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000008.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000009.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000010.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000011.html +0 -0
- data/reference/rdoc/classes/Gosu.src/M000012.html +0 -0
- data/reference/rdoc/classes/Gosu/Color.html +16 -17
- data/reference/rdoc/classes/Gosu/Color.src/M000016.html +0 -0
- data/reference/rdoc/classes/Gosu/Color.src/M000017.html +0 -0
- data/reference/rdoc/classes/Gosu/Color.src/M000018.html +0 -0
- data/reference/rdoc/classes/Gosu/Color.src/M000019.html +0 -0
- data/reference/rdoc/classes/Gosu/Font.html +16 -19
- data/reference/rdoc/classes/Gosu/Font.src/M000029.html +0 -0
- data/reference/rdoc/classes/Gosu/Font.src/M000030.html +0 -0
- data/reference/rdoc/classes/Gosu/Font.src/M000031.html +0 -0
- data/reference/rdoc/classes/Gosu/Font.src/M000032.html +0 -0
- data/reference/rdoc/classes/Gosu/Font.src/M000033.html +0 -0
- data/reference/rdoc/classes/Gosu/GLTexInfo.html +24 -16
- data/reference/rdoc/classes/Gosu/Image.html +16 -27
- data/reference/rdoc/classes/Gosu/Image.src/M000020.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000021.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000022.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000023.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000024.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000025.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000026.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000027.html +0 -0
- data/reference/rdoc/classes/Gosu/Image.src/M000028.html +0 -0
- data/reference/rdoc/classes/Gosu/Sample.html +16 -15
- data/reference/rdoc/classes/Gosu/Sample.src/M000013.html +0 -0
- data/reference/rdoc/classes/Gosu/Sample.src/M000014.html +0 -0
- data/reference/rdoc/classes/Gosu/Sample.src/M000015.html +0 -0
- data/reference/rdoc/classes/Gosu/SampleInstance.html +16 -19
- data/reference/rdoc/classes/Gosu/SampleInstance.src/M000051.html +0 -0
- data/reference/rdoc/classes/Gosu/SampleInstance.src/M000052.html +0 -0
- data/reference/rdoc/classes/Gosu/SampleInstance.src/M000053.html +0 -0
- data/reference/rdoc/classes/Gosu/SampleInstance.src/M000054.html +0 -0
- data/reference/rdoc/classes/Gosu/SampleInstance.src/M000055.html +0 -0
- data/reference/rdoc/classes/Gosu/Song.html +16 -23
- data/reference/rdoc/classes/Gosu/Song.src/M000056.html +0 -0
- data/reference/rdoc/classes/Gosu/Song.src/M000057.html +0 -0
- data/reference/rdoc/classes/Gosu/Song.src/M000058.html +0 -0
- data/reference/rdoc/classes/Gosu/Song.src/M000059.html +0 -0
- data/reference/rdoc/classes/Gosu/Song.src/M000060.html +0 -0
- data/reference/rdoc/classes/Gosu/Song.src/M000061.html +0 -0
- data/reference/rdoc/classes/Gosu/Song.src/M000062.html +0 -0
- data/reference/rdoc/classes/Gosu/TextInput.html +16 -9
- data/reference/rdoc/classes/Gosu/Window.html +16 -51
- data/reference/rdoc/classes/Gosu/Window.src/M000034.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000035.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000036.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000037.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000038.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000039.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000040.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000041.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000042.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000043.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000044.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000045.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000046.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000047.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000048.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000049.html +0 -0
- data/reference/rdoc/classes/Gosu/Window.src/M000050.html +0 -0
- data/reference/rdoc/classes/Numeric.html +16 -13
- data/reference/rdoc/classes/Numeric.src/M000001.html +0 -0
- data/reference/rdoc/classes/Numeric.src/M000002.html +0 -0
- data/reference/rdoc/created.rid +1 -1
- data/reference/rdoc/files/COPYING_txt.html +17 -12
- data/reference/rdoc/files/README_txt.html +16 -10
- data/reference/rdoc/files/reference/{DeploymentOnOSX_rdoc.html → Deployment on OS X_rdoc.html } +17 -11
- data/reference/rdoc/files/reference/{DeploymentOnWindows_rdoc.html → Deployment on Windows_rdoc.html } +17 -11
- data/reference/rdoc/files/reference/{DrawingWithColors_rdoc.html → Drawing with Colors_rdoc.html } +23 -17
- data/reference/rdoc/files/reference/{OrderOfCorners_rdoc.html → Order of Corners_rdoc.html } +18 -12
- data/reference/rdoc/files/reference/Tileability_rdoc.html +16 -10
- data/reference/rdoc/files/reference/{ZOrdering_rdoc.html → Z Ordering_rdoc.html } +18 -12
- data/reference/rdoc/files/reference/gosu_rb.html +16 -10
- data/reference/rdoc/fr_file_index.html +5 -5
- data/reference/rdoc/index.html +1 -1
- data/reference/rdoc/rdoc-style.css +4 -0
- metadata +129 -9
data/COPYING.txt
CHANGED
|
@@ -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.
|
data/Gosu/Graphics.hpp
CHANGED
|
@@ -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,
|
data/Gosu/Image.hpp
CHANGED
|
@@ -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
|
|
data/Gosu/Version.hpp
CHANGED
|
@@ -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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
|
148
|
-
spriteTexcoords[
|
|
149
|
-
spriteTexcoords[
|
|
150
|
-
spriteTexcoords[
|
|
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 <
|
|
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>::
|
|
308
|
+
std::multiset<DrawOp>::const_iterator last, cur = set.begin(), end = set.end();
|
|
243
309
|
while (cur != end)
|
|
244
310
|
{
|
|
245
|
-
cur
|
|
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
|
}
|