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

Compatibility upgrade of scripts involving textures #1890

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

colinator27
Copy link
Member

Description

This is a follow-up to #1870, upgrading existing built-in texture scripts to work with the changes made in that PR.

Some scripts had small syntax cleanup, as I went through them to make changes for textures.

A small amount of library and tool code was adjusted for the purpose of these script updates.

Caveats

Not every script was thoroughly tested (though a bunch were). Most scripts were at least tested to compile and start running. I may have also missed some scripts, but I did multiple searches through the code to figure out which scripts needed updating. This should still be better than nothing, however.

Multiple scripts still use Windows-only code, but the goal of this PR is only compatibility. Those scripts can get refactored in the future, and have been marked with TODO comments.

Notes

Followed all instances of TextureWorker and TextureBlob in scripts. Reviewed alongside the script changes made in #1538.

Copy link

github-actions bot commented Aug 26, 2024

@@ -122,13 +122,14 @@ public static MagickImage ReadBGRAImageFromFile(string filePath)
}

/// <summary>
/// Performs a resize of the given image, if required, using bilinear interpolation. Always returns a new image.
/// Performs a resize of the given image, if required, using the specified interpolation (bilinear by default). Always returns a new image.
Copy link
Contributor

Choose a reason for hiding this comment

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

considering people usually make pixel games in GM, are we sure we don't want to use NN as the default instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure. I believe the old method used wasn't nearest-neighbor, and there could be a benefit of it being very obvious you just tried to upscale a sprite on accident. In NN it can be slightly less obvious, especially if the aspect ratio only slightly differs. This would mostly affect the GUI though, which probably uses the default parameters currently.

UndertaleModTool/Scripts/Builtin Scripts/BorderEnabler.csx Outdated Show resolved Hide resolved
UndertaleModTool/Scripts/Builtin Scripts/BorderEnabler.csx Outdated Show resolved Hide resolved
UndertaleModTool/Scripts/Community Scripts/FontEditor.csx Outdated Show resolved Hide resolved
@Miepee Miepee merged commit d9df634 into master Nov 25, 2024
5 checks passed
@colinator27 colinator27 deleted the texture-handling-rewrite branch December 1, 2024 23:20
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.

3 participants