ID:2033551
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Following this request here (more specifically this post) http://www.byond.com/forum/?post=2030286#comment18329359

As far as I've been able to tell there's no easy way of directly comparing one icon_state to another. I propose something along the lines of icon.Compare(), or maybe atom.comapreIconState(), or something idk names aren't my thing, but to summerize, it would return 1 if both icon_states of the two things compared are identical, and 0 if they are not. Perhaps it could be extended to include how precise they match, something like (again my naming verbose-ness is shit for this kinda thing) returning ICON_MASK_SAME for two states which are the same, but treats all pixels as black, ICON_SAME_WITHOUT_ALPHA (lol) for two states which are the same but ignores alpha transparency and treats all pixels as alpha 255, . You get the gist of it, I hope.

It would render the above request irrelevant since you could just compare it to a blank icon, I can also think of a lot of advancements in lighting and custom collision via use of this with different maps/masks.
I'm not even sure how feasible this would be, it would be really nice to have though. I'm not sure what kind of methods exist for comparing one file to another that don't involve actually comparing each pixel of the image (which would probably be slow as heck on more complex images).

There's probably a more base-line method in existence though.
the icons are already in memory so it could just be a memcmp.
Client-side icon ops would throw a curve ball into this.