Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. state("CodeVein-Win64-Shipping")
  2. {
  3. }
  4.  
  5. state("CodeVein-Win64-Shipping", "1.9903.8.6465")
  6. {
  7. bool isLoading : 0x3C482D0;
  8. bool notTitleScreen : 0x402B2C4;
  9. }
  10.  
  11. init
  12. {
  13. string[] versions = {"1.9903.8.6465"};
  14.  
  15. FileVersionInfo fvi = modules.First().FileVersionInfo;
  16. string fileVersion = String.Format("{0}.{1}.{2}.{3}",
  17. fvi.FileMajorPart,
  18. fvi.FileMinorPart,
  19. fvi.FileBuildPart,
  20. fvi.FilePrivatePart);
  21. if (Array.IndexOf(versions, fileVersion) >= 0) {
  22. version = fileVersion;
  23. } else {
  24. version = "";
  25. }
  26.  
  27. vars.isLoading = false;
  28. vars.loadCount = 0;
  29. vars.split = false;
  30. vars.splitIndex = 0;
  31. vars.splitPoints = new int[]
  32. {
  33. 3,
  34. 4,
  35. 5
  36. };
  37. }
  38.  
  39. update
  40. {
  41. if (version == "") {
  42. return false;
  43. }
  44.  
  45. vars.isLoading = current.isLoading;
  46.  
  47. // Immediately reset the start flag. The game should only start on a
  48. // single frame.
  49. vars.split = true;
  50.  
  51. // This is a very hacky way to infer the very start of the
  52. // game--just count the number of loading screens after starting a
  53. // new game. LiveSplit must first "see" the title screen for this to
  54. // work, and assumes that all runs begin by selecting "New
  55. // Game".
  56. if (!current.notTitleScreen) {
  57. // Being on the title screen makes us eligible to click New Game.
  58. vars.splitIndex = 0;
  59. vars.loadCount = 0;
  60. vars.split = false;
  61. } else if (vars.splitIndex < vars.splitPoints.Length
  62. && !current.isLoading
  63. && old.isLoading) {
  64. // After X load cycles have completed, we can start the timer.
  65. if (++vars.loadCount == vars.splitPoints[vars.splitIndex]) {
  66. vars.split = true;
  67. }
  68. }
  69. }
  70.  
  71. start
  72. {
  73. if (vars.splitIndex == 0 && vars.loadCount == vars.splitPoints[vars.splitIndex] && vars.split) {
  74. vars.splitIndex++;
  75. return true;
  76. }
  77. return false;
  78. }
  79.  
  80. split
  81. {
  82. if (vars.splitIndex > 0 && vars.loadCount == vars.splitPoints[vars.splitIndex] && vars.split) {
  83. vars.splitIndex++;
  84. return true;
  85. }
  86. return false;
  87. }
  88.  
  89. reset
  90. {
  91. return !current.notTitleScreen;
  92. }
  93.  
  94. isLoading
  95. {
  96. return vars.isLoading;
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement