GameRes refactoring.

(FormatCatalog.CreateEntry): method renamed to 'Create' and made generic
towards Entry type.
This commit is contained in:
morkt
2015-08-30 22:34:06 +04:00
parent 4bfdc502e4
commit 46dbf2b142
53 changed files with 75 additions and 99 deletions

View File

@@ -64,7 +64,7 @@ namespace GameRes.Formats.Ffa
for (int i = 0; i < count; ++i)
{
string name = lst.View.ReadString (index_offset, 14);
var entry = FormatCatalog.Instance.CreateEntry (name);
var entry = FormatCatalog.Instance.Create<Entry> (name);
entry.Offset = lst.View.ReadUInt32 (index_offset+14);
entry.Size = lst.View.ReadUInt32 (index_offset+18);
if (!entry.CheckPlacement (file.MaxOffset))

View File

@@ -70,7 +70,7 @@ namespace GameRes.Formats.Ffa
for (int i = 0; i < count; ++i)
{
var name = file.View.ReadString (index_offset, 0x10);
var entry = FormatCatalog.Instance.CreateEntry (name);
var entry = FormatCatalog.Instance.Create<Entry> (name);
entry.Offset = file.View.ReadUInt32 (index_offset+0x10);
entry.Size = file.View.ReadUInt32 (index_offset+0x14);
if (!entry.CheckPlacement (file.MaxOffset))