CODModernWarfare2Remastered.asl 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // help from Klooger on some of the addresses
  2. state("MW2CR")
  3. {
  4. string6 decide: 0xA9809F;
  5. string50 CurrentMapName : 0x41758D1;
  6. int Loader : 0x4B894F0;
  7. }
  8. state("MW2CR", "Default")
  9. {
  10. string50 CurrentMapName : 0x42187F6;
  11. byte Loader : 0x6509784;
  12. string6 decide : 0xA9809F;
  13. }
  14. state("MW2CR", "1.1.12")
  15. {
  16. string50 CurrentMapName : 0x41758D1;
  17. int Loader : 0x4B894F0;
  18. string6 decide : 0x11BAC56C;
  19. }
  20. state("MW2CR", "1.1.13")
  21. {
  22. string50 CurrentMapName : 0x41767F6;
  23. byte Loader : 0x4B8A4F0;
  24. }
  25. init
  26. {
  27. // I have to leave this in as I don't own 1.1.12 or the orignal 1.0 version
  28. if (current.decide == "1.1.12")
  29. {
  30. version = "1.1.12";
  31. }
  32. else
  33. {
  34. version = "Default";
  35. }
  36. if ( modules.First().ModuleMemorySize == 300334080)
  37. {
  38. version = "1.1.13";
  39. }
  40. vars.doneMaps = new List<string>(); // Just in case intel% is added in the future (been talks) just adding a doneMaps just in case
  41. }
  42. startup
  43. {
  44. settings.Add("acta", true, "All Acts");
  45. settings.Add("act1", true, "Act 1", "acta");
  46. settings.Add("act2", true, "Act 2", "acta");
  47. settings.Add("act3", true, "Act 3", "acta");
  48. var tB = (Func<string, string, string, Tuple<string, string, string>>) ((elmt1, elmt2, elmt3) => { return Tuple.Create(elmt1, elmt2, elmt3); });
  49. var sB = new List<Tuple<string, string, string>>
  50. {
  51. //tB("act1","trainier", "S.S.D.D."),
  52. tB("act1","roadkill", "Team Player"),
  53. tB("act1","cliffhanger", "Cliffhanger"),
  54. tB("act1","airport", "No Russian"),
  55. tB("act1","favela", "Takedown"),
  56. tB("act2","invasion", "Wolverines"),
  57. tB("act2","favela_escape", "The Hornets Nest"),
  58. tB("act2","arcadia", "Exodus"),
  59. tB("act2","oilrig", "The Only Easy Day Was Yesterday"),
  60. tB("act2","gulag", "The Gulag"),
  61. tB("act2","dcburning", "Of Their Own Accord"),
  62. tB("act3","contingency", "Contingency"),
  63. tB("act3","dcemp", "Second Sun"),
  64. tB("act3","dc_whitehouse", "Whiskey Hotel"),
  65. tB("act3","estate", "Loose Ends"),
  66. tB("act3","boneyard", "The Enemy of My Enemy"),
  67. tB("act3","af_caves", "Just Like Old Times"),
  68. tB("act3","af_chase", "Endgame"),
  69. tB("act3","ending", "End"),
  70. };
  71. foreach (var s in sB) settings.Add(s.Item2, true, s.Item3, s.Item1);
  72. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  73. {
  74. var timingMessage = MessageBox.Show (
  75. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  76. "LiveSplit is currently set to show Real Time (RTA).\n"+
  77. "Would you like to set the timing method to Game Time? This will make verification easier",
  78. "LiveSplit | Call of Duty: Modern Warfare 2 Remastered",
  79. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  80. );
  81. if (timingMessage == DialogResult.Yes)
  82. {
  83. timer.CurrentTimingMethod = TimingMethod.GameTime;
  84. }
  85. }
  86. }
  87. start
  88. {
  89. return ((current.CurrentMapName == "trainer") && (current.Loader != 0));
  90. }
  91. update
  92. {
  93. print(modules.First().ModuleMemorySize.ToString());
  94. }
  95. onStart
  96. {
  97. vars.doneMaps.Add(current.CurrentMapName);
  98. }
  99. isLoading
  100. {
  101. return (current.CurrentMapName == "ui") || (current.Loader == 0) || (current.CurrentMapName == "airport");
  102. }
  103. reset
  104. {
  105. return ((current.CurrentMapName == "ui") && (old.CurrentMapName != "ui"));
  106. }
  107. onReset
  108. {
  109. vars.doneMaps.Clear();
  110. }
  111. split
  112. {
  113. if ((current.CurrentMapName != old.CurrentMapName) && (settings[current.CurrentMapName]) && (!vars.doneMaps.Contains(current.CurrentMapName)))
  114. {
  115. vars.doneMaps.Add(current.CurrentMapName);
  116. return true;
  117. }
  118. }