JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
oops, have to check all 9 buckets.
[vor.git] / shape.c
diff --git a/shape.c b/shape.c
index 5aa7fb7..75424ef 100644 (file)
--- a/shape.c
+++ b/shape.c
@@ -116,6 +116,6 @@ pixel_collide(unsigned int xoff, unsigned int yoff, struct shape *r)
        
        if(xoff >= r->w || yoff >= r->h) return 0;
 
        
        if(xoff >= r->w || yoff >= r->h) return 0;
 
-       pmask = 1 << (xoff & 31); xoff >>= 5;
-       return r->mask[yoff*r->mw + xoff] & pmask;
+       pmask = 0x80000000 >> (xoff&0x1f);
+       return r->mask[(yoff*r->mw) + (xoff>>5)] & pmask;
 }
 }