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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user