public static List <DisassemblyTask> CreateTaskList(Rom rom) { List <DisassemblyTask> taskList = new List <DisassemblyTask>(); List <JDmaData> dmadata; if (rom.Version.Game == Game.OcarinaOfTime) { dmadata = JOcaBase.JQuery.GetOcaDmaData(rom.Version.ToString()); } else if (rom.Version.Game == Game.MajorasMask) { dmadata = JOcaBase.JQuery.GetMaskDmaData(rom.Version.ToString()); } else { return(taskList); } var tables = rom.Files.Tables; for (int i = 0; i < tables.Actors.Records; i++) { var ovlRec = rom.Files.GetActorOverlayRecord(i); var task = New(dmadata, i, ovlRec, OvlType.Actor); //set functions GetActorSymbolNames(task, rom, ovlRec); taskList.Add(task); } for (int i = 0; i < tables.Particles.Records; i++) { var ovlRec = rom.Files.GetParticleOverlayRecord(i); taskList.Add(New(dmadata, i, ovlRec, OvlType.Particle)); } for (int i = 0; i < tables.GameOvls.Records; i++) { var ovlRec = rom.Files.GetGameContextRecord(i); taskList.Add(New(dmadata, i, ovlRec, OvlType.Game)); } for (int i = 0; i < tables.PlayerPause.Records; i++) { var ovlRec = rom.Files.GetPlayPauseOverlayRecord(i); taskList.Add(New(dmadata, i, ovlRec, OvlType.PlayPause)); } for (int i = 0; i < tables.Transitions.Records; i++) { var ovlRec = rom.Files.GetOverlayRecord(i, TableInfo.Type.Transitions); taskList.Add(New(dmadata, i, ovlRec, OvlType.Transition)); } for (int i = 0; i < tables.MapMarkData.Records; i++) { var ovlRec = rom.Files.GetOverlayRecord(i, TableInfo.Type.MapMarkData); if (ovlRec != null) { taskList.Add(New(dmadata, i, ovlRec, OvlType.MapMarkData)); } } List <JFileInfo> fileInfo = JQuery.Deserialize <List <JFileInfo> >("data/fileinfo.json"); foreach (var file in fileInfo.Where (x => x.Game == rom.Version.Game.ToString() && x.Version == rom.Version.ToString())) { taskList.Add(New(file)); } return(taskList); }
private static void LoadFunctionDatabase(RomVersion version) { var funcInfo = JQuery.GetFunctionInfo(version); Disassemble.AddFunctions(funcInfo); }