Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports VB = Microsoft.VisualBasic
- Public Class frmMain
- Inherits System.Windows.Forms.Form
- #Region "Windows フォー? デザイナによって生成されたコード"
- Public Sub New()
- MyBase.New()
- If m_vb6FormDefInstance Is Nothing Then
- If m_InitializingDefInstance Then
- m_vb6FormDefInstance = Me
- Else
- Try
- 'スタート・ツェv フォー?については、最?に作成されたイ?スタ?スクm既ゾイ?スタ?スになります。
- If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
- m_vb6FormDefInstance = Me
- End If
- Catch
- End Try
- End If
- End If
- '蓼の呼び出しは、Windows フォー? デザイナでアメ要です。
- InitializeComponent()
- End Sub
- 'Form は、コ?ポーネ?ト一?に後??を讎行するために dispose をオーバー?イドします。
- Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
- If Disposing Then
- If Not components Is Nothing Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(Disposing)
- End Sub
- 'Windows フォー? デザイナでアメ要です。
- Private components As System.ComponentModel.IContainer
- Public ToolTip1 As System.Windows.Forms.ToolTip
- Public WithEvents Command1 As System.Windows.Forms.Button
- Public WithEvents Text1 As System.Windows.Forms.TextBox
- Public WithEvents Label3 As System.Windows.Forms.Label
- Public WithEvents Label1 As System.Windows.Forms.Label
- '?? : 以下のプ?シージ?は Windows フォー? デザイナでアメ要です。
- 'Windows フォー? デザイナを使って変更でェスます。
- 'コードエディタを使って修正しないでください。
- Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents cboDecode As System.Windows.Forms.ComboBox
- Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents rbListOnly As System.Windows.Forms.RadioButton
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents cboEncoding As System.Windows.Forms.ComboBox
- Friend WithEvents chkImg As System.Windows.Forms.CheckBox
- Friend WithEvents chkAll As System.Windows.Forms.CheckBox
- Friend WithEvents chkScr As System.Windows.Forms.CheckBox
- Friend WithEvents chkCustomize As System.Windows.Forms.CheckBox
- Friend WithEvents txtCustomize As System.Windows.Forms.TextBox
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
- Me.Command1 = New System.Windows.Forms.Button
- Me.Text1 = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.ProgressBar1 = New System.Windows.Forms.ProgressBar
- Me.Label2 = New System.Windows.Forms.Label
- Me.cboDecode = New System.Windows.Forms.ComboBox
- Me.rbListOnly = New System.Windows.Forms.RadioButton
- Me.RadioButton2 = New System.Windows.Forms.RadioButton
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.chkImg = New System.Windows.Forms.CheckBox
- Me.chkScr = New System.Windows.Forms.CheckBox
- Me.chkAll = New System.Windows.Forms.CheckBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.cboEncoding = New System.Windows.Forms.ComboBox
- Me.chkCustomize = New System.Windows.Forms.CheckBox
- Me.txtCustomize = New System.Windows.Forms.TextBox
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'Command1
- '
- Me.Command1.BackColor = System.Drawing.SystemColors.Control
- Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
- Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
- Me.Command1.Location = New System.Drawing.Point(0, 42)
- Me.Command1.Name = "Command1"
- Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.Command1.Size = New System.Drawing.Size(440, 24)
- Me.Command1.TabIndex = 2
- Me.Command1.Text = "クムカ} / Unpack"
- '
- 'Text1
- '
- Me.Text1.AcceptsReturn = True
- Me.Text1.AutoSize = False
- Me.Text1.BackColor = System.Drawing.SystemColors.Window
- Me.Text1.Cursor = System.Windows.Forms.Cursors.IBeam
- Me.Text1.ForeColor = System.Drawing.SystemColors.WindowText
- Me.Text1.Location = New System.Drawing.Point(0, 16)
- Me.Text1.MaxLength = 0
- Me.Text1.Name = "Text1"
- Me.Text1.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.Text1.Size = New System.Drawing.Size(440, 20)
- Me.Text1.TabIndex = 0
- Me.Text1.Text = "C:\Program Files\Arcturus\"
- '
- 'Label3
- '
- Me.Label3.BackColor = System.Drawing.SystemColors.Control
- Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
- Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
- Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
- Me.Label3.Location = New System.Drawing.Point(0, 144)
- Me.Label3.Name = "Label3"
- Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.Label3.Size = New System.Drawing.Size(440, 16)
- Me.Label3.TabIndex = 3
- Me.Label3.Text = "Status"
- '
- 'Label1
- '
- Me.Label1.BackColor = System.Drawing.SystemColors.Control
- Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
- Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
- Me.Label1.Location = New System.Drawing.Point(0, 0)
- Me.Label1.Name = "Label1"
- Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.Label1.Size = New System.Drawing.Size(440, 16)
- Me.Label1.TabIndex = 1
- Me.Label1.Text = "スミソ鬢J Ragnarok ク|/Enter Ragnarok Dir (C:\Program Files\Arcturus\)"
- Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
- '
- 'ProgressBar1
- '
- Me.ProgressBar1.Location = New System.Drawing.Point(0, 160)
- Me.ProgressBar1.Name = "ProgressBar1"
- Me.ProgressBar1.Size = New System.Drawing.Size(440, 16)
- Me.ProgressBar1.TabIndex = 4
- '
- 'Label2
- '
- Me.Label2.Location = New System.Drawing.Point(0, 72)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(112, 16)
- Me.Label2.TabIndex = 5
- Me.Label2.Text = "クムタ」カオ・リ / Unpack:"
- '
- 'cboDecode
- '
- Me.cboDecode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
- Me.cboDecode.Items.AddRange(New Object() {"Data.pak", "Launcher.pak", "Music.pak"})
- Me.cboDecode.Location = New System.Drawing.Point(112, 72)
- Me.cboDecode.Name = "cboDecode"
- Me.cboDecode.Size = New System.Drawing.Size(112, 20)
- Me.cboDecode.TabIndex = 6
- '
- 'rbListOnly
- '
- Me.rbListOnly.Checked = True
- Me.rbListOnly.Location = New System.Drawing.Point(240, 72)
- Me.rbListOnly.Name = "rbListOnly"
- Me.rbListOnly.Size = New System.Drawing.Size(136, 16)
- Me.rbListOnly.TabIndex = 7
- Me.rbListOnly.TabStop = True
- Me.rbListOnly.Text = "ヲC・Xタノョラ / List Files"
- '
- 'RadioButton2
- '
- Me.RadioButton2.Location = New System.Drawing.Point(240, 88)
- Me.RadioButton2.Name = "RadioButton2"
- Me.RadioButton2.Size = New System.Drawing.Size(152, 16)
- Me.RadioButton2.TabIndex = 8
- Me.RadioButton2.Text = "クムタ」タノョラ / Extract Files"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtCustomize)
- Me.GroupBox1.Controls.Add(Me.chkCustomize)
- Me.GroupBox1.Controls.Add(Me.chkImg)
- Me.GroupBox1.Controls.Add(Me.chkScr)
- Me.GroupBox1.Controls.Add(Me.chkAll)
- Me.GroupBox1.Location = New System.Drawing.Point(232, 88)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(200, 56)
- Me.GroupBox1.TabIndex = 9
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "GroupBox1"
- '
- 'chkImg
- '
- Me.chkImg.Location = New System.Drawing.Point(104, 16)
- Me.chkImg.Name = "chkImg"
- Me.chkImg.Size = New System.Drawing.Size(88, 16)
- Me.chkImg.TabIndex = 2
- Me.chkImg.Tag = "|spr|tga|bmp|"
- Me.chkImg.Text = "spr,tga,bmp"
- '
- 'chkScr
- '
- Me.chkScr.Location = New System.Drawing.Point(48, 16)
- Me.chkScr.Name = "chkScr"
- Me.chkScr.Size = New System.Drawing.Size(56, 16)
- Me.chkScr.TabIndex = 1
- Me.chkScr.Tag = "|scr|ini|txt|rsa|rsw|jp|kr|ch"
- Me.chkScr.Text = "Scripts"
- '
- 'chkAll
- '
- Me.chkAll.Location = New System.Drawing.Point(8, 16)
- Me.chkAll.Name = "chkAll"
- Me.chkAll.Size = New System.Drawing.Size(40, 16)
- Me.chkAll.TabIndex = 0
- Me.chkAll.Text = "All"
- '
- 'Label4
- '
- Me.Label4.Location = New System.Drawing.Point(0, 104)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(100, 16)
- Me.Label4.TabIndex = 10
- Me.Label4.Text = "スsスX / Encoding:"
- '
- 'cboEncoding
- '
- Me.cboEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
- Me.cboEncoding.Items.AddRange(New Object() {" (System Default / ィtイホケwウ]ュネ)", "UTF-8 (GrfWiz Default / ケwウ])", "Big5 (Trad Chinese / チcナ鬢、、�)", "Shift_JIS (Japanese / 、鬢�)", "ISO-2022-KR (Korean / チ妤�)", "GB18030 (Simp Chinese /ツイナ鬢、、�)"})
- Me.cboEncoding.Location = New System.Drawing.Point(112, 104)
- Me.cboEncoding.Name = "cboEncoding"
- Me.cboEncoding.Size = New System.Drawing.Size(112, 20)
- Me.cboEncoding.TabIndex = 11
- '
- 'chkCustomize
- '
- Me.chkCustomize.Location = New System.Drawing.Point(8, 32)
- Me.chkCustomize.Name = "chkCustomize"
- Me.chkCustomize.Size = New System.Drawing.Size(80, 16)
- Me.chkCustomize.TabIndex = 3
- Me.chkCustomize.Text = "Customize"
- '
- 'txtCustomize
- '
- Me.txtCustomize.Location = New System.Drawing.Point(88, 32)
- Me.txtCustomize.Name = "txtCustomize"
- Me.txtCustomize.Size = New System.Drawing.Size(104, 19)
- Me.txtCustomize.TabIndex = 4
- Me.txtCustomize.Text = ""
- '
- 'frmMain
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
- Me.ClientSize = New System.Drawing.Size(440, 176)
- Me.Controls.Add(Me.cboEncoding)
- Me.Controls.Add(Me.Label4)
- Me.Controls.Add(Me.RadioButton2)
- Me.Controls.Add(Me.rbListOnly)
- Me.Controls.Add(Me.cboDecode)
- Me.Controls.Add(Me.Label2)
- Me.Controls.Add(Me.ProgressBar1)
- Me.Controls.Add(Me.Command1)
- Me.Controls.Add(Me.Text1)
- Me.Controls.Add(Me.Label3)
- Me.Controls.Add(Me.Label1)
- Me.Controls.Add(Me.GroupBox1)
- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "frmMain"
- Me.Text = "GrfWiz by ArtForz (Modified Version, 15/7/2004)"
- Me.GroupBox1.ResumeLayout(False)
- Me.ResumeLayout(False)
- End Sub
- #End Region
- #Region "・ツェvィ、?ード ウィザードのサポート コード"
- Private Shared m_vb6FormDefInstance As frmMain
- Private Shared m_InitializingDefInstance As Boolean
- Public Shared Property DefInstance() As frmMain
- Get
- If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
- m_InitializingDefInstance = True
- m_vb6FormDefInstance = New frmMain
- m_InitializingDefInstance = False
- End If
- DefInstance = m_vb6FormDefInstance
- End Get
- Set(ByVal Value As frmMain)
- m_vb6FormDefInstance = Value
- End Set
- End Property
- #End Region
- Private Declare Function MakeSureDirectoryPathExists Lib "IMAGEHLP.DLL" (ByVal DirPath As String) As Integer
- Private Structure FSEntry
- Dim NameLen As Byte
- Dim ID As Byte
- Dim StartOffset As Integer
- Dim PackedLen As Integer
- Dim UnpackedLen As Integer
- 'UPGRADE_NOTE: Name は Name_Renamed に・ツェvィ、?ードされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1061"' をク?ェNしてください。
- Dim Name_Renamed As String
- End Structure
- Private FS() As frmMain.FSEntry
- Private Sub UnpackIt(ByRef FSIndex As Short)
- Dim toUnpack As Boolean = False
- Dim suffix As String = FS(FSIndex).Name_Renamed.Substring(FS(FSIndex).Name_Renamed.LastIndexOf(".") + 1)
- If chkAll.Checked Then toUnpack = True
- If chkScr.Checked And chkScr.Tag.IndexOf("|" + suffix + "|") > -1 Then toUnpack = True
- If chkImg.Checked And chkImg.Tag.IndexOf("|" + suffix + "|") > -1 Then toUnpack = True
- If chkCustomize.Checked And txtCustomize.Text.IndexOf("|" + suffix + "|") > -1 Then toUnpack = True
- If Not toUnpack Then Exit Sub
- 'UPGRADE_WARNING: Dir にしい動作クm指ゾされています。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- If Dir(Text1.Text & FS(FSIndex).Name_Renamed) <> "" Then Kill(Text1.Text & FS(FSIndex).Name_Renamed)
- FileOpen(2, Text1.Text & FS(FSIndex).Name_Renamed, OpenMode.Binary, OpenAccess.Write, OpenShare.LockRead)
- Dim posbyte As Byte
- Dim x As Short
- Dim y As Short
- Dim curpos As Integer
- Dim revint As Short
- Dim lenbyte As Byte
- Dim inbyte() As Byte
- ReDim inbyte(FS(FSIndex).PackedLen - 1)
- Dim outbyte() As Byte
- ReDim outbyte(FS(FSIndex).UnpackedLen - 1)
- Dim outpos As Integer
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, inbyte, FS(FSIndex).StartOffset + 1)
- Do While True
- posbyte = inbyte(curpos)
- curpos = curpos + 1
- If outpos >= FS(FSIndex).UnpackedLen Then Exit Do
- For x = 1 To 8
- If (posbyte And 1) = 0 Then
- outbyte(outpos) = inbyte(curpos)
- outpos = outpos + 1
- If outpos >= FS(FSIndex).UnpackedLen Then Exit Do
- curpos = curpos + 1
- posbyte = Int(posbyte / 2)
- Else
- revint = inbyte(curpos)
- curpos = curpos + 1
- lenbyte = inbyte(curpos)
- curpos = curpos + 1
- revint = revint + (CShort(lenbyte And 15) * 256)
- lenbyte = Int(lenbyte / 16) + 2
- For y = 0 To lenbyte - 1
- outbyte(outpos) = outbyte(outpos - revint)
- outpos = outpos + 1
- If outpos >= FS(FSIndex).UnpackedLen Then Exit Do
- Next
- posbyte = Int(posbyte / 2)
- End If
- Next
- Loop
- 'UPGRADE_WARNING: Put は、FilePut に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FilePut(2, outbyte, 1)
- FileClose(2)
- End Sub
- Private Function RevBitString(ByRef InString As String) As String
- Dim x As Short
- Dim outstr As String
- For x = 1 To Len(InString)
- outstr = outstr & Chr((CShort(Asc(Mid(InString, x, 1)) And CShort(&HFS)) * 16) + Int(CShort(Asc(Mid(InString, x, 1)) And CShort(&HF0S)) / 16))
- Next
- RevBitString = outstr
- End Function
- Private Function DecodeFS(ByRef FileName As String) As Boolean
- ' On Error GoTo errie
- FileOpen(1, Text1.Text & FileName, OpenMode.Binary, OpenAccess.Read, OpenShare.LockWrite)
- FileOpen(3, Text1.Text & FileName & "-FS.log", OpenMode.Append)
- Dim DummyByte As Byte
- Dim StartOfFS As Integer
- Dim FSEntryCount As Short
- Dim x As Short
- Dim encoding As System.Text.Encoding = System.Text.Encoding.GetEncoding(cboEncoding.SelectedItem.Substring(0, cboEncoding.SelectedItem.IndexOf(" ")))
- Label3.Text = FileName & " : ・ソヲb、タェRオイコc (Analyzing Structure)"
- System.Windows.Forms.Application.DoEvents()
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, FSEntryCount, LOF(1) - 4)
- ReDim FS(FSEntryCount - 1)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, StartOfFS, LOF(1) - 8)
- PrintLine(3, Text1.Text)
- PrintLine(3, FileName)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, DummyByte, StartOfFS)
- For x = 0 To UBound(FS)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, FS(x).NameLen)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, FS(x).ID)
- ' If FS(x).ID > 2 Or FS(x).ID < 1 Then MsgBox "ID " + CStr(FS(x).ID)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, FS(x).StartOffset)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, FS(x).PackedLen)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, FS(x).UnpackedLen)
- 'FS(x).Name_Renamed = New String(Chr(0), FS(x).NameLen)
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- 'FileGet(1, FS(x).Name_Renamed)
- Dim bytecode() As Byte
- ReDim bytecode(FS(x).NameLen - 1)
- Dim a
- For a = 1 To FS(x).NameLen
- FileGet(1, bytecode(a - 1))
- Next a
- 'FS(x).Name_Renamed = System.Text.Encoding.GetEncoding(949).GetString(bytecode)
- FS(x).Name_Renamed = encoding.GetString(bytecode)
- ' FS(x).Name = Replace(RevBitString(FS(x).Name), "/", "\")
- FS(x).Name_Renamed = Replace(FS(x).Name_Renamed, "/", "\")
- If FS(x).ID = 1 Then
- PrintLine(3, "F " & FS(x).Name_Renamed)
- Else
- PrintLine(3, "D " & FS(x).Name_Renamed)
- End If
- 'UPGRADE_WARNING: Get は、FileGet に・ツェvィ、?ードされ、しい動作クm指ゾされました。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- FileGet(1, DummyByte)
- ' If DummyByte > 0 Then MsgBox "DB " + CStr(DummyByte)
- Next
- PrintLine(3, "")
- FileClose(3)
- If (rbListOnly.Checked) Then
- Label3.Text = FileName & " : ァケヲィヲC・X (Done Listing)"
- FileClose(1)
- FileClose(2)
- Shell(Environ("windir") + "\NotePad.exe """ + Text1.Text & FileName & "-FS.log" + """", AppWinStyle.NormalFocus)
- Exit Function
- Else
- For x = 0 To UBound(FS)
- If FS(x).ID = 2 Then MakeSureDirectoryPathExists(Text1.Text & FS(x).Name_Renamed & "\")
- Next
- For x = 0 To UBound(FS)
- If FS(x).ID = 1 Then
- Label3.Text = FileName & " : ・ソヲbクムカ} (Unpacking) " & VB.Right(FS(x).Name_Renamed, Len(FS(x).Name_Renamed) - InStrRev(FS(x).Name_Renamed, "\"))
- ToolTip1.SetToolTip(ProgressBar1, CStr(x) & "/" & CStr(UBound(FS)))
- 'UPGRADE_WARNING: オブジェクト ProgressBar1.Value の既ゾプ?パティを解?でェスませんでした。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' をク?ェNしてください。
- ProgressBar1.Value = x * 100 / UBound(FS)
- System.Windows.Forms.Application.DoEvents()
- If (FS(x).PackedLen > 0) And (FS(x).UnpackedLen > 0) Then UnpackIt(x)
- End If
- Next
- 'UPGRADE_WARNING: オブジェクト ProgressBar1.Value の既ゾプ?パティを解?でェスませんでした。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' をク?ェNしてください。
- ProgressBar1.Value = 0
- Label3.Text = FileName & " : ァケヲィクムカ} (Done Unpacking)"
- FileClose(1)
- FileClose(2)
- DecodeFS = True
- Exit Function
- End If
- errie:
- 'UPGRADE_WARNING: オブジェクト ProgressBar1.Value の既ゾプ?パティを解?でェスませんでした。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' をク?ェNしてください。
- ProgressBar1.Value = 0
- Label3.Text = FileName & " : ソ�~。G、wゥムカ} (Error: Unpacking Aborted)"
- FileClose(1)
- FileClose(2)
- FileClose(3)
- DecodeFS = False
- End Function
- Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
- Command1.Text = "・ソヲbクムカ} (Unpacking)..."
- Command1.Enabled = False
- Dim retval As Boolean
- Dim x As Short
- Dim tstr As String
- If VB.Right(Text1.Text, 1) = "\" Then
- 'UPGRADE_WARNING: Dir にしい動作クm指ゾされています。 詳細については、'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1041"' をク?ェNしてください。
- 'If Len(Dir(Text1.Text & "data.pak")) > 0 Then
- ' retval = DecodeFS("data.pak")
- If Len(Dir(Text1.Text & cboDecode.SelectedItem)) > 0 Then
- retval = DecodeFS(cboDecode.SelectedItem)
- If Not retval Then GoTo errie
- ' For x = 0 To 899
- ' If Len(Dir(Text1.Text + "edata" + Format(x, "000") + ".grf")) > 0 Then
- ' retval = DecodeFS("edata" + Format(x, "000") + ".grf")
- ' If Not retval Then GoTo errie
- ' End If
- ' If Len(Dir(Text1.Text + "jdata" + Format(x, "000") + ".grf")) > 0 Then
- ' retval = DecodeFS("jdata" + Format(x, "000") + ".grf")
- ' If Not retval Then GoTo errie
- ' End If
- ' If Len(Dir(Text1.Text + "gdata" + Format(x, "000") + ".grf")) > 0 Then
- ' retval = DecodeFS("gdata" + Format(x, "000") + ".grf")
- ' If Not retval Then GoTo errie
- ' End If
- ' Next
- Label3.Text = "、wクムスXゥメヲウタノョラ (Decoded all Files, have fun)"
- End If
- Else
- tstr = Microsoft.VisualBasic.Right(Text1.Text, Len(Text1.Text) - InStrRev(Text1.Text, "\"))
- Text1.Text = Microsoft.VisualBasic.Left(Text1.Text, InStrRev(Text1.Text, "\"))
- retval = DecodeFS(tstr)
- If Not retval Then GoTo errie
- Label3.Text = "、wクムスX (Decoded) " + tstr + ", have fun"
- End If
- errie:
- Command1.Text = "Unpack"
- Command1.Enabled = True
- End Sub
- Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
- End Sub
- Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- cboDecode.SelectedIndex = 0
- cboEncoding.Items().Item(0) = System.Text.Encoding.Default.WebName + cboEncoding.Items().Item(0)
- cboEncoding.SelectedIndex = 0
- End Sub
- Private Sub chkCustomize_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkCustomize.CheckedChanged
- If (chkCustomize.Checked) Then
- MsgBox("ュYュnィマ・ホヲケ・\ッ爍Aスミ・ホ | クケ、タケjゥメヲウゥオヲ�ノョラ。Aィメヲp |*.rsw|*.bmp| エNキ|テB・~クムタ」チY rsw 、ホ bmp タノョラ (スミッdキNウフォeュア、ホウフォ皴アェコ | クケ。I)。C" & vbCrLf & vbCrLf & _
- "To use this function, please use | (Pipe) to seperate all file extensions, e.g. |*.rsw|*.bmp| will extract 'rsw' and 'bmp' files (Please note the | at very first and very last!).", MsgBoxStyle.OKOnly Or MsgBoxStyle.Information)
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement