Naming conventions

This commit is contained in:
Alex Barney
2018-12-01 14:01:59 -06:00
parent 8faae5612d
commit 77972140a6
286 changed files with 11867 additions and 11845 deletions

View File

@ -6,29 +6,29 @@ namespace Ryujinx.HLE.Utilities
{
private static readonly uint FontKey = 0x06186249;
public static byte[] DecryptFont(Stream BFTTFStream)
public static byte[] DecryptFont(Stream bfttfStream)
{
uint KXor(uint In) => In ^ 0x06186249;
using (BinaryReader Reader = new BinaryReader(BFTTFStream))
using (BinaryReader reader = new BinaryReader(bfttfStream))
{
using (MemoryStream TTFStream = new MemoryStream())
using (MemoryStream ttfStream = new MemoryStream())
{
using (BinaryWriter Output = new BinaryWriter(TTFStream))
using (BinaryWriter output = new BinaryWriter(ttfStream))
{
if (KXor(Reader.ReadUInt32()) != 0x18029a7f)
if (KXor(reader.ReadUInt32()) != 0x18029a7f)
{
throw new InvalidDataException("Error: Input file is not in BFTTF format!");
}
BFTTFStream.Position += 4;
bfttfStream.Position += 4;
for (int i = 0; i < (BFTTFStream.Length - 8) / 4; i++)
for (int i = 0; i < (bfttfStream.Length - 8) / 4; i++)
{
Output.Write(KXor(Reader.ReadUInt32()));
output.Write(KXor(reader.ReadUInt32()));
}
return TTFStream.ToArray();
return ttfStream.ToArray();
}
}
}