gosu 0.7.37-universal-darwin → 0.7.38-universal-darwin
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/examples/ChipmunkIntegration.rb +1 -1
- data/examples/OpenGLIntegration.rb +1 -1
- data/examples/Tutorial.rb +1 -1
- data/lib/gosu.for_1_8.bundle +0 -0
- data/lib/gosu.for_1_9.bundle +0 -0
- data/lib/gosu.rb +3 -4
- data/lib/gosu/preview.rb +6 -1
- metadata +4 -4
data/Gosu/Bitmap.hpp
CHANGED
@@ -52,10 +52,10 @@ namespace Gosu
|
|
52
52
|
void insert(const Bitmap& source, int x, int y, unsigned srcX,
|
53
53
|
unsigned srcY, unsigned srcWidth, unsigned srcHeight);
|
54
54
|
|
55
|
-
|
55
|
+
//! Direct access to the array of color values. May be useful for optimized
|
56
56
|
//! OpenGL operations.
|
57
57
|
const Color* data() const { return &pixels[0]; }
|
58
|
-
Color* data()
|
58
|
+
Color* data() { return &pixels[0]; }
|
59
59
|
|
60
60
|
// Work with data() instead if you need fast operations.
|
61
61
|
GOSU_DEPRECATED void fill(Color c);
|
data/Gosu/Color.hpp
CHANGED
@@ -126,7 +126,7 @@ namespace Gosu
|
|
126
126
|
return alpha() << 24 | red() << 16 | green() << 8 | blue();
|
127
127
|
}
|
128
128
|
|
129
|
-
//! Returns the color in 0x00bbggrr representation.
|
129
|
+
//! Returns the color in 0x00bbggrr representation. Useful for Win32 programming.
|
130
130
|
std::tr1::uint32_t bgr() const
|
131
131
|
{
|
132
132
|
return blue() << 16 | green() << 8 | red();
|
data/Gosu/Graphics.hpp
CHANGED
@@ -90,6 +90,9 @@ namespace Gosu
|
|
90
90
|
void popTransform();
|
91
91
|
|
92
92
|
//! Draws a line from one point to another (last pixel exclusive).
|
93
|
+
//! Note: OpenGL lines are not reliable at all and may have a missing pixel at the start
|
94
|
+
//! or end point. Please only use this for debugging purposes. Otherwise, use a quad or
|
95
|
+
//! image to simulate lines, or contribute a better drawLine to Gosu.
|
93
96
|
void drawLine(double x1, double y1, Color c1,
|
94
97
|
double x2, double y2, Color c2,
|
95
98
|
ZPos z, AlphaMode mode = amDefault);
|
data/Gosu/GraphicsBase.hpp
CHANGED
@@ -24,7 +24,8 @@ namespace Gosu
|
|
24
24
|
//! The colors' channels will be added. The alpha channel specifies
|
25
25
|
//! the percentage of the new color's channels that will be added
|
26
26
|
//! to the old color's channels.
|
27
|
-
|
27
|
+
amAdd,
|
28
|
+
amAdditive = amAdd,
|
28
29
|
//! The color's channels will be multiplied with each other.
|
29
30
|
amMultiply
|
30
31
|
};
|
data/Gosu/Utility.hpp
CHANGED
@@ -20,7 +20,8 @@ namespace Gosu
|
|
20
20
|
std::string narrow(const std::wstring& ws);
|
21
21
|
|
22
22
|
//! Returns the user's preferred language, at the moment of calling the function. Expect return
|
23
|
-
//! values such as 'en_US', 'de_DE.UTF-8', 'ja', 'zh-Hans'.
|
23
|
+
//! values such as 'en_US', 'de_DE.UTF-8', 'ja', 'zh-Hans'. You can rely only on the first two letters
|
24
|
+
//! being a common language abbreviation.
|
24
25
|
std::string language();
|
25
26
|
}
|
26
27
|
|
data/Gosu/Version.hpp
CHANGED
@@ -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.for_1_8.bundle
CHANGED
Binary file
|
data/lib/gosu.for_1_9.bundle
CHANGED
Binary file
|
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
|
|
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: universal-darwin
|
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"
|