mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
virtual file system migration.
This commit is contained in:
@@ -45,10 +45,9 @@ namespace GameRes.Formats.BlackCyc
|
||||
if (!file.Name.EndsWith (".gpk", StringComparison.InvariantCultureIgnoreCase))
|
||||
return null;
|
||||
var gtb_name = Path.ChangeExtension (file.Name, "gtb");
|
||||
var gtb_info = new FileInfo (gtb_name);
|
||||
if (!gtb_info.Exists)
|
||||
if (!VFS.FileExists (gtb_name))
|
||||
return null;
|
||||
using (var gtb = new ArcView (gtb_name))
|
||||
using (var gtb = VFS.OpenView (gtb_name))
|
||||
{
|
||||
int count = gtb.View.ReadInt32 (0);
|
||||
if (!IsSaneCount (count))
|
||||
|
||||
@@ -45,14 +45,14 @@ namespace GameRes.Formats.BlackCyc
|
||||
if (!file.Name.EndsWith (".vpk", StringComparison.InvariantCultureIgnoreCase))
|
||||
return null;
|
||||
var vtb_name = Path.ChangeExtension (file.Name, "vtb");
|
||||
var vtb_info = new FileInfo (vtb_name);
|
||||
if (!vtb_info.Exists)
|
||||
if (!VFS.FileExists (vtb_name))
|
||||
return null;
|
||||
int count = (int)(vtb_info.Length / 0x0C) - 1;
|
||||
var vtb_entry = VFS.FindFile (vtb_name);
|
||||
int count = (int)(vtb_entry.Size / 0x0C) - 1;
|
||||
if (!IsSaneCount (count))
|
||||
return null;
|
||||
|
||||
using (var vtb = new ArcView (vtb_name))
|
||||
using (var vtb = VFS.OpenView (vtb_entry))
|
||||
{
|
||||
vtb.View.Reserve (0, (uint)vtb.MaxOffset);
|
||||
uint index_offset = 0;
|
||||
|
||||
Reference in New Issue
Block a user