public static PublicEntry[] From(BinaryReader rd, SectionEntry header, SmxNameTable names) { if (header.Size % Size != 0) { throw new Exception("invalid public table size"); } var count = header.Size / Size; var entries = new PublicEntry[count]; for (var i = 0; i < count; i++) { var entry = new PublicEntry(); entry.Address = rd.ReadUInt32(); entry.nameoffs = rd.ReadInt32(); entry.Name = names.StringAt(entry.nameoffs); entries[i] = entry; } return(entries); }
public SmxPublicTable(FileHeader file, SectionEntry header, SmxNameTable names) : base(file, header) { publics_ = PublicEntry.From(file.SectionReader(header), header, names); }
public static PublicEntry[] From(BinaryReader rd, SectionEntry header, SmxNameTable names) { if (header.Size % Size != 0) throw new Exception("invalid public table size"); var count = header.Size / Size; var entries = new PublicEntry[count]; for (var i = 0; i < count; i++) { var entry = new PublicEntry(); entry.Address = rd.ReadUInt32(); entry.nameoffs = rd.ReadInt32(); entry.Name = names.StringAt(entry.nameoffs); entries[i] = entry; } return entries; }