Skip to content
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

Merged
merged 2 commits into from
Jun 6, 2020

Conversation

Kamikaetzchen
Copy link
Contributor

No description provided.

Foreman/DataCache.cs Outdated Show resolved Hide resolved
Foreman/DataCache.cs Outdated Show resolved Hide resolved
{
if (iconImage.GetPixel(i, j).A != 0)
{
iconImage.SetPixel(i, j, tintColor);
Copy link
Owner

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?

Copy link
Contributor Author

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^^

}
catch (Exception e)
{
// whatever
Copy link
Owner

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.

Copy link
Contributor Author

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

}
catch (Exception e)
{
// whatever
Copy link
Owner

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants