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

@@ -109,7 +109,7 @@ namespace GameRes.Formats.CatSystem
for (uint i = 0; i < entry_count; ++i)
{
string name = file.View.ReadString (current_offset, 0x40);
var entry = FormatCatalog.Instance.CreateEntry (name);
var entry = FormatCatalog.Instance.Create<Entry> (name);
entry.Offset = file.View.ReadUInt32 (current_offset+0x40);
entry.Size = file.View.ReadUInt32 (current_offset+0x44);
if (!entry.CheckPlacement (file.MaxOffset))
@@ -150,7 +150,7 @@ namespace GameRes.Formats.CatSystem
uint key = twister.Twist (main_key + i);
string name = DecipherName (name_info, key);
var entry = FormatCatalog.Instance.CreateEntry (name);
var entry = FormatCatalog.Instance.Create<Entry> (name);
entry.Offset = eax;
entry.Size = edx;
if (!entry.CheckPlacement (file.MaxOffset))