mouse_cursor_is_over_that_image returns misleading positives when hovering over an image with
transparent padding/corners.
I don't think the work is worth the payoff here, but it I also know in my heart that this is a bug.
This could be trivial to solve in SDL mode (image->surface->pixels) but in OpenGL mode there is no copy
of images stored in RAM (only in VRAM)
To implement this in OGL mode using OGL calls (with no framework in the fdrpg engine) is simply out of
the question (because we only support a super old version of OGL which lacks the functions and data
structures required to do this quickly).
One possible OGL implementation would be to generate a stencil of object images based on the images'
alpha channel. We would only need this for clickable objects, but we would need one for all of each
object's frames. The memory overhead would be at least:
(1 bit * image_w * image_h) * frames_per_clickable_object * clickable_objects
and if we did it like that it would still be a little messy (bit padding would be required)
I'm torn because this is a noticeable defect in the highlighting fix I've written, but as I said
earlier I'm not sure the pain is worth the gain. So I'd like some direction on whether or not this is a
good use of my time.
|