gosu 0.8.6-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/Gosu/Audio.hpp +171 -0
  3. data/Gosu/AutoLink.hpp +16 -0
  4. data/Gosu/Bitmap.hpp +96 -0
  5. data/Gosu/Buttons.hpp +265 -0
  6. data/Gosu/Color.hpp +204 -0
  7. data/Gosu/Directories.hpp +36 -0
  8. data/Gosu/Font.hpp +83 -0
  9. data/Gosu/Fwd.hpp +31 -0
  10. data/Gosu/Gosu.hpp +34 -0
  11. data/Gosu/Graphics.hpp +115 -0
  12. data/Gosu/GraphicsBase.hpp +110 -0
  13. data/Gosu/IO.hpp +269 -0
  14. data/Gosu/Image.hpp +122 -0
  15. data/Gosu/ImageData.hpp +61 -0
  16. data/Gosu/Input.hpp +149 -0
  17. data/Gosu/Inspection.hpp +14 -0
  18. data/Gosu/Math.hpp +135 -0
  19. data/Gosu/Platform.hpp +93 -0
  20. data/Gosu/Sockets.hpp +156 -0
  21. data/Gosu/TR1.hpp +56 -0
  22. data/Gosu/Text.hpp +71 -0
  23. data/Gosu/TextInput.hpp +70 -0
  24. data/Gosu/Timing.hpp +16 -0
  25. data/Gosu/Utility.hpp +28 -0
  26. data/Gosu/Version.hpp +19 -0
  27. data/Gosu/WinUtility.hpp +75 -0
  28. data/Gosu/Window.hpp +145 -0
  29. data/examples/ChipmunkIntegration.rb +275 -0
  30. data/examples/CptnRuby.rb +223 -0
  31. data/examples/GosuZen.rb +68 -0
  32. data/examples/MoreChipmunkAndRMagick.rb +155 -0
  33. data/examples/OpenGLIntegration.rb +226 -0
  34. data/examples/RMagickIntegration.rb +417 -0
  35. data/examples/TextInput.rb +154 -0
  36. data/examples/Tutorial.rb +131 -0
  37. data/examples/media/Beep.wav +0 -0
  38. data/examples/media/CptnRuby Gem.png +0 -0
  39. data/examples/media/CptnRuby Map.txt +25 -0
  40. data/examples/media/CptnRuby Tileset.png +0 -0
  41. data/examples/media/CptnRuby.png +0 -0
  42. data/examples/media/Cursor.png +0 -0
  43. data/examples/media/Earth.png +0 -0
  44. data/examples/media/Explosion.wav +0 -0
  45. data/examples/media/Landscape.svg +10 -0
  46. data/examples/media/LargeStar.png +0 -0
  47. data/examples/media/Smoke.png +0 -0
  48. data/examples/media/Soldier.png +0 -0
  49. data/examples/media/Space.png +0 -0
  50. data/examples/media/Star.png +0 -0
  51. data/examples/media/Starfighter.bmp +0 -0
  52. data/lib/gosu.rb +20 -0
  53. data/lib/gosu/patches.rb +81 -0
  54. data/lib/gosu/preview.rb +139 -0
  55. data/lib/gosu/run.rb +11 -0
  56. data/lib/gosu/swig_patches.rb +60 -0
  57. data/lib/gosu/zen.rb +89 -0
  58. data/lib64/2.1/gosu.so +0 -0
  59. data/lib64/FreeImage.dll +0 -0
  60. data/lib64/OpenAL32.dll +0 -0
  61. data/lib64/SDL2.dll +0 -0
  62. data/lib64/libsndfile.dll +0 -0
  63. metadata +110 -0
