gosu 0.14.3-x86-mingw32 → 0.15.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 835e0c11239539361717f696352862171b7e0de884e9b09ff1171adb1fad158b
4
- data.tar.gz: 1000da4fab23ab10f7e9dc9bff0e932cf76b86eba836f0aca98970d367ca7604
3
+ metadata.gz: 1ca0271a9e17e93df08b0704e695b8d57789313f384ea67a05267da6c5b7530a
4
+ data.tar.gz: 6b1b1042ac1fdaf2c7234bc9ba2ca3ebe76ea23df6a1e0f240eee1ed1e843aa0
5
5
  SHA512:
6
- metadata.gz: ca8e2b48bf47048ed340ccd6ebd0ffa9a9f28fa58c2e445d7b697da1ab325b9281eb1ab90d2ef4672ac588df0d899f867a9ee4cb47657e5b6d314a5faf46ae76
7
- data.tar.gz: d9c13117eefdac1fed2596a569846ee74e9cfe35019980e92a8b6c494a8bacc8fece334d77923338b7b4af98f9e2660db6145045a2e8b83d417fd8f13d19c6fe
6
+ metadata.gz: b053b4ef1bd8d6864a26ad92b368fca22010eed47ae3b012cb898f0c5cd5a20c61b3d8f69649504769743ac58dc4471af72b6c2621ebbc04e4be509cda81157b
7
+ data.tar.gz: ece0bbde957fc07d43c97c47a669cb1316981d92dbcee94f10338171dab885473cce20a82b749504acf2914819badc642e159762e4e53ca538679e4aac376dc0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -68,13 +68,18 @@ module Gosu
68
68
  end
69
69
  end
70
70
 
71
+ # These were useful for working with Direct3D and the Win32 API a long time ago,
72
+ # there was never a real reason to have them available in Ruby.
73
+ Gosu.deprecate Gosu::Color, :bgr, :none
74
+ Gosu.deprecate Gosu::Color, :abgr, :none
75
+
71
76
  # No need to pass a Window to Image.
72
77
  class Gosu::Image
73
- alias initialize_without_window initialize
78
+ alias_method :initialize_without_window, :initialize
74
79
 
75
80
  def initialize(*args)
76
81
  if args[0].is_a? Gosu::Window
77
- Gosu.deprecation_message("Passing a Window to Image#initialize has been deprecated in Gosu 0.9 and this method now uses an options hash, see https://www.libgosu.org/rdoc/Gosu/Image.html.")
82
+ Gosu.deprecation_message("Passing a Window to Image#initialize has been deprecated in Gosu 0.9 and this method now uses an options hash, see https://www.libgosu.org/rdoc/Gosu/Image.html ")
78
83
  if args.size == 7
79
84
  initialize_without_window args[1], :tileable => args[2], :rect => args[3..-1]
80
85
  else
@@ -86,15 +91,15 @@ class Gosu::Image
86
91
  end
87
92
 
88
93
  class << self
89
- alias from_text_without_window from_text
94
+ alias_method :from_text_without_window, :from_text
90
95
  end
91
96
 
92
97
  def self.from_text(*args)
93
98
  if args.size == 4
94
- Gosu.deprecation_message("Passing a Window to Image.from_text has been deprecated in Gosu 0.9 and this method now uses an options hash, see https://www.libgosu.org/rdoc/Gosu/Image.html.")
99
+ Gosu.deprecation_message("Passing a Window to Image.from_text has been deprecated in Gosu 0.9 and this method now uses an options hash, see https://www.libgosu.org/rdoc/Gosu/Image.html ")
95
100
  from_text_without_window(args[1], args[3], :font => args[2])
96
101
  elsif args.size == 7
97
- Gosu.deprecation_message("Passing a Window to Image.from_text has been deprecated in Gosu 0.9 and this method now uses an options hash, see https://www.libgosu.org/rdoc/Gosu/Image.html.")
102
+ Gosu.deprecation_message("Passing a Window to Image.from_text has been deprecated in Gosu 0.9 and this method now uses an options hash, see https://www.libgosu.org/rdoc/Gosu/Image.html ")
98
103
  from_text_without_window(args[1], args[3], :font => args[2],
99
104
  :spacing => args[4], :width => args[5], :align => args[6])
100
105
  else
@@ -105,7 +110,7 @@ end
105
110
 
106
111
  # No need to pass a Window to Sample.
107
112
  class Gosu::Sample
108
- alias initialize_without_window initialize
113
+ alias_method :initialize_without_window, :initialize
109
114
 
110
115
  def initialize(*args)
111
116
  if args.first.is_a? Gosu::Window
@@ -118,7 +123,7 @@ end
118
123
 
119
124
  # No need to pass a Window to Song.
120
125
  class Gosu::Song
121
- alias initialize_without_window initialize
126
+ alias_method :initialize_without_window, :initialize
122
127
 
123
128
  def initialize(*args)
124
129
  if args.first.is_a? Gosu::Window
@@ -28,6 +28,12 @@ class Gosu::Font
28
28
  end
29
29
 
30
30
  class Gosu::Image
31
+ BlobHelper = Struct.new(:columns, :rows, :to_blob)
32
+
33
+ def self.from_blob(width, height, rgba = "\0\0\0\0" * (width * height))
34
+ self.new(BlobHelper.new(width, height, rgba))
35
+ end
36
+
31
37
  # from_markup will stop parsing markup in Gosu 1.0.
32
38
  def self.from_markup(*args)
33
39
  self.from_text(*args)
@@ -54,7 +60,7 @@ module Gosu
54
60
  FUCHSIA = Gosu::ImmutableColor.new(0xff_ff00ff)
55
61
  CYAN = Gosu::ImmutableColor.new(0xff_00ffff)
56
62
 
57
- alias hash gl
63
+ alias_method :hash, :gl
58
64
  def eql?(other)
59
65
  gl == other.gl
60
66
  end
@@ -65,7 +71,7 @@ class Gosu::Window
65
71
  # Call Thread.pass every tick, which may or may not be necessary for friendly co-existence with
66
72
  # Ruby's Thread class.
67
73
 
68
- alias _tick tick
74
+ alias_method :_tick, :tick
69
75
 
70
76
  def tick
71
77
  Thread.pass
@@ -3,20 +3,21 @@
3
3
  # compatible, but I just call protected_update etc. in the Ruby wrapper so I can add this
4
4
  # custom debugging help:
5
5
  class Gosu::Window
6
- alias initialize_without_hash initialize
7
-
6
+ alias_method :initialize_without_hash, :initialize
7
+
8
8
  def initialize width, height, *args
9
9
  if args.empty? or args.first.is_a? Hash
10
10
  options = args.first || {}
11
11
  fullscreen = options[:fullscreen]
12
12
  update_interval = options[:update_interval]
13
+ resizable = options[:resizable]
13
14
  else
14
15
  fullscreen, update_interval = *args
15
16
  end
16
17
  $gosu_gl_blocks = nil
17
- initialize_without_hash width, height, !!fullscreen, update_interval || 16.666666
18
+ initialize_without_hash width, height, !!fullscreen, update_interval || 16.666666, !!resizable
18
19
  end
19
-
20
+
20
21
  %w(update draw needs_redraw? needs_cursor?
21
22
  lose_focus button_down button_up).each do |callback|
22
23
  define_method "protected_#{callback}" do |*args|
@@ -39,7 +40,7 @@ class Gosu::Window
39
40
  $gosu_gl_blocks = nil
40
41
  end
41
42
 
42
- alias show_internal show
43
+ alias_method :show_internal, :show
43
44
  def show
44
45
  show_internal
45
46
  # Try to format the message nicely, without any useless patching that we are
@@ -56,14 +57,24 @@ end
56
57
  module Gosu
57
58
  # Keep a reference to these blocks that is only cleared after Window#draw.
58
59
  # Otherwise, the GC might free these blocks while Gosu is still rendering.
59
- def self.gl(*args, &block)
60
+ def self.gl(z = nil, &block)
60
61
  $gosu_gl_blocks ||= []
61
62
  $gosu_gl_blocks << block
62
- unsafe_gl(*args, &block)
63
+ if z.nil?
64
+ unsafe_gl(&block)
65
+ else
66
+ unsafe_gl(z, &block)
67
+ end
63
68
  end
64
69
  end
65
70
 
66
- # SWIG will not let me rename my method to '[]=', so use alias here.
71
+ # SWIG somehow maps the instance method "argb" as an overload of the class
72
+ # method of the same name.
73
+ class Gosu::Color
74
+ alias_method :argb, :to_i
75
+ end
76
+
77
+ # SWIG will not let me rename my method to '[]=', so use alias_method here.
67
78
  class Gosu::Font
68
- alias []= set_image
79
+ alias_method :[]=, :set_image
69
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.3
4
+ version: 0.15.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Julian Raschke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-04 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  2D game development library.
@@ -24,6 +24,8 @@ files:
24
24
  - lib/2.3/gosu.so
25
25
  - lib/2.4/gosu.so
26
26
  - lib/2.5/gosu.so
27
+ - lib/2.6/gosu.so
28
+ - lib/2.7/gosu.so
27
29
  - lib/OpenAL32.dll
28
30
  - lib/SDL2.dll
29
31
  - lib/gosu.rb
@@ -54,8 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
56
  - !ruby/object:Gem::Version
55
57
  version: '0'
56
58
  requirements: []
57
- rubyforge_project:
58
- rubygems_version: 2.7.3
59
+ rubygems_version: 3.1.2
59
60
  signing_key:
60
61
  specification_version: 4
61
62
  summary: 2D game development library.