-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for fluid/gas icons from mods & mipmapping from base #42
Conversation
Foreman/DataCache.cs
Outdated
{ | ||
if (iconImage.GetPixel(i, j).A != 0) | ||
{ | ||
iconImage.SetPixel(i, j, tintColor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this API but is there not a "blend" function or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for System.Drawing.Color
:(
but i'm not blending anyway, i just override the pixel if alpha is > 0, which shouldnt be to bad anyway
other option would be to convert the image to a byteArray[][]
and do the operation there, but i just wanted to get it working first^^
Foreman/DataCache.cs
Outdated
} | ||
catch (Exception e) | ||
{ | ||
// whatever |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include error logging here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometimes there are no tables for "shift" or "tint" or whatever and since NLua kinda sucks, i can only check for it with try/catch and then check if it's == null
so i really wouldn't go and catch those errors, bloats my errorlog to ~200KB
Foreman/DataCache.cs
Outdated
} | ||
catch (Exception e) | ||
{ | ||
// whatever |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include error logging here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
No description provided.