tge-was-taken / GFD-Studio

P3D, P4D, P5D & Persona 5 Model Editor
70 stars 45 forks source link

Here are some modifications regarding the improvements to DDS and GNF. #57

Closed avan06 closed 1 year ago

avan06 commented 1 year ago

Hello,

Here are some modifications regarding the improvements to DDS and GNF. Please review and decide whether to merge. Thank you.


  1. Improved GFDLibrary's capability to parse DDSHeader for DX10 format. In the past, DDSHeader would ignore the unique header of DX10 format, causing errors when retrieving PixelData. This has now been fixed.

  2. Enhanced the parsing capability of GFDLibrary for GNF Texture format. a. The GetSurfaceFormat function now supports parsing BC7 format when the DDS format is DX10 b. This issue has been resolved in the current enhancement, which ensures that other attributes are not overwritten when writing attribute values due to the shared mWord (32-bit value) in the header field of GNF Texture format. c. Fixed the issue of insufficient space in the source or destination array in the DoSwizzle function of Array.Copy (only occurring in some GNF files). d. Enhanced the capability of decoding GNF texture to DDS format in the DecodeToDDS function.

  3. Upgrade Framework from .NET 5 to .NET 6.

tge-was-taken commented 1 year ago

Thanks for the pr. Overall it appears fine, however I would suggest either renaming the .net 5 project to .net 6 or introduce a new .net 6 project to match. I have no particular preference so I'll leave that up to you.

avan06 commented 1 year ago

Hello, the GFDLibrary project file has been renamed from .NET5 to .NET6 as per your suggestion. Thank you.