gosu 0.7.31-universal-darwin → 0.7.32-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,7 @@ namespace Gosu
10
10
  class Audio;
11
11
  class Bitmap;
12
12
  class Buffer;
13
+ class Button;
13
14
  class Color;
14
15
  class File;
15
16
  class Font;
@@ -3,7 +3,37 @@
3
3
 
4
4
  #define GOSU_MAJOR_VERSION 0
5
5
  #define GOSU_MINOR_VERSION 7
6
- #define GOSU_POINT_VERSION 31
7
- #define GOSU_VERSION "0.7.31"
6
+ #define GOSU_POINT_VERSION 32
7
+ #define GOSU_VERSION "0.7.32"
8
8
 
9
+ #define GOSU_COPYRIGHT_NOTICE \
10
+ "May contain `ogg', `vorbis' libraries (c) 2002-2008 Xiph.org Foundation" \
11
+ "\n\n" \
12
+ "Redistribution and use in source and binary forms, with or without" \
13
+ "modification, are permitted provided that the following conditions" \
14
+ "are met:" \
15
+ "\n\n" \
16
+ "- Redistributions of source code must retain the above copyright" \
17
+ "notice, this list of conditions and the following disclaimer." \
18
+ "\n\n" \
19
+ "- Redistributions in binary form must reproduce the above copyright" \
20
+ "notice, this list of conditions and the following disclaimer in the" \
21
+ "documentation and/or other materials provided with the distribution." \
22
+ "\n\n" \
23
+ "- Neither the name of the Xiph.org Foundation nor the names of its" \
24
+ "contributors may be used to endorse or promote products derived from" \
25
+ "this software without specific prior written permission." \
26
+ "\n\n" \
27
+ "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS" \
28
+ "``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT" \
29
+ "LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR" \
30
+ "A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION" \
31
+ "OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL," \
32
+ "SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT" \
33
+ "LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE," \
34
+ "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY" \
35
+ "THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT" \
36
+ "(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE" \
37
+ "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
38
+
9
39
  #endif
@@ -4,7 +4,7 @@
4
4
  ## Date: 2007-10-05
5
5
  ## License: Same as for Gosu (MIT)
6
6
  ## Comments: Based on the Gosu Ruby Tutorial, but incorporating the Chipmunk Physics Engine
7
- ## See http://code.google.com/p/gosu/wiki/RubyChipmunkIntegration for the accompanying text.
7
+ ## See https://github.com/jlnr/gosu/wiki/Ruby-Chipmunk-Integration for the accompanying text.
8
8
 
9
9
  require 'rubygems'
10
10
  require 'gosu'
Binary file
Binary file
@@ -1,16 +1,16 @@
1
- require 'rbconfig'
2
-
3
- begin
4
- if defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
5
- version = '1_9'
6
- else
7
- version = '1_8'
8
- end
9
- require "#{File.dirname(__FILE__)}/gosu.for_#{version}.#{Config::CONFIG['DLEXT']}"
10
- require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
11
- rescue LoadError => e
12
- require "#{File.dirname(__FILE__)}/gosu.#{Config::CONFIG['DLEXT']}"
13
- require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
14
- end
15
-
16
- require "#{File.dirname(__FILE__)}/gosu/patches.rb"
1
+ require 'rbconfig'
2
+
3
+ begin
4
+ if defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
5
+ version = '1_9'
6
+ else
7
+ version = '1_8'
8
+ end
9
+ require "#{File.dirname(__FILE__)}/gosu.for_#{version}.#{Config::CONFIG['DLEXT']}"
10
+ require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
11
+ rescue LoadError => e
12
+ require "#{File.dirname(__FILE__)}/gosu.#{Config::CONFIG['DLEXT']}"
13
+ require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
14
+ end
15
+
16
+ require "#{File.dirname(__FILE__)}/gosu/patches.rb"
@@ -3,27 +3,38 @@
3
3
 
4
4
  # Exceptions in Window callbacks often get lost, this is especially annoying in draw/update.
5
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 update_ and draw_ in the Ruby wrapper so I can add this
6
+ # compatible, but I just call protected_update etc. in the Ruby wrapper so I can add this
7
7
  # custom debugging help:
8
8
  class Gosu::Window
9
- def update_
10
- update
11
- rescue Exception => e
12
- puts e.inspect
13
- puts e.backtrace
14
- raise e
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
+ !!send(callback, *args) unless @_exception
15
+ rescue Exception => e
16
+ # Exit the message loop naturally, then re-throw
17
+ @_exception = e
18
+ close
19
+ end
20
+ end
15
21
  end
16
-
17
- def draw_
18
- draw
19
- rescue Exception => e
20
- puts e.inspect
21
- puts e.backtrace
22
- raise e
22
+
23
+ alias show_internal show
24
+ def show
25
+ show_internal
26
+ # Try to format the message nicely, without any useless patching that we are
27
+ # doing here.
28
+ if @_exception then
29
+ if @_exception.backtrace.is_a? Array and not @_exception.backtrace.frozen? then
30
+ @_exception.backtrace.reject! { |line| line.include? 'lib/gosu/swig_patches.rb' }
31
+ end
32
+ raise @_exception
33
+ end
23
34
  end
24
35
  end
25
36
 
26
- # SWIG doesn't understand the C++ overloading.
37
+ # SWIG doesn't understand the C++ overloading, so we need this simple check in Ruby.
27
38
  class Gosu::Image
28
39
  def self.from_text(*args)
29
40
  args.size == 4 ? from_text4(*args) : from_text7(*args)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 67
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 31
10
- version: 0.7.31
9
+ - 32
10
+ version: 0.7.32
11
11
  platform: universal-darwin
12
12
  authors:
13
13
  - Julian Raschke
@@ -16,8 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-04-30 00:00:00 +08:00
20
- default_executable:
19
+ date: 2011-06-05 00:00:00 Z
21
20
  dependencies: []
22
21
 
23
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"
@@ -87,7 +86,6 @@ files:
87
86
  - examples/media/Starfighter.bmp
88
87
  - lib/gosu.for_1_8.bundle
89
88
  - lib/gosu.for_1_9.bundle
90
- has_rdoc: true
91
89
  homepage: http://libgosu.org/
92
90
  licenses: []
93
91
 
@@ -119,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
117
  requirements: []
120
118
 
121
119
  rubyforge_project:
122
- rubygems_version: 1.6.2
120
+ rubygems_version: 1.8.4
123
121
  signing_key:
124
122
  specification_version: 3
125
123
  summary: 2D game development library.