Skip to content

Commit

Permalink
Add cutscene movement and other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
644 committed Nov 1, 2021
1 parent bcf7bd6 commit af84d58
Show file tree
Hide file tree
Showing 16 changed files with 332 additions and 925 deletions.
2 changes: 1 addition & 1 deletion CheckUpdates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private async void CheckUpdates_Load(object sender, EventArgs e)
{
await CheckGitHubNewerVersion();
}
catch (Exception err)
catch
{
label1.Text = "Could not check for updates";
}
Expand Down
1 change: 1 addition & 0 deletions Config/config.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
},
"TrackRemapping": {},
"Shuffle": false,
"CutsceneMovement": false,
"ShuffleRotation": [
"Battle_00",
"Battle_0a",
Expand Down
1 change: 1 addition & 0 deletions Config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
},
"TrackRemapping": {},
"Shuffle": false,
"CutsceneMovement": false,
"ShuffleRotation": [
"Battle_00",
"Battle_0a",
Expand Down
1 change: 1 addition & 0 deletions DMC3MusicConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class DMC3MusicConfig
public Dictionary<string, List<string>> RoomTracks { get; set; }
public Dictionary<string, List<string>> AmbientTracks { get; set; }
public bool Shuffle { get; set; }
public bool CutsceneMovement { get; set; }
public List<string> ShuffleRotation { get; set; }
public int BattleTimer { get; set; }
public int AmbientTimer { get; set; }
Expand Down
9 changes: 3 additions & 6 deletions DMC3Process.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace dmc3music
{
Expand Down Expand Up @@ -61,7 +57,7 @@ public bool OpenReadOnly()
Process = localProcess[0];
Handle = OpenProcess(ProcessAccessFlags.VMRead, false, Process.Id);

if(Handle == UIntPtr.Zero)
if (Handle == UIntPtr.Zero)
{
return false;
}
Expand Down Expand Up @@ -135,7 +131,8 @@ public void WriteInt(int intVal, int address)

public void WriteExactMem(byte[] bytes, int address)
{
WriteProcessMemory(Handle, new IntPtr(address), bytes, (uint)bytes.LongLength, out _);
WriteProcessMemory(Handle, new IntPtr(address), bytes, (uint)bytes.LongLength, out int bytesWritten);
Console.WriteLine(bytesWritten);
}

public int ReadExactMem(int address)
Expand Down
57 changes: 11 additions & 46 deletions Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit af84d58

Please sign in to comment.