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:
morkt
2023-10-11 19:03:45 +04:00
parent 4d26cdcff6
commit f90e2e851c
24 changed files with 3504 additions and 279 deletions

View File

@@ -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;