public bool IsInTable(string Name) { uint Crc32 = Name.EncodeCrc32(); if (Crc32Tables.ContainsKey(Crc32) || NameTables.ContainsKey(Name)) { return(true); } return(false); }
//Gets the size of the resource in the RSTB public uint GetSize(string Name) { uint Crc32 = Name.EncodeCrc32(); if (Crc32Tables.ContainsKey(Crc32)) { return(Crc32Tables[Crc32]); } if (NameTables.ContainsKey(Name)) { return(NameTables[Name]); } return(0); }
public void DeleteEntry(string FileName) { if (!IsInTable(FileName)) { MessageBox.Show("File not in table! Could not remove entry! " + FileName); } uint Crc32 = FileName.EncodeCrc32(); if (Crc32Tables.ContainsKey(Crc32)) { Crc32Tables.Remove(Crc32); } if (NameTables.ContainsKey(FileName)) { NameTables.Remove(FileName); } }