BuffyTheVampireSlayer.asl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. state("pcsx2")
  2. {
  3. int CurItemSelected : 0x012457B4, 0x6E4;
  4. int Loader : 0x0123E454, 0xFD4;
  5. int CurMapID : 0x0123E450, 0x128;
  6. int IGT : 0x0123E450, 0x130;
  7. }
  8. init
  9. {
  10. vars.doneMaps = new List<string>();
  11. vars.timeTotal = 0;
  12. switch(modules.First().ModuleMemorySize)
  13. {
  14. case 47538176 :
  15. version = "PCSX2 Emulator 1.6.0";
  16. break;
  17. default: version = "Wrong version of PCSX2";
  18. break;
  19. }
  20. }
  21. startup
  22. {
  23. settings.Add("BTVS", true, "Buffy The Vampire Slayer - Chaos Bleeds");
  24. vars.missions2 = new Dictionary<string,string>
  25. {
  26. {"100003A", "Magic Box"},
  27. {"1000024", "Cemetery"},
  28. {"100000D", "Blood Factory"},
  29. {"1000047", "Magic Box Revisited"},
  30. {"100002B", "Downtown Sunnydale"},
  31. {"1000008", "High School"},
  32. {"1000049", "Old Quarry"},
  33. {"1000011", "The Initiative"},
  34. {"1000033", "Sunnydale Mall"},
  35. {"100002C", "Sunnydale Zoo"},
  36. {"10000D0", "The First's Lair"},
  37. {"10000F8", "Epilogue"},
  38. };
  39. foreach (var Tag in vars.missions2)
  40. {
  41. settings.Add(Tag.Key, true, Tag.Value, "BTVS");
  42. };
  43. }
  44. update
  45. {
  46. int timeDiff = (current.IGT - old.IGT);
  47. if ( timeDiff > 0 )
  48. {
  49. vars.timeTotal += timeDiff;
  50. }
  51. }
  52. gameTime
  53. {
  54. // Convert centiseconds to milliseconds and return.
  55. return TimeSpan.FromSeconds(vars.timeTotal);
  56. }
  57. start
  58. {
  59. return ((settings[current.CurMapID.ToString("X")]) && (current.IGT <= 1));
  60. }
  61. onStart
  62. {
  63. vars.doneMaps.Add(current.CurMapID.ToString("X"));
  64. }
  65. split
  66. {
  67. if ((settings[current.CurMapID.ToString("X")]) && (!vars.doneMaps.Contains(current.CurMapID.ToString("X"))))
  68. {
  69. vars.doneMaps.Add(current.CurMapID.ToString("X"));
  70. return true;
  71. }
  72. }
  73. onReset
  74. {
  75. vars.timeTotal = 0;
  76. vars.doneMaps.Clear();
  77. }
  78. isLoading
  79. {
  80. return true;
  81. }