clintbellanger/flare — pull request #791 by dorkster (2012-08-15 17:33:38+00:00)
Title: Tile-based hotspots WIP

Don't pull this. I just want to check and see if I'm on the right track before I continue updating hotspots in the game data. So far, I've tested with the stash and the warp zone in the Frontier Outpost. Everything works as expected. One thing to note, I'm using screen_to_map() here, which I think needs to be changed to work with size mods (there was already a TODO for this in the code).

I haven't added checking for transparent pixels, because I am confused on the implementation. I've added a checkPixel() function to Utils.cpp (although I'm not sure if I'm checking the RGBA values correctly). I don't understand what surface would be passed to this function. Would we need to create a surface and blit the contents of the tile to it? I imagine that would be expensive. Even if we did do that, would it be a composition of all layers? Check each layer individually? Or am I just confusing myself and there's a different way to do this all together?

Personally, I don't see the reasoning for checking transparency. A rectangular area of tiles by itself feels fine and keeps hotspots easy to click on.