chipmunk 6.1.3.3 → 6.1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +2 -0
- data/ext/chipmunk/chipmunk_types.h +2 -2
- data/ext/chipmunk/rb_chipmunk.c +1 -3
- data/ext/chipmunk/rb_cpShape.c +2 -2
- data/ext/chipmunk/rb_cpSpace.c +8 -8
- data/lib/chipmunk.rb +1 -1
- data/lib/version.rb +3 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ad1dd10bf05473ad1cdfe6b9c8b86355ad1c493
|
4
|
+
data.tar.gz: 5c9e9480ee09b452818e4a3e4db71849c946012a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c433bb21950dcfb6cce659fbfc0253fe8d37be4ade6979ef73da41e2ef994d89b10041cce1f3e4f7f7819149f37aa701bb906e6d543ff4d0cc4ce06ebcf596e6
|
7
|
+
data.tar.gz: 170e39392395a68bf42d79260892f88a316655e335b0be6bb78d5afaf1b6e67e46111f00e7eab1dbb01153e7491af8a2ce6667dcfd4c15caf3a18f747ed571b8
|
data/README
CHANGED
@@ -164,7 +164,7 @@ typedef uintptr_t cpHashValue;
|
|
164
164
|
typedef CP_COLLISION_TYPE_TYPE cpCollisionType;
|
165
165
|
#else
|
166
166
|
/// Type used for cpSpace.collision_type.
|
167
|
-
typedef
|
167
|
+
typedef unsigned long cpCollisionType;
|
168
168
|
#endif
|
169
169
|
|
170
170
|
#ifdef CP_GROUP_TYPE
|
@@ -178,7 +178,7 @@ typedef uintptr_t cpHashValue;
|
|
178
178
|
typedef CP_LAYERS_TYPE cpLayers;
|
179
179
|
#else
|
180
180
|
/// Type used for cpShape.layers.
|
181
|
-
typedef unsigned
|
181
|
+
typedef unsigned long cpLayers;
|
182
182
|
#endif
|
183
183
|
|
184
184
|
#ifdef CP_TIMESTAMP_TYPE
|
data/ext/chipmunk/rb_chipmunk.c
CHANGED
@@ -37,9 +37,7 @@ CP_OBJ2INT(VALUE object) {
|
|
37
37
|
int nextInt = 0;
|
38
38
|
|
39
39
|
if(NIL_P(intValue)) {
|
40
|
-
|
41
|
-
nextInt = RHASH(cpObjectToIntHash)->ntbl->num_entries;
|
42
|
-
}
|
40
|
+
nextInt = RHASH_SIZE(cpObjectToIntHash);
|
43
41
|
rb_hash_aset(cpObjectToIntHash, object, INT2NUM(nextInt));
|
44
42
|
} else {
|
45
43
|
nextInt = NUM2INT(intValue);
|
data/ext/chipmunk/rb_cpShape.c
CHANGED
@@ -85,7 +85,7 @@ static VALUE
|
|
85
85
|
rb_cpShapeSetCollType(VALUE self, VALUE val) {
|
86
86
|
VALUE col_type = rb_obj_id(val);
|
87
87
|
rb_iv_set(self, "collType", val);
|
88
|
-
SHAPE(self)->collision_type =
|
88
|
+
SHAPE(self)->collision_type = NUM2ULONG(col_type);
|
89
89
|
|
90
90
|
return val;
|
91
91
|
}
|
@@ -127,7 +127,7 @@ rb_cpShapeGetLayers(VALUE self) {
|
|
127
127
|
|
128
128
|
static VALUE
|
129
129
|
rb_cpShapeSetLayers(VALUE self, VALUE layers) {
|
130
|
-
SHAPE(self)->layers =
|
130
|
+
SHAPE(self)->layers = NUM2ULONG(layers);
|
131
131
|
|
132
132
|
return layers;
|
133
133
|
}
|
data/ext/chipmunk/rb_cpSpace.c
CHANGED
@@ -236,7 +236,7 @@ rb_cpSpaceAddCollisionHandler(int argc, VALUE *argv, VALUE self) {
|
|
236
236
|
rb_raise(rb_eArgError, "Cannot specify both a handler object and a block.");
|
237
237
|
} else if(RTEST(block)) {
|
238
238
|
cpSpaceAddCollisionHandler(
|
239
|
-
SPACE(self),
|
239
|
+
SPACE(self), NUM2ULONG(id_a), NUM2ULONG(id_b),
|
240
240
|
NULL,
|
241
241
|
compatibilityCallback,
|
242
242
|
NULL,
|
@@ -247,7 +247,7 @@ rb_cpSpaceAddCollisionHandler(int argc, VALUE *argv, VALUE self) {
|
|
247
247
|
rb_hash_aset(blocks, rb_ary_new3(2, id_a, id_b), block);
|
248
248
|
} else if(RTEST(obj)) {
|
249
249
|
cpSpaceAddCollisionHandler(
|
250
|
-
SPACE(self),
|
250
|
+
SPACE(self), NUM2ULONG(id_a), NUM2ULONG(id_b),
|
251
251
|
(respondsTo(obj, id_begin) ? beginCallback : NULL),
|
252
252
|
(respondsTo(obj, id_pre_solve) ? preSolveCallback : NULL),
|
253
253
|
(respondsTo(obj, id_post_solve) ? postSolveCallback : NULL),
|
@@ -258,7 +258,7 @@ rb_cpSpaceAddCollisionHandler(int argc, VALUE *argv, VALUE self) {
|
|
258
258
|
rb_hash_aset(blocks, rb_ary_new3(2, id_a, id_b), obj);
|
259
259
|
} else {
|
260
260
|
cpSpaceAddCollisionHandler(
|
261
|
-
SPACE(self),
|
261
|
+
SPACE(self), NUM2ULONG(id_a), NUM2ULONG(id_b),
|
262
262
|
NULL, doNothingCallback, NULL, NULL, NULL
|
263
263
|
);
|
264
264
|
}
|
@@ -270,7 +270,7 @@ static VALUE
|
|
270
270
|
rb_cpSpaceRemoveCollisionHandler(VALUE self, VALUE a, VALUE b) {
|
271
271
|
VALUE id_a = rb_obj_id(a);
|
272
272
|
VALUE id_b = rb_obj_id(b);
|
273
|
-
cpSpaceRemoveCollisionHandler(SPACE(self),
|
273
|
+
cpSpaceRemoveCollisionHandler(SPACE(self), NUM2ULONG(id_a), NUM2ULONG(id_b));
|
274
274
|
|
275
275
|
VALUE blocks = rb_iv_get(self, "@blocks");
|
276
276
|
rb_hash_delete(blocks, rb_ary_new3(2, id_a, id_b));
|
@@ -431,13 +431,13 @@ rb_cpSpaceReindexShape(VALUE self, VALUE shape) {
|
|
431
431
|
static unsigned int
|
432
432
|
get_layers(VALUE layers) {
|
433
433
|
if (NIL_P(layers)) return ~0;
|
434
|
-
return
|
434
|
+
return NUM2ULONG(layers);
|
435
435
|
}
|
436
436
|
|
437
437
|
static unsigned int
|
438
438
|
get_group(VALUE group) {
|
439
439
|
if (NIL_P(group)) return 0;
|
440
|
-
return
|
440
|
+
return NUM2ULONG(group);
|
441
441
|
}
|
442
442
|
|
443
443
|
static void
|
@@ -522,8 +522,8 @@ rb_cpSpaceBBQuery(int argc, VALUE *argv, VALUE self) {
|
|
522
522
|
unsigned int g = 0;
|
523
523
|
rb_scan_args(argc, argv, "12&", &bb, &layers, &group, &block);
|
524
524
|
|
525
|
-
if (!NIL_P(layers)) l =
|
526
|
-
if (!NIL_P(group)) g =
|
525
|
+
if (!NIL_P(layers)) l = NUM2ULONG(layers);
|
526
|
+
if (!NIL_P(group)) g = NUM2ULONG(group);
|
527
527
|
|
528
528
|
cpSpaceBBQuery(
|
529
529
|
SPACE(self), *BBGET(bb), l, g,
|
data/lib/chipmunk.rb
CHANGED
data/lib/version.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chipmunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.3.
|
4
|
+
version: 6.1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Lembcke, Beoran, John Mair (banisterfiend), Shawn Anderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Enhanced ruby bindings for the chipmunk game physics engine. '
|
14
14
|
email: beoran@rubyforge.org
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- ext/chipmunk/rb_cpSpace.c
|
87
87
|
- ext/chipmunk/rb_cpVect.c
|
88
88
|
- lib/chipmunk.rb
|
89
|
+
- lib/version.rb
|
89
90
|
homepage: https://github.com/beoran/chipmunk
|
90
91
|
licenses:
|
91
92
|
- MIT
|
@@ -106,9 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
107
|
version: '0'
|
107
108
|
requirements: []
|
108
109
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.4.5
|
110
111
|
signing_key:
|
111
112
|
specification_version: 4
|
112
113
|
summary: Enhanced ruby bindings for the chipmunk game physics engine.
|
113
114
|
test_files: []
|
114
|
-
has_rdoc:
|