gosu 0.14.3-x64-mingw32 → 0.15.2-x64-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: 47796883b8dacb435bcbbd35006bbf32d0bfa5217d92d7f818e05c9f599b8478
4
- data.tar.gz: 7b841e8913a4dce9ed4603b1201c1b0415b73ee1e3cfa21a56a33e1686e3ab9b
3
+ metadata.gz: 472647049ecb5b5b00277edaddc9c90f5cdcbc94b33edbf0eb66ebd4da8b8f78
4
+ data.tar.gz: 9644c9214489a4ef029189b01a9fb5acf68bf0f7351e89fe94945d2a660e0023
5
5
  SHA512:
6
- metadata.gz: 9ea2f55a3367a003546da74ae45a01236a639c8ac13cef864294d071e0fcf319e4cd53feb8fe08cd0d0005a540ea24ab85f021c817fe8c4566c89236ac4ff80d
7
- data.tar.gz: 13bcc68378a91a6197d8fb367695d746668002fc76f90ce6802e4057c6a1e403ec9f5d727d7f76e5406e6e8900e17310df7d037ca8fb5bc188be4d9b099a2113
6
+ metadata.gz: 6775ed1873f333fbd217e64a9632d18d577ee7317e024e2c681bec41e2e56a5870c075f2d7be9ff10c0a50446ffc0a7f9964c1981ae8b5a784e37b2de33e70bd
7
+ data.tar.gz: 5578ca174a5796bff680f312697912fa1a8c29b35dc2c923cf3c91b9a30166387e4dabe9290ac4da5033f4de37d748b60789520ac3fb0c73dc30d6e0ba6282db
@@ -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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
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: x64-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.
@@ -31,6 +31,8 @@ files:
31
31
  - lib64/2.3/gosu.so
32
32
  - lib64/2.4/gosu.so
33
33
  - lib64/2.5/gosu.so
34
+ - lib64/2.6/gosu.so
35
+ - lib64/2.7/gosu.so
34
36
  - lib64/OpenAL32.dll
35
37
  - lib64/SDL2.dll
36
38
  - lib64/libmpg123.dll
@@ -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.