Class: SDL::CollisionMap
- Inherits:
-
Object
- Object
- SDL::CollisionMap
- Defined in:
- ext/sdl/sdl.c
Instance Method Summary collapse
-
#check(x1, y1, cmap2, x2, y2) ⇒ Object
// SDL::CollisionMap methods:.
Instance Method Details
#check(x1, y1, cmap2, x2, y2) ⇒ Object
// SDL::CollisionMap methods:
242 243 244 245 246 247 248 249 250 251 252 |
# File 'ext/sdl/sdl.c', line 242
static VALUE CollisionMap_check(VALUE cmap1, VALUE x1, VALUE y1,
VALUE cmap2, VALUE x2, VALUE y2) {
DEFINE_SELF(CollisionMap, cdata1, cmap1);
DEFINE_SELF(CollisionMap, cdata2, cmap2);
if(!sge_cmcheck(cdata1, NUM2SINT16(x1), NUM2SINT16(y1),
cdata2, NUM2SINT16(x2), NUM2SINT16(y2)))
return Qnil;
return rb_ary_new3(2, INT2NUM(sge_get_cx()), INT2NUM(sge_get_cy()));
}
|