Quote:
Originally posted by Kaimetsu
Returns true if the point you specified is on the image and false if it falls on one of the transparent regions. I guess there are multiple this could be implemented:
1) The coordinates are given relative to the top-left corner of the image so the image doesn't need to be shown to be checked.
2) Instead of 'filename', the function takes image index (as used in showimg) and subsequently interprets the x and y as level or screen coordinates (depending on the draw layer of the given image).
Good for inventory systems - I can check if the player clicked on the apple rather than just checking against its bounding box. It opens up a few possibilities (systems like Ultima's, for example) and refines others. Let me know if the description wasn't clear enough.
|
I'm all for it. Better than doing if (mousex in |a,b|....) {}. Thats kind of how triggeraction works if I'm not mistaken (your proposed idea)?