From 5d08e9b495a2315e8a4758a8123466665085d044 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Wed, 15 Sep 2021 01:24:49 +0200 Subject: hos: Cleanup the project (#2634) * hos: Cleanup the project Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more. This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable. * Address gdkchan feedback * addresses Thog feedback * Revert ElfSymbol --- Ryujinx.HLE/Utilities/FontUtils.cs | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 Ryujinx.HLE/Utilities/FontUtils.cs (limited to 'Ryujinx.HLE/Utilities/FontUtils.cs') diff --git a/Ryujinx.HLE/Utilities/FontUtils.cs b/Ryujinx.HLE/Utilities/FontUtils.cs deleted file mode 100644 index 91cbdee7..00000000 --- a/Ryujinx.HLE/Utilities/FontUtils.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.IO; - -namespace Ryujinx.HLE.Utilities -{ - public static class FontUtils - { - private static readonly uint FontKey = 0x06186249; - - public static byte[] DecryptFont(Stream bfttfStream) - { - uint KXor(uint In) => In ^ FontKey; - - using (BinaryReader reader = new BinaryReader(bfttfStream)) - { - using (MemoryStream ttfStream = new MemoryStream()) - { - using (BinaryWriter output = new BinaryWriter(ttfStream)) - { - if (KXor(reader.ReadUInt32()) != 0x18029a7f) - { - throw new InvalidDataException("Error: Input file is not in BFTTF format!"); - } - - bfttfStream.Position += 4; - - for (int i = 0; i < (bfttfStream.Length - 8) / 4; i++) - { - output.Write(KXor(reader.ReadUInt32())); - } - - return ttfStream.ToArray(); - } - } - } - } - } -} -- cgit v1.2.3