daily update on 20240828 by nitload youmu, autotexture added
This commit is contained in:
@@ -54,24 +54,6 @@ namespace StgSharp.Data
|
||||
this.PreviousHash = previousHash;
|
||||
}
|
||||
|
||||
public static SSDSegment FromStream(byte[] stream)
|
||||
{
|
||||
if (stream.Length != 16 * StgSharp.ssdSegmentLength)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
SSDSegment ret = new SSDSegment();
|
||||
fixed (byte* bptr = stream)
|
||||
{
|
||||
ret.Head.data = *(M128*)bptr;
|
||||
for (int i = 1; i < StgSharp.ssdSegmentLength; i++)
|
||||
{
|
||||
ret.WriteData<M128>(i - 1, *(M128*)(bptr + 16 * i));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public byte this[int index]
|
||||
{
|
||||
get
|
||||
@@ -113,6 +95,24 @@ namespace StgSharp.Data
|
||||
}
|
||||
}
|
||||
|
||||
public static SSDSegment FromStream(byte[] stream)
|
||||
{
|
||||
if (stream.Length != 16 * StgSharp.ssdSegmentLength)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
SSDSegment ret = new SSDSegment();
|
||||
fixed (byte* bptr = stream)
|
||||
{
|
||||
ret.Head.data = *(M128*)bptr;
|
||||
for (int i = 1; i < StgSharp.ssdSegmentLength; i++)
|
||||
{
|
||||
ret.WriteData<M128>(i - 1, *(M128*)(bptr + (16 * i)));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public byte[] GetBytes()
|
||||
{
|
||||
byte[] ret = new byte[16 * StgSharp.ssdSegmentLength];
|
||||
|
||||
Reference in New Issue
Block a user