From 8e0bba7597d43e19bf0e4cdc592f5f8de975c3ef Mon Sep 17 00:00:00 2001 From: Soraiko Date: Mon, 25 May 2020 22:12:15 +0200 Subject: [PATCH] Updating the program to run tests. --- ConsoleApp1/Program.cs | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/ConsoleApp1/Program.cs b/ConsoleApp1/Program.cs index 100a2f8ee..8fbf082a5 100644 --- a/ConsoleApp1/Program.cs +++ b/ConsoleApp1/Program.cs @@ -1,7 +1,11 @@ -using System; +using OpenKh.Common; +using OpenKh.Kh2; +using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; @@ -11,12 +15,25 @@ class Program { static void Main(string[] args) { - //var stream = ProcessStream.SearchProcess("pcsx2"); + string OpenKhSolutionDirectory = + Directory.GetParent( /* ConsoleApp1 */ + Directory.GetParent( /* bin */ + Directory.GetParent( /* Debug */ + Directory.GetParent(Directory.GetCurrentDirectory()).FullName).FullName).FullName).FullName; + + if (!Directory.Exists(OpenKhSolutionDirectory + @"\OpenKh.Tests")) + return; + Directory.SetCurrentDirectory(OpenKhSolutionDirectory + @"\OpenKh.Tests"); + + + Stream stream = ProcessStream.SearchProcess("pcsx2"); /* For RAM-related tests. */ + //stream.Position = 0x00964c10; //var dpd = new OpenKh.Kh2.Dpd(stream); - //var dpd = new OpenKh.Kh2.Dpd(File.OpenRead(@"D:\Hacking\KH2\reverse\SAMPLES\tt_0.dpd")); - var dpd = new OpenKh.Kh2.Dpd(File.OpenRead(@"D:\Hacking\KH2\reverse\SAMPLES\texcommon.dpd")); + //var dpd = new OpenKh.Kh2.Dpd(File.OpenRead(@"D:\Hacking\KH2\reverse\SAMPLES\texcommon.dpd")); + + } } }