chipmunk 5.3.4.5 → 6.1.3.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/ext/chipmunk/chipmunk.c +199 -28
  2. data/ext/chipmunk/chipmunk.h +123 -68
  3. data/ext/chipmunk/chipmunk_ffi.h +129 -11
  4. data/ext/chipmunk/chipmunk_private.h +232 -16
  5. data/ext/chipmunk/chipmunk_types.h +94 -30
  6. data/ext/chipmunk/chipmunk_unsafe.h +12 -3
  7. data/ext/chipmunk/constraints/cpConstraint.h +90 -34
  8. data/ext/chipmunk/{cpDampedRotarySpring.h → constraints/cpDampedRotarySpring.h} +18 -8
  9. data/ext/chipmunk/{cpDampedSpring.h → constraints/cpDampedSpring.h} +27 -16
  10. data/ext/chipmunk/constraints/cpGearJoint.h +17 -7
  11. data/ext/chipmunk/constraints/cpGrooveJoint.h +19 -10
  12. data/ext/chipmunk/constraints/cpPinJoint.h +17 -8
  13. data/ext/chipmunk/constraints/cpPivotJoint.h +18 -9
  14. data/ext/chipmunk/constraints/cpRatchetJoint.h +17 -8
  15. data/ext/chipmunk/constraints/cpRotaryLimitJoint.h +16 -7
  16. data/ext/chipmunk/{cpSimpleMotor.h → constraints/cpSimpleMotor.h} +15 -6
  17. data/ext/chipmunk/constraints/cpSlideJoint.h +18 -9
  18. data/ext/chipmunk/constraints/util.h +36 -44
  19. data/ext/chipmunk/cpArbiter.c +159 -94
  20. data/ext/chipmunk/cpArbiter.h +135 -129
  21. data/ext/chipmunk/cpArray.c +37 -56
  22. data/ext/chipmunk/cpBB.c +1 -12
  23. data/ext/chipmunk/cpBB.h +80 -18
  24. data/ext/chipmunk/cpBBTree.c +891 -0
  25. data/ext/chipmunk/cpBody.c +185 -47
  26. data/ext/chipmunk/cpBody.h +156 -124
  27. data/ext/chipmunk/cpCollision.c +126 -115
  28. data/ext/chipmunk/cpConstraint.c +10 -6
  29. data/ext/chipmunk/cpDampedRotarySpring.c +26 -17
  30. data/ext/chipmunk/cpDampedSpring.c +25 -18
  31. data/ext/chipmunk/cpGearJoint.c +23 -17
  32. data/ext/chipmunk/cpGrooveJoint.c +26 -22
  33. data/ext/chipmunk/cpHashSet.c +51 -51
  34. data/ext/chipmunk/cpPinJoint.c +26 -19
  35. data/ext/chipmunk/cpPivotJoint.c +23 -19
  36. data/ext/chipmunk/cpPolyShape.c +93 -69
  37. data/ext/chipmunk/cpPolyShape.h +33 -69
  38. data/ext/chipmunk/cpRatchetJoint.c +26 -21
  39. data/ext/chipmunk/cpRotaryLimitJoint.c +28 -22
  40. data/ext/chipmunk/cpShape.c +122 -133
  41. data/ext/chipmunk/cpShape.h +146 -95
  42. data/ext/chipmunk/cpSimpleMotor.c +24 -17
  43. data/ext/chipmunk/cpSlideJoint.c +28 -26
  44. data/ext/chipmunk/cpSpace.c +251 -196
  45. data/ext/chipmunk/cpSpace.h +173 -103
  46. data/ext/chipmunk/cpSpaceComponent.c +236 -159
  47. data/ext/chipmunk/cpSpaceHash.c +259 -159
  48. data/ext/chipmunk/cpSpaceQuery.c +127 -59
  49. data/ext/chipmunk/cpSpaceStep.c +235 -197
  50. data/ext/chipmunk/cpSpatialIndex.c +69 -0
  51. data/ext/chipmunk/cpSpatialIndex.h +227 -0
  52. data/ext/chipmunk/cpSweep1D.c +254 -0
  53. data/ext/chipmunk/cpVect.c +11 -26
  54. data/ext/chipmunk/cpVect.h +76 -71
  55. data/ext/chipmunk/extconf.rb +4 -31
  56. data/ext/chipmunk/prime.h +1 -1
  57. data/ext/chipmunk/rb_chipmunk.c +36 -45
  58. data/ext/chipmunk/rb_chipmunk.h +6 -3
  59. data/ext/chipmunk/rb_cpArbiter.c +2 -2
  60. data/ext/chipmunk/rb_cpBB.c +116 -35
  61. data/ext/chipmunk/rb_cpBody.c +5 -12
  62. data/ext/chipmunk/rb_cpConstraint.c +144 -9
  63. data/ext/chipmunk/rb_cpShape.c +69 -78
  64. data/ext/chipmunk/rb_cpSpace.c +81 -76
  65. metadata +61 -61
  66. data/LICENSE +0 -22
  67. data/README +0 -110
  68. data/Rakefile +0 -102
  69. data/ext/chipmunk/cpArray.h +0 -49
  70. data/ext/chipmunk/cpCollision.h +0 -28
  71. data/ext/chipmunk/cpHashSet.h +0 -82
  72. data/ext/chipmunk/cpSpaceHash.h +0 -110
  73. data/lib/chipmunk.rb +0 -194
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chipmunk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.4.5
5
- prerelease:
4
+ version: 6.1.3.0.rc1
5
+ prerelease: 8
6
6
  platform: ruby
7
7
  authors:
8
- - Scott Lembcke, Beoran, John Mair (banisterfiend)
8
+ - Scott Lembcke, Beoran, John Mair (banisterfiend), Shawn Anderson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-06 00:00:00.000000000Z
12
+ date: 2013-04-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine. '
15
15
  email: beoran@rubyforge.org
@@ -18,77 +18,74 @@ extensions:
18
18
  - ext/chipmunk/extconf.rb
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - Rakefile
22
- - README
23
- - LICENSE
24
- - lib/chipmunk.rb
25
- - ext/chipmunk/extconf.rb
26
- - ext/chipmunk/cpSimpleMotor.h
27
- - ext/chipmunk/cpHashSet.h
28
- - ext/chipmunk/cpDampedRotarySpring.h
21
+ - ext/chipmunk/chipmunk.h
22
+ - ext/chipmunk/chipmunk_ffi.h
29
23
  - ext/chipmunk/chipmunk_private.h
30
24
  - ext/chipmunk/chipmunk_types.h
31
- - ext/chipmunk/prime.h
32
25
  - ext/chipmunk/chipmunk_unsafe.h
33
- - ext/chipmunk/cpDampedSpring.h
34
- - ext/chipmunk/cpSpace.h
35
- - ext/chipmunk/cpArbiter.h
36
- - ext/chipmunk/chipmunk_ffi.h
37
- - ext/chipmunk/cpBody.h
38
- - ext/chipmunk/cpVect.h
39
- - ext/chipmunk/cpSpaceHash.h
40
- - ext/chipmunk/constraints/cpRotaryLimitJoint.h
26
+ - ext/chipmunk/constraints/cpConstraint.h
27
+ - ext/chipmunk/constraints/cpDampedRotarySpring.h
28
+ - ext/chipmunk/constraints/cpDampedSpring.h
29
+ - ext/chipmunk/constraints/cpGearJoint.h
41
30
  - ext/chipmunk/constraints/cpGrooveJoint.h
42
- - ext/chipmunk/constraints/cpPivotJoint.h
43
31
  - ext/chipmunk/constraints/cpPinJoint.h
44
- - ext/chipmunk/constraints/util.h
45
- - ext/chipmunk/constraints/cpSlideJoint.h
46
- - ext/chipmunk/constraints/cpConstraint.h
32
+ - ext/chipmunk/constraints/cpPivotJoint.h
47
33
  - ext/chipmunk/constraints/cpRatchetJoint.h
48
- - ext/chipmunk/constraints/cpGearJoint.h
49
- - ext/chipmunk/cpCollision.h
50
- - ext/chipmunk/cpShape.h
34
+ - ext/chipmunk/constraints/cpRotaryLimitJoint.h
35
+ - ext/chipmunk/constraints/cpSimpleMotor.h
36
+ - ext/chipmunk/constraints/cpSlideJoint.h
37
+ - ext/chipmunk/constraints/util.h
38
+ - ext/chipmunk/cpArbiter.h
51
39
  - ext/chipmunk/cpBB.h
52
- - ext/chipmunk/rb_chipmunk.h
53
- - ext/chipmunk/cpArray.h
54
- - ext/chipmunk/chipmunk.h
40
+ - ext/chipmunk/cpBody.h
55
41
  - ext/chipmunk/cpPolyShape.h
56
- - ext/chipmunk/rb_chipmunk.c
57
- - ext/chipmunk/cpRotaryLimitJoint.c
58
- - ext/chipmunk/cpShape.c
59
- - ext/chipmunk/rb_cpBody.c
60
- - ext/chipmunk/cpPinJoint.c
61
- - ext/chipmunk/cpSimpleMotor.c
62
- - ext/chipmunk/rb_cpBB.c
63
- - ext/chipmunk/cpVect.c
64
- - ext/chipmunk/cpPivotJoint.c
65
- - ext/chipmunk/rb_cpShape.c
66
- - ext/chipmunk/cpRatchetJoint.c
42
+ - ext/chipmunk/cpShape.h
43
+ - ext/chipmunk/cpSpace.h
44
+ - ext/chipmunk/cpSpatialIndex.h
45
+ - ext/chipmunk/cpVect.h
46
+ - ext/chipmunk/prime.h
47
+ - ext/chipmunk/rb_chipmunk.h
48
+ - ext/chipmunk/chipmunk.c
67
49
  - ext/chipmunk/cpArbiter.c
68
- - ext/chipmunk/cpSlideJoint.c
69
- - ext/chipmunk/rb_cpConstraint.c
70
- - ext/chipmunk/rb_cpVect.c
71
- - ext/chipmunk/rb_cpArbiter.c
72
50
  - ext/chipmunk/cpArray.c
73
- - ext/chipmunk/cpSpaceHash.c
74
- - ext/chipmunk/cpSpaceStep.c
75
- - ext/chipmunk/rb_cpSpace.c
76
- - ext/chipmunk/cpSpace.c
77
- - ext/chipmunk/cpDampedRotarySpring.c
78
- - ext/chipmunk/cpHashSet.c
79
- - ext/chipmunk/cpCollision.c
51
+ - ext/chipmunk/cpBB.c
52
+ - ext/chipmunk/cpBBTree.c
80
53
  - ext/chipmunk/cpBody.c
54
+ - ext/chipmunk/cpCollision.c
81
55
  - ext/chipmunk/cpConstraint.c
56
+ - ext/chipmunk/cpDampedRotarySpring.c
82
57
  - ext/chipmunk/cpDampedSpring.c
83
- - ext/chipmunk/chipmunk.c
58
+ - ext/chipmunk/cpGearJoint.c
84
59
  - ext/chipmunk/cpGrooveJoint.c
60
+ - ext/chipmunk/cpHashSet.c
61
+ - ext/chipmunk/cpPinJoint.c
62
+ - ext/chipmunk/cpPivotJoint.c
63
+ - ext/chipmunk/cpPolyShape.c
64
+ - ext/chipmunk/cpRatchetJoint.c
65
+ - ext/chipmunk/cpRotaryLimitJoint.c
66
+ - ext/chipmunk/cpShape.c
67
+ - ext/chipmunk/cpSimpleMotor.c
68
+ - ext/chipmunk/cpSlideJoint.c
69
+ - ext/chipmunk/cpSpace.c
85
70
  - ext/chipmunk/cpSpaceComponent.c
86
- - ext/chipmunk/cpBB.c
71
+ - ext/chipmunk/cpSpaceHash.c
87
72
  - ext/chipmunk/cpSpaceQuery.c
88
- - ext/chipmunk/cpPolyShape.c
89
- - ext/chipmunk/cpGearJoint.c
73
+ - ext/chipmunk/cpSpaceStep.c
74
+ - ext/chipmunk/cpSpatialIndex.c
75
+ - ext/chipmunk/cpSweep1D.c
76
+ - ext/chipmunk/cpVect.c
77
+ - ext/chipmunk/rb_chipmunk.c
78
+ - ext/chipmunk/rb_cpArbiter.c
79
+ - ext/chipmunk/rb_cpBB.c
80
+ - ext/chipmunk/rb_cpBody.c
81
+ - ext/chipmunk/rb_cpConstraint.c
82
+ - ext/chipmunk/rb_cpShape.c
83
+ - ext/chipmunk/rb_cpSpace.c
84
+ - ext/chipmunk/rb_cpVect.c
85
+ - ext/chipmunk/extconf.rb
90
86
  homepage: https://github.com/beoran/chipmunk
