ruby-sdl-ffi 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,73 @@
1
+ ------------------------------------------------------------
2
+ Author: John Croisant <jacius@gmail.com>
3
+ Date: Fri Oct 30 18:29:33 2009 -0500
4
+
5
+ Ruby-SDL-FFI 0.2 released.
6
+
7
+ M README.rdoc
8
+ M ruby-sdl-ffi.gemspec
9
+
10
+ ------------------------------------------------------------
11
+ Author: John Croisant <jacius@gmail.com>
12
+ Date: Fri Oct 30 18:28:17 2009 -0500
13
+
14
+ Updated ruby-sdl-ffi.gemspec.
15
+
16
+ Include all rdoc files, lowered SDL_gfx required version.
17
+ Fixed rubyforge_project.
18
+
19
+ M ruby-sdl-ffi.gemspec
20
+
21
+ ------------------------------------------------------------
22
+ Author: John Croisant <jacius@gmail.com>
23
+ Date: Fri Oct 30 18:25:06 2009 -0500
24
+
25
+ Added NEWS.rdoc (release notes).
26
+
27
+ A NEWS.rdoc
28
+
29
+ ------------------------------------------------------------
30
+ Author: John Croisant <jacius@gmail.com>
31
+ Date: Thu Oct 29 16:39:26 2009 -0500
32
+
33
+ Updated README.rdoc.
34
+
35
+ M README.rdoc
36
+
37
+ ------------------------------------------------------------
38
+ Author: John Croisant <jacius@gmail.com>
39
+ Date: Thu Oct 29 16:26:17 2009 -0500
40
+
41
+ rotozoomSurfaceXY and rotozoomSurfaceSizeXY don't need to be optional.
42
+
43
+ They both exist in SDL_gfx 2.0.13, the minimum supported version.
44
+
45
+ M lib/ruby-sdl-ffi/gfx/rotozoom.rb
46
+
47
+ ------------------------------------------------------------
48
+ Author: John Croisant <jacius@gmail.com>
49
+ Date: Thu Oct 29 16:10:54 2009 -0500
50
+
51
+ Reordered gfx/primitives.rb a bit.
52
+
53
+ M lib/ruby-sdl-ffi/gfx/primitives.rb
54
+
55
+ ------------------------------------------------------------
56
+ Author: John Croisant <jacius@gmail.com>
57
+ Date: Thu Oct 29 16:04:35 2009 -0500
58
+
59
+ SDL_gfx's arcRGBA should be optfunc like arcColor.
60
+
61
+ M lib/ruby-sdl-ffi/gfx/primitives.rb
62
+
63
+ ------------------------------------------------------------
64
+ Author: John Croisant <jacius@gmail.com>
65
+ Date: Thu Oct 29 16:00:23 2009 -0500
66
+
67
+ AUDIO_U16SYS/AUDIO_S16SYS vary depending on byte order.
68
+
69
+ M lib/ruby-sdl-ffi/sdl/audio.rb
70
+
1
71
  ------------------------------------------------------------
2
72
  Author: John Croisant <jacius@gmail.com>
3
73
  Date: Sat Oct 24 15:57:13 2009 -0500
