diff --git a/AliveHookManager/LinkerMapParser.cs b/AliveHookManager/LinkerMapParser.cs index 63752a0..da9a09c 100644 --- a/AliveHookManager/LinkerMapParser.cs +++ b/AliveHookManager/LinkerMapParser.cs @@ -46,7 +46,7 @@ public void Parse(string linkMapText) int firstAtIndex = funcName.IndexOf('@'); funcName = funcName.Substring(0, (firstAtIndex != -1) ? firstAtIndex : funcName.Length); - string[] nameSplit = funcName.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries); + string[] nameSplit = funcName.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries); int address = 0; if (int.TryParse(nameSplit.Last(), System.Globalization.NumberStyles.HexNumber, null, out address) && address > 0x400000) { @@ -55,7 +55,7 @@ public void Parse(string linkMapText) var lowerFunc = funcName.ToLower(); var sym = funcObjectSplit.First().ToLower(); - if (!lowerFunc.StartsWith("_") && !lowerFunc.StartsWith("?")) + if (!lowerFunc.StartsWith("_") && !lowerFunc.StartsWith("?")) { Functions.Add(new LinkerMapFunction() { Name = funcName, Object = functionObject, Address = address }); } diff --git a/AliveHookManager/ManagerV2.cs b/AliveHookManager/ManagerV2.cs index f8e9bd4..94deb49 100644 --- a/AliveHookManager/ManagerV2.cs +++ b/AliveHookManager/ManagerV2.cs @@ -63,12 +63,29 @@ void SaveDisabledFunctions() } } - void LaunchGame(string args) - { - Process p = Process.Start("Exoddus_NoStubs.exe", args); - Hide(); - p.WaitForExit(); - Show(); + void LaunchGame(string args) + { + Process p; + + if (File.Exists("Exoddus_AliveDllAE.exe")) + { + p = Process.Start("Exoddus_AliveDllAE.exe", args); + } + + else if (File.Exists("AbeWin_AliveDllAO.exe")) + { + p = Process.Start("AbeWin_AliveDllAO.exe", args); + } + + else + { + MessageBox.Show($"Exoddus_AliveDllAE.exe nor AbeWin_AliveDllAO.exe was found. Make sure to put this app into the game directory.", $"No executable found", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + + Hide(); + p.WaitForExit(); + Show(); } bool LoadLinkerMap(string fileName)