mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-18 08:54:38 +08:00
Update Scheme Tool
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -25,7 +26,25 @@ namespace SchemeTool
|
||||
GameRes.Formats.KiriKiri.Xp3Scheme scheme = format.Scheme as GameRes.Formats.KiriKiri.Xp3Scheme;
|
||||
|
||||
// Add scheme information here
|
||||
|
||||
#if false
|
||||
byte[] cb = File.ReadAllBytes(@"MEM_10014628_00001000.mem");
|
||||
var cb2 = MemoryMarshal.Cast<byte, uint>(cb);
|
||||
for (int i = 0; i < cb2.Length; i++)
|
||||
cb2[i] = ~cb2[i];
|
||||
var cs = new GameRes.Formats.KiriKiri.CxScheme
|
||||
{
|
||||
Mask = 0x000,
|
||||
Offset = 0x000,
|
||||
PrologOrder = new byte[] { 0, 1, 2 },
|
||||
OddBranchOrder = new byte[] { 0, 1, 2, 3, 4, 5 },
|
||||
EvenBranchOrder = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||
ControlBlock = cb2.ToArray()
|
||||
};
|
||||
GameRes.Formats.KiriKiri.ICrypt crypt = new GameRes.Formats.KiriKiri.CxEncryption(cs);
|
||||
#else
|
||||
GameRes.Formats.KiriKiri.ICrypt crypt = new GameRes.Formats.KiriKiri.XorCrypt(0x00);
|
||||
#endif
|
||||
|
||||
scheme.KnownSchemes.Add("game title", crypt);
|
||||
}
|
||||
@@ -36,7 +55,7 @@ namespace SchemeTool
|
||||
if (gameMap != null)
|
||||
{
|
||||
// Add file name here
|
||||
gameMap.Add("file.exe", "game title");
|
||||
gameMap.Add("game.exe", "game title");
|
||||
}
|
||||
|
||||
// Save database
|
||||
|
||||
Reference in New Issue
Block a user