Skip to content

Commit

Permalink
fix tabs and issue with credits menu
Browse files Browse the repository at this point in the history
  • Loading branch information
MagixGames committed Oct 15, 2023
1 parent 225d6ec commit d81479b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
48 changes: 24 additions & 24 deletions Injector/SWBF II Cinematic Tools/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ public partial class MainWindow : Window
[DllImport("kernel32.dll")]
private static extern int CloseHandle(IntPtr hObject);

private static readonly IntPtr IntptrZero = (IntPtr)0;
private static string g_shortName = "SWBF2.patched";
private static string g_dllPath = "CT_SWBF2.patched.dll";
private static string g_targetExe = "starwarsbattlefrontii";
private static bool g_hasTrial = true;
private static string g_targetExeTrial = "starwarsbattlefrontii_trial";
private BackgroundWorker bgWorker = new BackgroundWorker();
private bool isInjected;
private static readonly IntPtr IntptrZero = (IntPtr)0;
private static string g_shortName = "SWBF2.patched";
private static string g_dllPath = "CT_SWBF2.patched.dll";
private static string g_targetExe = "starwarsbattlefrontii";
private static bool g_hasTrial = true;
private static string g_targetExeTrial = "starwarsbattlefrontii_trial";
private BackgroundWorker bgWorker = new BackgroundWorker();
private bool isInjected;
private const string c_dlUrl = "https://github.com/MagixGames/SWBFII-Cinematic-Tools-Patch/releases/latest/download/updateinfo.txt";


// Token: 0x06000008 RID: 8 RVA: 0x00002048 File Offset: 0x00000248
private void Inject()
// Token: 0x06000008 RID: 8 RVA: 0x00002048 File Offset: 0x00000248
private void Inject()
{
uint num = 0U;
Process[] processes = Process.GetProcesses();
Expand All @@ -85,16 +85,16 @@ private void Inject()
return;
}

foreach (ProcessModule module in Process.GetProcessById((int)num).Modules)
{
if (module.FileName == fullPath)
{
this.isInjected = true;
return;
}
}
foreach (ProcessModule module in Process.GetProcessById((int)num).Modules)
{
if (module.FileName == fullPath)
{
this.isInjected = true;
return;
}
}

IntPtr procAddress = MainWindow.GetProcAddress(MainWindow.GetModuleHandle("kernel32.dll"), "LoadLibraryA");
IntPtr procAddress = MainWindow.GetProcAddress(MainWindow.GetModuleHandle("kernel32.dll"), "LoadLibraryA");
if (procAddress == MainWindow.IntptrZero)
{
MessageBox.Show("GetProcAddress failed. GetLastError " + Marshal.GetLastWin32Error(), "Error", MessageBoxButton.OK, MessageBoxImage.Hand);
Expand Down Expand Up @@ -144,11 +144,11 @@ private void CheckUpdates()
WebClient webClient = new WebClient();
StreamReader streamReader;
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
streamReader = new StreamReader(webClient.OpenRead(c_dlUrl));
Thread.Sleep(50);
goto IL_98;
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
streamReader = new StreamReader(webClient.OpenRead(c_dlUrl));
Thread.Sleep(50);
goto IL_98;
}
catch (WebException ex)
{
Expand Down
2 changes: 1 addition & 1 deletion cosmetic.efptxt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Change the credits text
// Max length: 0x19F or 415
GOTO 0xAE25B0
WRITESTRINGN "CineTools, updated by MagixGames / Magix1484\n\nThanks to git/NatalieWhatever for the help in reverse engineering\n\nF5: Toggle tools UI\nINSERT: Toggle camera\nDELETE: Freeze time\NHOME: Toggle game UI\nF: Create camera keyframe\nG: Delete keyframe\nP: Play camera track\nEffect controls:\nE: Play effect\nR: Stop effect\nHold R: Delete effect\nQ: Pick up effect\nE+Mouse: Rotate picked up effect"
WRITESTRINGN "CineTools, updated by MagixGames / Magix1484\n\nThanks to git/NatalieWhatever for the help in reverse engineering\n\nF5: Toggle tools UI\nINSERT: Toggle camera\nDELETE: Freeze time\nHOME: Toggle game UI\nF: Create camera keyframe\nG: Delete keyframe\nP: Play camera track\nEffect controls:\nE: Play effect\nR: Stop effect\nHold R: Delete effect\nQ: Pick up effect\nE+Mouse: Rotate picked up effect"

0 comments on commit d81479b

Please sign in to comment.