public Record(CollisionActor actor, IFile file, RomVersion version) { Initialize(); int ramStart = 0; if (file is RamObject) { var obj = (RamObject)file; ramStart = (int)obj.Ram.Start; File = new FileData(obj.Object, FileType.Object); } else if (file is OvlActor) { var af = (OvlActor)file; ramStart = (int)af.Ram.Start; File = new FileData(af.Actor, FileType.Actor); } else { throw new NotImplementedException(); } Offset = ((int)actor.MeshPtr & 0xFFFFFF) - (ramStart & 0xFFFFFF); Versions.Add(version); Actors.Add(actor.ActorId); }
public void AddNewRecord(CollisionActor actor, IFile obj, RomVersion version) { try { var record = new Record(actor, obj, version); if (Meshes.ContainsKey(record.GetHashCode())) { Meshes[record.GetHashCode()].Merge(record); } else { Meshes.Add(record.GetHashCode(), record); } } catch { Console.WriteLine("UNRECORDED"); } }