1
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-12-12 01:31:20 +04:00

Material parsing and viewing

This commit is contained in:
bird_egop
2025-12-04 03:50:29 +03:00
parent 3b1fd5ef97
commit 75b1548f55
18 changed files with 1694 additions and 63 deletions

View File

@@ -21,6 +21,14 @@ public static class Extensions
return BinaryPrimitives.ReadUInt32LittleEndian(buf);
}
public static ushort ReadUInt16LittleEndian(this Stream fs)
{
Span<byte> buf = stackalloc byte[2];
fs.ReadExactly(buf);
return BinaryPrimitives.ReadUInt16LittleEndian(buf);
}
public static float ReadFloatLittleEndian(this Stream fs)
{
Span<byte> buf = stackalloc byte[4];