├── .gitignore ├── App.config ├── App.xaml ├── App.xaml.cs ├── Controller.cs ├── KeyboardInput.cs ├── Labtool.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── MemoryAccessor.cs ├── Player.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── README.md ├── images └── Labtool030.png ├── packages.config ├── packages ├── Fasm.NET.1.70.03.2 │ ├── .signature.p7s │ ├── Fasm.NET.1.70.03.2.nupkg │ └── lib │ │ ├── Fasm.NET.dll │ │ └── Fasm.NET.xml ├── MemorySharp.1.2.0 │ ├── .signature.p7s │ ├── MemorySharp.1.2.0.nupkg │ └── lib │ │ ├── LICENSE │ │ ├── MemorySharp.XML │ │ └── MemorySharp.dll └── SlimDX.4.0.13.44 │ ├── .signature.p7s │ ├── SlimDX.4.0.13.44.nupkg │ └── lib │ ├── NET20 │ └── SlimDX.dll │ └── NET40 │ └── SlimDX.dll ├── publish ├── Application Files │ ├── rev2-Labtool(Framework)_1_0_0_0 │ │ ├── Fasm.NET.dll.deploy │ │ ├── MemorySharp.dll.deploy │ │ ├── rev2-Labtool(Framework).application │ │ ├── rev2-Labtool(Framework).exe.config.deploy │ │ ├── rev2-Labtool(Framework).exe.deploy │ │ └── rev2-Labtool(Framework).exe.manifest │ └── rev2-Labtool(Framework)_1_0_0_1 │ │ ├── Fasm.NET.dll.deploy │ │ ├── MemorySharp.dll.deploy │ │ ├── rev2-Labtool(Framework).application │ │ ├── rev2-Labtool(Framework).exe.config.deploy │ │ ├── rev2-Labtool(Framework).exe.deploy │ │ └── rev2-Labtool(Framework).exe.manifest ├── autorun.inf ├── rev2-Labtool(Framework).application └── setup.exe ├── rev2-Labtool(Framework).csproj ├── rev2-Labtool(Framework).csproj.user ├── rev2-Labtool(Framework).sln └── rev2-Labtool(Framework)_TemporaryKey.pfx /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.vspscc 94 | *.vssscc 95 | .builds 96 | *.pidb 97 | *.svclog 98 | *.scc 99 | 100 | # Chutzpah Test files 101 | _Chutzpah* 102 | 103 | # Visual C++ cache files 104 | ipch/ 105 | *.aps 106 | *.ncb 107 | *.opendb 108 | *.opensdf 109 | *.sdf 110 | *.cachefile 111 | *.VC.db 112 | *.VC.VC.opendb 113 | 114 | # Visual Studio profiler 115 | *.psess 116 | *.vsp 117 | *.vspx 118 | *.sap 119 | 120 | # Visual Studio Trace Files 121 | *.e2e 122 | 123 | # TFS 2012 Local Workspace 124 | $tf/ 125 | 126 | # Guidance Automation Toolkit 127 | *.gpState 128 | 129 | # ReSharper is a .NET coding add-in 130 | _ReSharper*/ 131 | *.[Rr]e[Ss]harper 132 | *.DotSettings.user 133 | 134 | # TeamCity is a build add-in 135 | _TeamCity* 136 | 137 | # DotCover is a Code Coverage Tool 138 | *.dotCover 139 | 140 | # AxoCover is a Code Coverage Tool 141 | .axoCover/* 142 | !.axoCover/settings.json 143 | 144 | # Coverlet is a free, cross platform Code Coverage Tool 145 | coverage*[.json, .xml, .info] 146 | 147 | # Visual Studio code coverage results 148 | *.coverage 149 | *.coveragexml 150 | 151 | # NCrunch 152 | _NCrunch_* 153 | .*crunch*.local.xml 154 | nCrunchTemp_* 155 | 156 | # MightyMoose 157 | *.mm.* 158 | AutoTest.Net/ 159 | 160 | # Web workbench (sass) 161 | .sass-cache/ 162 | 163 | # Installshield output folder 164 | [Ee]xpress/ 165 | 166 | # DocProject is a documentation generator add-in 167 | DocProject/buildhelp/ 168 | DocProject/Help/*.HxT 169 | DocProject/Help/*.HxC 170 | DocProject/Help/*.hhc 171 | DocProject/Help/*.hhk 172 | DocProject/Help/*.hhp 173 | DocProject/Help/Html2 174 | DocProject/Help/html 175 | 176 | # Click-Once directory 177 | publish/ 178 | 179 | # Publish Web Output 180 | *.[Pp]ublish.xml 181 | *.azurePubxml 182 | # Note: Comment the next line if you want to checkin your web deploy settings, 183 | # but database connection strings (with potential passwords) will be unencrypted 184 | *.pubxml 185 | *.publishproj 186 | 187 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 188 | # checkin your Azure Web App publish settings, but sensitive information contained 189 | # in these scripts will be unencrypted 190 | PublishScripts/ 191 | 192 | # NuGet Packages 193 | *.nupkg 194 | # NuGet Symbol Packages 195 | *.snupkg 196 | # The packages folder can be ignored because of Package Restore 197 | **/[Pp]ackages/* 198 | # except build/, which is used as an MSBuild target. 199 | !**/[Pp]ackages/build/ 200 | # Uncomment if necessary however generally it will be regenerated when needed 201 | #!**/[Pp]ackages/repositories.config 202 | # NuGet v3's project.json files produces more ignorable files 203 | *.nuget.props 204 | *.nuget.targets 205 | 206 | # Microsoft Azure Build Output 207 | csx/ 208 | *.build.csdef 209 | 210 | # Microsoft Azure Emulator 211 | ecf/ 212 | rcf/ 213 | 214 | # Windows Store app package directories and files 215 | AppPackages/ 216 | BundleArtifacts/ 217 | Package.StoreAssociation.xml 218 | _pkginfo.txt 219 | *.appx 220 | *.appxbundle 221 | *.appxupload 222 | 223 | # Visual Studio cache files 224 | # files ending in .cache can be ignored 225 | *.[Cc]ache 226 | # but keep track of directories ending in .cache 227 | !?*.[Cc]ache/ 228 | 229 | # Others 230 | ClientBin/ 231 | ~$* 232 | *~ 233 | *.dbmdl 234 | *.dbproj.schemaview 235 | *.jfm 236 | *.pfx 237 | *.publishsettings 238 | orleans.codegen.cs 239 | 240 | # Including strong name files can present a security risk 241 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 242 | #*.snk 243 | 244 | # Since there are multiple workflows, uncomment next line to ignore bower_components 245 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 246 | #bower_components/ 247 | 248 | # RIA/Silverlight projects 249 | Generated_Code/ 250 | 251 | # Backup & report files from converting an old project file 252 | # to a newer Visual Studio version. Backup files are not needed, 253 | # because we have git ;-) 254 | _UpgradeReport_Files/ 255 | Backup*/ 256 | UpgradeLog*.XML 257 | UpgradeLog*.htm 258 | ServiceFabricBackup/ 259 | *.rptproj.bak 260 | 261 | # SQL Server files 262 | *.mdf 263 | *.ldf 264 | *.ndf 265 | 266 | # Business Intelligence projects 267 | *.rdl.data 268 | *.bim.layout 269 | *.bim_*.settings 270 | *.rptproj.rsuser 271 | *- [Bb]ackup.rdl 272 | *- [Bb]ackup ([0-9]).rdl 273 | *- [Bb]ackup ([0-9][0-9]).rdl 274 | 275 | # Microsoft Fakes 276 | FakesAssemblies/ 277 | 278 | # GhostDoc plugin setting file 279 | *.GhostDoc.xml 280 | 281 | # Node.js Tools for Visual Studio 282 | .ntvs_analysis.dat 283 | node_modules/ 284 | 285 | # Visual Studio 6 build log 286 | *.plg 287 | 288 | # Visual Studio 6 workspace options file 289 | *.opt 290 | 291 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 292 | *.vbw 293 | 294 | # Visual Studio LightSwitch build output 295 | **/*.HTMLClient/GeneratedArtifacts 296 | **/*.DesktopClient/GeneratedArtifacts 297 | **/*.DesktopClient/ModelManifest.xml 298 | **/*.Server/GeneratedArtifacts 299 | **/*.Server/ModelManifest.xml 300 | _Pvt_Extensions 301 | 302 | # Paket dependency manager 303 | .paket/paket.exe 304 | paket-files/ 305 | 306 | # FAKE - F# Make 307 | .fake/ 308 | 309 | # CodeRush personal settings 310 | .cr/personal 311 | 312 | # Python Tools for Visual Studio (PTVS) 313 | __pycache__/ 314 | *.pyc 315 | 316 | # Cake - Uncomment if you are using it 317 | # tools/** 318 | # !tools/packages.config 319 | 320 | # Tabs Studio 321 | *.tss 322 | 323 | # Telerik's JustMock configuration file 324 | *.jmconfig 325 | 326 | # BizTalk build output 327 | *.btp.cs 328 | *.btm.cs 329 | *.odx.cs 330 | *.xsd.cs 331 | 332 | # OpenCover UI analysis results 333 | OpenCover/ 334 | 335 | # Azure Stream Analytics local run output 336 | ASALocalRun/ 337 | 338 | # MSBuild Binary and Structured Log 339 | *.binlog 340 | 341 | # NVidia Nsight GPU debugger configuration file 342 | *.nvuser 343 | 344 | # MFractors (Xamarin productivity tool) working folder 345 | .mfractor/ 346 | 347 | # Local History for Visual Studio 348 | .localhistory/ 349 | 350 | # BeatPulse healthcheck temp database 351 | healthchecksdb 352 | 353 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 354 | MigrationBackup/ 355 | 356 | # Ionide (cross platform F# VS Code tools) working folder 357 | .ionide/ 358 | 359 | # Fody - auto-generated XML schema 360 | FodyWeavers.xsd -------------------------------------------------------------------------------- /App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace rev2_Labtool_Framework_ 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Controller.cs: -------------------------------------------------------------------------------- 1 | using SlimDX.DirectInput; 2 | using System.Collections.Generic; 3 | 4 | class Controller 5 | { 6 | private static DirectInput _joystick = new DirectInput(); 7 | private static JoystickState _state = new JoystickState(); 8 | private static Joystick[] _sticks; 9 | public bool[] _pressedButtons; 10 | public bool _isStickEnabled = false; 11 | 12 | public Controller() 13 | { 14 | getSticks(); 15 | 16 | if (_sticks.Length > 0) 17 | { 18 | _isStickEnabled = true; 19 | } 20 | } 21 | 22 | public static void getSticks() 23 | { 24 | List sticks = new List(); 25 | foreach (DeviceInstance device in _joystick.GetDevices(DeviceClass.GameController, DeviceEnumerationFlags.AttachedOnly)) 26 | { 27 | try 28 | { 29 | Joystick stick = new Joystick(_joystick, device.InstanceGuid); 30 | stick.Acquire(); 31 | 32 | foreach (DeviceObjectInstance deviceObject in stick.GetObjects()) 33 | { 34 | if ((deviceObject.ObjectType & ObjectDeviceType.Axis) != 0) 35 | stick.GetObjectPropertiesById((int)deviceObject.ObjectType).SetRange(-100, 100); 36 | } 37 | 38 | sticks.Add(stick); 39 | } 40 | catch (DirectInputException) 41 | { 42 | } 43 | } 44 | _sticks = sticks.ToArray(); 45 | } 46 | 47 | public void GetState() 48 | { 49 | if (_sticks != null) 50 | { 51 | _state = _sticks[0].GetCurrentState(); 52 | _pressedButtons = _state.GetButtons(); 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /KeyboardInput.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | 4 | class KeyboardInput 5 | { 6 | [DllImport("User32.dll")] 7 | private static extern short GetAsyncKeyState(int vKey); 8 | 9 | private static readonly int VK_1 = 0x31; 10 | private static readonly int VK_2 = 0x32; 11 | 12 | public bool _reset; 13 | public bool _save; 14 | 15 | public void readKeys() 16 | { 17 | short resetKeyState = GetAsyncKeyState(VK_1); 18 | short saveKeyState = GetAsyncKeyState(VK_2); 19 | 20 | _reset = ((resetKeyState >> 15) & 0x0001) == 0x0001; 21 | _save = ((saveKeyState >> 15) & 0x0001) == 0x0001; 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Labtool.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | class Labtool 5 | { 6 | public Controller _controller = new Controller(); 7 | public KeyboardInput _keyboard = new KeyboardInput(); 8 | public Player _player1 = new Player(); 9 | public Player _player2 = new Player(); 10 | 11 | public class Framedata 12 | { 13 | public bool blockstring = false; 14 | public int frameAdvantage; 15 | public bool updateFA; 16 | } 17 | 18 | public class Gapdata 19 | { 20 | public bool updateGap = false; 21 | public int idleCount = 0; 22 | public int rememberGap; 23 | } 24 | 25 | #region Framedata 26 | public Framedata f = new Framedata(); 27 | public Gapdata g1 = new Gapdata(); 28 | public Gapdata g2 = new Gapdata(); 29 | private void frameAdvantage(Framedata f, ref Player p1, ref Player p2) 30 | { 31 | bool p1idle = p1.IsCompletelyIdle(); 32 | bool p2idle = p2.IsCompletelyIdle(); 33 | 34 | if (!p1idle && !p2idle) 35 | { 36 | f.frameAdvantage = 0; 37 | f.blockstring = true; 38 | } 39 | 40 | if ((p1idle || p2idle) && f.blockstring) 41 | { 42 | if (p1idle && p2idle) 43 | { 44 | f.blockstring = false; 45 | f.updateFA = true; 46 | } 47 | 48 | if (!p1idle) 49 | { 50 | --f.frameAdvantage; 51 | } 52 | if (!p2idle) 53 | { 54 | ++f.frameAdvantage; 55 | } 56 | } 57 | } 58 | 59 | private void gap(Gapdata g, ref Player opponent) 60 | { 61 | if (opponent.IsUnderAttack()) 62 | { 63 | if (g.idleCount != -1) 64 | { 65 | if (g.idleCount <= 30) 66 | { 67 | g.rememberGap = g.idleCount + 1; 68 | g.updateGap = true; 69 | g.idleCount = 0; 70 | } 71 | g.idleCount = -1; 72 | } 73 | } 74 | else 75 | { 76 | ++g.idleCount; 77 | } 78 | } 79 | #endregion 80 | 81 | #region DataRefreshing 82 | private int prevFrame = 0; 83 | private int currFrame = 0; 84 | public void updateFrameInfo() 85 | { 86 | do 87 | { 88 | timeBeginPeriod(1); 89 | System.Threading.Thread.Sleep(1); 90 | timeEndPeriod(1); 91 | currFrame = MemoryAccessor.FrameCount(); 92 | } 93 | while (currFrame == prevFrame); 94 | 95 | IntPtr aswEngPtr = MemoryAccessor.GetAswEnginePtr(); 96 | if ((int)aswEngPtr == 0) 97 | { 98 | // match not currently running 99 | System.Threading.Thread.Sleep(1000); 100 | return; 101 | } 102 | _player1.assignPlayerPtr(aswEngPtr + MemoryAccessor._p1Offset); 103 | _player2.assignPlayerPtr(aswEngPtr + MemoryAccessor._p2Offset); 104 | 105 | 106 | _player1.characterIndex = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._charIndexOffset); 107 | _player2.characterIndex = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._charIndexOffset); 108 | _player1._isBlocking = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._BlockstunOffset) != 0; 109 | _player2._isBlocking = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._BlockstunOffset) != 0; 110 | _player1._isHit = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._HitstunOffset) != 0; 111 | _player2._isHit = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._HitstunOffset) != 0; 112 | _player1._currentAnim = MemoryAccessor.ReadAnimationString(ref _player1); 113 | _player2._currentAnim = MemoryAccessor.ReadAnimationString(ref _player2); 114 | _player1._hitstop = MemoryAccessor.ReadHitstop(ref _player1); 115 | _player2._hitstop = MemoryAccessor.ReadHitstop(ref _player2); 116 | _player1._flags0x4d3c = MemoryAccessor.ReadFlags0x4d3c(ref _player1); 117 | _player2._flags0x4d3c = MemoryAccessor.ReadFlags0x4d3c(ref _player2); 118 | _player1._flags0x4d48 = MemoryAccessor.ReadFlags0x4d48(ref _player1); 119 | _player2._flags0x4d48 = MemoryAccessor.ReadFlags0x4d48(ref _player2); 120 | _player1._forceDisableFlags = MemoryAccessor.ReadForceDisableFlags(ref _player1); 121 | _player2._forceDisableFlags = MemoryAccessor.ReadForceDisableFlags(ref _player2); 122 | 123 | frameAdvantage(f, ref _player1, ref _player2); 124 | gap(g1, ref _player2); 125 | gap(g2, ref _player1); 126 | 127 | _player1._HP = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._HPOffset); 128 | _player2._HP = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._HPOffset); 129 | _player1._defenseModifier = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._DefenseModifierOffset); 130 | _player2._defenseModifier = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._DefenseModifierOffset); 131 | _player1._meter = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._MeterOffset); 132 | _player2._meter = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._MeterOffset); 133 | _player1._RISC = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._RISCOffset); 134 | _player2._RISC = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._RISCOffset); 135 | _player1._stun = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._StunOffset); 136 | _player2._stun = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._StunOffset); 137 | _player1._stunThreshold = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._StunThresholdOffset); 138 | _player2._stunThreshold = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._StunThresholdOffset); 139 | 140 | _player1._pos.x = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._PositionXOffset); 141 | _player1._pos.y = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._PositionYOffset); 142 | _player2._pos.x = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._PositionXOffset); 143 | _player2._pos.y = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._PositionYOffset); 144 | 145 | if (MemoryAccessor.FrameCount() - currFrame != 0) 146 | { 147 | Console.WriteLine("frame skipped"); 148 | } 149 | prevFrame = currFrame; 150 | } 151 | #endregion 152 | 153 | #region InputProcessing 154 | Position savedPosP1 = new Position(-252000,0); //P1 roundstart position 155 | Position savedPosP2 = new Position(252000, 0); //P2 roundstart position 156 | public static bool processKeys = false; 157 | public void macroButtons() 158 | { 159 | _keyboard.readKeys(); 160 | 161 | if (processKeys) 162 | { 163 | 164 | if (_keyboard._save) 165 | { 166 | savedPosP1.x = _player1._pos.x; 167 | savedPosP1.y = _player1._pos.y; 168 | savedPosP2.x = _player2._pos.x; 169 | savedPosP2.y = _player2._pos.y; 170 | 171 | } 172 | else if (_keyboard._reset) 173 | { 174 | MemoryAccessor.WriteInfoInt(ref _player1, MemoryAccessor._PositionXOffset, savedPosP1.x); 175 | MemoryAccessor.WriteInfoInt(ref _player1, MemoryAccessor._PositionYOffset, savedPosP1.y); 176 | MemoryAccessor.WriteInfoInt(ref _player2, MemoryAccessor._PositionXOffset, savedPosP2.x); 177 | MemoryAccessor.WriteInfoInt(ref _player2, MemoryAccessor._PositionYOffset, savedPosP2.y); 178 | } 179 | 180 | else if (_controller._isStickEnabled == true) 181 | { 182 | _controller.GetState(); 183 | /* 184 | if (_controller._pressedButtons[6]) 185 | { 186 | MemoryAccessor.WriteInfoInt(ref _player1, MemoryAccessor._PositionXOffset, savedPosP1.x); 187 | MemoryAccessor.WriteInfoInt(ref _player1, MemoryAccessor._PositionYOffset, savedPosP1.y); 188 | MemoryAccessor.WriteInfoInt(ref _player2, MemoryAccessor._PositionXOffset, savedPosP2.x); 189 | MemoryAccessor.WriteInfoInt(ref _player2, MemoryAccessor._PositionYOffset, savedPosP2.y); 190 | } 191 | */ 192 | } 193 | } 194 | } 195 | #endregion 196 | 197 | #region DLL Imports 198 | [DllImport("winmm.dll")] 199 | private static extern int timeBeginPeriod(uint uPeriod); 200 | 201 | [DllImport("winmm.dll")] 202 | private static extern int timeEndPeriod(uint uPeriod); 203 | 204 | #endregion 205 | } 206 | 207 | /* 208 | * TODO 209 | * - Find Camera center 210 | * - Fix display when playing as p2 (most probably, find real positions and/or which side they are facing at first) 211 | * - Find dizzy thresholds and guts in memory 212 | * 213 | * DONE 214 | * Positions are displayed (divided by 1000 for lisibility's sake) 215 | * keyboard key "1" or joystick button 6 (select) do reset the positions you saved by using keyboard key "2". Custom buttons and keys implementation is planned. 216 | * Consistency of framedata readings improved (the tool may be wrong once every twenty times now, and only by a frame) 217 | * Using actual blockstun and hitstun values to compute gaps 218 | * Dizzy renamed to Stun to avoid confusions with the playable character 219 | * Stun values corrected: Johnny 7000, I-no 5500 220 | * 221 | * NOTES 222 | * If stuck falling on the ground indefinitely because of the position reset, you can jump to go back to normal 223 | */ 224 | -------------------------------------------------------------------------------- /MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |