- int v = (int)pbase.height / 16;
- int h = (int)pbase.width / 16;
-
- if(issolid(pbase.x + 1, pbase.y + 1) ||
- issolid(pbase.x + pbase.width -1, pbase.y + 1) ||
- issolid(pbase.x +1, pbase.y + pbase.height -1) ||
- issolid(pbase.x + pbase.width -1, pbase.y + pbase.height - 1))
- return true;
-
- for(int i = 1; i < h; ++i)
- {
- if(issolid(pbase.x + i*16,pbase.y + 1))
- return true;
- }
-
- for(int i = 1; i < h; ++i)
- {
- if( issolid(pbase.x + i*16,pbase.y + pbase.height - 1))
- return true;
- }
+ base_type base;
+ base.x = rect.p1.x;
+ base.y = rect.p1.y;
+ base.width = rect.get_width();
+ base.height = rect.get_height();
+ return collision_object_map(base);
+}