gosu 0.14.5-x86-mingw32 → 0.15.0-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: 846e786dae20abc1d22647c90892dde876942f9b241db5fbc9260d7ae2bebbb3
4
- data.tar.gz: e17444b29bb88b09065ffb85b73f2f37d0e97e336154b71d8ada25a133ef30a5
3
+ metadata.gz: 2434cac72e63c139ef2a8f70ceab296212fc1b70e1dc883341b18f8a742b5382
4
+ data.tar.gz: c5651e9fc146459f757be56ab0cc0ad61d2e9ee512cac859c2194ba15c63f634
5
5
  SHA512:
6
- metadata.gz: 5bd60f3a47c25a3a163239e1d1d0be719a5c0f0b33fb20364bc55ab23ef5bc228e43ea36384ac75cb6edaac30441d803424d11085435645c3e5712b39f9c777d
7
- data.tar.gz: beb07932cfe3179d432847273356bbe0602d97abf8ee4abe13e2e00b5745aea640b088bc9cec179807fef320ea815e95ace3ee1c7b1275911176dad1aefcf8d8
6
+ metadata.gz: f4d150c23b1b279c5cf00698e794d412038fc2b1d886b2d88aaa026a1027b65bcce1d0eec94bb7c2fdf1133172d2f428160e0d3ef24194ffc380e48abb84f918
7
+ data.tar.gz: 628489600b3cf2fd296bb7d00b18688d71bfe299bd6935aaf1f224f1ffbd5b54384d46c0577f3020812b949d79cb6e3038c15ffcc2489e05b3c5fb01311934fe
data/lib/2.3/gosu.so CHANGED
Binary file
data/lib/2.4/gosu.so CHANGED
Binary file
data/lib/2.5/gosu.so CHANGED
Binary file
data/lib/2.6/gosu.so CHANGED
Binary file
data/lib/gosu/compat.rb CHANGED
@@ -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
data/lib/gosu/patches.rb CHANGED
@@ -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.5
4
+ version: 0.15.0
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: 2019-01-08 00:00:00.000000000 Z
11
+ date: 2020-01-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  2D game development library.