diff --git a/p2isPSX_CDToolkit/DungeonEditor.vb b/p2isPSX_CDToolkit/DungeonEditor.vb index 04b4f84..dc40a2a 100644 --- a/p2isPSX_CDToolkit/DungeonEditor.vb +++ b/p2isPSX_CDToolkit/DungeonEditor.vb @@ -81,7 +81,25 @@ pointer += 30 Loop + '32 - floors count + '36-52 - floors ids (by 1 byte) + 'FLOOR STRUCTURE FROM 52 (40 bytes chunks) + '{ + 'int16 + int16 - Map width and (Heigth / 2) in words, or normal minimap by 1 byte + 'int32 - FFFF0000 + 'int32 - Flood id + 'int32 - User minimap offset + 'int32 - Floor objects geometry offset + 'int32 - User normal map offset + 'int32 - Some vars offset 1 + 'int32 - Some vars offset 2 (coords??) + 'int32 - Some vars offset 3 + 'int32 - Floor places strings offset (int16 - status, char[30] - text) + '} + '80 - Minimap offset + '84 - DUNGEON MAIN MAP offset + '88 - Dungeon normal usermap offset End Sub diff --git a/p2isPSX_CDToolkit/Form1.Designer.vb b/p2isPSX_CDToolkit/Form1.Designer.vb index 3601dd4..a712815 100644 --- a/p2isPSX_CDToolkit/Form1.Designer.vb +++ b/p2isPSX_CDToolkit/Form1.Designer.vb @@ -265,7 +265,8 @@ Partial Class Form1 Me.UserPath.Name = "UserPath" Me.UserPath.Size = New System.Drawing.Size(300, 20) Me.UserPath.TabIndex = 0 - Me.UserPath.Text = "D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Persona 2 - Batsu USER.bin" + Me.UserPath.Text = "D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\EXTRA_CD\Sumaru TV Special P" & + "review Disc (Japan).bin" ' 'Label3 ' diff --git a/p2isPSX_CDToolkit/Form1.vb b/p2isPSX_CDToolkit/Form1.vb index c66e6c2..ee49f47 100644 --- a/p2isPSX_CDToolkit/Form1.vb +++ b/p2isPSX_CDToolkit/Form1.vb @@ -207,7 +207,7 @@ Public Class Form1 Dim xy = "" - If r.Type = 2 Then xy = ", x" & r.x & "y" & r.y & "w" & r.w & "h" & r.h + If r.Type = 2 Then xy = ", Vx" & r.x & " Vy" & r.y & ", w" & r.w & " h" & r.h Select Case r.Compr @@ -423,8 +423,19 @@ Public Class Form1 End Function - Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown, SelBinFiles.KeyDown - If e.KeyCode = Keys.E Then ExportUnrleFile.PerformClick() + Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown, SelBinFiles.KeyDown, CDFileList.KeyDown + If e.KeyCode = Keys.E Then + If SelBinFiles.SelectedIndex = -1 Then + If CDFileList.SelectedIndex = -1 Then Exit Sub + Dim a = New ISOTools + Dim fil = a.getCDfile(getFilnam, files1(CDFileList.SelectedIndex).Sector, files1(CDFileList.SelectedIndex).Sizw) + Dim filename = ExportBinPath.Text & CDFileList.SelectedIndex.ToString("D4") & ".bin" + My.Computer.FileSystem.WriteAllBytes(filename, fil.ToArray, False) + Savedlbl.Text = "SAVED TO " & filename + Else + ExportUnrleFile.PerformClick() + End If + End If End Sub @@ -494,7 +505,7 @@ Public Class Form1 CDFileList.Items.Clear() If Not File.Exists(filnam) Then MsgBox("File not found! Please select proper BIN file and check path!", MsgBoxStyle.Critical) : Exit Sub - If FileLen(filnam) < 621900000 Then MsgBox("File is not proper PERSONA2 IS bin image! Check it!", MsgBoxStyle.Critical) : Exit Sub + If FileLen(filnam) < 621900000 Then MsgBox("File is not proper PERSONA2 EP bin image! Check it!", MsgBoxStyle.Critical) : Exit Sub 'Reading Files Descriptions diff --git a/p2isPSX_CDToolkit/ISOTools.vb b/p2isPSX_CDToolkit/ISOTools.vb index f0662d5..38e48bf 100644 --- a/p2isPSX_CDToolkit/ISOTools.vb +++ b/p2isPSX_CDToolkit/ISOTools.vb @@ -116,11 +116,12 @@ Public Class ISOTools Public Function makeFileList(ByVal ISOname As String) Dim a = New List(Of fileInfo) - - Dim FilesSectors = getCDfile(ISOname, &H17, &H1B88).ToArray + Dim maxFiles = 880 + Dim FilesSectors = getCDfile(ISOname, &H17, &H4000).ToArray If ISOname.Contains("KUDOS") Then FilesSectors = getCDfile(ISOname, &H31, &H1B88).ToArray + If ISOname.Contains("Sumaru TV") Then maxFiles = 1124 - For x = 0 To 880 + For x = 0 To maxFiles a.Add(New fileInfo With {.FileID = x, .Sector = Form1.Read32bitNum(FilesSectors, x * 8), .Sizw = Form1.Read32bitNum(FilesSectors, x * 8 + 4)}) Next diff --git a/p2isPSX_CDToolkit/ScriptTools.vb b/p2isPSX_CDToolkit/ScriptTools.vb index 00abc00..2450075 100644 --- a/p2isPSX_CDToolkit/ScriptTools.vb +++ b/p2isPSX_CDToolkit/ScriptTools.vb @@ -1771,7 +1771,8 @@ endlineTest: TextLine &= Chr(bytes(curTextAddr)) curTextAddr += 1 Next - If charNum And 1 Then curTextAddr += 1 'if AND1 - +1 + 'If charNum And 1 Then curTextAddr += 1 'if AND1 - +1 + curTextAddr += charNum And 1 'if AND1 - +1 Continue Do End If If c And &H1000 Then @@ -1779,7 +1780,7 @@ endlineTest: If c = &H1101 Then TextLine &= " / " curTextAddr += (c >> 8 And &HF) * 2 : Continue Do 'BitShift / And / Jump command length Else - 'TextLine &= Chr(c And &HFF) + TextLine &= Form1.chars(c) End If curTextAddr += 2 diff --git a/p2isPSX_CDToolkit/bin/Debug/FileDesc.txt b/p2isPSX_CDToolkit/bin/Debug/FileDesc.txt index c9f7065..75f5e86 100644 --- a/p2isPSX_CDToolkit/bin/Debug/FileDesc.txt +++ b/p2isPSX_CDToolkit/bin/Debug/FileDesc.txt @@ -1,4 +1,4 @@ - +MDEC_CODE @@ -675,9 +675,9 @@ ExtraPack ...... LastExtra - - - +TimCLUT1 +TimCLUT2 +TimCLUT3 IntrFcTIM TitleCode TitleScrn @@ -879,3 +879,123 @@ Vid_Intro + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.exe b/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.exe index 4a04452..97e7529 100644 Binary files a/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.exe and b/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.exe differ diff --git a/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.pdb b/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.pdb index 9ef37aa..16e5625 100644 Binary files a/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.pdb and b/p2isPSX_CDToolkit/bin/Debug/p2epPSX_CDToolkit.pdb differ diff --git a/p2isPSX_CDToolkit/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/p2isPSX_CDToolkit/obj/Debug/DesignTimeResolveAssemblyReferences.cache index ca4eb73..96d78a7 100644 Binary files a/p2isPSX_CDToolkit/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/p2isPSX_CDToolkit/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.exe b/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.exe index 4a04452..97e7529 100644 Binary files a/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.exe and b/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.exe differ diff --git a/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.pdb b/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.pdb index 9ef37aa..16e5625 100644 Binary files a/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.pdb and b/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.pdb differ diff --git a/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.vbproj.GenerateResource.cache b/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.vbproj.GenerateResource.cache index 1b072d8..c15e46f 100644 Binary files a/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.vbproj.GenerateResource.cache and b/p2isPSX_CDToolkit/obj/Debug/p2epPSX_CDToolkit.vbproj.GenerateResource.cache differ