@@ -0,0 +1,31 @@
1
+ = NEWS
2
+
3
+ == Ruby-SDL-FFI 0.2
4
+
5
+ * The values of SDL::AUDIO_U16SYS and SDL::AUDIO_S16SYS are now
6
+ correct on both big-endian and little-endian systems.
7
+
8
+ * SDL::Gfx::arcRGBA is now considered optional (as it should have been
9
+ in version 0.1). Loading will continue even if it is not available,
10
+ such as when using older versions of SDL_gfx.
11
+
12
+ * The minimum supported version of SDL_gfx is now 2.0.13. It was
13
+ 2.0.17 before.
14
+
15
+ * SDL::Gfx::rotozoomSurfaceXY and SDL::Gfx::rotozoomSurfaceSizeXY are
16
+ no longer considered optional, because they are available in all
17
+ supported versions of SDL_gfx (2.0.13 and higher).
18
+
19
+
20
+
21
+
22
+ == Ruby-SDL-FFI 0.1
23
+
24
+ * Initial release of Ruby-SDL-FFI. Bindings are provided for these
25
+ libraries (older versions may work, but haven't been tested):
26
+
27
+ * SDL >= 1.2.13
28
+ * SDL_gfx >= 2.0.17
29
+ * SDL_image >= 1.2.7
30
+ * SDL_mixer >= 1.2.8
31
+ * SDL_ttf >= 2.0.9
@@ -1,10 +1,10 @@
1
1
 
2
2
  = Ruby-SDL-FFI
3
3
 
4
- Version:: 0.1
5
- Date:: 2009-10-24
4
+ Version:: 0.2
5
+ Date:: 2009-10-30
6
6
 
7
- Homepage:: http://github.com/jacius/ffi-sdl/
7
+ Homepage:: http://github.com/jacius/ruby-sdl-ffi/
8
8
  Author:: John Croisant <jacius@gmail.com>
9
9
  Copyright:: 2009 John Croisant
10
10
 
@@ -12,10 +12,10 @@ Copyright:: 2009 John Croisant
12
12
  == Description
13
13
 
14
14
  Ruby-SDL-FFI is a low-level binding to SDL [1] and related
15
- libraries using Ruby-FFI [2]. It provides very basic access
16
- to SDL from Ruby [3] without the need for a compiled C
17
- wrapper. It aims to be platform and Ruby implementation
18
- independent.
15
+ libraries using Ruby-FFI [2] or compatible FFI APIs, such as
16
+ JRuby's. It provides very basic access to SDL from Ruby [3]
17
+ without the need for a compiled C wrapper. It aims to be
18
+ platform and Ruby implementation independent.
19
19
 
20
20
  Ruby-SDL-FFI does not attempt to provide any high-level
21
21
  functionality, only to mirror the standard SDL interface.
@@ -23,7 +23,7 @@ For higher-level functionality, you should use other
23
23
  libraries (Rubygame [4], Gosu [5], etc.).
24
24
 
25
25
  1. SDL: http://www.libsdl.org/
26
- 2. Ruby-FFI: http://kenai.com/projects/ruby-ffi/
26
+ 2. Ruby-FFI: http://github.com/ffi/ffi
27
27
  3. Ruby: http://www.ruby-lang.org/en/
28
28
  4. Rubygame: http://rubygame.org/
29
29
  5. Gosu: http://www.libgosu.org/
@@ -46,23 +46,17 @@ more mature and stable (i.e. version 1.0+).
46
46
  == Requirements
47
47
 
48
48
  * SDL >= 1.2.13
49
- * Ruby-FFI >= 0.4.0 (or compatible FFI implementation)
50
49
  * Nice-FFI >= 0.2.0
51
50
 
52
51
  Optional:
53
52
 
54
53
  * SDL_image >= 1.2.7
55
- * SDL_gfx >= 2.0.17
54
+ * SDL_gfx >= 2.0.13
56
55
  * SDL_mixer >= 1.2.8
57
56
  * SDL_ttf >= 2.0.9
58
57
 
59
58
  Ruby-SDL-FFI may work with older versions, but hasn't been tried on them.
60
59
 
61
- So far, Ruby-SDL-FFI has only been tested on 32-bit Linux with
62
- the standard Ruby implementation (aka MRI) version 1.8.6.
63
- However, with a few tweaks it should work on any system with
64
- compatible FFI functionality.
65
-
66
60
 
67
61
  == License
68
62
 
@@ -94,18 +94,6 @@ module SDL
94
94
  [ :pointer, :int16, :int16, :int16,
95
95
  :uint8, :uint8, :uint8, :uint8 ], :int
96
96
 
97
-
98
-
99
- optfunc :arcColor,
100
- [ :pointer, :int16, :int16, :int16,
101
- :int16, :int16, :uint32 ], :int
102
-
103
- func :arcRGBA,
104
- [ :pointer, :int16, :int16, :int16, :int16, :int16,
105
- :uint8, :uint8, :uint8, :uint8 ], :int
106
-
107
-
108
-
109
97
  func :aacircleColor,
110
98
  [ :pointer, :int16, :int16, :int16, :uint32 ], :int
111
99
 
@@ -122,6 +110,16 @@ module SDL
122
110
 
123
111
 
124
112
 
113
+ optfunc :arcColor,
114
+ [ :pointer, :int16, :int16, :int16,
115
+ :int16, :int16, :uint32 ], :int
116
+
117
+ optfunc :arcRGBA,
118
+ [ :pointer, :int16, :int16, :int16, :int16, :int16,
119
+ :uint8, :uint8, :uint8, :uint8 ], :int
120
+
121
+
122
+
125
123
  func :ellipseColor,
126
124
  [ :pointer, :int16, :int16, :int16, :int16, :uint32 ], :int
127
125
 
@@ -64,22 +64,21 @@ module SDL
64
64
  end
65
65
 
66
66
 
67
- optfunc :rotozoomSurfaceXY,
68
- [ :pointer, :double, :double, :double, :int ],
69
- SDL::Surface.typed_pointer
70
-
71
- optional {
72
- func :__rotozoomSurfaceSizeXY, :rotozoomSurfaceSizeXY,
73
- [ :int, :int, :double, :double, :double,
74
- :pointer, :pointer ], :void
75
-
76
- def self.rotozoomSurfaceSizeXY( width, height, angle, zoomx, zoomy )
77
- w = FFI::MemoryPointer.new( :int )
78
- h = FFI::MemoryPointer.new( :int )
79
- __rotozoomSurfaceSizeXY( width, height, angle, zoomx, zoomy, w, h )
80
- return [w.get_int(0), h.get_int(0)]
81
- end
82
- }
67
+ func :rotozoomSurfaceXY,
68
+ [ :pointer, :double, :double, :double, :int ],
69
+ SDL::Surface.typed_pointer
70
+
71
+ func :__rotozoomSurfaceSizeXY, :rotozoomSurfaceSizeXY,
72
+ [ :int, :int, :double, :double, :double,
73
+ :pointer, :pointer ], :void
74
+
75
+ def self.rotozoomSurfaceSizeXY( width, height, angle, zoomx, zoomy )
76
+ w = FFI::MemoryPointer.new( :int )
77
+ h = FFI::MemoryPointer.new( :int )
78
+ __rotozoomSurfaceSizeXY( width, height, angle, zoomx, zoomy, w, h )
79
+ return [w.get_int(0), h.get_int(0)]
80
+ end
81
+
83
82
 
84
83
 
85
84
  func :zoomSurface, [ :pointer, :double, :double, :int ],
@@ -64,8 +64,14 @@ module SDL
64
64
  AUDIO_S16MSB = 0x9010
65
65
  AUDIO_U16 = 0x0010
66
66
  AUDIO_S16 = 0x8010
67
- AUDIO_U16SYS = 0x0010
68
- AUDIO_S16SYS = 0x8010
67
+
68
+ if FFI::Platform::BYTE_ORDER == FFI::Platform::LITTLE_ENDIAN
69
+ AUDIO_U16SYS = AUDIO_U16LSB
70
+ AUDIO_S16SYS = AUDIO_S16LSB
71
+ else
72
+ AUDIO_U16SYS = AUDIO_U16MSB
73
+ AUDIO_S16SYS = AUDIO_U16MSB
74
+ end
69
75
 
70
76
 
71
77
  # callback( :filters_cb, [ :pointer, :uint16 ], :void)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-sdl-ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: "0.2"
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Croisant
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-24 00:00:00 -05:00
12
+ date: 2009-10-30 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -36,6 +36,7 @@ extensions: []
36
36
  extra_rdoc_files: []
37
37
 
38
38
  files:
39
+ - NEWS.rdoc
39
40
  - README.rdoc
40
41
  - lib/ruby-sdl-ffi.rb
41
42
  - lib/ruby-sdl-ffi/sdl/mouse.rb
@@ -85,10 +86,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
86
  requirements:
86
87
  - SDL >= 1.2.13
87
88
  - SDL_image >= 1.2.7 (optional)
88
- - SDL_gfx >= 2.0.17 (optional)
89
+ - SDL_gfx >= 2.0.13 (optional)
89
90
  - SDL_mixer >= 1.2.8 (optional)
90
91
  - SDL_ttf >= 2.0.9 (optional)
91
- rubyforge_project: nice-ffi
92
+ rubyforge_project: ruby-sdl-ffi
92
93
  rubygems_version: 1.3.5
93
94
  signing_key:
94
95
  specification_version: 3