gosu 0.10.8-x64-mingw32 → 0.11.0-x64-mingw32

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 038ebab55fe3377b32101c4b5a73d974979c904c
4
- data.tar.gz: 5bbae144668316bc3ada533d51f2c1b99b8f5c72
3
+ metadata.gz: 1d7d9494266b33edbefad4e921031493bb1a892d
4
+ data.tar.gz: 364ad066a23d879d5c2f58fa6b42685c0faad10a
5
5
  SHA512:
6
- metadata.gz: 9fa433548ee52a43b3b8f00335c06cad7716567bef05710cb3572be065dd03f9c7ec847b994db28b8bc5709e2306cd0323d86bed093ec0ae40e1be99cdfbc6cc
7
- data.tar.gz: a39a066d3b515bcc5ba1d13174af420ec1903c8156f762ab7055eb667339b5084b34c062498762bdaf824266e92a1410dcd42b0b1c1a55b480421404b8bde932
6
+ metadata.gz: 77d674bd2833d8280b71c10f7cf22612ac5bb7b1126cf19da2447c80e79c7a4763010f7ce7f147c640a07b3d47b265888f397d627e5a2c9ff0404df3d8857296
7
+ data.tar.gz: 14418af72c8f8af1d86864f84afe10f35143fefe9976d2616e5ba0701a2fac615091dfbb4c34076541ff5ffbbe322ec8f1bec8d22189832f4749b2f6bfa5a5c5
@@ -4,31 +4,43 @@ class ::Numeric
4
4
  def degrees_to_radians
5
5
  self * Math::PI / 180.0
6
6
  end
7
-
7
+
8
8
  def radians_to_degrees
9
9
  self * 180.0 / Math::PI
10
10
  end
11
-
11
+
12
12
  def gosu_to_radians
13
13
  (self - 90) * Math::PI / 180.0
14
14
  end
15
-
15
+
16
16
  def radians_to_gosu
17
17
  self * 180.0 / Math::PI + 90
18
18
  end
19
19
  end
20
20
 
21
21
  # Backwards compatibility:
22
- # Import constants into Gosu::Button.
23
- module Gosu::Button
24
- Gosu.constants.each { |c| const_set(c, Gosu.const_get(c)) }
22
+ # Support for KbLeft instead of KB_LEFT and Gp3Button2 instead of GP_3_BUTTON_2.
23
+ # Also import old-style constants into Gosu::Button.
24
+ module Gosu::Button; end
25
+ Gosu.constants.grep(/^KB_|MS_|GP_/).each do |c|
26
+ old_name = case c
27
+ when :KB_ISO then "KbISO"
28
+ when :KB_NUMPAD_PLUS then "KbNumpadAdd"
29
+ when :KB_NUMPAD_MINUS then "KbNumpadSubtract"
30
+ when :KB_EQUALS then "KbEqual"
31
+ when :KB_LEFT_BRACKET then "KbBracketLeft"
32
+ when :KB_RIGHT_BRACKET then "KbBracketRight"
33
+ else c.to_s.capitalize.gsub(/_(.)/) { $1.upcase }
34
+ end
35
+ Gosu.const_set old_name, Gosu.const_get(c)
36
+ Gosu::Button.const_set old_name, Gosu.const_get(c)
25
37
  end
26
38
 
27
39
  # Backwards compatibility:
28
40
  # Passing a Window to initialize and from_text has been deprecated in Gosu 0.9.
29
41
  class Gosu::Image
30
42
  alias initialize_without_window initialize
31
-
43
+
32
44
  def initialize(*args)
33
45
  if args[0].is_a? Gosu::Window then
34
46
  if args.size == 7 then
@@ -40,11 +52,11 @@ class Gosu::Image
40
52
  initialize_without_window(*args)
41
53
  end
42
54
  end
43
-
55
+
44
56
  class << self
45
57
  alias from_text_without_window from_text
46
58
  end
47
-
59
+
48
60
  def self.from_text(*args)
49
61
  if args.size == 4
50
62
  from_text_without_window(args[1], args[3], :font => args[2])
@@ -61,7 +73,7 @@ end
61
73
  # Passing a Window to Sample#initialize has been deprecated in Gosu 0.7.17.
62
74
  class Gosu::Sample
63
75
  alias initialize_without_window initialize
64
-
76
+
65
77
  def initialize(*args)
66
78
  args.shift if args.first.is_a? Gosu::Window
67
79
  initialize_without_window(*args)
@@ -72,7 +84,7 @@ end
72
84
  # Passing a Window to Song#initialize has been deprecated in Gosu 0.7.17.
73
85
  class Gosu::Song
74
86
  alias initialize_without_window initialize
75
-
87
+
76
88
  def initialize(*args)
77
89
  args.shift if args.first.is_a? Gosu::Window
78
90
  initialize_without_window(*args)
@@ -85,7 +97,7 @@ module Gosu
85
97
  class ImmutableColor < Color
86
98
  private :alpha=, :red=, :green=, :blue=, :hue=, :saturation=, :value=
87
99
  end
88
-
100
+
89
101
  class Color
90
102
  NONE = Gosu::ImmutableColor.new(0x00_000000)
91
103
  BLACK = Gosu::ImmutableColor.new(0xff_000000)
@@ -109,18 +121,18 @@ end
109
121
  class Gosu::Window
110
122
  # Backwards compatibility:
111
123
  # Class methods that have been turned into module methods.
112
-
124
+
113
125
  def self.button_id_to_char(id)
114
126
  Gosu.button_id_to_char(id)
115
127
  end
116
-
128
+
117
129
  def self.char_to_button_id(ch)
118
130
  Gosu.char_to_button_id(ch)
119
131
  end
120
-
132
+
121
133
  # Backwards compatibility:
122
134
  # Instance methods that have been turned into module methods.
123
-
135
+
124
136
  %w(draw_line draw_triangle draw_quad
125
137
  flush gl clip_to record
126
138
  transform translate rotate scale
@@ -129,18 +141,22 @@ class Gosu::Window
129
141
  Gosu.send method, *args, &block
130
142
  end
131
143
  end
132
-
144
+
133
145
  # Call Thread.pass every tick, which may or may not be necessary for friendly co-existence with
134
146
  # Ruby's Thread class.
135
-
147
+
136
148
  alias _tick tick
137
-
149
+
138
150
  def tick
139
151
  Thread.pass
140
152
  _tick
141
153
  end
142
154
  end
143
155
 
156
+ # Backwards compatibility:
157
+ # This was renamed, because it's not actually a "copyright notice" (Wikipedia: https://en.wikipedia.org/wiki/Copyright_notice).
158
+ Gosu::GOSU_COPYRIGHT_NOTICE = Gosu::LICENSES
159
+
144
160
  # Release OpenAL resources during Ruby's shutdown, not Gosu's.
145
161
  at_exit do
146
162
  Gosu::Song.current_song.stop if Gosu::Song.current_song
@@ -1,11 +1,20 @@
1
- # Replace the load path
1
+ # This script is used by Ruby.app: https://github.com/gosu/ruby_app
2
+
3
+ # Replace the load path.
2
4
  $LOAD_PATH.clear
3
5
  $LOAD_PATH << File.dirname(__FILE__)[0..-6]
4
6
  $LOAD_PATH << $LOAD_PATH[0] + '/lib'
5
- # Ruby portions of Gosu
7
+
8
+ # Ruby portions of Gosu.
6
9
  require 'gosu/patches'
7
10
  require 'gosu/swig_patches'
11
+
8
12
  # Let the application know it is being run from the Mac app wrapper.
9
13
  OSX_EXECUTABLE = true
10
- # Main application
11
- require 'Main'
14
+
15
+ # Main application.
16
+ begin
17
+ require 'Main'
18
+ rescue LoadError
19
+ require 'main'
20
+ end
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.10.8
4
+ version: 0.11.0
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: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  2D game development library.
@@ -42,17 +42,17 @@ require_paths:
42
42
  - lib
43
43
  required_ruby_version: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.1.0
48
48
  required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - ">="
50
+ - - '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
54
  rubyforge_project:
55
- rubygems_version: 2.6.3
55
+ rubygems_version: 2.6.6
56
56
  signing_key:
57
57
  specification_version: 4
58
58
  summary: 2D game development library.