code_junkie

Algorithm for hit test in non-overlapping rectangles

Nov 11th, 2011
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. int id = bitmap_getpixel (mouse.x, mouse.y)
  2. if (id != -1)
  3. {
  4. hit_rectange (id);
  5. }
  6. else
  7. {
  8. no_hit();
  9. }
Add Comment
Please, Sign In to add comment