public uint TestInputSeed(ulong seed) { var ssg = new SeedSearcherGPU(); ssg.SetSixLSB(LSB); ssg.SetSixFirstCondition(pkmn1); ssg.SetSixSecondCondition(pkmn2); ssg.SetSixThirdCondition(pkmn3); if (m_Mode == Mode.Star35) { ssg.SetSixFourthCondition(pkmn4); } return(ssg.TestSeed(seed)); }
private void CalculateGPU(int searcherIDX, int minRerolls, int maxRerolls, int[] target, ToolStripStatusLabel updateLbl, ToolStripProgressBar calculationProgressBar) { var devices = SeedSearcherGPU.UseableGPU(); var ssg = new SeedSearcherGPU(); ssg.SetSixFirstCondition(pkmn1); ssg.SetSixSecondCondition(pkmn2); ssg.SetSixThirdCondition(pkmn3); ssg.SetTargetCondition(target); ssg.SetSixLSB(LSB); int additionalPart = -1; if (target.Length > 6) { additionalPart = target[6]; } List <ulong> abilities = GetAbilityBits(additionalPart); if (m_Mode == Mode.Star12) { if (ssg.TestSeed(0) != 5) { var result = ssg.SearchOne(devices[searcherIDX], minRerolls, maxRerolls, abilities, updateLbl, calculationProgressBar); if (result != 0) { Result.Add(result); } } else { Result.Add(0); } } else { ssg.SetSixFourthCondition(pkmn4); if (ssg.TestSeed(0) != 5) { ulong result; if (target[4] == -1) { result = ssg.SearchFour(devices[searcherIDX], minRerolls, maxRerolls, abilities, updateLbl, calculationProgressBar); } else if (target[5] == -1) { result = ssg.SearchFive(devices[searcherIDX], minRerolls, maxRerolls, abilities, updateLbl, calculationProgressBar); } else { result = ssg.SearchSix(devices[searcherIDX], minRerolls, maxRerolls, abilities, updateLbl, calculationProgressBar); } if (result != 0) { Result.Add(result); } } else { Result.Add(0); } } }