Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- state("CodeVein-Win64-Shipping")
- {
- }
- state("CodeVein-Win64-Shipping", "1.9903.8.6465")
- {
- bool isLoading : 0x3C482D0;
- bool notTitleScreen : 0x402B2C4;
- }
- init
- {
- string[] versions = {"1.9903.8.6465"};
- FileVersionInfo fvi = modules.First().FileVersionInfo;
- string fileVersion = String.Format("{0}.{1}.{2}.{3}",
- fvi.FileMajorPart,
- fvi.FileMinorPart,
- fvi.FileBuildPart,
- fvi.FilePrivatePart);
- if (Array.IndexOf(versions, fileVersion) >= 0) {
- version = fileVersion;
- } else {
- version = "";
- }
- vars.isLoading = false;
- vars.loadCount = 0;
- vars.split = false;
- vars.splitIndex = 0;
- vars.splitPoints = new int[]
- {
- 3,
- 4,
- 5
- };
- }
- update
- {
- if (version == "") {
- return false;
- }
- vars.isLoading = current.isLoading;
- // Immediately reset the start flag. The game should only start on a
- // single frame.
- vars.split = true;
- // This is a very hacky way to infer the very start of the
- // game--just count the number of loading screens after starting a
- // new game. LiveSplit must first "see" the title screen for this to
- // work, and assumes that all runs begin by selecting "New
- // Game".
- if (!current.notTitleScreen) {
- // Being on the title screen makes us eligible to click New Game.
- vars.splitIndex = 0;
- vars.loadCount = 0;
- vars.split = false;
- } else if (vars.splitIndex < vars.splitPoints.Length
- && !current.isLoading
- && old.isLoading) {
- // After X load cycles have completed, we can start the timer.
- if (++vars.loadCount == vars.splitPoints[vars.splitIndex]) {
- vars.split = true;
- }
- }
- }
- start
- {
- if (vars.splitIndex == 0 && vars.loadCount == vars.splitPoints[vars.splitIndex] && vars.split) {
- vars.splitIndex++;
- return true;
- }
- return false;
- }
- split
- {
- if (vars.splitIndex > 0 && vars.loadCount == vars.splitPoints[vars.splitIndex] && vars.split) {
- vars.splitIndex++;
- return true;
- }
- return false;
- }
- reset
- {
- return !current.notTitleScreen;
- }
- isLoading
- {
- return vars.isLoading;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement