Initial v1.7.0 Support (#445)

* Pre-patch preparations

* Update magic values

* Check formatting characters directly rather than string compare

"Brown".StartsWith("\u000e")
>true
what

let's be paranoid here, because .NET Core behaves differently from .NET framework.

* Update FileHashRevision.cs

Postbox with the massive decrease in size; likely the same mutation caused the other massive decreases.

* Dump item names

* Update flag definitions

* Update item info

* Add feathers to bug list

Might remove later.

* Update RecipeList.cs

* Update ItemRemakeUtil.cs

* Update stack details

* Update offsets

* Update MainSaveOffsets17.cs

* Update GameLists.cs
This commit is contained in:
Kurt
2021-01-27 20:04:51 -08:00
committed by GitHub
parent f427ca647e
commit 6c40e1c769
42 changed files with 5886 additions and 2545 deletions

View File

@@ -6,16 +6,16 @@ public static class Encryption
{
private static byte[] GetParam(uint[] data, in int index)
{
var sead = new SEADRandom(data[data[index] & 0x7F]);
var rand = new XorShift128(data[data[index] & 0x7F]);
var prms = data[data[index + 1] & 0x7F] & 0x7F;
var rndRollCount = (prms & 0xF) + 1;
for (var i = 0; i < rndRollCount; i++)
sead.GetU64();
rand.GetU64();
var result = new byte[0x10];
for (var i = 0; i < result.Length; i++)
result[i] = (byte)(sead.GetU32() >> 24);
result[i] = (byte)(rand.GetU32() >> 24);
return result;
}
@@ -47,7 +47,7 @@ public static void Decrypt(byte[] headerData, byte[] encData)
private static CryptoFile GenerateHeaderFile(uint seed, byte[] versionData)
{
// Generate 128 Random uints which will be used for params
var random = new SEADRandom(seed);
var random = new XorShift128(seed);
var encryptData = new uint[128];
for (var i = 0; i < encryptData.Length; i++)
encryptData[i] = random.GetU32();