public IEnumerable <FileModResult> TryApply(FileStorage storage) { var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x9a75c8439ca12500ul, 0x437af585d0ae9474ul, 0x4b620dfdu)); if (s == null) { return(null); } MemoryStream bin = s.CopyToMemoryAndDispose(); // fix duplicate line on Imperial Chronicle sign var patcher = new SenScriptPatcher(bin); patcher.RemovePartialCommand(0x27aed, 0x2c, 0x27b03, 0x13); // fix incorrect voice clips for Rean in Alisa's bike scene bin.Position = 0x10150; bin.WriteUInt16(63276, EndianUtils.Endianness.LittleEndian); bin.Position = 0x10253; bin.WriteUInt16(63278, EndianUtils.Endianness.LittleEndian); // fix voice/text mismatches in Millium's bike scene patcher.ExtendPartialCommand(0x155cd, 0x4e, 0x15618, new byte[] { 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72 }); patcher.ReplacePartialCommand(0x168a9, 0x2f, 0x168b1, 0x24, new byte[] { 0x57, 0x6f, 0x6f, 0x20, 0x68, 0x6f, 0x6f }); return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/c0100.dat", bin) }); }
public IEnumerable <FileModResult> TryApply(FileStorage storage) { var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x531ae02b784b6530ul, 0xf4dc08676a793c89ul, 0xf9ebae68u)); if (s == null) { return(null); } MemoryStream bin = s.CopyToMemoryAndDispose(); var patcher = new SenScriptPatcher(bin); // missing period patcher.ExtendPartialCommand(0x1fdb, 0x5b, 0x2034, new byte[] { 0x2e }); // missing word patcher.ExtendPartialCommand(0x3962, 0x42, 0x3995, new byte[] { 0x62, 0x65, 0x20 }); return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/r0601.dat", bin) }); }
public IEnumerable <FileModResult> TryApply(FileStorage storage) { var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x66a22b79517c7214ul, 0xb00b2a7a4ac898bcul, 0x5f231fd8u)); if (s == null) { return(null); } MemoryStream bin = s.CopyToMemoryAndDispose(); var patcher = new SenScriptPatcher(bin); // both double space and missing dot in this one... { bin.Position = 0xb5be; byte[] b = bin.ReadBytes(0x3f); for (int i = 0x23; i >= 0x11; --i) { b[i] = b[i - 1]; } bin.Position = 0xb5be; bin.Write(b); } // double spaces in various lines patcher.RemovePartialCommand(0xeb28, 0x49, 0xeb39, 1); patcher.RemovePartialCommand(0xeef6, 0xc0, 0xef20, 1); // broken alisa line (missing space/linebreak) bin.Position = 0x1f7a; bin.WriteUInt8(0x01); patcher.ExtendPartialCommand(0x1f5c, 0x3c, 0x1f83, new byte[] { 0x20 }); // missing word patcher.ExtendPartialCommand(0x1c93, 0x93, 0x1cac, new byte[] { 0x69, 0x73, 0x20 }); return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t0031.dat", bin) }); }
public IEnumerable <FileModResult> TryApply(FileStorage storage) { var s = storage.TryGetDuplicate(new HyoutaUtils.Checksum.SHA1(0x8bf43f6d4c7f0de5ul, 0xba13e4c14301da05ul, 0xbd1c919au)); if (s == null) { return(null); } MemoryStream bin = s.CopyToMemoryAndDispose(); var patcher = new SenScriptPatcher(bin); // extra word in voice but not text patcher.ExtendPartialCommand(0xcdd1, 0x8c, 0xce58, new byte[] { 0x2c, 0x20, 0x68, 0x75, 0x68 }); // repeated voice clip where there shouldn't be one patcher.RemovePartialCommand(0xd1d1, 0x3d, 0xd1d4, 5); // extra word in voice but not text patcher.ExtendPartialCommand(0x1f46b, 0x10, 0x1f476, new byte[] { 0x4d, 0x6d, 0x2d, 0x68, 0x6d }); return(new FileModResult[] { new FileModResult("data/scripts/scena/dat_us/t0000c.dat", bin) }); }