gosu 0.7.37 → 0.7.38
Sign up to get free protection for your applications and to get access to all the features.
- data/Gosu/Bitmap.hpp +2 -2
- data/Gosu/Color.hpp +1 -1
- data/Gosu/Graphics.hpp +3 -0
- data/Gosu/GraphicsBase.hpp +2 -1
- data/Gosu/Utility.hpp +2 -1
- data/Gosu/Version.hpp +2 -2
- data/GosuImpl/Graphics/BitmapApple.mm +25 -4
- data/GosuImpl/Graphics/DrawOp.hpp +1 -0
- data/GosuImpl/Graphics/Macro.hpp +9 -5
- data/GosuImpl/Graphics/RenderState.hpp +1 -1
- data/GosuImpl/RubyGosu.swg +19 -5
- data/GosuImpl/RubyGosu_wrap.cxx +289 -392
- data/examples/ChipmunkIntegration.rb +1 -1
- data/examples/OpenGLIntegration.rb +1 -1
- data/examples/Tutorial.rb +1 -1
- data/lib/gosu.rb +3 -4
- data/lib/gosu/preview.rb +6 -1
- data/linux/extconf.rb +1 -2
- metadata +4 -4
@@ -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, :
|
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, :
|
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
|
data/examples/Tutorial.rb
CHANGED
data/lib/gosu.rb
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
require 'rbconfig'
|
2
2
|
|
3
|
-
|
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
|
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']}"
|
data/lib/gosu/preview.rb
CHANGED
@@ -42,7 +42,12 @@ module Gosu
|
|
42
42
|
else
|
43
43
|
source = args[0]
|
44
44
|
tileable = !args[1] || args[1][:tileable]
|
45
|
-
|
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
|
|
data/linux/extconf.rb
CHANGED
@@ -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` -
|
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:
|
4
|
+
hash: 79
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
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-
|
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"
|