mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2026-08-15 02:57:49 +04:00
fix textures UV. drop leftovers. properly map material_lo.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Buffers.Binary;
|
||||
using System.Text;
|
||||
using Common;
|
||||
|
||||
namespace MaterialLib;
|
||||
|
||||
@@ -168,28 +169,3 @@ public static class MaterialParser
|
||||
return $"Интерполируется: {string.Join(", ", parts)} | Остальные компоненты копируются (Flags: 0x{(int)target:X})";
|
||||
}
|
||||
}
|
||||
|
||||
// Helper extensions
|
||||
internal static class StreamExtensions
|
||||
{
|
||||
public static float ReadFloatLittleEndian(this Stream stream)
|
||||
{
|
||||
Span<byte> buffer = stackalloc byte[4];
|
||||
stream.ReadExactly(buffer);
|
||||
return BinaryPrimitives.ReadSingleLittleEndian(buffer);
|
||||
}
|
||||
|
||||
public static ushort ReadUInt16LittleEndian(this Stream stream)
|
||||
{
|
||||
Span<byte> buffer = stackalloc byte[2];
|
||||
stream.ReadExactly(buffer);
|
||||
return BinaryPrimitives.ReadUInt16LittleEndian(buffer);
|
||||
}
|
||||
|
||||
public static uint ReadUInt32LittleEndian(this Stream stream)
|
||||
{
|
||||
Span<byte> buffer = stackalloc byte[4];
|
||||
stream.ReadExactly(buffer);
|
||||
return BinaryPrimitives.ReadUInt32LittleEndian(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user