gosu 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69a831194f9c3424b3866b28db95100d56da1621
4
- data.tar.gz: e98300b664a62ff75bfe6de59542c779d939241e
3
+ metadata.gz: 4ce6ec413ea4f92e41a4adb0f6b622909e0afcbb
4
+ data.tar.gz: f37a8dfcc263d51194b354f91d4f8c8841e93f7b
5
5
  SHA512:
6
- metadata.gz: 66d9c21c663b3bba6bbb48f6c2860c3075a75ebc0f77216a42251c851380dedcbb5a10da7479196b652d52ab138996bafaaaa3ff7e5ed4ec7c1b75f77190c347
7
- data.tar.gz: ebd17c6adcfbc3b6bbfe7f63b18085273c430b18806148e77468ba5cca41ef290d49e35820681c919276351a6fda29e5ccea3dc67b89c9de9bb6acbc527401f7
6
+ metadata.gz: 5365979f253c9638eca55b4b4c1e09eff1d751dde85bbfaaf6251e61367731732c956ffd23ed9822c73d879a9aea80741b35ffc1efd784cc513c5fbc58be1a7f
7
+ data.tar.gz: bafe53467903dcead01226d8a07605e43d70683c3cf71ee57c3ad855ce3b265f81a1f076c86e96a6d7652bc200ec416e432e7106623be2e0b0cc579a1baee45d
data/COPYING CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2001-2016 Julian Raschke, Jan Lücker and all contributors.
1
+ Copyright (C) 2001-2017 Julian Raschke, Jan Lücker and all contributors.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a
4
4
  copy of this software and associated documentation files (the "Software"),
@@ -4,7 +4,7 @@
4
4
 
5
5
  #define GOSU_MAJOR_VERSION 0
6
6
  #define GOSU_MINOR_VERSION 11
7
- #define GOSU_POINT_VERSION 1
7
+ #define GOSU_POINT_VERSION 2
8
8
 
9
9
  namespace Gosu
