scripts & contacts export support
This commit is contained in:
@@ -149,7 +149,7 @@ Partial Class Form1
|
||||
|
||||
|
||||
|
||||
For a = 57 To 397
|
||||
For a = 57 To 396
|
||||
'reading files
|
||||
Debug.WriteLine("Working On......" & a.ToString("D4"))
|
||||
Dim ind = files.FindIndex(Function(x) x.Contains(a.ToString("D4")))
|
||||
@@ -337,8 +337,11 @@ Partial Class Form1
|
||||
Dim exeFile = cd.getCDfile(getFilnam, 27, 1812408)
|
||||
|
||||
'search in exe
|
||||
Dim res = ByteSearch(exeFile.ToArray, finfil.ToArray)
|
||||
If res > -1 Then MsgBox("FOUND! IN SLPS!" & vbCrLf & "Offset: " & res) : Exit Sub
|
||||
Dim exeResults = ByteSearchAll(exeFile.ToArray, finfil.ToArray)
|
||||
For Each res In exeResults
|
||||
|
||||
MsgBox("FOUND! IN SLPS!" & vbCrLf & "Offset: " & res) : Exit Sub
|
||||
Next
|
||||
|
||||
|
||||
'all files to video
|
||||
@@ -347,8 +350,10 @@ Partial Class Form1
|
||||
'If curFile(0) = 1 Or curFile(0) = 2 Then Continue For 'IF ARCHIVE
|
||||
'If curFile(1) = 1 Or curFile(1) = 2 Then Continue For
|
||||
Debug.WriteLine("Searching... " & a)
|
||||
res = ByteSearch(curFile.ToArray, finfil.ToArray)
|
||||
If res > -1 Then MsgBox("FOUND! IN file #" & a & vbCrLf & "Offset: " & res) : Exit For
|
||||
Dim fileResults = ByteSearchAll(curFile.ToArray, finfil.ToArray)
|
||||
For Each res In fileResults
|
||||
MsgBox("FOUND! IN file #" & a & vbCrLf & "Offset: " & res) : Exit For
|
||||
Next
|
||||
Next
|
||||
|
||||
|
||||
@@ -485,20 +490,20 @@ Partial Class Form1
|
||||
Private Sub ConvertContact_Click(sender As Object, e As EventArgs) Handles ExportContact.Click
|
||||
|
||||
|
||||
Dim Japfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona.2.Innocent.Sin\Export\1075_Battle_Contacts", "*_J").ToList
|
||||
Dim Engfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona.2.Innocent.Sin\Export\1075_Battle_Contacts", "*_E*").ToList
|
||||
Dim OutPut_Dir = "D:\Games\PSX\Persona.2.Innocent.Sin\Export\1075_Battle_Contacts\Processing\Back\"
|
||||
Dim Japfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Export\UnRLE\0864_Btl_CONTC\SRC\", "*_U").ToList
|
||||
Dim Engfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Export\UnRLE\0864_Btl_CONTC\SRC\", "*_E").ToList
|
||||
Dim OutPut_Dir = "D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Export\UnRLE\0864_Btl_CONTC\"
|
||||
|
||||
Dim scr = New ScriptTools
|
||||
Dim cnt = 0
|
||||
|
||||
For Each fil In Japfiles
|
||||
|
||||
Dim contact As String = scr.MakeExportFile(My.Computer.FileSystem.ReadAllBytes(fil), My.Computer.FileSystem.ReadAllBytes(Engfiles(Japfiles.IndexOf(fil))), cnt)
|
||||
Dim contact As String = scr.MakeContactExportFile(My.Computer.FileSystem.ReadAllBytes(fil), My.Computer.FileSystem.ReadAllBytes(Engfiles(Japfiles.IndexOf(fil))), cnt)
|
||||
|
||||
Dim filename = OutPut_Dir & Path.GetFileName(fil) & "_exp.txt"
|
||||
|
||||
My.Computer.FileSystem.WriteAllText(filename, contact, False, Encoding.GetEncoding(1251))
|
||||
My.Computer.FileSystem.WriteAllText(filename, contact, False)
|
||||
Next
|
||||
|
||||
|
||||
@@ -508,9 +513,9 @@ Partial Class Form1
|
||||
|
||||
Private Sub Summon_Export_Click(sender As Object, e As EventArgs) Handles Summon_Export.Click
|
||||
|
||||
Dim Japfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona.2.Innocent.Sin\Export\0077_Summon_Text", "*_U").ToList
|
||||
Dim Engfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona.2.Innocent.Sin\Export\0077_Summon_Text", "*_E*").ToList
|
||||
Dim OutPut_Dir = "D:\Games\PSX\Persona.2.Innocent.Sin\Export\0077_Summon_Text\Processing\Back\"
|
||||
Dim Japfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Export\UnRLE\0035_SUMMON_MSGS", "*_U").ToList
|
||||
Dim Engfiles = IO.Directory.GetFiles("D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Export\UnRLE\0035_SUMMON_MSGS", "*_E").ToList
|
||||
Dim OutPut_Dir = "D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Export\UnRLE\0035_SUMMON_MSGS\Processing\"
|
||||
|
||||
Dim scr = New ScriptTools
|
||||
Dim cnt = 0
|
||||
@@ -519,9 +524,10 @@ Partial Class Form1
|
||||
|
||||
Dim contact As String = scr.MakeSummonExport(My.Computer.FileSystem.ReadAllBytes(fil), My.Computer.FileSystem.ReadAllBytes(Engfiles(Japfiles.IndexOf(fil))), cnt)
|
||||
|
||||
Dim filename = OutPut_Dir & Path.GetFileName(fil) & "_exp.txt"
|
||||
Dim filename = OutPut_Dir & Path.GetFileName(fil) & "_CONV.txt"
|
||||
|
||||
My.Computer.FileSystem.WriteAllText(filename, contact, False, Encoding.GetEncoding(1251))
|
||||
My.Computer.FileSystem.WriteAllText(filename, contact, False)
|
||||
cnt += 1
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user