BarbieInThe12DancingPrincesses.asl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. state("Barbie(TM) In The 12 Dancing Princesses", "PC")
  2. {
  3. string50 CurGame : 0x1242D0;
  4. string50 CurShow : 0x138730;
  5. float Loader : 0x118674;
  6. int End : 0x135A84;
  7. }
  8. state("pcsx2", "PS2")
  9. {
  10. string50 CurGame : 0x0123E7E8, 0x250;
  11. string50 CurShow : 0x0123E83C, 0x558;
  12. int End : 0x0123E7B4, 0x2BC;
  13. int Loader : 0x2C5F93C;
  14. }
  15. init
  16. {
  17. switch (modules.First().ModuleMemorySize)
  18. {
  19. case 47538176: version = "PS2";
  20. break;
  21. case 1335296 : version = "PC";
  22. break;
  23. }
  24. vars.doneMaps = new List<string>();
  25. vars.DoSplit = 0;
  26. vars.OldMinigame = "null";
  27. vars.LoadingValue = null;
  28. }
  29. startup
  30. {
  31. settings.Add("SEP", true, "Split on every princess?");
  32. settings.Add("ST", false, "Split on entering princess dancing section?");
  33. settings.SetToolTip("ST", "Keeping this false will have livesplit split on leaving the princess dancing setting!");
  34. settings.Add("missions", true, "Barbie In The 12 Dancing Princesses");
  35. vars.missions = new Dictionary<string,string>
  36. { {@"games\eg_gemstone_juggle\", "gemstone minigame"},
  37. {@"games\eg_charm_the_magpie\", "charm the magpie minigame"},
  38. {@"games\eg_boathouse_puzzle\", "boathouse minigame"},
  39. };
  40. foreach (var Tag in vars.missions)
  41. {
  42. settings.Add(Tag.Key, true, Tag.Value, "missions");
  43. };
  44. if (timer.CurrentTimingMethod == TimingMethod.RealTime)
  45. {
  46. var timingMessage = MessageBox.Show (
  47. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  48. "LiveSplit is currently set to show Real Time (RTA).\n"+
  49. "Would you like to set the timing method to Game Time?",
  50. "LiveSplit | Barbie In The 12 Dancing Princesses",
  51. MessageBoxButtons.YesNo, MessageBoxIcon.Question
  52. );
  53. if (timingMessage == DialogResult.Yes)
  54. timer.CurrentTimingMethod = TimingMethod.GameTime;
  55. }
  56. }
  57. update
  58. {
  59. switch (version)
  60. {
  61. case "PC" : vars.LoadingValue = 0;
  62. break;
  63. case "PS2" : vars.LoadingValue = 5;
  64. break;
  65. }
  66. //string Spacer = "1";
  67. if (settings["SEP"])
  68. {
  69. if (settings["ST"])
  70. {
  71. if ((old.CurShow != "dance star") && (current.CurShow == "dance star") && (current.Loader != vars.LoadingValue))
  72. {
  73. vars.DoSplit = 1;
  74. }
  75. }
  76. else
  77. {
  78. if ((current.CurShow == "Central Pavilion") && (old.CurShow == "dance star"))
  79. {
  80. vars.DoSplit = 1;
  81. }
  82. }
  83. }
  84. if (settings[current.CurGame])
  85. {
  86. vars.OldMinigame = current.CurGame;
  87. }
  88. if ((settings[vars.OldMinigame]) && (!vars.doneMaps.Contains(vars.OldMinigame)) && (vars.OldMinigame != current.CurGame))
  89. {
  90. vars.doneMaps.Add(vars.OldMinigame);
  91. vars.DoSplit = 1;
  92. }
  93. if ((current.CurShow == "my show live") && (current.End == 0))
  94. {
  95. vars.DoSplit = 1;
  96. }
  97. }
  98. start
  99. {
  100. return ((current.CurGame == @"worlds\enchanted glen\") && (current.Loader != vars.LoadingValue) && (current.End != 0));
  101. }
  102. onStart
  103. {
  104. vars.OldMinigame = current.CurGame;
  105. }
  106. split
  107. {
  108. if (vars.DoSplit == 1)
  109. {
  110. vars.DoSplit = 0;
  111. return true;
  112. }
  113. }
  114. onReset
  115. {
  116. vars.doneMaps.Clear();
  117. vars.OldMinigame = "null";
  118. }
  119. isLoading
  120. {
  121. return (current.Loader == vars.LoadingValue);
  122. }