10
10
  {
@@ -1,6 +1,6 @@
1
1
  require 'rbconfig'
2
2
 
3
- if RUBY_PLATFORM =~ /mswin$|mingw32|mingw64|win32\-|\-win32/ then
3
+ if RUBY_PLATFORM =~ /mswin$|mingw32|mingw64|win32\-|\-win32/
4
4
  binary_path = File.dirname(__FILE__)
5
5
  # 64-bit builds of Windows use "x64-mingw32" as RUBY_PLATFORM
6
6
  binary_path += '64' if RUBY_PLATFORM =~ /^x64-/
@@ -42,8 +42,8 @@ class Gosu::Image
42
42
  alias initialize_without_window initialize
43
43
 
44
44
  def initialize(*args)
45
- if args[0].is_a? Gosu::Window then
46
- if args.size == 7 then
45
+ if args[0].is_a? Gosu::Window
46
+ if args.size == 7
47
47
  initialize_without_window args[1], :tileable => args[2], :rect => args[3..-1]
48
48
  else
49
49
  initialize_without_window args[1], :tileable => args[2]
@@ -9,13 +9,14 @@ class Gosu::Window
9
9
  alias initialize_without_hash initialize
10
10
 
11
11
  def initialize width, height, *args
12
- if args.empty? or args.first.is_a? Hash then
12
+ if args.empty? or args.first.is_a? Hash
13
13
  options = args.first || {}
14
14
  fullscreen = options[:fullscreen]
15
15
  update_interval = options[:update_interval]
16
16
  else
17
17
  fullscreen, update_interval = *args
18
18
  end
19
+ $gosu_gl_blocks = nil
19
20
  initialize_without_hash width, height, !!fullscreen, update_interval || 16.666666
20
21
  end
21
22
 
@@ -30,6 +31,7 @@ class Gosu::Window
30
31
  # Exit the message loop naturally, then re-throw
31
32
  @_exception = e
32
33
  close
34
+ false
33
35
  end
34
36
  end
35
37
  end
@@ -45,8 +47,8 @@ class Gosu::Window
45
47
  show_internal
46
48
  # Try to format the message nicely, without any useless patching that we are
47
49
  # doing here.
48
- if defined? @_exception then
49
- if @_exception.backtrace.is_a? Array and not @_exception.backtrace.frozen? then
50
+ if defined? @_exception
51
+ if @_exception.backtrace.is_a? Array and not @_exception.backtrace.frozen?
50
52
  @_exception.backtrace.reject! { |line| line.include? 'lib/gosu/swig_patches.rb' }
51
53
  end
52
54
  raise @_exception
@@ -256,9 +256,12 @@ namespace Gosu
256
256
 
257
257
  void operator()() const
258
258
  {
259
- // Inlined begin_gl() to avoid flushing.
259
+ // Duplicated from begin_gl() (which we don't call, to avoid flushing).
260
260
  glPushAttrib(GL_ALL_ATTRIB_BITS);
261
261
  glDisable(GL_BLEND);
262
+ // Reset the colour to white to avoid surprises.
263
+ // https://www.libgosu.org/cgi-bin/mwf/topic_show.pl?pid=9115#pid9115
264
+ glColor4ubv(reinterpret_cast<const GLubyte*>(&Color::WHITE));
262
265
  while (glGetError() != GL_NO_ERROR);
263
266
 
264
267
  functor();
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 3.0.11
3
+ * Version 3.0.12
4
4
  *
5
5
  * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -2221,7 +2221,7 @@ static VALUE mGosu;
2221
2221
  #define SWIG_RUBY_THREAD_END_BLOCK
2222
2222
 
2223
2223
 
2224
- #define SWIGVERSION 0x030011
2224
+ #define SWIGVERSION 0x030012
2225
2225
  #define SWIG_VERSION SWIGVERSION
2226
2226
 
2227
2227
 
@@ -2513,7 +2513,7 @@ SWIG_ruby_failed(void)
2513
2513
  }
2514
2514
 
2515
2515
 
2516
- /*@SWIG:/usr/local/Cellar/swig/3.0.11/share/swig/3.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2516
+ /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2517
2517
  SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
2518
2518
  {
2519
2519
  VALUE obj = args[0];
@@ -2555,7 +2555,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
2555
2555
  #include <string>
2556
2556
 
2557
2557
 
2558
- /*@SWIG:/usr/local/Cellar/swig/3.0.11/share/swig/3.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2558
+ /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2559
2559
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
2560
2560
  {
2561
2561
  VALUE obj = args[0];
@@ -2691,6 +2691,10 @@ SWIG_From_bool (bool value)
2691
2691
  SWIGINTERN int
2692
2692
  SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
2693
2693
  {
2694
+ if (TYPE(obj) != T_STRING) {
2695
+ obj = rb_funcall(obj, rb_intern("to_s"), 0, NULL);
2696
+ }
2697
+
2694
2698
  if (TYPE(obj) == T_STRING) {
2695
2699
  char *cstr = StringValuePtr(obj);
2696
2700
  size_t size = RSTRING_LEN(obj) + 1;
@@ -2753,7 +2757,7 @@ SWIG_AsPtr_std_string (VALUE obj, std::string **val)
2753
2757
  }
2754
2758
 
2755
2759
 
2756
- /*@SWIG:/usr/local/Cellar/swig/3.0.11/share/swig/3.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2760
+ /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2757
2761
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2758
2762
  {
2759
2763
  VALUE obj = args[0];
@@ -2854,9 +2858,11 @@ SWIGINTERN void Gosu_Font_set_image(Gosu::Font *self,wchar_t wc,VALUE source){
2854
2858
  * versions.
2855
2859
  *
2856
2860
  * Make sure namespace std exists to avoid compiler warnings.
2861
+ *
2862
+ * extern "C++" is required as this fragment can end up inside an extern "C" { } block
2857
2863
  */
2858
2864
  namespace std { }
2859
- template<typename T>
2865
+ extern "C++" template<typename T>
2860
2866
  inline int SWIG_isfinite_func(T x) {
2861
2867
  using namespace std;
2862
2868
  return isfinite(x);
@@ -9830,7 +9836,7 @@ fail:
9830
9836
 
9831
9837
 
9832
9838
  SWIGINTERN VALUE
9833
- _wrap_Window_set_mouse_x(int argc, VALUE *argv, VALUE self) {
9839
+ _wrap_Window_mouse_xe___(int argc, VALUE *argv, VALUE self) {
9834
9840
  Gosu::Window *arg1 = (Gosu::Window *) 0 ;
9835
9841
  double arg2 ;
9836
9842
  void *argp1 = 0 ;
@@ -9866,7 +9872,7 @@ fail:
9866
9872
 
9867
9873
 
9868
9874
  SWIGINTERN VALUE
9869
- _wrap_Window_set_mouse_y(int argc, VALUE *argv, VALUE self) {
9875
+ _wrap_Window_mouse_ye___(int argc, VALUE *argv, VALUE self) {
9870
9876
  Gosu::Window *arg1 = (Gosu::Window *) 0 ;
9871
9877
  double arg2 ;
9872
9878
  void *argp1 = 0 ;
@@ -11517,7 +11523,7 @@ SWIGEXPORT void Init_gosu(void) {
11517
11523
  rb_define_const(mGosu, "LICENSES", SWIG_From_std_string(static_cast< std::string >(Gosu::LICENSES)));
11518
11524
  rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
11519
11525
  rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(11)));
11520
- rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(1)));
11526
+ rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(2)));
11521
11527
  rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
11522
11528
  rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
11523
11529
  rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1);
@@ -11936,8 +11942,8 @@ SWIGEXPORT void Init_gosu(void) {
11936
11942
  rb_define_method(SwigClassWindow.klass, "mouse_x", VALUEFUNC(_wrap_Window_mouse_x), -1);
11937
11943
  rb_define_method(SwigClassWindow.klass, "mouse_y", VALUEFUNC(_wrap_Window_mouse_y), -1);
11938
11944
  rb_define_method(SwigClassWindow.klass, "set_mouse_position", VALUEFUNC(_wrap_Window_set_mouse_position), -1);
11939
- rb_define_method(SwigClassWindow.klass, "set_mouse_x", VALUEFUNC(_wrap_Window_set_mouse_x), -1);
11940
- rb_define_method(SwigClassWindow.klass, "set_mouse_y", VALUEFUNC(_wrap_Window_set_mouse_y), -1);
11945
+ rb_define_method(SwigClassWindow.klass, "mouse_x=", VALUEFUNC(_wrap_Window_mouse_xe___), -1);
11946
+ rb_define_method(SwigClassWindow.klass, "mouse_y=", VALUEFUNC(_wrap_Window_mouse_ye___), -1);
11941
11947
  SwigClassWindow.mark = (void (*)(void *)) mark_window;
11942
11948
  SwigClassWindow.destroy = (void (*)(void *)) free_Gosu_Window;
11943
11949
  SwigClassWindow.trackObjects = 1;
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 3.0.11
3
+ * Version 3.0.12
4
4
  *
5
5
  * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
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.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Raschke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-18 00:00:00.000000000 Z
11
+ date: 2017-02-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  2D game development library.