UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

Refactor from System.Drawing.Common to Skiasharp.

Open Miepee opened this issue 2 years ago • 5 comments

Description

This PR attempts to refactor from System.Drawing.Common to Skiasharp. Doing this successfully means, that we'll be finally able to bump the .NET version for the project and not make the project Windows only by doing so. Fixes #875

Caveats

This is not finished yet

Notes

TODO:

  • [x] Opening this, because I need help with the GUI part (CC @VladiStep ), as I'm unable to do meaningful changes there due to me using Linux.
  • [ ] Someone should test this with QOI games (I don't have any on me).
  • [x] Ensure that basic graphic functionality didn't get lost (i.e. viewing embedded texture pages, texture page entries, rooms etc.) once the GUI part has been refactored
  • [x] Make sure that all the graphic related scripts (importAllTilesets, importAllSprites, newTextureRepacker etc.) still work as they should
  • [ ] Check if these behave properly on different display scales

Miepee avatar Nov 15 '23 18:11 Miepee

Opening this, because I need help with the GUI part (CC @VladiStep ), as I'm unable to do meaningful changes there due to me using Linux.

Can't you just use wine? I usually do my work on utmt with wine and it works just fine except for a few offs

mustafa-archived avatar Nov 15 '23 21:11 mustafa-archived

That works for the GUI, but I don't want to make the core library require the use of wine. Wine only runs on certain machines, while if we can get it to run natively, it will run anywhere where the dotnet runtime is able to run. Which is to say, a lot more machines.

If you meant dev'ing using WINE - that's more painful, because i can't actually build the GUI. And running the whole build environment via wine is a huge PITA.

Miepee avatar Nov 15 '23 21:11 Miepee

Oh ok.

mustafa-archived avatar Nov 15 '23 21:11 mustafa-archived

Opening this PR up for review. I did a very basic test via WINE and it worked as expected there. But I would like to have someone on windows still test:

  • QOI games
  • the graphic exporter/importer scripts

Miepee avatar Jun 02 '24 14:06 Miepee

So I tested this a few days ago and found that (for sure) SkiaSharp doesn't losslessly process PNG images, so unfortunately this probably won't be able to merge. (And it'll probably be superseded by #1870 and the PRs that follow it.)

However, this is still really good reference for what CSX scripts we'll need to update after #1870 is merged, which I'm going to start working on.

colinator27 avatar Aug 15 '24 15:08 colinator27

I will close this PR as its superseded as mentioned above. For script reference, this PR existing is enough reference.

Miepee avatar Aug 22 '24 21:08 Miepee