gosu 0.14.4 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/COPYING +1 -1
  4. data/Gosu/Buttons.hpp +1 -0
  5. data/Gosu/Channel.h +25 -0
  6. data/Gosu/Color.h +38 -0
  7. data/Gosu/Font.h +36 -0
  8. data/Gosu/Gosu.h +79 -0
  9. data/Gosu/Image.h +54 -0
  10. data/Gosu/Sample.h +19 -0
  11. data/Gosu/Song.h +24 -0
  12. data/Gosu/TextInput.h +30 -0
  13. data/Gosu/Version.hpp +2 -2
  14. data/Gosu/Window.h +61 -0
  15. data/Gosu/Window.hpp +3 -2
  16. data/README.md +1 -1
  17. data/ext/gosu/extconf.rb +3 -0
  18. data/lib/gosu/compat.rb +12 -7
  19. data/lib/gosu/patches.rb +8 -2
  20. data/lib/gosu/swig_patches.rb +20 -9
  21. data/rdoc/gosu.rb +28 -7
  22. data/src/ChannelWrapper.cpp +50 -0
  23. data/src/ColorWrapper.cpp +126 -0
  24. data/src/Constants.cpp +287 -0
  25. data/src/Font.cpp +1 -0
  26. data/src/FontWrapper.cpp +74 -0
  27. data/src/GosuWrapper.cpp +232 -0
  28. data/src/Graphics.cpp +4 -1
  29. data/src/GraphicsImpl.hpp +0 -1
  30. data/src/ImageWrapper.cpp +168 -0
  31. data/src/LargeImageData.cpp +1 -0
  32. data/src/MarkupParser.cpp +11 -3
  33. data/src/RubyGosu.cxx +186 -121
  34. data/src/RubyGosu.h +2 -2
  35. data/src/SampleWrapper.cpp +30 -0
  36. data/src/SongWrapper.cpp +52 -0
  37. data/src/TexChunk.cpp +29 -19
  38. data/src/Text.cpp +2 -0
  39. data/src/TextBuilder.cpp +3 -3
  40. data/src/TextInputWrapper.cpp +101 -0
  41. data/src/TrueTypeFont.cpp +1 -0
  42. data/src/Window.cpp +62 -28
  43. data/src/WindowUIKit.cpp +8 -4
  44. data/src/WindowWrapper.cpp +289 -0
  45. data/src/stb_image.h +153 -56
  46. data/src/stb_image_write.h +111 -60
  47. data/src/stb_truetype.h +74 -39
  48. data/src/stb_vorbis.c +55 -15
  49. data/src/utf8proc.c +47 -29
  50. data/src/utf8proc.h +46 -24
  51. data/src/utf8proc_data.h +10043 -9609
  52. metadata +23 -4
@@ -46,6 +46,9 @@ if `uname`.chomp == 'Darwin'
46
46
  $CXXFLAGS << " #{`sdl2-config --cflags`.chomp}"
47
47
  # Prefer statically linking SDL 2.
48
48
  $LDFLAGS << " #{`sdl2-config --static-libs`.chomp} -framework OpenGL -framework Metal -framework OpenAL"
49
+ # And yet another hack: `sdl2-config --static-libs` uses `-lSDL2` instead of linking to the static library,
50
+ # even if it exists. -> Manually replace it. (Ugh!)
51
+ $LDFLAGS.sub! " -lSDL2 ", " /usr/local/lib/libSDL2.a " if File.exist? "/usr/local/lib/libSDL2.a"
49
52
 
50
53
  # Disable building of 32-bit slices in Apple's Ruby.
51
54
  # (RbConfig::CONFIG['CXXFLAGS'] on 10.11: -arch x86_64 -arch i386 -g -Os -pipe)
@@ -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
@@ -1,4 +1,4 @@
1
- # Encoding: UTF-8
1
+ ## Encoding: UTF-8
2
2
 
3
3
  module Gosu
4
4
  ##
@@ -50,6 +50,7 @@ module Gosu
50
50
  KB_LEFT_SHIFT = :an_integer
51
51
  KB_MINUS = :an_integer
52
52
  KB_NUMPAD_0…KB_NUMPAD_9 = :an_integer
53
+ KB_NUMPAD_DELETE = :an_integer
53
54
  KB_NUMPAD_DIVIDE = :an_integer
54
55
  KB_NUMPAD_MINUS = :an_integer
55
56
  KB_NUMPAD_MULTIPLY = :an_integer
@@ -189,10 +190,19 @@ module Gosu
189
190
 
190
191
  # @!endgroup
191
192
 
192
- # Returns a 32-bit representation of the color suitable for use with OpenGL calls. This color is stored in a fixed order in memory and its integer value may vary depending on your system's byte order.
193
+ ##
194
+ # @return [Integer] a 32-bit representation of the color in 0xAARRGGBB format.
195
+ def argb; end
196
+
197
+ alias_method :to_i, :argb
198
+
199
+ # Returns a 32-bit representation of the color suitable for use with OpenGL calls. This color is stored in a fixed format in memory and its integer value may vary depending on your system's byte order.
193
200
  #
194
201
  # @return [Integer] a 32-bit OpenGL color.