@@ -0,0 +1,60 @@
1
+ # SWIG workarounds
2
+ # These are offloaded into a separate file because rb_eval_string() is weird on Ruby 1.8.
3
+
4
+ # Exceptions in Window callbacks often get lost, this is especially annoying in draw/update.
5
+ # It is not clear whether this is a SWIG issue or if some stack frame is not exception
6
+ # compatible, but I just call protected_update etc. in the Ruby wrapper so I can add this
7
+ # custom debugging help:
8
+ class Gosu::Window
9
+ %w(update draw needs_redraw? needs_cursor?
10
+ lose_focus button_down button_up).each do |callback|
11
+ define_method "protected_#{callback}" do |*args|
12
+ begin
13
+ # If there has been an exception, don't do anything as to not make matters worse.
14
+ # Conveniently turn the return value into a boolean result (for needs_cursor? etc).
15
+ defined?(@_exception) ? false : !!send(callback, *args)
16
+ rescue Exception => e
17
+ # Exit the message loop naturally, then re-throw
18
+ @_exception = e
19
+ close
20
+ end
21
+ end
22
+ end
23
+
24
+ def protected_draw_2
25
+ protected_draw
26
+ $gosu_gl_blocks_2 = $gosu_gl_blocks
27
+ $gosu_gl_blocks = nil
28
+ end
29
+
30
+ def gl(*args, &block)
31
+ $gosu_gl_blocks ||= []
32
+ $gosu_gl_blocks << block
33
+ unsafe_gl(*args, &block)
34
+ end
35
+
36
+ alias show_internal show
37
+ def show
38
+ show_internal
39
+ # Try to format the message nicely, without any useless patching that we are
40
+ # doing here.
41
+ if defined? @_exception then
42
+ if @_exception.backtrace.is_a? Array and not @_exception.backtrace.frozen? then
43
+ @_exception.backtrace.reject! { |line| line.include? 'lib/gosu/swig_patches.rb' }
44
+ end
45
+ raise @_exception
46
+ end
47
+ end
48
+ end
49
+
50
+ # SWIG doesn't understand the C++ overloading, so we need this simple check in Ruby.
51
+ class Gosu::Image
52
+ def self.from_text(*args)
53
+ args.size == 4 ? from_text4(*args) : from_text7(*args)
54
+ end
55
+ end
56
+
57
+ # SWIG won't let me rename my method to '[]='.
58
+ class Gosu::Font
59
+ alias []= set_image
60
+ end
@@ -0,0 +1,89 @@
1
+ require 'gosu/preview'
2
+
3
+ module Gosu
4
+ module Zen
5
+
6
+ @@window_args = [800, 600, {}]
7
+ @@options = {}
8
+
9
+ def window width, height, options = nil
10
+ if $window.nil?
11
+ @@window_args[0] = width
12
+ @@window_args[1] = height
13
+ @@window_args[2].merge! options if options
14
+ else
15
+ raise "window size can only be set before the window is created"
16
+ end
17
+ end
18
+
19
+ def set what, value
20
+ if $window.nil?
21
+ @@options[what.to_sym] = value
22
+ else
23
+ $window.send "#{what}=", value
24
+ end
25
+ end
26
+
27
+ def init &body
28
+ ZenWindow.send :define_method, :init, &body
29
+ end
30
+
31
+ def button_down id = nil, &body
32
+ m = id ? "button_down_#{id}" : :button_down_other
33
+ ZenWindow.send :define_method, m, &body
34
+ end
35
+
36
+ def button_up id = nil, &body
37
+ m = id ? "button_up_#{id}" : :button_up_other
38
+ ZenWindow.send :define_method, m, &body
39
+ end
40
+
41
+ def update &body
42
+ ZenWindow.send :define_method, :update, &body
43
+ end
44
+
45
+ def draw &body
46
+ ZenWindow.send :define_method, :draw, &body
47
+ end
48
+
49
+ def run!
50
+ window = ZenWindow.new *@@window_args
51
+ @@options.each do |opt, value|
52
+ window.send "#{opt}=", value
53
+ end
54
+ window.show
55
+ end
56
+
57
+ def Zen.included mod
58
+ at_exit { run! unless $! }
59
+ end
60
+
61
+ end
62
+
63
+ class ZenWindow < Window
64
+ def initialize *args
65
+ super
66
+ init
67
+ end
68
+
69
+ def init
70
+ end
71
+
72
+ def button_down id
73
+ m = :"button_down_#{id}"
74
+ respond_to?(m) ? send(m) : button_down_other(id)
75
+ end
76
+
77
+ def button_up id
78
+ m = :"button_up_#{id}"
79
+ respond_to?(m) ? send(m) : button_up_other(id)
80
+ end
81
+
82
+ def button_down_other id
83
+ end
84
+
85
+ def button_up_other id
86
+ end
87
+
88
+ end
89
+ end
Binary file
Binary file
Binary file
Binary file
Binary file
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gosu
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.6
5
+ platform: x64-mingw32
6
+ authors:
7
+ - Julian Raschke
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |2
14
+ 2D game development library.
15
+
16
+ Gosu features easy to use and game-friendly interfaces to 2D graphics
17
+ and text (accelerated by 3D hardware), sound samples and music as well as
18
+ keyboard, mouse and gamepad/joystick input.
19
+
20
+ Also includes demos for integration with RMagick, Chipmunk and OpenGL.
21
+ email: julian@raschke.de
22
+ executables: []
23
+ extensions: []
24
+ extra_rdoc_files: []
25
+ files:
26
+ - Gosu/Audio.hpp
27
+ - Gosu/AutoLink.hpp
28
+ - Gosu/Bitmap.hpp
29
+ - Gosu/Buttons.hpp
30
+ - Gosu/Color.hpp
31
+ - Gosu/Directories.hpp
32
+ - Gosu/Font.hpp
33
+ - Gosu/Fwd.hpp
34
+ - Gosu/Gosu.hpp
35
+ - Gosu/Graphics.hpp
36
+ - Gosu/GraphicsBase.hpp
37
+ - Gosu/IO.hpp
38
+ - Gosu/Image.hpp
39
+ - Gosu/ImageData.hpp
40
+ - Gosu/Input.hpp
41
+ - Gosu/Inspection.hpp
42
+ - Gosu/Math.hpp
43
+ - Gosu/Platform.hpp
44
+ - Gosu/Sockets.hpp
45
+ - Gosu/TR1.hpp
46
+ - Gosu/Text.hpp
47
+ - Gosu/TextInput.hpp
48
+ - Gosu/Timing.hpp
49
+ - Gosu/Utility.hpp
50
+ - Gosu/Version.hpp
51
+ - Gosu/WinUtility.hpp
52
+ - Gosu/Window.hpp
53
+ - examples/ChipmunkIntegration.rb
54
+ - examples/CptnRuby.rb
55
+ - examples/GosuZen.rb
56
+ - examples/MoreChipmunkAndRMagick.rb
57
+ - examples/OpenGLIntegration.rb
58
+ - examples/RMagickIntegration.rb
59
+ - examples/TextInput.rb
60
+ - examples/Tutorial.rb
61
+ - examples/media/Beep.wav
62
+ - examples/media/CptnRuby Gem.png
63
+ - examples/media/CptnRuby Map.txt
64
+ - examples/media/CptnRuby Tileset.png
65
+ - examples/media/CptnRuby.png
66
+ - examples/media/Cursor.png
67
+ - examples/media/Earth.png
68
+ - examples/media/Explosion.wav
69
+ - examples/media/Landscape.svg
70
+ - examples/media/LargeStar.png
71
+ - examples/media/Smoke.png
72
+ - examples/media/Soldier.png
73
+ - examples/media/Space.png
74
+ - examples/media/Star.png
75
+ - examples/media/Starfighter.bmp
76
+ - lib/gosu.rb
77
+ - lib/gosu/patches.rb
78
+ - lib/gosu/preview.rb
79
+ - lib/gosu/run.rb
80
+ - lib/gosu/swig_patches.rb
81
+ - lib/gosu/zen.rb
82
+ - lib64/2.1/gosu.so
83
+ - lib64/FreeImage.dll
84
+ - lib64/OpenAL32.dll
85
+ - lib64/SDL2.dll
86
+ - lib64/libsndfile.dll
87
+ homepage: http://www.libgosu.org/
88
+ licenses: []
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: 2.1.0
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.4.5
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: 2D game development library.
110
+ test_files: []