diff --git a/ModAPI Installers/GameVersion.cs b/ModAPI Installers/GameVersion.cs
index a04a358..ae18961 100644
--- a/ModAPI Installers/GameVersion.cs
+++ b/ModAPI Installers/GameVersion.cs
@@ -9,7 +9,7 @@ namespace ModAPI_Installers
public enum GameVersionType
{
/// 3.0.0.2818 (July 2009) installed from disc, with patch 5.1
- Disk,
+ Disc,
/// 3.0.0.2818 (July 2009) installed from Origin, with patch 5.1, requires ModAPI Fix
Origin,
/// 3.1.0.22 (March 2017) installed from Origin, requires ModAPI Fix
@@ -33,7 +33,7 @@ public static class GameVersion
public static int[] ExecutableSizes = {
- /* DISK*/ 24909584,
+ /* DISC*/ 24909584,
/* ORIGIN */ 31347984,
/* ORIGIN_P */ 24898224,
/* EA_OCT24 */ 24906040,
@@ -95,7 +95,7 @@ public static GameVersionType DetectVersion(string path)
public static string GetNewDLLName(GameVersionType type)
{
- if (type == GameVersionType.Disk)
+ if (type == GameVersionType.Disc)
return "SporeModAPI.disk.dll";
else if ((type == GameVersionType.Origin) ||
(type == GameVersionType.Origin_Patched) ||
diff --git a/Spore ModAPI Launcher/GameVersionSelector.Designer.cs b/Spore ModAPI Launcher/GameVersionSelector.Designer.cs
index d2ea869..61368bf 100644
--- a/Spore ModAPI Launcher/GameVersionSelector.Designer.cs
+++ b/Spore ModAPI Launcher/GameVersionSelector.Designer.cs
@@ -29,68 +29,84 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GameVersionSelector));
- this.label1 = new System.Windows.Forms.Label();
+ this.labelDetectionError = new System.Windows.Forms.Label();
this.btnSteam = new System.Windows.Forms.Button();
- this.btnOrigin = new System.Windows.Forms.Button();
- this.btnDisk = new System.Windows.Forms.Button();
+ this.btnEAApp = new System.Windows.Forms.Button();
+ this.btnDisc = new System.Windows.Forms.Button();
this.SuspendLayout();
//
- // label1
+ // labelDetectionError
//
- this.label1.AutoSize = true;
- this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label1.Location = new System.Drawing.Point(13, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(503, 20);
- this.label1.TabIndex = 0;
- this.label1.Text = Strings.ChooseGameVersion;
+ this.labelDetectionError.AutoSize = true;
+ this.labelDetectionError.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelDetectionError.Location = new System.Drawing.Point(12, 9);
+ this.labelDetectionError.Name = "labelDetectionError";
+ this.labelDetectionError.Size = new System.Drawing.Size(399, 60);
+ this.labelDetectionError.TabIndex = 0;
+ this.labelDetectionError.Text = "Your game version could not be detected automatically.\r\n\r\nPlease choose your vers" +
+ "ion:";
//
// btnSteam
//
- this.btnSteam.BackgroundImage = global::SporeModAPI_Launcher.Properties.Resources.VersionButton_Steam_GoG1;
this.btnSteam.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
- this.btnSteam.Location = new System.Drawing.Point(13, 133);
+ this.btnSteam.Font = new System.Drawing.Font("Segoe UI", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnSteam.Image = global::SporeModAPI_Launcher.Properties.Resources.VersionButton_Steam_GOG_Icon;
+ this.btnSteam.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.btnSteam.Location = new System.Drawing.Point(12, 167);
this.btnSteam.Name = "btnSteam";
- this.btnSteam.Size = new System.Drawing.Size(538, 80);
+ this.btnSteam.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
+ this.btnSteam.Size = new System.Drawing.Size(539, 80);
this.btnSteam.TabIndex = 3;
+ this.btnSteam.Text = "Steam / GOG";
+ this.btnSteam.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnSteam.UseVisualStyleBackColor = true;
this.btnSteam.Click += new System.EventHandler(this.btnSteam_Click);
//
- // btnOrigin
+ // btnEAApp
//
- this.btnOrigin.BackgroundImage = global::SporeModAPI_Launcher.Properties.Resources.VersionButton_Origin1;
- this.btnOrigin.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
- this.btnOrigin.Location = new System.Drawing.Point(13, 219);
- this.btnOrigin.Name = "btnOrigin";
- this.btnOrigin.Size = new System.Drawing.Size(538, 80);
- this.btnOrigin.TabIndex = 2;
- this.btnOrigin.UseVisualStyleBackColor = true;
- this.btnOrigin.Click += new System.EventHandler(this.btnOrigin_Click);
+ this.btnEAApp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
+ this.btnEAApp.Font = new System.Drawing.Font("Segoe UI", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnEAApp.Image = global::SporeModAPI_Launcher.Properties.Resources.VersionButton_EAApp_Icon;
+ this.btnEAApp.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.btnEAApp.Location = new System.Drawing.Point(12, 253);
+ this.btnEAApp.Name = "btnEAApp";
+ this.btnEAApp.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
+ this.btnEAApp.Size = new System.Drawing.Size(539, 80);
+ this.btnEAApp.TabIndex = 2;
+ this.btnEAApp.Text = "EA App";
+ this.btnEAApp.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.btnEAApp.UseVisualStyleBackColor = true;
+ this.btnEAApp.Click += new System.EventHandler(this.btnEAApp_Click);
//
- // btnDisk
+ // btnDisc
//
- this.btnDisk.BackgroundImage = global::SporeModAPI_Launcher.Properties.Resources.VersionButton_Disk3;
- this.btnDisk.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
- this.btnDisk.Location = new System.Drawing.Point(13, 47);
- this.btnDisk.Name = "btnDisk";
- this.btnDisk.Size = new System.Drawing.Size(538, 80);
- this.btnDisk.TabIndex = 1;
- this.btnDisk.UseVisualStyleBackColor = true;
- this.btnDisk.Click += new System.EventHandler(this.btnDisk_Click);
+ this.btnDisc.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
+ this.btnDisc.Font = new System.Drawing.Font("Segoe UI", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+ this.btnDisc.Image = global::SporeModAPI_Launcher.Properties.Resources.VersionButton_Disc_Icon;
+ this.btnDisc.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.btnDisc.Location = new System.Drawing.Point(12, 81);
+ this.btnDisc.Name = "btnDisc";
+ this.btnDisc.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
+ this.btnDisc.Size = new System.Drawing.Size(539, 80);
+ this.btnDisc.TabIndex = 1;
+ this.btnDisc.Text = "Disc";
+ this.btnDisc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.btnDisc.UseVisualStyleBackColor = true;
+ this.btnDisc.Click += new System.EventHandler(this.btnDisc_Click);
//
// GameVersionSelector
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(563, 313);
+ this.ClientSize = new System.Drawing.Size(563, 345);
this.Controls.Add(this.btnSteam);
- this.Controls.Add(this.btnOrigin);
- this.Controls.Add(this.btnDisk);
- this.Controls.Add(this.label1);
+ this.Controls.Add(this.btnEAApp);
+ this.Controls.Add(this.btnDisc);
+ this.Controls.Add(this.labelDetectionError);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "GameVersionSelector";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = Strings.ChooseGameVersionTitle;
+ this.Text = "Select your game version";
this.ResumeLayout(false);
this.PerformLayout();
@@ -98,9 +114,9 @@ private void InitializeComponent()
#endregion
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnDisk;
- private System.Windows.Forms.Button btnOrigin;
+ private System.Windows.Forms.Label labelDetectionError;
+ private System.Windows.Forms.Button btnDisc;
+ private System.Windows.Forms.Button btnEAApp;
private System.Windows.Forms.Button btnSteam;
}
}
\ No newline at end of file
diff --git a/Spore ModAPI Launcher/GameVersionSelector.cs b/Spore ModAPI Launcher/GameVersionSelector.cs
index 0905b03..2621531 100644
--- a/Spore ModAPI Launcher/GameVersionSelector.cs
+++ b/Spore ModAPI Launcher/GameVersionSelector.cs
@@ -21,15 +21,9 @@ public GameVersionSelector()
InitializeComponent();
}
- private void btnDisk_Click(object sender, EventArgs e)
+ private void btnDisc_Click(object sender, EventArgs e)
{
- SelectedVersion = GameVersionType.Disk;
- this.Close();
- }
-
- private void btnOrigin_Click(object sender, EventArgs e)
- {
- SelectedVersion = GameVersionType.Origin;
+ SelectedVersion = GameVersionType.Disc;
this.Close();
}
@@ -42,5 +36,11 @@ private void btnSteam_Click(object sender, EventArgs e)
this.Close();
}
+
+ private void btnEAApp_Click(object sender, EventArgs e)
+ {
+ SelectedVersion = GameVersionType.Origin;
+ this.Close();
+ }
}
}
diff --git a/Spore ModAPI Launcher/Injector.cs b/Spore ModAPI Launcher/Injector.cs
index e691965..7a6cd9c 100644
--- a/Spore ModAPI Launcher/Injector.cs
+++ b/Spore ModAPI Launcher/Injector.cs
@@ -113,7 +113,7 @@ public static IntPtr InjectDLL(PROCESS_INFORMATION pi, string dllPath)
return new IntPtr((Int64)thread_result);
}
- public static void SetInjectionData(PROCESS_INFORMATION pi, IntPtr hDLLInjectorHandle, bool is_disk_spore, List dlls)
+ public static void SetInjectionData(PROCESS_INFORMATION pi, IntPtr hDLLInjectorHandle, bool is_disc_spore, List dlls)
{
IntPtr hLocalDLLInjectorHandle = NativeMethods.LoadLibraryEx("ModAPI.DLLInjector.dll", IntPtr.Zero, LoadLibraryFlags.DONT_RESOLVE_DLL_REFERENCES);
IntPtr SetInjectDataPtr = GetProcAddress(hLocalDLLInjectorHandle, "SetInjectionData");
@@ -134,7 +134,7 @@ public static void SetInjectionData(PROCESS_INFORMATION pi, IntPtr hDLLInjectorH
IntPtr hProc = NativeMethods.OpenProcess(NativeMethods.AccessRequired, false, pi.dwProcessId); //Open the process with all access
- int total_alloc_size = 1 + 4; //1 byte for if we are disk spore, 4 bytes for number of strings
+ int total_alloc_size = 1 + 4; //1 byte for if we are disc spore, 4 bytes for number of strings
foreach (string dll in dlls)
{
total_alloc_size += 4 + Encoding.Unicode.GetByteCount(dll); //4 bytes for string length + string
@@ -151,7 +151,7 @@ public static void SetInjectionData(PROCESS_INFORMATION pi, IntPtr hDLLInjectorH
//write injection data
var bytes = new byte[total_alloc_size];
int byte_offset = 0;
- bytes[byte_offset++] = (byte)(is_disk_spore ? 1 : 0);
+ bytes[byte_offset++] = (byte)(is_disc_spore ? 1 : 0);
foreach (byte b in BitConverter.GetBytes((uint)dlls.Count))
bytes[byte_offset++] = b;
diff --git a/Spore ModAPI Launcher/Properties/Resources.Designer.cs b/Spore ModAPI Launcher/Properties/Resources.Designer.cs
index 7ba6e2b..dac4d32 100644
--- a/Spore ModAPI Launcher/Properties/Resources.Designer.cs
+++ b/Spore ModAPI Launcher/Properties/Resources.Designer.cs
@@ -73,9 +73,9 @@ internal static byte[] Spore_ModAPI_Launcher {
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
- internal static System.Drawing.Bitmap VersionButton_Disk3 {
+ internal static System.Drawing.Bitmap VersionButton_Disc_Icon {
get {
- object obj = ResourceManager.GetObject("VersionButton_Disk3", resourceCulture);
+ object obj = ResourceManager.GetObject("VersionButton_Disc_Icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@@ -83,9 +83,9 @@ internal static System.Drawing.Bitmap VersionButton_Disk3 {
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
- internal static System.Drawing.Bitmap VersionButton_Origin1 {
+ internal static System.Drawing.Bitmap VersionButton_EAApp_Icon {
get {
- object obj = ResourceManager.GetObject("VersionButton_Origin1", resourceCulture);
+ object obj = ResourceManager.GetObject("VersionButton_EAApp_Icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@@ -93,9 +93,9 @@ internal static System.Drawing.Bitmap VersionButton_Origin1 {
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
- internal static System.Drawing.Bitmap VersionButton_Steam_GoG1 {
+ internal static System.Drawing.Bitmap VersionButton_Steam_GOG_Icon {
get {
- object obj = ResourceManager.GetObject("VersionButton_Steam_GoG1", resourceCulture);
+ object obj = ResourceManager.GetObject("VersionButton_Steam_GOG_Icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
diff --git a/Spore ModAPI Launcher/Properties/Resources.resx b/Spore ModAPI Launcher/Properties/Resources.resx
index bb509b4..5442eae 100644
--- a/Spore ModAPI Launcher/Properties/Resources.resx
+++ b/Spore ModAPI Launcher/Properties/Resources.resx
@@ -118,16 +118,16 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- ..\Resources\VersionButton_Origin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\VersionButton_Disc_Icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\VersionButton_Steam_GoG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
-
- ..\Resources\VersionButton_Disk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\VersionButton_Steam_GOG_Icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Spore ModAPI Launcher.manifest;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ ..\Resources\VersionButton_EAApp_Icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/Spore ModAPI Launcher/Resources/VersionButton_Disc_Icon.png b/Spore ModAPI Launcher/Resources/VersionButton_Disc_Icon.png
new file mode 100644
index 0000000..8179eb4
Binary files /dev/null and b/Spore ModAPI Launcher/Resources/VersionButton_Disc_Icon.png differ
diff --git a/Spore ModAPI Launcher/Resources/VersionButton_Disk.png b/Spore ModAPI Launcher/Resources/VersionButton_Disk.png
deleted file mode 100644
index 6e9e585..0000000
Binary files a/Spore ModAPI Launcher/Resources/VersionButton_Disk.png and /dev/null differ
diff --git a/Spore ModAPI Launcher/Resources/VersionButton_EAApp_Icon.png b/Spore ModAPI Launcher/Resources/VersionButton_EAApp_Icon.png
new file mode 100644
index 0000000..606abba
Binary files /dev/null and b/Spore ModAPI Launcher/Resources/VersionButton_EAApp_Icon.png differ
diff --git a/Spore ModAPI Launcher/Resources/VersionButton_Origin.png b/Spore ModAPI Launcher/Resources/VersionButton_Origin.png
deleted file mode 100644
index cc7bfdb..0000000
Binary files a/Spore ModAPI Launcher/Resources/VersionButton_Origin.png and /dev/null differ
diff --git a/Spore ModAPI Launcher/Resources/VersionButton_Steam_GOG_Icon.png b/Spore ModAPI Launcher/Resources/VersionButton_Steam_GOG_Icon.png
new file mode 100644
index 0000000..28bc63c
Binary files /dev/null and b/Spore ModAPI Launcher/Resources/VersionButton_Steam_GOG_Icon.png differ
diff --git a/Spore ModAPI Launcher/Resources/VersionButton_Steam_GoG.png b/Spore ModAPI Launcher/Resources/VersionButton_Steam_GoG.png
deleted file mode 100644
index 148740c..0000000
Binary files a/Spore ModAPI Launcher/Resources/VersionButton_Steam_GoG.png and /dev/null differ
diff --git a/Spore ModAPI Launcher/Spore ModAPI Launcher.csproj b/Spore ModAPI Launcher/Spore ModAPI Launcher.csproj
index 30bca3c..a353ca1 100644
--- a/Spore ModAPI Launcher/Spore ModAPI Launcher.csproj
+++ b/Spore ModAPI Launcher/Spore ModAPI Launcher.csproj
@@ -129,11 +129,11 @@
+
+
+
-
-
-