91
- licenses: []
87
+ licenses:
88
+ - MIT
92
89
  post_install_message:
93
90
  rdoc_options: []
94
91
  require_paths:
@@ -99,15 +96,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
96
  - - ! '>='
100
97
  - !ruby/object:Gem::Version
101
98
  version: '0'
99
+ segments:
100
+ - 0
101
+ hash: -4521143806321433034
102
102
  required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  none: false
104
104
  requirements:
105
- - - ! '>='
105
+ - - ! '>'
106
106
  - !ruby/object:Gem::Version
107
- version: '0'
107
+ version: 1.3.1
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 1.8.5
110
+ rubygems_version: 1.8.25
111
111
  signing_key:
112
112
  specification_version: 3
113
113
  summary: Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine.
data/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- /* Copyright (c) 2007 Scott Lembcke
2
- * Copyright (c) 2010-2011 John Mair
3
- * Copyright (c) 2010-2011 Beoran (beoran@rubyforge.org)
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a copy
6
- * of this software and associated documentation files (the "Software"), to deal
7
- * in the Software without restriction, including without limitation the rights
8
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- * copies of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included in
13
- * all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
data/README DELETED
@@ -1,110 +0,0 @@
1
- Ruby Bindings to Chipmunk Physics Version 5.3.4
2
-
3
- (C) Scott Lembcke, Beoran and John Mair (banisterfiend)
4
-
5
- IMPORTANT NOTICE:
6
- This is version 5.3.4.3 of the bindings for MRI Ruby 1.8.x and 1.9.x to
7
- Chipmunk version 5.3.4.
8
-
9
- (1) 1/10/09 Cross-Platform Gem built by John Mair (banisterfiend)
10
- * Just go: gem install chipmunk
11
-
12
- FORUM:
13
- http://www.slembcke.net/forums
14
-
15
- CONTACT:
16
- slembcke@gmail.com (also on Google Talk) for Chipmunk.
17
- beoran@rubyforge.org for these bindings to Ruby.
18
-
19
- ABOUT CHIPMUNK:
20
- Chipmunk is a simple, lightweight and fast 2D rigid body physics library
21
- written in C by Slembcke. It's licensed under the unrestrictive, OSI approved
22
- MIT license.
23
-
24
- ABOUT THESE RUBY BINDINGS:
25
- Although chipmunk comes with ruby bindings, they are not always up to date
26
- with regards to the functionality of the C library, and historically, they
27
- have been incompatible with recent versions of Ruby.
28
-
29
- Therefore, these bindings are intended to as an enhanced version with more
30
- features and better compatibility with recent versions of Ruby. They are also
31
- intended to be an alternative to the chipmunk-ffi bindings when performance
32
- is of the utmost importance, as it may be for games.
33
-
34
- The intent is for these bindings to be mostly source code compatible with the
35
- FFI bindings. Main exceptions are when it did not support the functionality I
36
- added yet. All this is documented by specs and by the html documentation.
37
-
38
- If you have any problems with these bindings, please contact the maintainer at
39
- beoran@rubyforge.org, or report the issue on the issue tracker:
40
- https://github.com/beoran/chipmunk/issues
41
-
42
- INSTALLATION
43
- Clone this repository, go into the ext directory and do:
44
-
45
- ruby extconf.rb ; make ; make install
46
-
47
- There is also a gem available for Linux and OS/X, and a binary gem for Windows,
48
- which you can try to install with:
49
-
50
- gem install chipmunk
51
-
52
- However, due to incompatilties in the latest versions of
53
- Rake, Rake-Compiler and rubygems, the gem method of installation may fail for
54
- you. This will be solved when these incompatibilities are solved by these
55
- upstream tools.
56
-
57
- These bindings vendor Chipmunk 5.3.4 with a few extra patches, so you don't
58
- need to have it installed.
59
-
60
- DOCUMENTATION:
61
- Full handcrafted documentation based on the C documentation is available at:
62
- http://beoran.github.com/chipmunk/
63
-
64
- CHANGES:
65
- * Since 5.3.4.4: Vendored chipmunk again, uncleanly. should compile well now.
66
- * Version 5.3.4.2 and 5.3.4.3 are broken, don't use them.
67
- * Since 5.3.4.1: Vendored chipmunk again, cleanly. Several bugfixes.
68
- * Since 5.1.0 : Much more of Chipmunk's functionality is wrapped. Unvendored
69
- chipmunk. More specs and documentation.
70
-
71
- VERSIONING POLICY:
72
- Since 5.3.4.0 these bindings follow the version of chipmunk, followed by an
73
- extra number for the version of the bindings. All major releases will be
74
- backwards compatible in their API. The API may be enhanced in minor releases.
75
- The next planned release that is expected to partialy break backwards
76
- compatibility with the 5.3.4 API will be 6.x.x.0, which will be based on
77
- the upstream C Chipmunk library version 6.x.x after that leaves beta.
78
-
79
- KNOWN BUGS:
80
- * There are no bindings to SpaceHash since I think they are not so useful
81
- anymore since Chipmunk supports BB queries.
82
- * Some methods may crash with a segentation violation in case they are not
83
- used correctly, according to the underlying requirements of the C library.
84
-
85
- CONTRACTING:
86
- Howling Moon Software (Slembke's company) is available for contracting if you
87
- want to make the physics in your game really stand out. Feel free to contact
88
- them through their webpage: http://howlingmoonsoftware.com/contracting.php
89
-
90
- TODO:
91
- * Allow several constructors to be more flexible and take nil as a default
92
- argument.
93
- * Try to prevent segfauts on incorrect use of certain methods, if possible.
94
- * Get ready for chipmunk 5.3.5 and 6.x when they come out.
95
- * Some more specs.
96
- * Fix the gem when the upstream tools get fixed.
97
-
98
- INFO FOR MAINTAINERS:
99
-
100
- (1) 1/10/09 Cross-Platform Gem built by John Mair (banisterfiend)
101
- * Just go: gem install chipmunk
102
-
103
- (2) Patched for 1.9.1 by Beoran (beoran@rubyforge.org)
104
-
105
- (3) How to build the gems? (maintainers only)
106
- * Install rake-compiler (http://github.com/luislavena/rake-compiler)
107
- * Install 1.9.1 and 1.8.6 mingw ruby versions (instructions above)
108
- * Type: rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1
109
- * Upload new gems to rubyforge and gemcutter.
110
-
data/Rakefile DELETED
@@ -1,102 +0,0 @@
1
- # Rakefile added by John Mair (banisterfiend)
2
-
3
- # require 'psych'
4
- require 'rake'
5
- require 'rake/clean'
6
- require 'rubygems'
7
- require 'rubygems/package_task'
8
-
9
-
10
-
11
- begin
12
- require 'rake/extensiontask'
13
- rescue LoadError
14
- puts "rake-compiler not found! Please install the rake-compiler gem!"
15
- # `/bin/bash -l -c "gem1.9 install rake-compiler"`
16
- # require 'rake/extensiontask'
17
- # puts "...done!"
18
- end
19
-
20
- CHIPMUNK_VERSION = "5.3.4.5"
21
- VENDORED_CHIPMUNK = 'chipmunk-5.3.4'
22
- VENDORED_SRC_DIR = File.join('vendor', VENDORED_CHIPMUNK, 'src')
23
- VENDORED_SRC_DIR2 = File.join('vendor', VENDORED_CHIPMUNK, 'src', 'constraints')
24
- VENDORED_INCLUDE_DIR = File.join('vendor', VENDORED_CHIPMUNK, 'include', 'chipmunk')
25
-
26
-
27
-
28
- dlext = Config::CONFIG['DLEXT']
29
-
30
- CLEAN.include("ext/**/*.#{dlext}", "ext/**/.log", "ext/**/.o", "ext/**/*~", "ext/**/*#*", "ext/**/.obj", "ext/**/.def", "ext/**/.pdb")
31
- CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o", "doc/**")
32
-
33
-
34
- def apply_spec_defaults(s)
35
- s.name = "chipmunk"
36
- s.summary = "Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine."
37
- s.description = s.summary + " "
38
- s.version = CHIPMUNK_VERSION
39
- s.author = "Scott Lembcke, Beoran, John Mair (banisterfiend)"
40
- s.email = 'beoran@rubyforge.org'
41
- s.date = Time.now.strftime '%Y-%m-%d'
42
- s.require_path = 'lib'
43
- s.homepage = "https://github.com/beoran/chipmunk"
44
- end
45
-
46
- FILES = ["Rakefile", "README", "LICENSE", "lib/chipmunk.rb"] +
47
- FileList["spec/*.rb", "ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c"].to_a
48
-
49
- # common tasks
50
- task :compile => :clean
51
-
52
- # platform dependent tasks
53
- if RUBY_PLATFORM =~ /darwin/
54
-
55
- spec = Gem::Specification.new do |s|
56
- apply_spec_defaults(s)
57
- s.platform = Gem::Platform::CURRENT
58
- s.files = ["Rakefile", "README", "LICENSE", "lib/chipmunk.rb", "lib/1.8/chipmunk.#{dlext}", "lib/1.9/chipmunk.#{dlext}"] +
59
- FileList["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c"].to_a
60
- end
61
-
62
- Rake::ExtensionTask.new('chipmunk') do |ext|
63
- ext.ext_dir = "ext"
64
- ext.lib_dir = "lib/#{RUBY_VERSION[0..2]}"
65
- ext.config_script = 'extconf.rb'
66
- ext.config_options << '--enable-macosx'
67
- end
68
-
69
- task :compile_multi => :clean do
70
- `/bin/bash -l -c "rvm 1.8.6,1.9.2 rake compile"`
71
- end
72
-
73
- task :gem => :compile_multi
74
- Gem::PackageTask.new(spec) do |pkg|
75
- pkg.need_zip = false
76
- pkg.need_tar = false
77
- end
78
-
79
- else
80
-
81
- spec = Gem::Specification.new do |s|
82
- apply_spec_defaults(s)
83
- s.platform = Gem::Platform::RUBY
84
- s.extensions = FileList["ext/**/extconf.rb"]
85
- s.files = ["Rakefile", "README", "LICENSE", "lib/chipmunk.rb"] +
86
- FileList["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c"].to_a
87
- end
88
-
89
- # add your default gem packing task
90
- Gem::PackageTask.new(spec) do |pkg|
91
- pkg.need_zip = false
92
- pkg.need_tar = false
93
- end
94
-
95
- Rake::ExtensionTask.new('chipmunk', spec) do |ext|
96
- ext.config_script = 'extconf.rb'
97
- ext.cross_compile = true
98
- ext.cross_platform = 'i586-mingw32'
99
- # ext.cross_platform = 'i386-mswin32'
100
- end
101
-
102
- end
@@ -1,49 +0,0 @@
1
- /* Copyright (c) 2007 Scott Lembcke
2
- *
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy
4
- * of this software and associated documentation files (the "Software"), to deal
5
- * in the Software without restriction, including without limitation the rights
6
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- * copies of the Software, and to permit persons to whom the Software is
8
- * furnished to do so, subject to the following conditions:
9
- *
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- * SOFTWARE.
20
- */
21
-
22
- // NOTE: cpArray is rarely used and will probably go away.
23
-
24
- typedef struct cpArray{
25
- CP_PRIVATE(int num);
26
- CP_PRIVATE(int max);
27
- CP_PRIVATE(void **arr);
28
- } cpArray;
29
-
30
- typedef void (*cpArrayIter)(void *ptr, void *data);
31
-
32
- cpArray *cpArrayAlloc(void);
33
- cpArray *cpArrayInit(cpArray *arr, int size);
34
- cpArray *cpArrayNew(int size);
35
-
36
- void cpArrayDestroy(cpArray *arr);
37
- void cpArrayFree(cpArray *arr);
38
-
39
- void cpArrayClear(cpArray *arr);
40
-
41
- void cpArrayPush(cpArray *arr, void *object);
42
- void *cpArrayPop(cpArray *arr);
43
- void cpArrayDeleteIndex(cpArray *arr, int idx);
44
- void cpArrayDeleteObj(cpArray *arr, void *obj);
45
-
46
- void cpArrayAppend(cpArray *arr, cpArray *other);
47
-
48
- void cpArrayEach(cpArray *arr, cpArrayIter iterFunc, void *data);
49
- cpBool cpArrayContains(cpArray *arr, void *ptr);