gosu 0.7.35-i386-mingw32 → 0.7.36-i386-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/Gosu/Image.hpp CHANGED
@@ -19,16 +19,16 @@ namespace Gosu
19
19
  public:
20
20
  //! Loads an image from a given filename that can be drawn onto
21
21
  //! graphics.
22
- //! This constructor can handle PNG and BMP images. A color key of #ff00ff is
23
- //! automatically applied to BMP type images. For more flexibility, use the
24
- //! corresponding constructor that uses a Bitmap object.
22
+ //! This constructor can handle PNG and BMP images. A color key of #ff00ff is
23
+ //! automatically applied to BMP type images. For more flexibility, use the
24
+ //! corresponding constructor that uses a Bitmap object.
25
25
  Image(Graphics& graphics, const std::wstring& filename,
26
26
  bool tileable = false);
27
27
  //! Loads a portion of the the image at the given filename that can be
28
28
  //! drawn onto graphics.
29
- //! This constructor can handle PNG and BMP images. A color key of #ff00ff is
30
- //! automatically applied to BMP type images. For more flexibility, use the
31
- //! corresponding constructor that uses a Bitmap object.
29
+ //! This constructor can handle PNG and BMP images. A color key of #ff00ff is
30
+ //! automatically applied to BMP type images. For more flexibility, use the
31
+ //! corresponding constructor that uses a Bitmap object.
32
32
  Image(Graphics& graphics, const std::wstring& filename, unsigned srcX,
33
33
  unsigned srcY, unsigned srcWidth, unsigned srcHeight,
34
34
  bool tileable = false);
@@ -80,8 +80,8 @@ namespace Gosu
80
80
  ImageData& getData() const;
81
81
  };
82
82
 
83
- //! Convenience function that splits a BMP or PNG file into an array
84
- //! of small rectangles and creates images from them.
83
+ //! Convenience function that splits a BMP or PNG file into an array
84
+ //! of small rectangles and creates images from them.
85
85
  //! \param tileWidth If positive, specifies the width of one tile in
86
86
  //! pixels. If negative, the bitmap is divided into -tileWidth rows.
87
87
  //! \param tileHeight See tileWidth.
data/Gosu/Input.hpp CHANGED
@@ -33,42 +33,42 @@
33
33
 
34
34
  namespace Gosu
