mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 20:24:47 +08:00
PR #84 changes
This commit is contained in:
@@ -96,17 +96,16 @@ namespace CodeWalker.GameFiles
|
||||
{
|
||||
public override long BlockLength
|
||||
{
|
||||
get { return 20 + (256 * 16); }
|
||||
get { return 16 + (8 * (SystemPagesCount + GraphicsPagesCount)); }
|
||||
}
|
||||
|
||||
// structure data
|
||||
public uint Unknown_0h { get; set; }
|
||||
public uint Unknown_4h { get; set; }
|
||||
public byte SystemPagesCount { get; set; }
|
||||
public byte SystemPagesCount { get; set; } = 128;//default sizing to ensure there is enough space allocated when writing files
|
||||
public byte GraphicsPagesCount { get; set; }
|
||||
public ushort Unknown_Ah { get; set; }
|
||||
public uint Unknown_Ch { get; set; }
|
||||
public uint Unknown_10h { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reads the data-block from a stream.
|
||||
@@ -120,7 +119,7 @@ namespace CodeWalker.GameFiles
|
||||
this.GraphicsPagesCount = reader.ReadByte();
|
||||
this.Unknown_Ah = reader.ReadUInt16();
|
||||
this.Unknown_Ch = reader.ReadUInt32();
|
||||
this.Unknown_10h = reader.ReadUInt32();
|
||||
reader.Position += 8 * (SystemPagesCount + GraphicsPagesCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -135,9 +134,8 @@ namespace CodeWalker.GameFiles
|
||||
writer.Write(this.GraphicsPagesCount);
|
||||
writer.Write(this.Unknown_Ah);
|
||||
writer.Write(this.Unknown_Ch);
|
||||
writer.Write(this.Unknown_10h);
|
||||
|
||||
var pad = 256 * 16;
|
||||
var pad = 8 * (SystemPagesCount + GraphicsPagesCount);
|
||||
writer.Write(new byte[pad]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user