diff --git a/AssetStudio/BuildTarget.cs b/AssetStudio/BuildTarget.cs index 94bc643..79a9de0 100644 --- a/AssetStudio/BuildTarget.cs +++ b/AssetStudio/BuildTarget.cs @@ -62,5 +62,6 @@ ArmLinuxServer, VisionOS, PlayableAds, + Switch2, } } diff --git a/AssetStudio/Classes/AnimationClip.cs b/AssetStudio/Classes/AnimationClip.cs index bb504c1..ec7631a 100644 --- a/AssetStudio/Classes/AnimationClip.cs +++ b/AssetStudio/Classes/AnimationClip.cs @@ -881,6 +881,11 @@ namespace AssetStudio m_KeepOriginalPositionY = reader.ReadBoolean(); m_KeepOriginalPositionXZ = reader.ReadBoolean(); m_HeightFromFeet = reader.ReadBoolean(); + if (version.IsTuanjie && version >= (2022, 3, 62, 13)) //2022.3.62t13(1.10.1) and up + { + var m_AdditiveType = reader.ReadInt32(); + var m_BasePoseType = reader.ReadInt32(); + } reader.AlignStream(); } } diff --git a/AssetStudio/Classes/AnimatorController.cs b/AssetStudio/Classes/AnimatorController.cs index a17eab9..29b7934 100644 --- a/AssetStudio/Classes/AnimatorController.cs +++ b/AssetStudio/Classes/AnimatorController.cs @@ -162,12 +162,23 @@ namespace AssetStudio m_CanTransitionToSelf = reader.ReadBoolean(); } - if (version.IsTuanjie && version >= (2022, 3, 62, 8)) //2022.3.62t8(1.9.0) and up + if (version.IsTuanjie && version.IsInRange((2022, 3, 62, 8), (2022, 3, 62, 12))) //2022.3.62t8-t11(1.9.x))) { var m_UseInertialization = reader.ReadBoolean(); } reader.AlignStream(); + + if (version.IsTuanjie && version >= (2022, 3, 62, 12)) //2022.3.62t12(1.10.0) and up + { + var m_TransitionBlendMode = reader.ReadInt32(); + var m_PoseBlendCurveMode = reader.ReadInt32(); + var m_RootMotionBlendCurveMode = reader.ReadInt32(); + var m_PoseBlendCurveKeyframeArraySize = reader.ReadInt32(); + reader.Position += m_PoseBlendCurveKeyframeArraySize * 28; //skip m_PoseBlendCurveKeyframeArray[] + var m_RootMotionBlendCurveKeyframeArraySize = reader.ReadInt32(); + reader.Position += m_RootMotionBlendCurveKeyframeArraySize * 28; //skip m_RootMotionBlendCurveKeyframeArray[] + } } } diff --git a/AssetStudio/Classes/Renderer.cs b/AssetStudio/Classes/Renderer.cs index dc10fbc..f50248e 100644 --- a/AssetStudio/Classes/Renderer.cs +++ b/AssetStudio/Classes/Renderer.cs @@ -83,6 +83,10 @@ namespace AssetStudio { var m_ForceDisableGRD = reader.ReadByte(); } + if (version >= (2022, 3, 62, 12)) //2022.3.62t12(1.10.0) and up + { + var m_ForceDisableSmallMeshCull = reader.ReadByte(); + } } } if (version >= (2023, 2)) //2023.2 and up diff --git a/AssetStudio/Classes/TextureFormat.cs b/AssetStudio/Classes/TextureFormat.cs index ed1a9d4..66be009 100644 --- a/AssetStudio/Classes/TextureFormat.cs +++ b/AssetStudio/Classes/TextureFormat.cs @@ -330,6 +330,14 @@ /// PNG (8 bits) compressed RGBA texture format. /// PNG_8_RGBA = TUANJIE_OFFSET + 77, + /// + /// WebP (32 bits) compressed RGBA texture format. + /// + WebP_32 = TUANJIE_OFFSET + 78, + /// + /// WebP (24 bits) compressed RGB texture format. + /// + WebP_24 = TUANJIE_OFFSET + 79, } public static class TextureFormatExtensions @@ -342,5 +350,7 @@ } public static bool IsPng(this TextureFormat format) => format >= TextureFormat.PNG_32_RGBA && format <= TextureFormat.PNG_8_RGBA; + + public static bool IsWebP(this TextureFormat format) => format == TextureFormat.WebP_24 || format == TextureFormat.WebP_32; } } diff --git a/AssetStudioCLI/ParallelExporter.cs b/AssetStudioCLI/ParallelExporter.cs index 6e1815f..47415ad 100644 --- a/AssetStudioCLI/ParallelExporter.cs +++ b/AssetStudioCLI/ParallelExporter.cs @@ -47,7 +47,8 @@ namespace AssetStudioCLI debugLog += sb.ToString(); } - if (type == ImageFormat.Png && m_Texture2D.m_TextureFormat.IsPng()) + if ((type == ImageFormat.Png && m_Texture2D.m_TextureFormat.IsPng()) + || (type == ImageFormat.Webp && m_Texture2D.m_TextureFormat.IsWebP())) { File.WriteAllBytes(exportFullPath, m_Texture2D.image_data.GetData()); debugLog += $"{item.TypeString} \"{item.Text}\" exported to \"{exportFullPath}\""; diff --git a/AssetStudioGUI/ParallelExporter.cs b/AssetStudioGUI/ParallelExporter.cs index 7b7f5f5..47eea83 100644 --- a/AssetStudioGUI/ParallelExporter.cs +++ b/AssetStudioGUI/ParallelExporter.cs @@ -46,7 +46,8 @@ namespace AssetStudioGUI debugLog += sb.ToString(); } - if (type == ImageFormat.Png && m_Texture2D.m_TextureFormat.IsPng()) + if ((type == ImageFormat.Png && m_Texture2D.m_TextureFormat.IsPng()) + || (type == ImageFormat.Webp && m_Texture2D.m_TextureFormat.IsWebP())) { File.WriteAllBytes(exportFullPath, m_Texture2D.image_data.GetData()); debugLog += $"{item.TypeString} \"{item.Text}\" exported to \"{exportFullPath}\""; diff --git a/AssetStudioUtility/Texture2DConverter.cs b/AssetStudioUtility/Texture2DConverter.cs index 1eb53f2..b2140a4 100644 --- a/AssetStudioUtility/Texture2DConverter.cs +++ b/AssetStudioUtility/Texture2DConverter.cs @@ -323,10 +323,13 @@ namespace AssetStudio case TextureFormat.RGBA64: //test pass flag = DecodeRGBA64(buff, destSpan); break; + //Tuanjie case TextureFormat.PNG_8_RGBA: case TextureFormat.PNG_24_RGB: //test pass case TextureFormat.PNG_32_RGBA: //test pass - flag = DecodePng(buff, destSpan); + case TextureFormat.WebP_24: + case TextureFormat.WebP_32: + flag = DecodeImage(buff, destSpan); break; } } @@ -825,7 +828,7 @@ namespace AssetStudio } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private bool DecodePng(ReadOnlySpan buff, Span destSpan) + private bool DecodeImage(ReadOnlySpan buff, Span destSpan) { try {