private static void MatchGeneric(TableInfo.Type type, VFileTable sourceFileList, VFileTable targetFileList, Dictionary <long, FOut> fOut, Dictionary <long, FileRecord> unmatched) { var sourceT = sourceFileList.Tables.GetTable(type); var targetT = targetFileList.Tables.GetTable(type); int iter = Math.Min(sourceT.Records, targetT.Records); for (int i = 0; i < iter; i++) { FileAddress source = sourceFileList.GetFileByTable(type, i); FileAddress target = targetFileList.GetFileByTable(type, i); TestMatch(source, target, fOut, unmatched); } }
private static void MatchRooms(VFileTable sourceFileList, VFileTable targetFileList, Dictionary <long, FOut> fOut, Dictionary <long, FileRecord> unmatched) { var sourceT = sourceFileList.Tables.GetTable(TableInfo.Type.Scenes); var targetT = targetFileList.Tables.GetTable(TableInfo.Type.Scenes); int scenes = Math.Min(sourceT.Records, targetT.Records); for (int i = 0; i < scenes; i++) { var sR = sourceFileList.GetSceneFile(i); var tR = targetFileList.GetSceneFile(i); if (sR == null) { continue; } if (tR == null) { continue; } Scene s = SceneRoomReader.InitializeScene(sR, i); Scene t = SceneRoomReader.InitializeScene(tR, i); List <FileAddress> sourceRooms = s.Header.GetRoomAddresses(); List <FileAddress> targetRooms = t.Header.GetRoomAddresses(); int rooms = Math.Min(sourceRooms.Count, targetRooms.Count); for (int j = 0; j < rooms; j++) { TestMatch(sourceRooms[j], targetRooms[j], fOut, unmatched); } } }