public static DebugNativeArgEntry[] From(BinaryReader rd, SmxNameTable names, int count) { var entries = new DebugNativeArgEntry[count]; for (var i = 0; i < count; i++) { var entry = new DebugNativeArgEntry(); entry.Ident = (SymKind)rd.ReadByte(); entry.tagid = rd.ReadUInt16(); entry.dimcount = rd.ReadUInt16(); entry.nameoffs = rd.ReadInt32(); if (entry.dimcount > 0) { entry.Dims = DebugSymbolDimEntry.From(null, rd, entry.dimcount); } entry.Name = names.StringAt(entry.nameoffs); entries[i] = entry; } return(entries); }
public static DebugNativeEntry[] From(BinaryReader rd, DebugNativesHeader header, SmxNameTable names) { var entries = new DebugNativeEntry[header.num_entries]; for (var i = 0; i < header.num_entries; i++) { var entry = new DebugNativeEntry(); entry.Index = rd.ReadInt32(); entry.nameoffs = rd.ReadInt32(); entry.tagid = rd.ReadUInt16(); entry.nargs = rd.ReadUInt16(); entry.Name = names.StringAt(entry.nameoffs); if (entry.nargs > 0) { entry.Args = DebugNativeArgEntry.From(rd, names, entry.nargs); } else { entry.Args = new DebugNativeArgEntry[0]; } entries[i] = entry; } return(entries); }
public static DebugNativeArgEntry[] From(BinaryReader rd, SmxNameTable names, int count) { var entries = new DebugNativeArgEntry[count]; for (var i = 0; i < count; i++) { var entry = new DebugNativeArgEntry(); entry.Ident = (SymKind)rd.ReadByte(); entry.tagid = rd.ReadUInt16(); entry.dimcount = rd.ReadUInt16(); entry.nameoffs = rd.ReadInt32(); if (entry.dimcount > 0) entry.Dims = DebugSymbolDimEntry.From(null, rd, entry.dimcount); entry.Name = names.StringAt(entry.nameoffs); entries[i] = entry; } return entries; }