gosu 0.9.0.pre1 → 0.9.0

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: dd11308d7e4ec0b716285c993461a7eb3d0f4069
4
- data.tar.gz: 72ae78ce681cbf45756c97d6267acca346bd08a9
3
+ metadata.gz: 8fc27b3d10f045f30fb38c06462bd4edcb298756
4
+ data.tar.gz: 6a7cb61ea9fbd971633b95dca7ca3ba32189eb1e
5
5
  SHA512:
6
- metadata.gz: f4c3400c2284f15cf12b9f036232c1790c77b63e76b6dfe19559b6fc2445ae57468fad1d5fdedd1d1c8a35ed39a16c4d7c10917498d2d5f6442da49890fc1bbb
7
- data.tar.gz: 2a013ba899728594d5fabb8243c766c11eb08ae603485c435be051b1f6e3977a3287713b6ee9f852aa81a4febf5f40c7dd69bcc02e2e3b1c3a6fd4d91baa6787
6
+ metadata.gz: 3b52d7cb01a0db77a7e03b8281371aec7f5785cbcd1c2e0ce9d21471dda552bfaf2cf4535d523d4f7b2f63ffcf4750af76293c10397e3250aeff29d430be62be
7
+ data.tar.gz: ae31aadc306b2c185f734e4625e51ea0308847089d5bcdc2e01aa777901312b437359b8fa3ae7bddfd390b5bf543af6dde8a9277cae9259533b799699feaf777
@@ -4,7 +4,7 @@
4
4
  #define GOSU_MAJOR_VERSION 0
5
5
  #define GOSU_MINOR_VERSION 9
6
6
  #define GOSU_POINT_VERSION 0
7
- #define GOSU_VERSION "0.9.0.pre1"
7
+ #define GOSU_VERSION "0.9.0"
8
8
 
9
9
  #define GOSU_COPYRIGHT_NOTICE \
10
10
  "This software uses the following third-party libraries:\n" \
@@ -2154,7 +2154,8 @@ static VALUE mGosu;
2154
2154
  #include <stdexcept>
2155
2155
 
2156
2156
 
2157
- // Avoid Ruby Macro Hell on Windows...
2157
+
2158
+ // Escape from ruby.h macro hell on Windows.
2158
2159
  #undef accept
2159
2160
  #undef write
2160
2161
  #undef close
@@ -2597,8 +2598,10 @@ SWIGINTERN Gosu::Color Gosu_Color_dup(Gosu::Color const *self){
2597
2598
  return *self;
2598
2599
  }
2599
2600
  SWIGINTERN std::string Gosu_Color_inspect(Gosu::Color const *self){
2600
- char buffer[31];
2601
- std::snprintf(buffer, sizeof buffer, "#<Gosu::Color:ARGB=0x%08x>", self->argb());
2601
+ char buffer[32];
2602
+ // snprintf is either member of std:: (C++11), or a #define for ruby_snprintf.
2603
+ using namespace std;
2604
+ snprintf(buffer, sizeof buffer, "#<Gosu::Color:ARGB=0x%02x_%06x>", self->alpha(), self->argb() & 0xffffff);
2602
2605
  return buffer;
2603
2606
  }
2604
2607
 
@@ -11098,7 +11101,7 @@ SWIGEXPORT void Init_gosu(void) {
11098
11101
  rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
11099
11102
  rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(9)));
11100
11103
  rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(0)));
11101
- rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.9.0.pre1"));
11104
+ rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.9.0"));
11102
11105
  rb_define_const(mGosu, "GOSU_COPYRIGHT_NOTICE", SWIG_FromCharPtr("This software uses the following third-party libraries:\n\nGosu, http://www.libgosu.org, MIT License, http://opensource.org/licenses/MIT\nSDL 2, http://www.libsdl.org, MIT License, http://opensource.org/licenses/MIT\nFreeImage, http://freeimage.sourceforge.net, FreeImage Public License\nlibogg & libvorbis, http://www.xiph.org, BSD License, 3-Clause Version, http://www.xiph.org/licenses/bsd\nlibsndfile, http://www.mega-nerd.com/libsndfile, GNU LGPL 3, http://www.gnu.org/copyleft/lesser.html\nOpenAL Soft, http://kcat.strangesoft.net/openal.html, GNU LGPL 2, http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html\n"));
11103
11106
  rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
11104
11107
  rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
@@ -104,8 +104,8 @@ class Gosu::Window
104
104
  flush gl clip_to record
105
105
  transform translate rotate scale
106
106
  button_id_to_char char_to_button_id button_down?).each do |method|
107
- define_method method.to_sym do |*args|
108
- Gosu.send method, *args
107
+ define_method method.to_sym do |*args, &block|
108
+ Gosu.send method, *args, &block
109
109
  end
110
110
  end
111
111
  end
@@ -435,10 +435,10 @@ module Gosu
435
435
  # Draws the image as an arbitrary quad. This method can be used for advanced non-rectangular drawing techniques, e.g., faking perspective or isometric projection.
436
436
  #
437
437
  # @return [void]
438
- # @param (see Gosu::Window#draw_quad)
438
+ # @param (see Gosu.draw_quad)
439
439
  #
440
440
  # @see #draw
441
- # @see Gosu::Window#draw_quad
441
+ # @see Gosu.draw_quad
442
442
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#drawing-with-colours Drawing with colors, explained in the Gosu Wiki
443
443
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#order-of-corners The order of corners explained in the Gosu Wiki
444
444
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#z-ordering Z-ordering explained in the Gosu Wiki
@@ -884,11 +884,32 @@ module Gosu
884
884
  # @param mode [:default, :additive] the blending mode to use.
885
885
  #
886
886
  # @see draw_line
887
+ # @see draw_rect
887
888
  # @see draw_quad
888
889
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#drawing-with-colours Drawing with colors, explained in the Gosu Wiki
889
890
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#z-ordering Z-ordering explained in the Gosu Wiki
890
891
  def draw_triangle(x1, y1, c1, x2, y2, c2, x3, y3, c3, z=0, mode=:default); end
891
892
 
893
+ ##
894
+ # Draws a rectangle (actually a quad, or two triangles).
895
+ #
896
+ # @return [void]
897
+ # @param x [Float] the X coordinate of the rectangle’s top left corner.
898
+ # @param y [Float] the Y coordinate of the rectangle’s top left corner.
899
+ # @param width [Float] the width of the rectangle.
900
+ # @param height [Float] the height of the rectangle.
901
+ # @param c [Gosu::Color] the color of the rectangle.
902
+ # @param z [Float] the Z-order.
903
+ # @param mode [:default, :additive] the blending mode to use.
904
+ #
905
+ # @see draw_line
906
+ # @see draw_triangle
907
+ # @see draw_quad
908
+ # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#drawing-with-colours Drawing with colors, explained in the Gosu Wiki
909
+ # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#order-of-corners The order of corners explained in the Gosu Wiki
910
+ # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#z-ordering Z-ordering explained in the Gosu Wiki
911
+ def draw_rect(x, y, width, height, c, z=0, mode=:default); end
912
+
892
913
  ##
893
914
  # Draws a quad (actually two triangles).
894
915
  #
@@ -910,6 +931,7 @@ module Gosu
910
931
  #
911
932
  # @see draw_line
912
933
  # @see draw_triangle
934
+ # @see draw_rect
913
935
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#drawing-with-colours Drawing with colors, explained in the Gosu Wiki
914
936
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#order-of-corners The order of corners explained in the Gosu Wiki
915
937
  # @see https://github.com/jlnr/gosu/wiki/Basic-Concepts#z-ordering Z-ordering explained in the Gosu Wiki
@@ -956,7 +978,7 @@ module Gosu
956
978
  def clip_to(x, y, w, h); end
957
979
 
958
980
  ##
959
- # Records all drawing operatons inside the block as a reusable "image". This method can be used to speed rendering of multiple static images, e.g., a fixed tile map.
981
+ # Records all drawing operations inside the block as a reusable "image". This method can be used to speed rendering of multiple static images, e.g., a fixed tile map.
960
982
  #
961
983
  # @note Because the returned object is not a true image---it's implemented using vertex buffers and is not backed by a texture---there are restrictions on how it can be used.
962
984
  #
@@ -972,7 +994,7 @@ module Gosu
972
994
  def record(width, height); end
973
995
 
974
996
  ##
975
- # Rotates all drawing operatons inside the block.
997
+ # Rotates all drawing operations inside the block.
976
998
  #
977
999
  # @return [void]
978
1000
  # @param angle [Float] the rotation angle.
@@ -20,7 +20,7 @@ namespace
20
20
  }
21
21
  }
22
22
 
23
- std::tr1::array<bool, Gosu::numButtons> buttonStates { { false } };
23
+ std::tr1::array<bool, Gosu::numButtons> buttonStates = { { false } };
24
24
  }
25
25
 
26
26
  struct Gosu::Input::Impl
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.pre1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Raschke
@@ -162,9 +162,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  version: 1.8.2
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - '>'
165
+ - - '>='
166
166
  - !ruby/object:Gem::Version
167
- version: 1.3.1
167
+ version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
170
  rubygems_version: 2.0.14