Added Save methods to YvrFile and YwrFile

This commit is contained in:
dexy 2019-01-29 00:35:23 +11:00
parent 2622ea08b6
commit dd97b65933
3 changed files with 17 additions and 3 deletions

View File

@ -49,6 +49,13 @@ namespace CodeWalker.GameFiles
} }
public byte[] Save()
{
byte[] data = ResourceBuilder.Build(Records, 1); //yvr is type/version 1...
return data;
}
} }
} }

View File

@ -49,6 +49,13 @@ namespace CodeWalker.GameFiles
} }
public byte[] Save()
{
byte[] data = ResourceBuilder.Build(Waypoints, 1); //ywr is type/version 1...
return data;
}
} }
} }

View File

@ -43,9 +43,9 @@ namespace CodeWalker.GameFiles
{ {
base.Write(writer, parameters); base.Write(writer, parameters);
//// update structure data // update structure data
//this.EntriesPointer = (ulong)(this.Entries?.Position ?? 0); this.EntriesPointer = (ulong)(this.Entries?.FilePosition ?? 0);
//this.EntriesCount = (uint)(this.Entries?.Count ?? 0); this.EntriesCount = (uint)(this.Entries?.Count ?? 0);
// write structure data // write structure data
writer.Write(this.Unknown_10h); writer.Write(this.Unknown_10h);