LazyDuchess / OpenTS2

Open source re-implementation of The Sims 2 in Unity
Mozilla Public License 2.0
248 stars 19 forks source link

Read and use ALFA channels when present. Fixes #4 #5

Closed ammaraskar closed 1 year ago

ammaraskar commented 1 year ago

This adds logic to handle the run-length-encoding for the ALFA channel in the IMGCodec and adds a new file type under Formats/ for handling the special jpeg files with these segments.

Tested with UITest:

image

LazyDuchess commented 1 year ago

Great work!

Though I try not to use the UnityEngine API outside of the Engine namespace in order to make it a little more clear where the Unity dependent stuff lives (hence classes like the TextureFactory), in order to make any potential port of the project to a different engine at least a little less painful, and to make tools outside of the Unity engine. I noticed you're referencing it in Formats for Asserts.

I'll leave it in as it's no big deal atm but yeah should go through these instances and replace them with an abstraction for this purpose.