gosu 0.7.37 → 0.7.38

Sign up to get free protection for your applications and to get access to all the features.
@@ -118,7 +118,7 @@ class Star
118
118
 
119
119
  def draw
120
120
  img = @animation[Gosu::milliseconds / 100 % @animation.size];
121
- img.draw(@shape.body.p.x - img.width / 2.0, @shape.body.p.y - img.height / 2.0, ZOrder::Stars, 1, 1, @color, :additive)
121
+ img.draw(@shape.body.p.x - img.width / 2.0, @shape.body.p.y - img.height / 2.0, ZOrder::Stars, 1, 1, @color, :add)
122
122
  end
123
123
  end
124
124
 
@@ -157,7 +157,7 @@ class Star
157
157
 
158
158
  def draw
159
159
  img = @animation[Gosu::milliseconds / 100 % @animation.size];
160
- img.draw_rot(@x, @y, ZOrder::Stars, @y, 0.5, 0.5, 1, 1, @color, :additive)
160
+ img.draw_rot(@x, @y, ZOrder::Stars, @y, 0.5, 0.5, 1, 1, @color, :add)
161
161
  end
162
162
 
163
163
  def update
@@ -75,7 +75,7 @@ class Star
75
75
  def draw
76
76
  img = @animation[Gosu::milliseconds / 100 % @animation.size]
77
77
  img.draw(@x - img.width / 2.0, @y - img.height / 2.0,
78
- ZOrder::Stars, 1, 1, @color, :additive)
78
+ ZOrder::Stars, 1, 1, @color, :add)
79
79
  end
80
80
  end
81
81
 
@@ -1,14 +1,13 @@
1
1
  require 'rbconfig'
2
2
 
3
- WINDOWS_HINTS = %w(-win32 win32- mswin mingw32)
4
-
5
- if defined? RUBY_PLATFORM and WINDOWS_HINTS.any? { |hint| RUBY_PLATFORM.include? hint } then
3
+ if defined? RUBY_PLATFORM and
4
+ %w(-win32 win32- mswin mingw32).any? { |s| RUBY_PLATFORM.include? s } then
6
5
  ENV['PATH'] = "#{File.dirname(__FILE__)};#{ENV['PATH']}"
7
6
  end
8
7
 
9
8
  if File.exist? "#{File.dirname(__FILE__)}/gosu.#{Config::CONFIG['DLEXT']}"
10
9
  require "gosu.#{Config::CONFIG['DLEXT']}"
11
- elsif defined? RUBY_VERSION and RUBY_VERSION.split('.')[1].to_i > 8 then
10
+ elsif defined? RUBY_VERSION and RUBY_VERSION >= '1.9' then
12
11
  require "gosu.for_1_9.#{Config::CONFIG['DLEXT']}"
13
12
  else
14
13
  require "gosu.for_1_8.#{Config::CONFIG['DLEXT']}"
@@ -42,7 +42,12 @@ module Gosu
42
42
  else
43
43
  source = args[0]
44
44
  tileable = !args[1] || args[1][:tileable]
45
- initialize07 $window, source, !!tileable
45
+ rect = args[1] && args[1][:rect]
46
+ if rect then
47
+ initialize07 $window, source, !!tileable, *rect
48
+ else
49
+ initialize07 $window, source, !!tileable
50
+ end
46
51
  end
47
52
  end
48
53
 
@@ -89,14 +89,13 @@ else
89
89
  pango_config = "pkg-config pangoft2"
90
90
 
91
91
  $INCFLAGS << " `#{sdl_config} --cflags` `#{pango_config} --cflags`"
92
- $LDFLAGS << " `#{sdl_config} --libs` `#{pango_config} --libs` -lXdamage -lX11"
92
+ $LDFLAGS << " `#{sdl_config} --libs` `#{pango_config} --libs` -lX11"
93
93
  have_header('SDL_ttf.h') if have_library('SDL_ttf', 'TTF_RenderUTF8_Blended')
94
94
  have_header('gl.h') if have_library('GL', 'glMatrixMode')
95
95
  have_header('FreeImage.h') if have_library('freeimage', 'FreeImage_ConvertFromRawBits')
96
96
  have_header('vorbisfile.h') if have_library('vorbisfile', 'ov_open_callbacks')
97
97
  have_header('AL/al.h') if have_library('openal')
98
98
  have_header('sndfile.h') if have_library('sndfile')
99
- have_header('X11/extensions/Xdamage.h')
100
99
  end
101
100
 
102
101
  # Copy all relevant C++ files into the current directory
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: 73
4
+ hash: 79
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 37
10
- version: 0.7.37
9
+ - 38
10
+ version: 0.7.38
11
11
  platform: ruby
12
12
  authors:
13
13
  - Julian Raschke
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-12 00:00:00 Z
18
+ date: 2011-10-28 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
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"