Program.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace OpenVIII.Search
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. start:
  13. Memory.Init(null, null, null);
  14. Console.Write("Insert string you would like to find. This assumes you are looking for FF8 formated strings." +
  15. "\r\nThere may be special characters in your string so you might have to remove words to get a match.\r\n The search is case senseative.\r\n Input: ");
  16. FF8String sval = Console.ReadLine().Trim((Environment.NewLine+" _").ToCharArray());
  17. //new FF8String(new byte[] { 0x10, 0, 0, 0, 0x02, 0, 0, 0 });
  18. Search s = new Search(sval);//used to find file a string is in. disable if not using.
  19. var rs = s.results;
  20. if (rs.Count > 0)
  21. Console.WriteLine($"Found \"{sval}\" {rs.Count} times. Results below.");
  22. else Console.WriteLine($"Cannot find \"{sval}\"...");
  23. foreach (var r in rs)
  24. {
  25. Console.WriteLine($"{r.Item1}, {r.Item2}, {r.Item3}");
  26. }
  27. Console.WriteLine($"Press [Enter] to continue...");
  28. Console.ReadLine();
  29. goto start;
  30. }
  31. }
  32. }