mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-14 17:54:16 +08:00
updated legacy formats.
(BIZ): moved to Adviz folder. (GIZ, GIZ2, BIZ2, PR1): new PC-98 image formats. (DATA, BGM, SED): MyHarvest resource formats. (HTF): compressed image format. (PAK): Mina resource archives. (GCmp): read palette from external resource. (NCG): Nekotaro image format. (BND, TCZ, TSZ): Ponytail Soft PC-98 formats. (NOR): Sophia resource archive. (SDA, PLA): Squadra D resource archives. (UCA): added checks to avoid false positives.
This commit is contained in:
@@ -74,13 +74,15 @@ namespace GameRes.Formats.WestGate
|
||||
uint next_offset = file.View.ReadUInt32 (index_offset+0xC);
|
||||
if (next_offset < data_offset)
|
||||
return null;
|
||||
string last_name = null;
|
||||
var invalid_chars = Path.GetInvalidFileNameChars();
|
||||
var dir = new List<Entry> (count);
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
var name = file.View.ReadString (index_offset, 0xC);
|
||||
if (string.IsNullOrWhiteSpace (name) || name.IndexOfAny (invalid_chars) != -1)
|
||||
if (last_name == name || string.IsNullOrWhiteSpace (name) || name.IndexOfAny (invalid_chars) != -1)
|
||||
return null;
|
||||
last_name = name;
|
||||
index_offset += 0x10;
|
||||
var entry = new Entry { Name = name, Type = entry_type };
|
||||
entry.Offset = next_offset;
|
||||
|
||||
Reference in New Issue
Block a user