mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed Rocket League, fixed volume overlay
This commit is contained in:
parent
1ba2db0bba
commit
f158acbb14
@ -3,6 +3,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<section name="Artemis.Modules.Games.RocketLeague.RocketLeague" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Settings.Offsets" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Settings.Offsets" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Modules.Games.Witcher3.Witcher3" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Modules.Games.Witcher3.Witcher3" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Modules.Effects.AudioVisualizer.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Modules.Effects.AudioVisualizer.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
@ -21,6 +22,17 @@
|
|||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
</startup>
|
</startup>
|
||||||
<userSettings>
|
<userSettings>
|
||||||
|
<Artemis.Modules.Games.RocketLeague.RocketLeague>
|
||||||
|
<setting name="Enabled" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="MainColor" serializeAs="String">
|
||||||
|
<value>#FFFF5000</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="SecondaryColor" serializeAs="String">
|
||||||
|
<value>#FFFF0000</value>
|
||||||
|
</setting>
|
||||||
|
</Artemis.Modules.Games.RocketLeague.RocketLeague>
|
||||||
<Artemis.Settings.Offsets>
|
<Artemis.Settings.Offsets>
|
||||||
<setting name="RocketLeague" serializeAs="String">
|
<setting name="RocketLeague" serializeAs="String">
|
||||||
<value>{"Game":"RocketLeague","GameVersion":"1.10","GameAddresses":[{"Description":"Boost","BasePointer":{"value":21998084},"Offsets":[88,1452,1780,540]}]}</value>
|
<value>{"Game":"RocketLeague","GameVersion":"1.10","GameAddresses":[{"Description":"Boost","BasePointer":{"value":21998084},"Offsets":[88,1452,1780,540]}]}</value>
|
||||||
|
|||||||
@ -117,7 +117,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
|||||||
Waves.Add(Settings.IsRandomColors
|
Waves.Add(Settings.IsRandomColors
|
||||||
? new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0, ColorHelpers.GetRandomRainbowColor())
|
? new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0, ColorHelpers.GetRandomRainbowColor())
|
||||||
: new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0,
|
: new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0,
|
||||||
ColorHelpers.MediaColorToDrawingColor(Settings.WaveColor)));
|
ColorHelpers.ToDrawingColor(Settings.WaveColor)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -145,8 +145,8 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
AmmoRect.Width = ((int) Math.Floor((16/100.00)*ammoPercentage))*Scale;
|
AmmoRect.Width = ((int) Math.Floor((16/100.00)*ammoPercentage))*Scale;
|
||||||
AmmoRect.Colors = new List<Color>
|
AmmoRect.Colors = new List<Color>
|
||||||
{
|
{
|
||||||
ColorHelpers.MediaColorToDrawingColor(_counterStrikeSettings.AmmoMainColor),
|
ColorHelpers.ToDrawingColor(_counterStrikeSettings.AmmoMainColor),
|
||||||
ColorHelpers.MediaColorToDrawingColor(_counterStrikeSettings.AmmoSecondaryColor)
|
ColorHelpers.ToDrawingColor(_counterStrikeSettings.AmmoSecondaryColor)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Low ammo indicator
|
// Low ammo indicator
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Artemis.Settings {
|
namespace Artemis.Modules.Games.RocketLeague {
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
@ -25,7 +25,7 @@ namespace Artemis.Settings {
|
|||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
public bool Enabled {
|
public bool Enabled {
|
||||||
get {
|
get {
|
||||||
return ((bool)(this["Enabled"]));
|
return ((bool)(this["Enabled"]));
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Modules.Games.RocketLeague" GeneratedClassName="RocketLeague">
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
|
|
||||||
GeneratedClassNamespace="Artemis.Settings" GeneratedClassName="RocketLeague">
|
|
||||||
<Profiles />
|
<Profiles />
|
||||||
<Settings>
|
<Settings>
|
||||||
<Setting Name="Enabled" Type="System.Boolean" Scope="User">
|
<Setting Name="Enabled" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">False</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="MainColor" Type="System.Windows.Media.Color" Scope="User">
|
<Setting Name="MainColor" Type="System.Windows.Media.Color" Scope="User">
|
||||||
<Value Profile="(Default)">#FFFF5000</Value>
|
<Value Profile="(Default)">#FFFF5000</Value>
|
||||||
|
|||||||
@ -17,9 +17,9 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
public class RocketLeagueModel : GameModel
|
public class RocketLeagueModel : GameModel
|
||||||
{
|
{
|
||||||
private readonly RocketLeagueSettings _settings;
|
private readonly RocketLeagueSettings _settings;
|
||||||
private KeyboardRectangle _boostRect;
|
|
||||||
private int _boostAmount;
|
private int _boostAmount;
|
||||||
private bool _boostGrowing;
|
private bool _boostGrowing;
|
||||||
|
private KeyboardRectangle _boostRect;
|
||||||
private Memory _memory;
|
private Memory _memory;
|
||||||
private GamePointersCollectionModel _pointer;
|
private GamePointersCollectionModel _pointer;
|
||||||
private int _previousBoost;
|
private int _previousBoost;
|
||||||
@ -44,14 +44,13 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
public override void Enable()
|
public override void Enable()
|
||||||
{
|
{
|
||||||
_boostRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>
|
_boostRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>
|
||||||
{
|
{
|
||||||
ColorHelpers.MediaColorToDrawingColor(_settings.MainColor),
|
ColorHelpers.ToDrawingColor(_settings.MainColor),
|
||||||
ColorHelpers.MediaColorToDrawingColor(_settings.SecondaryColor)
|
ColorHelpers.ToDrawingColor(_settings.SecondaryColor)
|
||||||
}, LinearGradientMode.Horizontal);
|
}, LinearGradientMode.Horizontal);
|
||||||
|
|
||||||
MemoryHelpers.GetPointers();
|
MemoryHelpers.GetPointers();
|
||||||
_pointer = JsonConvert
|
_pointer = JsonConvert.DeserializeObject<GamePointersCollectionModel>(Offsets.Default.RocketLeague);
|
||||||
.DeserializeObject<GamePointersCollectionModel>(Offsets.Default.RocketLeague);
|
|
||||||
|
|
||||||
var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName);
|
var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName);
|
||||||
_memory = new Memory(tempProcess);
|
_memory = new Memory(tempProcess);
|
||||||
@ -77,7 +76,12 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
if (_boostAmount > 100)
|
if (_boostAmount > 100)
|
||||||
_boostAmount = 100;
|
_boostAmount = 100;
|
||||||
|
|
||||||
_boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
|
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
|
||||||
|
_boostRect.Colors = new List<Color>
|
||||||
|
{
|
||||||
|
ColorHelpers.ToDrawingColor(_settings.MainColor),
|
||||||
|
ColorHelpers.ToDrawingColor(_settings.SecondaryColor)
|
||||||
|
};
|
||||||
|
|
||||||
Task.Run(() => GrowIfHigher());
|
Task.Run(() => GrowIfHigher());
|
||||||
}
|
}
|
||||||
@ -94,7 +98,7 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
var differenceStep = difference/amountOfSteps;
|
var differenceStep = difference/amountOfSteps;
|
||||||
var differenceStepRest = difference%amountOfSteps;
|
var differenceStepRest = difference%amountOfSteps;
|
||||||
_boostAmount = _previousBoost;
|
_boostAmount = _previousBoost;
|
||||||
_boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
|
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
|
||||||
|
|
||||||
for (var i = 0; i < amountOfSteps; i++)
|
for (var i = 0; i < amountOfSteps; i++)
|
||||||
{
|
{
|
||||||
@ -102,10 +106,10 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
{
|
{
|
||||||
differenceStepRest -= 1;
|
differenceStepRest -= 1;
|
||||||
_boostAmount += 1;
|
_boostAmount += 1;
|
||||||
_boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
|
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
|
||||||
}
|
}
|
||||||
_boostAmount += differenceStep;
|
_boostAmount += differenceStep;
|
||||||
_boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
|
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
|
||||||
|
|
||||||
Thread.Sleep(50);
|
Thread.Sleep(50);
|
||||||
}
|
}
|
||||||
@ -115,7 +119,7 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
|
|
||||||
public override Bitmap GenerateBitmap()
|
public override Bitmap GenerateBitmap()
|
||||||
{
|
{
|
||||||
var bitmap = new Bitmap(Scale*21, Scale*8);
|
var bitmap = MainModel.ActiveKeyboard.KeyboardBitmap(Scale);
|
||||||
|
|
||||||
using (var g = Graphics.FromImage(bitmap))
|
using (var g = Graphics.FromImage(bitmap))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,18 +16,18 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
|
|
||||||
public override sealed void Load()
|
public override sealed void Load()
|
||||||
{
|
{
|
||||||
Enabled = Settings.RocketLeague.Default.Enabled;
|
Enabled = RocketLeague.Default.Enabled;
|
||||||
MainColor = Settings.RocketLeague.Default.MainColor;
|
MainColor = RocketLeague.Default.MainColor;
|
||||||
SecondaryColor = Settings.RocketLeague.Default.SecondaryColor;
|
SecondaryColor = RocketLeague.Default.SecondaryColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override sealed void Save()
|
public override sealed void Save()
|
||||||
{
|
{
|
||||||
Settings.RocketLeague.Default.Enabled = Enabled;
|
RocketLeague.Default.Enabled = Enabled;
|
||||||
Settings.RocketLeague.Default.MainColor = MainColor;
|
RocketLeague.Default.MainColor = MainColor;
|
||||||
Settings.RocketLeague.Default.SecondaryColor = SecondaryColor;
|
RocketLeague.Default.SecondaryColor = SecondaryColor;
|
||||||
|
|
||||||
Settings.RocketLeague.Default.Save();
|
RocketLeague.Default.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override sealed void ToDefault()
|
public override sealed void ToDefault()
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
@ -32,11 +31,15 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
|
|||||||
public void Draw(Graphics g)
|
public void Draw(Graphics g)
|
||||||
{
|
{
|
||||||
var volumeRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>
|
var volumeRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>
|
||||||
{
|
{
|
||||||
ColorHelpers.MediaColorToDrawingColor(Settings.MainColor),
|
ColorHelpers.ToDrawingColor(Settings.SecondaryColor),
|
||||||
ColorHelpers.MediaColorToDrawingColor(Settings.SecondaryColor)
|
ColorHelpers.ToDrawingColor(Settings.MainColor)
|
||||||
},
|
},
|
||||||
LinearGradientMode.Horizontal);
|
LinearGradientMode.Horizontal)
|
||||||
|
{
|
||||||
|
Width = (int) (100.00/(MainModel.ActiveKeyboard.Width*4)*Volume),
|
||||||
|
ContainedBrush = false
|
||||||
|
};
|
||||||
volumeRect.Draw(g);
|
volumeRect.Draw(g);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,7 +72,7 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
|
|||||||
|
|
||||||
public override Bitmap GenerateBitmap()
|
public override Bitmap GenerateBitmap()
|
||||||
{
|
{
|
||||||
return GenerateBitmap(new Bitmap(21, 6));
|
return GenerateBitmap(MainModel.ActiveKeyboard.KeyboardBitmap(4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Bitmap GenerateBitmap(Bitmap bitmap)
|
public override Bitmap GenerateBitmap(Bitmap bitmap)
|
||||||
|
|||||||
@ -70,12 +70,12 @@ namespace Artemis.Utilities
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Color MediaColorToDrawingColor(System.Windows.Media.Color mColor)
|
public static Color ToDrawingColor(System.Windows.Media.Color mColor)
|
||||||
{
|
{
|
||||||
return Color.FromArgb(mColor.A, mColor.R, mColor.G, mColor.B);
|
return Color.FromArgb(mColor.A, mColor.R, mColor.G, mColor.B);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static System.Windows.Media.Color DrawingColorToMediaColor(Color dColor)
|
public static System.Windows.Media.Color ToMediaColor(Color dColor)
|
||||||
{
|
{
|
||||||
return System.Windows.Media.Color.FromArgb(dColor.A, dColor.R, dColor.G, dColor.B);
|
return System.Windows.Media.Color.FromArgb(dColor.A, dColor.R, dColor.G, dColor.B);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,15 +32,15 @@ namespace Artemis.Utilities.Keyboard
|
|||||||
_rotationProgress = 0;
|
_rotationProgress = 0;
|
||||||
_blinkWorker.DoWork += BlinkWorker_DoWork;
|
_blinkWorker.DoWork += BlinkWorker_DoWork;
|
||||||
|
|
||||||
X = x;
|
Scale = 4;
|
||||||
Y = y;
|
X = x*Scale;
|
||||||
Width = keyboard.Width;
|
Y = y*Scale;
|
||||||
Height = keyboard.Height;
|
Width = keyboard.Width*Scale;
|
||||||
|
Height = keyboard.Height*Scale;
|
||||||
Visible = true;
|
Visible = true;
|
||||||
Opacity = 255;
|
Opacity = 255;
|
||||||
|
|
||||||
ContainedBrush = true;
|
ContainedBrush = true;
|
||||||
Scale = 4;
|
|
||||||
GradientMode = gradientMode;
|
GradientMode = gradientMode;
|
||||||
Rotate = false;
|
Rotate = false;
|
||||||
LoopSpeed = 1;
|
LoopSpeed = 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user