195
202
  def gl; end
203
+
204
+ # Returns an OpenGL integer constant that identifies the RGBA color format that Gosu uses.
205
+ GL_FORMAT = :some_integer
196
206
 
197
207
  ##
198
208
  # @return [Color] a copy of the color.
@@ -347,6 +357,14 @@ module Gosu
347
357
  # @see https://github.com/gosu/gosu/wiki/Basic-Concepts#tileability Tileability explained in the Gosu Wiki
348
358
  def initialize(source, options = {}); end
349
359
 
360
+ ##
361
+ # Creates a new image with the given dimensions and RGBA pixel data.
362
+ #
363
+ # @param [Integer] width Width of the image in pixels.
364
+ # @param [Integer] height Height of the image in pixels.
365
+ # @param [String] rgba A string containing raw binary image data, with either one byte ('uint8') or four bytes ('float') per RGBA component.
366
+ def self.from_blob(width, height, rgba = "\0\0\0\0" * (width * height)); end
367
+
350
368
  ##
351
369
  # Creates a reusable image from one or more lines of text.
352
370
  #
@@ -471,7 +489,6 @@ module Gosu
471
489
  # @return [Gosu::GLTexInfo?] information about the underlying OpenGL texture.
472
490
  #
473
491
  # @see Gosu::GLTexInfo
474
- # @see file:examples/OpenGLIntegration.rb
475
492
  def gl_tex_info; end
476
493
 
477
494
  ##
@@ -764,6 +781,10 @@ module Gosu
764
781
  ##
765
782
  # Toggles between windowed mode and fullscreen.
766
783
  attr_writer :fullscreen
784
+
785
+ ##
786
+ # @return [true, false] whether this window is resizable.
787
+ def resizable?; end
767
788
 
768
789
  ##
769
790
  # @return [Float] the interval between calls to {#update}, in milliseconds.
@@ -772,8 +793,9 @@ module Gosu
772
793
  ##
773
794
  # Creates a new window with the requested size.
774
795
  #
775
- # @note The actual window may be smaller if the requested size is too large for the current display resolution; in that case, Gosu will automatically scale all coordinates to transparently emulate a larger window. No need to thank us.
776
- #
796
+ # Resizable fullscreen windows always use the full desktop resolution.
797
+ # Windows that are larger than the desktop resolution will be shrunk.
798
+ #
777
799
  # @overload initialize(width, height, options = {})
778
800
  # @overload initialize(width, height, fullscreen, update_interval = 16.666666)
779
801
  #
@@ -781,6 +803,7 @@ module Gosu
781
803
  # @param height [Integer] the desired window height.
782
804
  # @param [Hash] options
783
805
  # @option options [true, false] :fullscreen (false) whether to present the window in fullscreen mode.
806
+ # @option options [true, false] :resizable (false) whether the window can be resized by the user.
784
807
  # @option options [Float] :update_interval (16.666666) the interval between frames, in milliseconds.
785
808
  def initialize(width, height, options); end
786
809
 
@@ -889,7 +912,6 @@ module Gosu
889
912
  # Can be retrieved from some images to use them in OpenGL operations.
890
913
  #
891
914
  # @see Gosu::Image#gl_tex_info
892
- # @see file:examples/OpenGLIntegration.rb
893
915
  class GLTexInfo
894
916
  ##
895
917
  # @return [Integer] OpenGL texture id
@@ -1040,7 +1062,6 @@ module Gosu
1040
1062
  #
1041
1063
  # @see Window#draw
1042
1064
  # @see file:reference/Z-Ordering
1043
- # @see file:examples/OpenGLIntegration.rb
1044
1065
  def gl(z=nil); end
1045
1066
 
1046
1067
  ##
@@ -0,0 +1,50 @@
1
+ #include <Gosu/Audio.hpp>
2
+ #include <Gosu/Channel.h>
3
+
4
+ extern "C" {
5
+
6
+ Gosu_Channel *Gosu_Channel_create(Gosu_Channel *channel)
7
+ {
8
+ return channel;
9
+ }
10
+
11
+ bool Gosu_Channel_playing(Gosu_Channel *channel)
12
+ {
13
+ return reinterpret_cast<Gosu::Channel *>(channel)->playing();
14
+ }
15
+ void Gosu_Channel_pause(Gosu_Channel *channel)
16
+ {
17
+ reinterpret_cast<Gosu::Channel *>(channel)->pause();
18
+ }
19
+ bool Gosu_Channel_paused(Gosu_Channel *channel)
20
+ {
21
+ return reinterpret_cast<Gosu::Channel *>(channel)->paused();
22
+ }
23
+ void Gosu_Channel_resume(Gosu_Channel *channel)
24
+ {
25
+ reinterpret_cast<Gosu::Channel *>(channel)->resume();
26
+ }
27
+ void Gosu_Channel_stop(Gosu_Channel *channel)
28
+ {
29
+ reinterpret_cast<Gosu::Channel *>(channel)->stop();
30
+ }
31
+
32
+ void Gosu_Channel_set_volume(Gosu_Channel *channel, double volume)
33
+ {
34
+ reinterpret_cast<Gosu::Channel *>(channel)->set_volume(volume);
35
+ }
36
+ void Gosu_Channel_set_speed(Gosu_Channel *channel, double speed)
37
+ {
38
+ reinterpret_cast<Gosu::Channel *>(channel)->set_speed(speed);
39
+ }
40
+ void Gosu_Channel_set_pan(Gosu_Channel *channel, double pan)
41
+ {
42
+ reinterpret_cast<Gosu::Channel *>(channel)->set_pan(pan);
43
+ }
44
+
45
+ void Gosu_Channel_destroy(Gosu_Channel *channel)
46
+ {
47
+ delete (reinterpret_cast<Gosu::Channel *>(channel));
48
+ }
49
+
50
+ }
@@ -0,0 +1,126 @@
1
+ #include <Gosu/Color.hpp>
2
+ #include <Gosu/Color.h>
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ unsigned Gosu_Color_create(unsigned argb)
9
+ {
10
+ return Gosu::Color(argb).argb();
11
+ }
12
+ unsigned Gosu_Color_create_argb(Gosu_Color_Channel a, Gosu_Color_Channel r, Gosu_Color_Channel g, Gosu_Color_Channel b)
13
+ {
14
+ return Gosu::Color(a, r, g, b).argb();
15
+ }
16
+ unsigned Gosu_Color_create_from_hsv(double h, double s, double v)
17
+ {
18
+ return Gosu::Color::from_hsv(h, s, v).argb();
19
+ }
20
+ unsigned Gosu_Color_create_from_ahsv(Gosu_Color_Channel alpha, double h, double s, double v)
21
+ {
22
+ return Gosu::Color::from_ahsv(alpha, h, s, v).argb();
23
+ }
24
+
25
+ Gosu_Color_Channel Gosu_Color_alpha(unsigned color)
26
+ {
27
+ return Gosu::Color(color).alpha();
28
+ }
29
+ Gosu_Color_Channel Gosu_Color_red(unsigned color)
30
+ {
31
+ return Gosu::Color(color).red();
32
+ }
33
+ Gosu_Color_Channel Gosu_Color_green(unsigned color)
34
+ {
35
+ return Gosu::Color(color).green();
36
+ }
37
+ Gosu_Color_Channel Gosu_Color_blue(unsigned color)
38
+ {
39
+ return Gosu::Color(color).blue();
40
+ }
41
+
42
+ unsigned Gosu_Color_set_alpha(unsigned color, Gosu_Color_Channel value)
43
+ {
44
+ Gosu::Color gosu_color = Gosu::Color(color);
45
+ gosu_color.set_alpha(value);
46
+
47
+ return gosu_color.argb();
48
+ }
49
+ unsigned Gosu_Color_set_red(unsigned color, Gosu_Color_Channel value)
50
+ {
51
+ Gosu::Color gosu_color = Gosu::Color(color);
52
+ gosu_color.set_red(value);
53
+
54
+ return gosu_color.argb();
55
+ }
56
+ unsigned Gosu_Color_set_green(unsigned color, Gosu_Color_Channel value)
57
+ {
58
+ Gosu::Color gosu_color = Gosu::Color(color);
59
+ gosu_color.set_green(value);
60
+
61
+ return gosu_color.argb();
62
+ }
63
+ unsigned Gosu_Color_set_blue(unsigned color, Gosu_Color_Channel value)
64
+ {
65
+ Gosu::Color gosu_color = Gosu::Color(color);
66
+ gosu_color.set_blue(value);
67
+
68
+ return gosu_color.argb();
69
+ }
70
+
71
+ double Gosu_Color_hue(unsigned color)
72
+ {
73
+ return Gosu::Color(color).hue();
74
+ }
75
+ double Gosu_Color_saturation(unsigned color)
76
+ {
77
+ return Gosu::Color(color).saturation();
78
+ }
79
+ double Gosu_Color_value(unsigned color)
80
+ {
81
+ return Gosu::Color(color).value();
82
+ }
83
+
84
+ unsigned Gosu_Color_set_hue(unsigned color, double value)
85
+ {
86
+ Gosu::Color gosu_color = Gosu::Color(color);
87
+ gosu_color.set_hue(value);
88
+
89
+ return gosu_color.argb();
90
+ }
91
+ unsigned Gosu_Color_set_saturation(unsigned color, double value)
92
+ {
93
+ Gosu::Color gosu_color = Gosu::Color(color);
94
+ gosu_color.set_saturation(value);
95
+
96
+ return gosu_color.argb();
97
+ }
98
+ unsigned Gosu_Color_set_value(unsigned color, double value)
99
+ {
100
+ Gosu::Color gosu_color = Gosu::Color(color);
101
+ gosu_color.set_value(value);
102
+
103
+ return gosu_color.argb();
104
+ }
105
+
106
+ unsigned Gosu_Color_argb(unsigned color)
107
+ {
108
+ return Gosu::Color(color).argb();
109
+ }
110
+ unsigned Gosu_Color_bgr(unsigned color)
111
+ {
112
+ return Gosu::Color(color).bgr();
113
+ }
114
+ unsigned Gosu_Color_abgr(unsigned color)
115
+ {
116
+ return Gosu::Color(color).abgr();
117
+ }
118
+
119
+ unsigned Gosu_Color_gl(unsigned color)
120
+ {
121
+ return color;
122
+ }
123
+
124
+ #ifdef __cplusplus
125
+ }
126
+ #endif
@@ -0,0 +1,287 @@
1
+ #include <Gosu/Version.hpp>
2
+ #include <Gosu/Buttons.hpp>
3
+ #include <Gosu/GraphicsBase.hpp>
4
+
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ const char *Gosu_version()
10
+ {
11
+ return Gosu::VERSION.c_str();
12
+ }
13
+
14
+ const char *Gosu_licenses()
15
+ {
16
+ return Gosu::LICENSES.c_str();
17
+ }
18
+
19
+ unsigned Gosu_MAJOR_VERSION = GOSU_MAJOR_VERSION;
20
+ unsigned Gosu_MINOR_VERSION = GOSU_MINOR_VERSION;
21
+ unsigned Gosu_POINT_VERSION = GOSU_POINT_VERSION;
22
+
23
+ // Alpha/Blend Modes
24
+ unsigned Gosu_AM_DEFAULT = Gosu::AM_DEFAULT;
25
+ unsigned Gosu_AM_INTERPOLATE = Gosu::AM_INTERPOLATE;
26
+ unsigned Gosu_AM_ADD = Gosu::AM_ADD;
27
+ unsigned Gosu_AM_MULTIPLY = Gosu::AM_MULTIPLY;
28
+
29
+ // Font Flags
30
+ unsigned Gosu_FF_BOLD = Gosu::FF_BOLD;
31
+ unsigned Gosu_FF_ITALIC = Gosu::FF_ITALIC;
32
+ unsigned Gosu_FF_UNDERLINE = Gosu::FF_UNDERLINE;
33
+ unsigned Gosu_FF_COMBINATIONS = Gosu::FF_COMBINATIONS;
34
+
35
+ // Alignment
36
+ unsigned Gosu_AL_LEFT = Gosu::AL_LEFT;
37
+ unsigned Gosu_AL_RIGHT = Gosu::AL_RIGHT;
38
+ unsigned Gosu_AL_CENTER = Gosu::AL_CENTER;
39
+ unsigned Gosu_AL_JUSTIFY = Gosu::AL_JUSTIFY;
40
+
41
+ // Image Flags
42
+ unsigned Gosu_IF_SMOOTH = Gosu::IF_SMOOTH;
43
+ unsigned Gosu_IF_TILEABLE_LEFT = Gosu::IF_TILEABLE_LEFT;
44
+ unsigned Gosu_IF_TILEABLE_TOP = Gosu::IF_TILEABLE_TOP;
45
+ unsigned Gosu_IF_TILEABLE_RIGHT = Gosu::IF_TILEABLE_RIGHT;
46
+ unsigned Gosu_IF_TILEABLE_BOTTOM = Gosu::IF_TILEABLE_BOTTOM;
47
+ unsigned Gosu_IF_TILEABLE = Gosu::IF_TILEABLE;
48
+ unsigned Gosu_IF_RETRO = Gosu::IF_RETRO;
49
+
50
+ unsigned Gosu_KB_RANGE_BEGIN = Gosu::KB_RANGE_BEGIN;
51
+ unsigned Gosu_KB_ESCAPE = Gosu::KB_ESCAPE;
52
+ unsigned Gosu_KB_F1 = Gosu::KB_F1;
53
+ unsigned Gosu_KB_F2 = Gosu::KB_F2;
54
+ unsigned Gosu_KB_F3 = Gosu::KB_F3;
55
+ unsigned Gosu_KB_F4 = Gosu::KB_F4;
56
+ unsigned Gosu_KB_F5 = Gosu::KB_F5;
57
+ unsigned Gosu_KB_F6 = Gosu::KB_F6;
58
+ unsigned Gosu_KB_F7 = Gosu::KB_F7;
59
+ unsigned Gosu_KB_F8 = Gosu::KB_F8;
60
+ unsigned Gosu_KB_F9 = Gosu::KB_F9;
61
+ unsigned Gosu_KB_F10 = Gosu::KB_F10;
62
+ unsigned Gosu_KB_F11 = Gosu::KB_F11;
63
+ unsigned Gosu_KB_F12 = Gosu::KB_F12;
64
+ unsigned Gosu_KB_0 = Gosu::KB_0;
65
+ unsigned Gosu_KB_1 = Gosu::KB_1;
66
+ unsigned Gosu_KB_2 = Gosu::KB_2;
67
+ unsigned Gosu_KB_3 = Gosu::KB_3;
68
+ unsigned Gosu_KB_4 = Gosu::KB_4;
69
+ unsigned Gosu_KB_5 = Gosu::KB_5;
70
+ unsigned Gosu_KB_6 = Gosu::KB_6;
71
+ unsigned Gosu_KB_7 = Gosu::KB_7;
72
+ unsigned Gosu_KB_8 = Gosu::KB_8;
73
+ unsigned Gosu_KB_9 = Gosu::KB_9;
74
+ unsigned Gosu_KB_TAB = Gosu::KB_TAB;
75
+ unsigned Gosu_KB_RETURN = Gosu::KB_RETURN;
76
+ unsigned Gosu_KB_SPACE = Gosu::KB_SPACE;
77
+ unsigned Gosu_KB_LEFT_SHIFT = Gosu::KB_LEFT_SHIFT;
78
+ unsigned Gosu_KB_RIGHT_SHIFT = Gosu::KB_RIGHT_SHIFT;
79
+ unsigned Gosu_KB_LEFT_CONTROL = Gosu::KB_LEFT_CONTROL;
80
+ unsigned Gosu_KB_RIGHT_CONTROL = Gosu::KB_RIGHT_CONTROL;
81
+ unsigned Gosu_KB_LEFT_ALT = Gosu::KB_LEFT_ALT;
82
+ unsigned Gosu_KB_RIGHT_ALT = Gosu::KB_RIGHT_ALT;
83
+ unsigned Gosu_KB_LEFT_META = Gosu::KB_LEFT_META;
84
+ unsigned Gosu_KB_RIGHT_META = Gosu::KB_RIGHT_META;
85
+ unsigned Gosu_KB_BACKSPACE = Gosu::KB_BACKSPACE;
86
+ unsigned Gosu_KB_LEFT = Gosu::KB_LEFT;
87
+ unsigned Gosu_KB_RIGHT = Gosu::KB_RIGHT;
88
+ unsigned Gosu_KB_UP = Gosu::KB_UP;
89
+ unsigned Gosu_KB_DOWN = Gosu::KB_DOWN;
90
+ unsigned Gosu_KB_HOME = Gosu::KB_HOME;
91
+ unsigned Gosu_KB_END = Gosu::KB_END;
92
+ unsigned Gosu_KB_INSERT = Gosu::KB_INSERT;
93
+ unsigned Gosu_KB_DELETE = Gosu::KB_DELETE;
94
+ unsigned Gosu_KB_PAGE_UP = Gosu::KB_PAGE_UP;
95
+ unsigned Gosu_KB_PAGE_DOWN = Gosu::KB_PAGE_DOWN;
96
+ unsigned Gosu_KB_ENTER = Gosu::KB_ENTER;
97
+ unsigned Gosu_KB_BACKTICK = Gosu::KB_BACKTICK;
98
+ unsigned Gosu_KB_MINUS = Gosu::KB_MINUS;
99
+ unsigned Gosu_KB_EQUALS = Gosu::KB_EQUALS;
100
+ unsigned Gosu_KB_LEFT_BRACKET = Gosu::KB_LEFT_BRACKET;
101
+ unsigned Gosu_KB_RIGHT_BRACKET = Gosu::KB_RIGHT_BRACKET;
102
+ unsigned Gosu_KB_BACKSLASH = Gosu::KB_BACKSLASH;
103
+ unsigned Gosu_KB_SEMICOLON = Gosu::KB_SEMICOLON;
104
+ unsigned Gosu_KB_APOSTROPHE = Gosu::KB_APOSTROPHE;
105
+ unsigned Gosu_KB_COMMA = Gosu::KB_COMMA;
106
+ unsigned Gosu_KB_PERIOD = Gosu::KB_PERIOD;
107
+ unsigned Gosu_KB_SLASH = Gosu::KB_SLASH;
108
+ unsigned Gosu_KB_A = Gosu::KB_A;
109
+ unsigned Gosu_KB_B = Gosu::KB_B;
110
+ unsigned Gosu_KB_C = Gosu::KB_C;
111
+ unsigned Gosu_KB_D = Gosu::KB_D;
112
+ unsigned Gosu_KB_E = Gosu::KB_E;
113
+ unsigned Gosu_KB_F = Gosu::KB_F;
114
+ unsigned Gosu_KB_G = Gosu::KB_G;
115
+ unsigned Gosu_KB_H = Gosu::KB_H;
116
+ unsigned Gosu_KB_I = Gosu::KB_I;
117
+ unsigned Gosu_KB_J = Gosu::KB_J;
118
+ unsigned Gosu_KB_K = Gosu::KB_K;
119
+ unsigned Gosu_KB_L = Gosu::KB_L;
120
+ unsigned Gosu_KB_M = Gosu::KB_M;
121
+ unsigned Gosu_KB_N = Gosu::KB_N;
122
+ unsigned Gosu_KB_O = Gosu::KB_O;
123
+ unsigned Gosu_KB_P = Gosu::KB_P;
124
+ unsigned Gosu_KB_Q = Gosu::KB_Q;
125
+ unsigned Gosu_KB_R = Gosu::KB_R;
126
+ unsigned Gosu_KB_S = Gosu::KB_S;
127
+ unsigned Gosu_KB_T = Gosu::KB_T;
128
+ unsigned Gosu_KB_U = Gosu::KB_U;
129
+ unsigned Gosu_KB_V = Gosu::KB_V;
130
+ unsigned Gosu_KB_W = Gosu::KB_W;
131
+ unsigned Gosu_KB_X = Gosu::KB_X;
132
+ unsigned Gosu_KB_Y = Gosu::KB_Y;
133
+ unsigned Gosu_KB_Z = Gosu::KB_Z;
134
+ unsigned Gosu_KB_ISO = Gosu::KB_ISO;
135
+ unsigned Gosu_KB_NUMPAD_0 = Gosu::KB_NUMPAD_0;
136
+ unsigned Gosu_KB_NUMPAD_1 = Gosu::KB_NUMPAD_1;
137
+ unsigned Gosu_KB_NUMPAD_2 = Gosu::KB_NUMPAD_2;
138
+ unsigned Gosu_KB_NUMPAD_3 = Gosu::KB_NUMPAD_3;
139
+ unsigned Gosu_KB_NUMPAD_4 = Gosu::KB_NUMPAD_4;
140
+ unsigned Gosu_KB_NUMPAD_5 = Gosu::KB_NUMPAD_5;
141
+ unsigned Gosu_KB_NUMPAD_6 = Gosu::KB_NUMPAD_6;
142
+ unsigned Gosu_KB_NUMPAD_7 = Gosu::KB_NUMPAD_7;
143
+ unsigned Gosu_KB_NUMPAD_8 = Gosu::KB_NUMPAD_8;
144
+ unsigned Gosu_KB_NUMPAD_9 = Gosu::KB_NUMPAD_9;
145
+ unsigned Gosu_KB_NUMPAD_DELETE = Gosu::KB_NUMPAD_DELETE;
146
+ unsigned Gosu_KB_NUMPAD_PLUS = Gosu::KB_NUMPAD_PLUS;
147
+ unsigned Gosu_KB_NUMPAD_MINUS = Gosu::KB_NUMPAD_MINUS;
148
+ unsigned Gosu_KB_NUMPAD_MULTIPLY = Gosu::KB_NUMPAD_MULTIPLY;
149
+ unsigned Gosu_KB_NUMPAD_DIVIDE = Gosu::KB_NUMPAD_DIVIDE;
150
+ unsigned Gosu_KB_RANGE_END = Gosu::KB_RANGE_END;
151
+
152
+ unsigned Gosu_MS_RANGE_BEGIN = Gosu::MS_RANGE_BEGIN;
153
+ unsigned Gosu_MS_LEFT = Gosu::MS_LEFT;
154
+ unsigned Gosu_MS_MIDDLE = Gosu::MS_MIDDLE;
155
+ unsigned Gosu_MS_RIGHT = Gosu::MS_RIGHT;
156
+ unsigned Gosu_MS_WHEEL_UP = Gosu::MS_WHEEL_UP;
157
+ unsigned Gosu_MS_WHEEL_DOWN = Gosu::MS_WHEEL_DOWN;
158
+ unsigned Gosu_MS_OTHER_0 = Gosu::MS_OTHER_0;
159
+ unsigned Gosu_MS_OTHER_1 = Gosu::MS_OTHER_1;
160
+ unsigned Gosu_MS_OTHER_2 = Gosu::MS_OTHER_2;
161
+ unsigned Gosu_MS_OTHER_3 = Gosu::MS_OTHER_3;
162
+ unsigned Gosu_MS_OTHER_4 = Gosu::MS_OTHER_4;
163
+ unsigned Gosu_MS_OTHER_5 = Gosu::MS_OTHER_5;
164
+ unsigned Gosu_MS_OTHER_6 = Gosu::MS_OTHER_6;
165
+ unsigned Gosu_MS_OTHER_7 = Gosu::MS_OTHER_7;
166
+ unsigned Gosu_MS_RANGE_END = Gosu::MS_RANGE_END;
167
+
168
+ unsigned Gosu_GP_RANGE_BEGIN = Gosu::GP_RANGE_BEGIN;
169
+ unsigned Gosu_GP_LEFT = Gosu::GP_LEFT;
170
+ unsigned Gosu_GP_RIGHT = Gosu::GP_RIGHT;
171
+ unsigned Gosu_GP_UP = Gosu::GP_UP;
172
+ unsigned Gosu_GP_DOWN = Gosu::GP_DOWN;
173
+ unsigned Gosu_GP_BUTTON_0 = Gosu::GP_BUTTON_0;
174
+ unsigned Gosu_GP_BUTTON_1 = Gosu::GP_BUTTON_1;
175
+ unsigned Gosu_GP_BUTTON_2 = Gosu::GP_BUTTON_2;
176
+ unsigned Gosu_GP_BUTTON_3 = Gosu::GP_BUTTON_3;
177
+ unsigned Gosu_GP_BUTTON_4 = Gosu::GP_BUTTON_4;
178
+ unsigned Gosu_GP_BUTTON_5 = Gosu::GP_BUTTON_5;
179
+ unsigned Gosu_GP_BUTTON_6 = Gosu::GP_BUTTON_6;
180
+ unsigned Gosu_GP_BUTTON_7 = Gosu::GP_BUTTON_7;
181
+ unsigned Gosu_GP_BUTTON_8 = Gosu::GP_BUTTON_8;
182
+ unsigned Gosu_GP_BUTTON_9 = Gosu::GP_BUTTON_9;
183
+ unsigned Gosu_GP_BUTTON_10 = Gosu::GP_BUTTON_10;
184
+ unsigned Gosu_GP_BUTTON_11 = Gosu::GP_BUTTON_11;
185
+ unsigned Gosu_GP_BUTTON_12 = Gosu::GP_BUTTON_12;
186
+ unsigned Gosu_GP_BUTTON_13 = Gosu::GP_BUTTON_13;
187
+ unsigned Gosu_GP_BUTTON_14 = Gosu::GP_BUTTON_14;
188
+ unsigned Gosu_GP_BUTTON_15 = Gosu::GP_BUTTON_15;
189
+
190
+ unsigned Gosu_GP_0_LEFT = Gosu::GP_0_LEFT;
191
+ unsigned Gosu_GP_0_RIGHT = Gosu::GP_0_RIGHT;
192
+ unsigned Gosu_GP_0_UP = Gosu::GP_0_UP;
193
+ unsigned Gosu_GP_0_DOWN = Gosu::GP_0_DOWN;
194
+ unsigned Gosu_GP_0_BUTTON_0 = Gosu::GP_0_BUTTON_0;
195
+ unsigned Gosu_GP_0_BUTTON_1 = Gosu::GP_0_BUTTON_1;
196
+ unsigned Gosu_GP_0_BUTTON_2 = Gosu::GP_0_BUTTON_2;
197
+ unsigned Gosu_GP_0_BUTTON_3 = Gosu::GP_0_BUTTON_3;
198
+ unsigned Gosu_GP_0_BUTTON_4 = Gosu::GP_0_BUTTON_4;
199
+ unsigned Gosu_GP_0_BUTTON_5 = Gosu::GP_0_BUTTON_5;
200
+ unsigned Gosu_GP_0_BUTTON_6 = Gosu::GP_0_BUTTON_6;
201
+ unsigned Gosu_GP_0_BUTTON_7 = Gosu::GP_0_BUTTON_7;
202
+ unsigned Gosu_GP_0_BUTTON_8 = Gosu::GP_0_BUTTON_8;
203
+ unsigned Gosu_GP_0_BUTTON_9 = Gosu::GP_0_BUTTON_9;
204
+ unsigned Gosu_GP_0_BUTTON_10 = Gosu::GP_0_BUTTON_10;
205
+ unsigned Gosu_GP_0_BUTTON_11 = Gosu::GP_0_BUTTON_11;
206
+ unsigned Gosu_GP_0_BUTTON_12 = Gosu::GP_0_BUTTON_12;
207
+ unsigned Gosu_GP_0_BUTTON_13 = Gosu::GP_0_BUTTON_13;
208
+ unsigned Gosu_GP_0_BUTTON_14 = Gosu::GP_0_BUTTON_14;
209
+ unsigned Gosu_GP_0_BUTTON_15 = Gosu::GP_0_BUTTON_15;
210
+
211
+ unsigned Gosu_GP_1_LEFT = Gosu::GP_1_LEFT;
212
+ unsigned Gosu_GP_1_RIGHT = Gosu::GP_1_RIGHT;
213
+ unsigned Gosu_GP_1_UP = Gosu::GP_1_UP;
214
+ unsigned Gosu_GP_1_DOWN = Gosu::GP_1_DOWN;
215
+ unsigned Gosu_GP_1_BUTTON_0 = Gosu::GP_1_BUTTON_0;
216
+ unsigned Gosu_GP_1_BUTTON_1 = Gosu::GP_1_BUTTON_1;
217
+ unsigned Gosu_GP_1_BUTTON_2 = Gosu::GP_1_BUTTON_2;
218
+ unsigned Gosu_GP_1_BUTTON_3 = Gosu::GP_1_BUTTON_3;
219
+ unsigned Gosu_GP_1_BUTTON_4 = Gosu::GP_1_BUTTON_4;
220
+ unsigned Gosu_GP_1_BUTTON_5 = Gosu::GP_1_BUTTON_5;
221
+ unsigned Gosu_GP_1_BUTTON_6 = Gosu::GP_1_BUTTON_6;
222
+ unsigned Gosu_GP_1_BUTTON_7 = Gosu::GP_1_BUTTON_7;
223
+ unsigned Gosu_GP_1_BUTTON_8 = Gosu::GP_1_BUTTON_8;
224
+ unsigned Gosu_GP_1_BUTTON_9 = Gosu::GP_1_BUTTON_9;
225
+ unsigned Gosu_GP_1_BUTTON_10 = Gosu::GP_1_BUTTON_10;
226
+ unsigned Gosu_GP_1_BUTTON_11 = Gosu::GP_1_BUTTON_11;
227
+ unsigned Gosu_GP_1_BUTTON_12 = Gosu::GP_1_BUTTON_12;
228
+ unsigned Gosu_GP_1_BUTTON_13 = Gosu::GP_1_BUTTON_13;
229
+ unsigned Gosu_GP_1_BUTTON_14 = Gosu::GP_1_BUTTON_14;
230
+ unsigned Gosu_GP_1_BUTTON_15 = Gosu::GP_1_BUTTON_15;
231
+
232
+ unsigned Gosu_GP_2_LEFT = Gosu::GP_2_LEFT;
233
+ unsigned Gosu_GP_2_RIGHT = Gosu::GP_2_RIGHT;
234
+ unsigned Gosu_GP_2_UP = Gosu::GP_2_UP;
235
+ unsigned Gosu_GP_2_DOWN = Gosu::GP_2_DOWN;
236
+ unsigned Gosu_GP_2_BUTTON_0 = Gosu::GP_2_BUTTON_0;
237
+ unsigned Gosu_GP_2_BUTTON_1 = Gosu::GP_2_BUTTON_1;
238
+ unsigned Gosu_GP_2_BUTTON_2 = Gosu::GP_2_BUTTON_2;
239
+ unsigned Gosu_GP_2_BUTTON_3 = Gosu::GP_2_BUTTON_3;
240
+ unsigned Gosu_GP_2_BUTTON_4 = Gosu::GP_2_BUTTON_4;
241
+ unsigned Gosu_GP_2_BUTTON_5 = Gosu::GP_2_BUTTON_5;
242
+ unsigned Gosu_GP_2_BUTTON_6 = Gosu::GP_2_BUTTON_6;
243
+ unsigned Gosu_GP_2_BUTTON_7 = Gosu::GP_2_BUTTON_7;
244
+ unsigned Gosu_GP_2_BUTTON_8 = Gosu::GP_2_BUTTON_8;
245
+ unsigned Gosu_GP_2_BUTTON_9 = Gosu::GP_2_BUTTON_9;
246
+ unsigned Gosu_GP_2_BUTTON_10 = Gosu::GP_2_BUTTON_10;
247
+ unsigned Gosu_GP_2_BUTTON_11 = Gosu::GP_2_BUTTON_11;
248
+ unsigned Gosu_GP_2_BUTTON_12 = Gosu::GP_2_BUTTON_12;
249
+ unsigned Gosu_GP_2_BUTTON_13 = Gosu::GP_2_BUTTON_13;
250
+ unsigned Gosu_GP_2_BUTTON_14 = Gosu::GP_2_BUTTON_14;
251
+ unsigned Gosu_GP_2_BUTTON_15 = Gosu::GP_2_BUTTON_15;
252
+
253
+ unsigned Gosu_GP_3_LEFT = Gosu::GP_3_LEFT;
254
+ unsigned Gosu_GP_3_RIGHT = Gosu::GP_3_RIGHT;
255
+ unsigned Gosu_GP_3_UP = Gosu::GP_3_UP;
256
+ unsigned Gosu_GP_3_DOWN = Gosu::GP_3_DOWN;
257
+ unsigned Gosu_GP_3_BUTTON_0 = Gosu::GP_3_BUTTON_0;
258
+ unsigned Gosu_GP_3_BUTTON_1 = Gosu::GP_3_BUTTON_1;
259
+ unsigned Gosu_GP_3_BUTTON_2 = Gosu::GP_3_BUTTON_2;
260
+ unsigned Gosu_GP_3_BUTTON_3 = Gosu::GP_3_BUTTON_3;
261
+ unsigned Gosu_GP_3_BUTTON_4 = Gosu::GP_3_BUTTON_4;
262
+ unsigned Gosu_GP_3_BUTTON_5 = Gosu::GP_3_BUTTON_5;
263
+ unsigned Gosu_GP_3_BUTTON_6 = Gosu::GP_3_BUTTON_6;
264
+ unsigned Gosu_GP_3_BUTTON_7 = Gosu::GP_3_BUTTON_7;
265
+ unsigned Gosu_GP_3_BUTTON_8 = Gosu::GP_3_BUTTON_8;
266
+ unsigned Gosu_GP_3_BUTTON_9 = Gosu::GP_3_BUTTON_9;
267
+ unsigned Gosu_GP_3_BUTTON_10 = Gosu::GP_3_BUTTON_10;
268
+ unsigned Gosu_GP_3_BUTTON_11 = Gosu::GP_3_BUTTON_11;
269
+ unsigned Gosu_GP_3_BUTTON_12 = Gosu::GP_3_BUTTON_12;
270
+ unsigned Gosu_GP_3_BUTTON_13 = Gosu::GP_3_BUTTON_13;
271
+ unsigned Gosu_GP_3_BUTTON_14 = Gosu::GP_3_BUTTON_14;
272
+ unsigned Gosu_GP_3_BUTTON_15 = Gosu::GP_3_BUTTON_15;
273
+
274
+ unsigned Gosu_GP_RANGE_END = Gosu::GP_RANGE_END;
275
+
276
+ unsigned Gosu_NUM_BUTTONS = Gosu::NUM_BUTTONS;
277
+ unsigned Gosu_NUM_GAMEPADS = Gosu::NUM_GAMEPADS;
278
+ unsigned Gosu_NO_BUTTON = Gosu::NO_BUTTON;
279
+
280
+ unsigned Gosu_KB_NUM = Gosu::KB_NUM;
281
+ unsigned Gosu_MS_NUM = Gosu::MS_NUM;
282
+ unsigned Gosu_GP_NUM = Gosu::GP_NUM;
283
+ unsigned Gosu_GP_NUM_PER_GAMEPAD = Gosu::GP_NUM_PER_GAMEPAD;
284
+
285
+ #ifdef __cplusplus
286
+ }
287
+ #endif