chipmunk 6.1.3.0.rc1 → 6.1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/ext/chipmunk/rb_chipmunk.c +1 -9
- data/ext/chipmunk/rb_chipmunk.h +1 -3
- data/ext/chipmunk/rb_cpSpace.c +15 -1
- metadata +21 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 184118e83810f5f9ff162b0a2ec8c3b20d2e227e
|
4
|
+
data.tar.gz: 6526469b14b6dbc5332618b0777354934fe298df
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3485a244856099559d2626f679c8142514454048e7fb54cb8f097e4ea01ec916b96aee2bd74d90cfc215532fde311c7696e0dad464525e2e2132902c5f9b458d
|
7
|
+
data.tar.gz: c03c533bdb64b59d112d895fddbf31c93881fe9893a92320bea9090c98e22a807a659401ad95c700dd02506f8715485612ee275dc6cc519b5427a5ec09348b94
|
data/ext/chipmunk/rb_chipmunk.c
CHANGED
@@ -166,15 +166,6 @@ rb_cpRecenterPoly(VALUE self, VALUE arr) {
|
|
166
166
|
return arr;
|
167
167
|
}
|
168
168
|
|
169
|
-
// We need this as rb_obj_method_arity is not in 1.8.7
|
170
|
-
int
|
171
|
-
cp_rb_obj_method_arity(VALUE self, ID id) {
|
172
|
-
VALUE metho = rb_funcall(self, rb_intern("method"), 1, ID2SYM(id));
|
173
|
-
VALUE arity = rb_funcall(metho, rb_intern("arity"), 0, 0);
|
174
|
-
return NUM2INT(arity);
|
175
|
-
}
|
176
|
-
|
177
|
-
|
178
169
|
|
179
170
|
|
180
171
|
|
@@ -221,6 +212,7 @@ Init_chipmunk(void) {
|
|
221
212
|
|
222
213
|
rb_define_const(m_Chipmunk, "ALL_LAYERS", UINT2NUM((unsigned int)CP_ALL_LAYERS));
|
223
214
|
rb_define_const(m_Chipmunk, "NO_GROUP", UINT2NUM(CP_NO_GROUP));
|
215
|
+
CP_OBJ2INT(UINT2NUM(CP_NO_GROUP));
|
224
216
|
|
225
217
|
rb_eval_string("Float::INFINITY = 1.0/0.0 unless Float.const_defined? :INFINITY");
|
226
218
|
rb_eval_string("CP::INFINITY = 1.0/0.0 unless CP.const_defined? :INFINITY");
|
data/ext/chipmunk/rb_chipmunk.h
CHANGED
@@ -53,8 +53,6 @@ VWRAP(VALUE parent, cpVect *v) {
|
|
53
53
|
return vec_obj;
|
54
54
|
}
|
55
55
|
|
56
|
-
int cp_rb_obj_method_arity(VALUE self, ID id);
|
57
|
-
|
58
56
|
#define GETTER_TEMPLATE(func_name, klass, type) \
|
59
57
|
static inline type * \
|
60
58
|
func_name(VALUE self) \
|
@@ -105,7 +103,7 @@ void Init_cpSpace();
|
|
105
103
|
void Init_cpArbiter(void);
|
106
104
|
|
107
105
|
// transforms a boolean VALUE to an int
|
108
|
-
#define CP_BOOL_INT(VAL) ((
|
106
|
+
#define CP_BOOL_INT(VAL) (RTEST(VAL))
|
109
107
|
|
110
108
|
// transforms a C value (pointer or int) to Qtrue of Qfalse
|
111
109
|
// For consistency with CP_BOOL_INT.
|
data/ext/chipmunk/rb_cpSpace.c
CHANGED
@@ -145,6 +145,20 @@ doNothingCallback(cpArbiter *arb, cpSpace *space, void *data) {
|
|
145
145
|
return 0;
|
146
146
|
}
|
147
147
|
|
148
|
+
// We need this as rb_obj_method_arity is not in 1.8.7
|
149
|
+
int
|
150
|
+
rb_obj_method_arity(VALUE self, ID id) {
|
151
|
+
VALUE metho;
|
152
|
+
VALUE arity;
|
153
|
+
if(id == id_call) {
|
154
|
+
metho = self;
|
155
|
+
} else {
|
156
|
+
metho = rb_funcall(self, rb_intern("method"), 1, ID2SYM(id));
|
157
|
+
}
|
158
|
+
arity = rb_funcall(metho, rb_intern("arity"), 0, 0);
|
159
|
+
return NUM2INT(arity);
|
160
|
+
}
|
161
|
+
|
148
162
|
// This callback function centralizes all collision callbacks.
|
149
163
|
// it also adds flexibility by changing theway the callback is called on the
|
150
164
|
// arity of the callback block or method. With arity0, no args are pased,
|
@@ -159,7 +173,7 @@ do_callback(void * data, ID method, cpArbiter *arb) {
|
|
159
173
|
VALUE va = (VALUE)a->data;
|
160
174
|
VALUE vb = (VALUE)b->data;
|
161
175
|
VALUE varb = ARBWRAP(arb);
|
162
|
-
int arity =
|
176
|
+
int arity = rb_obj_method_arity(object, method);
|
163
177
|
switch(arity) {
|
164
178
|
case 0:
|
165
179
|
return CP_BOOL_INT(rb_funcall(object, method, 0));
|
metadata
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chipmunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.3.0
|
5
|
-
prerelease: 8
|
4
|
+
version: 6.1.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Scott Lembcke, Beoran, John Mair (banisterfiend), Shawn Anderson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-16 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
description:
|
13
|
+
description: 'Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine. '
|
15
14
|
email: beoran@rubyforge.org
|
16
15
|
executables: []
|
17
16
|
extensions:
|
18
17
|
- ext/chipmunk/extconf.rb
|
19
18
|
extra_rdoc_files: []
|
20
19
|
files:
|
20
|
+
- ext/chipmunk/chipmunk.c
|
21
21
|
- ext/chipmunk/chipmunk.h
|
22
22
|
- ext/chipmunk/chipmunk_ffi.h
|
23
23
|
- ext/chipmunk/chipmunk_private.h
|
@@ -35,22 +35,14 @@ files:
|
|
35
35
|
- ext/chipmunk/constraints/cpSimpleMotor.h
|
36
36
|
- ext/chipmunk/constraints/cpSlideJoint.h
|
37
37
|
- ext/chipmunk/constraints/util.h
|
38
|
-
- ext/chipmunk/cpArbiter.h
|
39
|
-
- ext/chipmunk/cpBB.h
|
40
|
-
- ext/chipmunk/cpBody.h
|
41
|
-
- ext/chipmunk/cpPolyShape.h
|
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
|
49
38
|
- ext/chipmunk/cpArbiter.c
|
39
|
+
- ext/chipmunk/cpArbiter.h
|
50
40
|
- ext/chipmunk/cpArray.c
|
51
41
|
- ext/chipmunk/cpBB.c
|
42
|
+
- ext/chipmunk/cpBB.h
|
52
43
|
- ext/chipmunk/cpBBTree.c
|
53
44
|
- ext/chipmunk/cpBody.c
|
45
|
+
- ext/chipmunk/cpBody.h
|
54
46
|
- ext/chipmunk/cpCollision.c
|
55
47
|
- ext/chipmunk/cpConstraint.c
|
56
48
|
- ext/chipmunk/cpDampedRotarySpring.c
|
@@ -61,20 +53,28 @@ files:
|
|
61
53
|
- ext/chipmunk/cpPinJoint.c
|
62
54
|
- ext/chipmunk/cpPivotJoint.c
|
63
55
|
- ext/chipmunk/cpPolyShape.c
|
56
|
+
- ext/chipmunk/cpPolyShape.h
|
64
57
|
- ext/chipmunk/cpRatchetJoint.c
|
65
58
|
- ext/chipmunk/cpRotaryLimitJoint.c
|
66
59
|
- ext/chipmunk/cpShape.c
|
60
|
+
- ext/chipmunk/cpShape.h
|
67
61
|
- ext/chipmunk/cpSimpleMotor.c
|
68
62
|
- ext/chipmunk/cpSlideJoint.c
|
69
63
|
- ext/chipmunk/cpSpace.c
|
64
|
+
- ext/chipmunk/cpSpace.h
|
70
65
|
- ext/chipmunk/cpSpaceComponent.c
|
71
66
|
- ext/chipmunk/cpSpaceHash.c
|
72
67
|
- ext/chipmunk/cpSpaceQuery.c
|
73
68
|
- ext/chipmunk/cpSpaceStep.c
|
74
69
|
- ext/chipmunk/cpSpatialIndex.c
|
70
|
+
- ext/chipmunk/cpSpatialIndex.h
|
75
71
|
- ext/chipmunk/cpSweep1D.c
|
76
72
|
- ext/chipmunk/cpVect.c
|
73
|
+
- ext/chipmunk/cpVect.h
|
74
|
+
- ext/chipmunk/extconf.rb
|
75
|
+
- ext/chipmunk/prime.h
|
77
76
|
- ext/chipmunk/rb_chipmunk.c
|
77
|
+
- ext/chipmunk/rb_chipmunk.h
|
78
78
|
- ext/chipmunk/rb_cpArbiter.c
|
79
79
|
- ext/chipmunk/rb_cpBB.c
|
80
80
|
- ext/chipmunk/rb_cpBody.c
|
@@ -82,33 +82,28 @@ files:
|
|
82
82
|
- ext/chipmunk/rb_cpShape.c
|
83
83
|
- ext/chipmunk/rb_cpSpace.c
|
84
84
|
- ext/chipmunk/rb_cpVect.c
|
85
|
-
- ext/chipmunk/extconf.rb
|
86
85
|
homepage: https://github.com/beoran/chipmunk
|
87
86
|
licenses:
|
88
87
|
- MIT
|
88
|
+
metadata: {}
|
89
89
|
post_install_message:
|
90
90
|
rdoc_options: []
|
91
91
|
require_paths:
|
92
92
|
- lib
|
93
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
94
|
requirements:
|
96
|
-
- -
|
95
|
+
- - '>='
|
97
96
|
- !ruby/object:Gem::Version
|
98
97
|
version: '0'
|
99
|
-
segments:
|
100
|
-
- 0
|
101
|
-
hash: -4521143806321433034
|
102
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
-
none: false
|
104
99
|
requirements:
|
105
|
-
- -
|
100
|
+
- - '>='
|
106
101
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
102
|
+
version: '0'
|
108
103
|
requirements: []
|
109
104
|
rubyforge_project:
|
110
|
-
rubygems_version:
|
105
|
+
rubygems_version: 2.2.2
|
111
106
|
signing_key:
|
112
|
-
specification_version:
|
107
|
+
specification_version: 4
|
113
108
|
summary: Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine.
|
114
109
|
test_files: []
|