gosu 0.7.30 → 0.7.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@
3
3
 
4
4
  #define GOSU_MAJOR_VERSION 0
5
5
  #define GOSU_MINOR_VERSION 7
6
- #define GOSU_POINT_VERSION 30
7
- #define GOSU_VERSION "0.7.30"
6
+ #define GOSU_POINT_VERSION 31
7
+ #define GOSU_VERSION "0.7.31"
8
8
 
9
9
  #endif
@@ -75,7 +75,9 @@ Gosu::Bitmap Gosu::loadImageFile(const std::wstring& filename)
75
75
  {
76
76
  ObjRef<NSString> filenameRef([[NSString alloc] initWithUTF8String: wstringToUTF8(filename).c_str()]);
77
77
  ObjRef<APPLE_IMAGE> image([[APPLE_IMAGE alloc] initWithContentsOfFile: filenameRef.obj()]);
78
-
78
+ if (!image.get())
79
+ throw std::runtime_error("Cannot load image file " + wstringToUTF8(filename));
80
+
79
81
  Bitmap bitmap;
80
82
  appleImageToBitmap(image.obj(), bitmap);
81
83
  if (boost::iends_with(filename, L".bmp"))
@@ -96,6 +98,8 @@ Gosu::Bitmap Gosu::loadImageFile(Reader reader)
96
98
  reader.read([buffer.get() mutableBytes], length);
97
99
 
98
100
  ObjRef<APPLE_IMAGE> image([[APPLE_IMAGE alloc] initWithData: buffer.get()]);
101
+ if (!image.get())
102
+ throw std::runtime_error("Cannot load image file from stream");
99
103
 
100
104
  Bitmap bitmap;
101
105
  appleImageToBitmap(image.obj(), bitmap);
@@ -11085,8 +11085,8 @@ SWIGEXPORT void Init_gosu(void) {
11085
11085
  SWIG_RubyInitializeTrackings();
11086
11086
  rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
11087
11087
  rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(7)));
11088
- rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(30)));
11089
- rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.30"));
11088
+ rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(31)));
11089
+ rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.31"));
11090
11090
  rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
11091
11091
  rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
11092
11092
  rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1);
@@ -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"
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: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 30
10
- version: 0.7.30
9
+ - 31
10
+ version: 0.7.31
11
11
  platform: ruby
12
12
  authors:
13
13
  - Julian Raschke