Skip to content

Commit

Permalink
Backup XEX on tweak
Browse files Browse the repository at this point in the history
	modified:   Sonic-06-Mod-Manager/src/Environment3/RushInterface.cs
	modified:   Sonic-06-Mod-Manager/src/UnifyPatcher.cs
  • Loading branch information
HyperPolygon64 committed Feb 1, 2020
1 parent 660115b commit 0fb2851
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sonic-06-Mod-Manager/src/Environment3/RushInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
using System.Diagnostics;
using Unify.Globalisation;
using System.Windows.Forms;
using System.Configuration;
using System.ComponentModel;
using System.IO.Compression;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Configuration;

// Sonic '06 Mod Manager is licensed under the MIT License:
/*
Expand Down
4 changes: 4 additions & 0 deletions Sonic-06-Mod-Manager/src/UnifyPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,10 @@ public static void ApplyTweaks(RushInterface rush) {
// Field of View
if (fieldOfView != 90) {
string xex = Path.Combine(gameDirectory, "default.xex"); // Location of the XEX

if (!File.Exists($"{xex}_back"))
File.Copy(xex, $"{xex}_back", true);

XEX.Decrypt(xex); // Decrypt the XEX to be able to modify it properly
XEX.FieldOfView(xex, fieldOfView); // Set FOV
}
Expand Down

0 comments on commit 0fb2851

Please sign in to comment.