35
35
  {
36
- //! Very lightweight class that identifies a button (keyboard, mouse or other device).
37
- class Button
38
- {
39
- unsigned id_;
40
-
41
- public:
42
- //! For internal use.
43
- explicit Button(unsigned id) : id_(id) {}
44
- //! For internal use.
45
- unsigned id() const { return id_; }
36
+ //! Very lightweight class that identifies a button (keyboard, mouse or other device).
37
+ class Button
38
+ {
39
+ unsigned id_;
40
+
41
+ public:
42
+ //! For internal use.
43
+ explicit Button(unsigned id) : id_(id) {}
44
+ //! For internal use.
45
+ unsigned id() const { return id_; }
46
46
 
47
- //! Default constructor; == noButton.
48
- Button() : id_(noButton) {}
47
+ //! Default constructor; == noButton.
48
+ Button() : id_(noButton) {}
49
49
 
50
- //! Conversion from ButtonName constants.
51
- Button(ButtonName name) : id_(name) {}
52
- };
50
+ //! Conversion from ButtonName constants.
51
+ Button(ButtonName name) : id_(name) {}
52
+ };
53
53
 
54
- //! Tests whether two Buttons identify the same physical button.
55
- inline bool operator==(Button lhs, Button rhs)
56
- {
57
- return lhs.id() == rhs.id();
58
- }
59
- inline bool operator!=(Button lhs, Button rhs)
60
- {
61
- return !(lhs == rhs);
62
- }
54
+ //! Tests whether two Buttons identify the same physical button.
55
+ inline bool operator==(Button lhs, Button rhs)
56
+ {
57
+ return lhs.id() == rhs.id();
58
+ }
59
+ inline bool operator!=(Button lhs, Button rhs)
60
+ {
61
+ return !(lhs == rhs);
62
+ }
63
63
  inline bool operator<(Button lhs, Button rhs)
64
64
  {
65
65
  return lhs.id() < rhs.id();
66
66
  }
67
-
67
+
68
68
  //! Struct that saves information about a touch on the surface of a multi-
69
69
  //! touch device.
70
- //! Available even on non-iPhone platforms to make it easier to compile the
71
- //! same source for multiple platforms.
70
+ //! Available even on non-iPhone platforms to make it easier to compile the
71
+ //! same source for multiple platforms.
72
72
  struct Touch
73
73
  {
74
74
  //! Allows for identification of a touch across calls.
@@ -79,13 +79,13 @@ namespace Gosu
79
79
  typedef std::vector<Touch> Touches;
80
80
 
81
81
  //! Manages initialization and shutdown of the input system. Only one Input
82
- //! instance can exist per application.
82
+ //! instance can exist per application.
83
83
  class Input
84
84
  {
85
85
  struct Impl;
86
86
  const std::auto_ptr<Impl> pimpl;
87
87
 
88
- public:
88
+ public:
89
89
  #ifdef GOSU_IS_WIN
90
90
  Input(HWND window);
91
91
  #endif
@@ -113,9 +113,9 @@ namespace Gosu
113
113
  //! given character, or noButton.
114
114
  static Button charToId(wchar_t ch);
115
115
 
116
- //! Returns true if a button is currently pressed.
116
+ //! Returns true if a button is currently pressed.
117
117
  //! Updated every tick.
118
- bool down(Button btn) const;
118
+ bool down(Button btn) const;
119
119
 
120
120
  //! Returns the horizontal position of the mouse relative to the top
121
121
  //! left corner of the window given to Input's constructor.
@@ -143,12 +143,12 @@ namespace Gosu
143
143
  //! mouse is and calls onButtonUp/onButtonDown, if assigned.
144
144
  void update();
145
145
 
146
- //! Assignable events that are called by update. You can bind these to your own functions.
147
- //! If you use the Window class, it will assign forward these to its own methods.
146
+ //! Assignable events that are called by update. You can bind these to your own functions.
147
+ //! If you use the Window class, it will assign forward these to its own methods.
148
148
  std::tr1::function<void (Button)> onButtonDown, onButtonUp;
149
149
 
150
- //! Assignable events that are called by update. You can bind these to your own functions.
151
- //! If you use the Window class, it will assign forward these to its own methods.
150
+ //! Assignable events that are called by update. You can bind these to your own functions.
151
+ //! If you use the Window class, it will assign forward these to its own methods.
152
152
  std::tr1::function<void (Touch)> onTouchBegan, onTouchMoved, onTouchEnded;
153
153
 
154
154
  //! Returns the currently active TextInput instance, or 0.
data/Gosu/Version.hpp CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
  #define GOSU_MAJOR_VERSION 0
5
5
  #define GOSU_MINOR_VERSION 7
6
- #define GOSU_POINT_VERSION 35
7
- #define GOSU_VERSION "0.7.35"
6
+ #define GOSU_POINT_VERSION 36
7
+ #define GOSU_VERSION "0.7.36"
8
8
 
9
9
  #define GOSU_COPYRIGHT_NOTICE \
10
10
  "May contain `ogg', `vorbis' libraries (c) 2002-2008 Xiph.org Foundation" \
data/Gosu/Window.hpp CHANGED
@@ -21,7 +21,7 @@
21
21
  namespace Gosu
22
22
  {
23
23
  //! Convenient all-in-one class that serves as the foundation of a standard
24
- //! Gosu application. Manages initialization of all of Gosu's core components
24
+ //! Gosu application. Manages initialization of all of Gosu's core components
25
25
  //! and provides timing functionality.
26
26
  //! Note that you should really only use one instance of this class at the same time.
27
27
  //! This may or may not change later.
@@ -43,7 +43,8 @@ namespace Gosu
43
43
 
44
44
  double updateInterval() const;
45
45
 
46
- //! Enters a modal loop where the Window is visible on screen and receives calls to draw, update etc.
46
+ //! Enters a modal loop where the Window is visible on screen and
47
+ //! receives calls to draw, update etc.
47
48
  void show();
48
49
  //! Closes the window if it is currently shown.
49
50
  void close();
@@ -61,9 +62,9 @@ namespace Gosu
61
62
  //! By default, the window is redrawn all the time.
62
63
  virtual bool needsRedraw() const { return true; }
63
64
 
64
- //! If this function returns true, the system arrow cursor is drawn while
65
- //! over the window.
66
- virtual bool needsCursor() const { return false; }
65
+ //! If this function returns true, the system arrow cursor is drawn while
66
+ //! over the window.
67
+ virtual bool needsCursor() const { return false; }
67
68
 
68
69
  //! This function is called when the window loses focus on some platforms.
69
70
  //! Most importantly, it is called on the iPhone or iPad when the user
data/lib/FreeImage.dll ADDED
Binary file
data/lib/OpenAL32.dll CHANGED
Binary file
data/lib/gosu.for_1_8.so CHANGED
Binary file
data/lib/gosu.for_1_9.so CHANGED
Binary file
metadata CHANGED
@@ -1,25 +1,24 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 69
4
+ hash: 75
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 35
10
- version: 0.7.35
9
+ - 36
10
+ version: 0.7.36
11
11
  platform: i386-mingw32
12
12
  authors:
13
13
  - Julian Raschke
14
- - Jan Luecker
15
14
  autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2011-08-12 00:00:00 Z
18
+ date: 2011-08-24 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
- description: " 2D game development library.\n\n Gosu features easy to use and game-friendly interfaces to 2D graphics\n and text (accelerated by 3D hardware), sound samples and music as well as\n keyboard, mouse and gamepad/joystick input.\n\n Also includes demos for integration with RMagick, Chipmunk and Ruby-OpenGL.\n"
21
+ description: " 2D game development library.\n\n Gosu features easy to use and game-friendly interfaces to 2D graphics\n and text (accelerated by 3D hardware), sound samples and music as well as\n keyboard, mouse and gamepad/joystick input.\n\n Also includes demos for integration with RMagick, Chipmunk and OpenGL.\n"
23
22
  email: julian@raschke.de
24
23
  executables: []
25
24
 
@@ -61,8 +60,6 @@ files:
61
60
  - Gosu/Window.hpp
62
61
  - Gosu/WinUtility.hpp
63
62
  - lib/gosu.rb
64
- - lib/gosu/patches.rb
65
- - lib/gosu/swig_patches.rb
66
63
  - examples/ChipmunkIntegration.rb
67
64
  - examples/CptnRuby.rb
68
65
  - examples/MoreChipmunkAndRMagick.rb
@@ -87,6 +84,7 @@ files:
87
84
  - examples/media/Starfighter.bmp
88
85
  - lib/gosu.for_1_8.so
89
86
  - lib/gosu.for_1_9.so
87
+ - lib/FreeImage.dll
90
88
  - lib/libsndfile.dll
91
89
  - lib/OpenAL32.dll
92
90
  homepage: http://libgosu.org/
data/lib/gosu/patches.rb DELETED
@@ -1,75 +0,0 @@
1
- # Extend Numeric with simple angle conversion methods.
2
- class ::Numeric
3
- def degrees_to_radians
4
- self * Math::PI / 180.0
5
- end
6
- def radians_to_degrees
7
- self * 180.0 / Math::PI
8
- end
9
- def gosu_to_radians
10
- (self - 90) * Math::PI / 180.0
11
- end
12
- def radians_to_gosu
13
- self * 180.0 / Math::PI + 90
14
- end
15
- end
16
-
17
- # Backwards compatibility: import constants into Gosu::Button.
18
- module Gosu::Button
19
- Gosu.constants.each { |c| const_set(c, Gosu.const_get(c)) }
20
- end
21
-
22
- # Backwards compatibility: Window arguments to Sample and Song
23
- class Gosu::Sample
24
- alias initialize_ initialize
25
-
26
- def initialize(*args)
27
- args.shift if args.first.is_a? Gosu::Window
28
- initialize_(*args)
29
- end
30
- end
31
- class Gosu::Song
32
- alias initialize_ initialize
33
-
34
- def initialize(*args)
35
- args.shift if args.first.is_a? Gosu::Window
36
- initialize_(*args)
37
- end
38
- end
39
-
40
- # Color constants (SWIG messes up constants somehow)
41
- class Gosu::Color
42
- class Constant < Gosu::Color
43
- private
44
- def alpha=; end
45
- def red=; end
46
- def green=; end
47
- def blue=; end
48
- def hue=; end
49
- def saturation=; end
50
- def value=; end
51
- end
52
-
53
- NONE = Gosu::Color::Constant.argb(0x00000000)
54
- BLACK = Gosu::Color::Constant.argb(0xff000000)
55
- GRAY = Gosu::Color::Constant.argb(0xff808080)
56
- WHITE = Gosu::Color::Constant.argb(0xffffffff)
57
- AQUA = Gosu::Color::Constant.argb(0xff00ffff)
58
- RED = Gosu::Color::Constant.argb(0xffff0000)
59
- GREEN = Gosu::Color::Constant.argb(0xff00ff00)
60
- BLUE = Gosu::Color::Constant.argb(0xff0000ff)
61
- YELLOW = Gosu::Color::Constant.argb(0xffffff00)
62
- FUCHSIA = Gosu::Color::Constant.argb(0xffff00ff)
63
- CYAN = Gosu::Color::Constant.argb(0xff00ffff)
64
- end
65
-
66
- # Instance methods for button_id_to_char and char_to_button_id
67
- class Gosu::Window
68
- def button_id_to_char(id)
69
- self.class.button_id_to_char(id)
70
- end
71
-
72
- def char_to_button_id(ch)
73
- self.class.char_to_button_id(ch)
74
- end
75
- end
@@ -1,43 +0,0 @@
1
- # SWIG workarounds
2
- # These are offloaded into a separate file because rb_eval_string() is weird on Ruby 1.8.
3
-
4
- # Exceptions in Window callbacks often get lost, this is especially annoying in draw/update.
5
- # It is not clear whether this is a SWIG issue or if some stack frame is not exception
6
- # compatible, but I just call protected_update etc. in the Ruby wrapper so I can add this
7
- # custom debugging help:
8
- class Gosu::Window
9
- %w(update draw needs_redraw? needs_cursor?
10
- lose_focus button_down button_up).each do |callback|
11
- define_method "protected_#{callback}" do |*args|
12
- begin
13
- # Turn into a boolean result for needs_cursor? etc while we are at it.
14
- # If there has been an exception, don't do anything as to not make matters worse.
15
- defined?(@_exception) ? false : !!send(callback, *args)
16
- rescue Exception => e
17
- # Exit the message loop naturally, then re-throw
18
- @_exception = e
19
- close
20
- end
21
- end
22
- end
23
-
24
- alias show_internal show
25
- def show
26
- show_internal
27
- # Try to format the message nicely, without any useless patching that we are
28
- # doing here.
29
- if defined? @_exception then
30
- if @_exception.backtrace.is_a? Array and not @_exception.backtrace.frozen? then
31
- @_exception.backtrace.reject! { |line| line.include? 'lib/gosu/swig_patches.rb' }
32
- end
33
- raise @_exception
34
- end
35
- end
36
- end
37
-
38
- # SWIG doesn't understand the C++ overloading, so we need this simple check in Ruby.
39
- class Gosu::Image
40
- def self.from_text(*args)
41
- args.size == 4 ? from_text4(*args) : from_text7(*args)
42
- end
43
- end