diff --git a/Artemis/Artemis/App.config b/Artemis/Artemis/App.config index 154bc2f17..1dceb70cb 100644 --- a/Artemis/Artemis/App.config +++ b/Artemis/Artemis/App.config @@ -4,6 +4,8 @@ +
+
@@ -25,10 +27,24 @@ allowExeDefinition="MachineToLocalUser" requirePermission="false" /> + + + + {"Game":"RocketLeague","GameVersion":"1.10","GameAddresses":[{"Description":"Boost","BasePointer":{"value":21998084},"Offsets":[88,1452,1780,540]}]} + + + {"Game":"Witcher3","GameVersion":"1.11","GameAddresses":[{"Description":"Sign","BasePointer":{"value":42942304},"Offsets":[40,16,32,3008]}]} + + + + + True + + 4 @@ -74,6 +90,9 @@ True + + True + @@ -175,6 +194,9 @@ Logitech G910 Orion Spark RGB + + True + diff --git a/Artemis/Artemis/Artemis.csproj b/Artemis/Artemis/Artemis.csproj index fd981c2bd..8126e7061 100644 --- a/Artemis/Artemis/Artemis.csproj +++ b/Artemis/Artemis/Artemis.csproj @@ -84,7 +84,11 @@ ..\packages\MahApps.Metro.1.1.2.0\lib\net45\MahApps.Metro.dll True - + + False + + + False E:\Downloads\Chome Downloads\MyMemory-x64.dll @@ -168,6 +172,7 @@ + AudioVisualization.settings True @@ -196,6 +201,11 @@ True + + True + True + Witcher3.settings + @@ -218,6 +228,11 @@ True General.settings + + True + True + Offsets.settings + @@ -310,12 +325,20 @@ SettingsSingleFileGenerator RocketLeague.Designer.cs + + SettingsSingleFileGenerator + Witcher3.Designer.cs + SettingsSingleFileGenerator VolumeDisplay.Designer.cs + + SettingsSingleFileGenerator + Offsets.Designer.cs + SettingsSingleFileGenerator diff --git a/Artemis/Artemis/Models/GamePointersCollectionModel.cs b/Artemis/Artemis/Models/GamePointersCollectionModel.cs new file mode 100644 index 000000000..6a5d4ace4 --- /dev/null +++ b/Artemis/Artemis/Models/GamePointersCollectionModel.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Artemis.Models +{ + public class GamePointersCollectionModel + { + public string Game { get; set; } + public string GameVersion { get; set; } + public List GameAddresses { get; set; } + } + + public class GamePointer + { + public string Description { get; set; } + public IntPtr BasePointer { get; set; } + public int[] Offsets { get; set; } + public override string ToString() + { + return Offsets.Aggregate(BasePointer.ToString("X"), (current, offset) => current + $"+{offset.ToString("X")}"); + } + } +} \ No newline at end of file diff --git a/Artemis/Artemis/Models/MainModel.cs b/Artemis/Artemis/Models/MainModel.cs index 3f10dc754..614b73feb 100644 --- a/Artemis/Artemis/Models/MainModel.cs +++ b/Artemis/Artemis/Models/MainModel.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Threading; +using System.Threading.Tasks; using Artemis.Events; using Artemis.KeyboardProviders; using Artemis.Settings; @@ -34,8 +35,8 @@ namespace Artemis.Models } public EffectModel ActiveEffect { get; set; } - public List EffectModels { get; set; } public KeyboardProvider ActiveKeyboard { get; set; } + public List EffectModels { get; set; } public List KeyboardProviders { get; set; } public GameStateWebServer GameStateWebServer { get; set; } @@ -104,6 +105,11 @@ namespace Artemis.Models if (effectModel is OverlayModel) throw new ArgumentException("Can't set an Overlay effect as the active effect"); + // Game models are only used if they are enabled + var gameModel = effectModel as GameModel; + if (gameModel != null) + if (!gameModel.Enabled) + return; if (ActiveEffect != null && effectModel.Name == ActiveEffect.Name) return; diff --git a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs index bc7c0a518..71d9a1953 100644 --- a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs +++ b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs @@ -23,6 +23,18 @@ namespace Artemis.Modules.Games.CounterStrike { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool Enabled { + get { + return ((bool)(this["Enabled"])); + } + set { + this["Enabled"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] diff --git a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings index 75e9907fb..d45c34188 100644 --- a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings +++ b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings @@ -1,7 +1,12 @@  - + + + + True + diff --git a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml index d6d9746c0..57ea3b8a9 100644 --- a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml +++ b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml @@ -54,13 +54,13 @@ + Margin="5,3,0,0" Width="180" /> @@ -68,7 +68,7 @@ Grid.Column="1" HorizontalAlignment="Left">