

Private Sub OpenFFToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenFFToolStripMenuItem.Click
OpenFF()
End Sub
Private Sub OpenFF()
Try
If (dragDropFFname = "") Then
OpenDialog.Title = "Open a .FF file"
OpenDialog.Filter = ".FF files(*.ff)|*.ff"
OpenDialog.FileName = ""
OpenDialog.FilterIndex = 1
If (Boolean.Parse(GetPreferenceValue("rememberLF"))) Then
OpenDialog.InitialDirectory = GetPreferenceValue("lastlocation")
Else
OpenDialog.InitialDirectory = Directory.GetCurrentDirectory()
End If
OpenDialog.RestoreDirectory = True
If (OpenDialog.ShowDialog() = Windows.Forms.DialogResult.OK And OpenDialog.CheckFileExists) Then
dragDropFFname = OpenDialog.FileName
Else
Exit Sub
End If
End If
' Load the .FF file
Array.Clear(ffBytes, 0, ffBytes.Length)
RawFiles.Nodes.Clear()
fileInfo.RawFiles.Clear()
CodeBox.Text = ""
Wait.Show()
'If (Boolean.Parse(GetPreferenceValue("reduceram", "True"))) Then
' run backend in 'open' mode
Dim backEnd As Process = System.Diagnostics.Process.Start(Directory.GetCurrentDirectory() + "\FFbackend.exe", "-o """ + dragDropFFname + """")
backEnd.WaitForExit()
fileInfo.DataOffset = Integer.Parse(File.ReadAllLines(Directory.GetCurrentDirectory() + "\prefs\ff.config")(0)) ' read the file the backend makes
fileInfo.IsMultiplayer = Boolean.Parse(File.ReadAllLines(Directory.GetCurrentDirectory() + "\prefs\ff.config")(1))
fileInfo.OrigFileName = File.ReadAllLines(Directory.GetCurrentDirectory() + "\prefs\ff.config")(2)
File.Delete(Directory.GetCurrentDirectory() + "\prefs\ff.config") ' delete it
Me.Cursor = Cursors.Default
currentOpenFFextracted = dragDropFFname.Substring(0, dragDropFFname.LastIndexOf(".")) + "-extract.dat" ' The backend makes this file
fileInfo.FileName = dragDropFFname
dragDropFFname = ""
SetPreferenceValue("lastlocation", fileInfo.FileName.Substring(0, fileInfo.FileName.LastIndexOf("\")))
System.IO.File.Delete("prefs\prefs.ini")
System.IO.File.WriteAllLines("prefs\prefs.ini", Form1.optionsData.ToArray(GetType(System.String)))
ffBytes = File.ReadAllBytes(currentOpenFFextracted)
Me.Text = "FF Viewer v" + versionNum + " [" + fileInfo.FileName + "]"
Dim numOfNulls As Integer = 0
Dim notExtractedFF As Byte()
notExtractedFF = File.ReadAllBytes(fileInfo.FileName)
If (Integer.Parse(notExtractedFF(
.ToString()) <> 0) Then
' the file is little endian (usually pc)
fileInfo.Version = ByteHandling.GetDWORD(notExtractedFF, 8, True)
fileInfo.BigEndian = False
Else
' the file is big endian
fileInfo.Version = ByteHandling.GetDWORD(notExtractedFF, 8, False)
fileInfo.BigEndian = True
End If
If (ffBytes(47) <> 255) Then ' if byte 47 is not FF, the current file is COD4/5!
numOfNulls = ByteHandling.GetDWORD(ffBytes, 44, Not fileInfo.BigEndian) 'and the amount of nulls starts 12 later! (12 more header bytes!)
openedMW2 = False
Else
numOfNulls = ByteHandling.GetDWORD(ffBytes, 32, Not fileInfo.BigEndian)
openedMW2 = True
End If
' Find out where the PreAssetStrings at the top of the FF starts
Dim currentSpacer As Integer = 52
If (Not openedMW2) Then
currentSpacer += 4
End If
While (ffBytes(currentSpacer) = Byte.Parse(255))
currentSpacer += 1
End While
' Now, add all of the PreAssetStrings to fileInfo
If (openedMW2) Then
fileInfo.PreAssetStringCount = ByteHandling.GetDWORD(ffBytes, 40, Not fileInfo.BigEndian) - 1
Dim preAssetStringOffset As Integer = currentSpacer
For i As Integer = 0 To fileInfo.PreAssetStringCount - 1
Dim newOffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {0}, preAssetStringOffset)
Dim stringName As String = ByteHandling.GetString(ffBytes, preAssetStringOffset, newOffset)
fileInfo.PreAssetStrings.Add(New PreAssetStringData(stringName, stringName.Length))
preAssetStringOffset = newOffset + 1
Next
Else
fileInfo.PreAssetStringCount = ByteHandling.GetDWORD(ffBytes, 36, Not fileInfo.BigEndian) - 1
Dim preAssetStringOffset As Integer = currentSpacer
For i As Integer = 0 To fileInfo.PreAssetStringCount - 1
Dim newOffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {0}, preAssetStringOffset)
Dim stringName As String = ByteHandling.GetString(ffBytes, preAssetStringOffset, newOffset)
fileInfo.PreAssetStrings.Add(New PreAssetStringData(stringName, stringName.Length))
preAssetStringOffset = newOffset + 1
Next
End If
numOfNulls = fileInfo.PreAssetStringCount
' Now find out where the string table ends and the assets start!
Dim startAssets As Integer = currentSpacer
While (numOfNulls > 0)
startAssets = ByteHandling.FindBytes(ffBytes, New Byte() {0}, startAssets + 1)
numOfNulls -= 1
End While
If (openedMW2) Then
fileInfo.AssetCount = ByteHandling.GetDWORD(ffBytes, 48, Not fileInfo.BigEndian)
Dim currentOffset As Integer = startAssets + 3
For i As Integer = 0 To fileInfo.AssetCount - 1
If (fileInfo.BigEndian) Then
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset + 1)))
Else
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset)))
End If
currentOffset += 8
Next
Else
fileInfo.AssetCount = ByteHandling.GetDWORD(ffBytes, 44, Not fileInfo.BigEndian)
Dim currentOffset As Integer = startAssets + 3
For i As Integer = 0 To fileInfo.AssetCount - 1
If (fileInfo.BigEndian) Then
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset + 1)))
Else
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset)))
End If
currentOffset += 8
Next
End If
Dim csvCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {Asc("."), Asc("c"), Asc("s"), Asc("v"), 0})
Dim offset As Integer = 0
For i As Integer = 0 To csvCount - 1
offset = ByteHandling.FindBytes(ffBytes, New Byte() {Asc("."), Asc("c"), Asc("s"), Asc("v"), 0}, offset + 1, True) + 1
Dim startofNameoffset As Integer
startofNameoffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(255), offset) + 1
Dim columns As Integer = ByteHandling.GetDWORD(ffBytes, startofNameoffset - 12, Not fileInfo.BigEndian)
Dim rows As Integer = ByteHandling.GetDWORD(ffBytes, startofNameoffset - 8, Not fileInfo.BigEndian)
If (rows <> -1 And columns <> -1 And offset - startofNameoffset < 25) Then
StringTables.Nodes.Add(ByteHandling.GetString(ffBytes, startofNameoffset, offset + 4))
StringTables.Nodes(StringTables.Nodes.Count - 1).Nodes.Add("Columns: " + columns.ToString())
StringTables.Nodes(StringTables.Nodes.Count - 1).Nodes.Add("Rows: " + rows.ToString())
fileInfo.StringTables.Add(New StringTableData(ByteHandling.GetString(ffBytes, startofNameoffset, offset + 4), columns, rows, startofNameoffset))
End If
Application.DoEvents()
Next
AddRawFileExtension(New Byte() {Asc("."), Asc("g"), Asc("s"), Asc("c"), 0})
AddRawFileExtension(New Byte() {Asc("."), Asc("r"), Asc("m"), Asc("b"), 0})
AddRawFileExtension(New Byte() {Asc("."), Asc("d"), Asc("e"), Asc("f"), 0, 78})
AddRawFileExtension(New Byte() {Asc("."), Asc("c"), Asc("f"), Asc("g"), 0})
AddRawFileExtension(New Byte() {Asc("."), Asc("i"), Asc("n"), Asc("f"), Asc("o"), 0}, 5)
Dim imageOffset As Integer = 0
Dim imageCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {0, 160, 171, 16}, 0)
For i As Integer = 0 To imageCount - 1
imageOffset = ByteHandling.FindBytes(ffBytes, New Byte() {0, 160, 171, 16}, imageOffset + 1)
Dim nameOffsetEnd As Integer = imageOffset ' start of Image name
Dim nameOffset As Integer = 0
If (openedMW2) Then ' for some reason, cod4 uses a FF byte to indicate the start of an image :S?
nameOffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(0), nameOffsetEnd - 1) + 1
Else
nameOffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(255), nameOffsetEnd - 1) + 1
End If
MiscData.Nodes(0).Nodes.Add(ByteHandling.GetString(ffBytes, nameOffset, nameOffsetEnd))
Application.DoEvents()
Next
Dim menuOffset As Integer = 0
Dim menuCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {Asc("."), Asc("m"), Asc("e"), Asc("n"), Asc("u"), 0}, 0)
For i As Integer = 0 To menuCount - 1
menuOffset = ByteHandling.FindBytes(ffBytes, New Byte() {Asc("."), Asc("m"), Asc("e"), Asc("n"), Asc("u"), 0}, menuOffset + 1)
Dim nameOffsetEnd As Integer = menuOffset ' start of menu name
Dim nameOffset As Integer = 0
nameOffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(255), nameOffsetEnd - 1) + 1
Dim node As TreeNode = MiscData.Nodes(1).Nodes.Add(ByteHandling.GetString(ffBytes, nameOffset, nameOffsetEnd + 5))
node.Nodes.Add("Name Offset: " + nameOffset.ToString())
node.Nodes.Add("File offset: " + nameOffsetEnd.ToString())
node.Nodes.Add("# of menuDef's: " + ByteHandling.GetDWORD(ffBytes, nameOffset - 8, Not openedMW2).ToString())
Application.DoEvents()
Next
Dim weapCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {0, Asc("W"), Asc("E"), Asc("A"), Asc("P")})
offset = 0
For i As Integer = 0 To weapCount - 1
offset = ByteHandling.FindBytes(ffBytes, New Byte() {0, Asc("W"), Asc("E"), Asc("A"), Asc("P")}, offset + 1, True) + 1
Dim startofNameoffset As Integer = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(0), offset) + 1
Dim endofNameoffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {255}, offset) + 1
Dim node As TreeNode = MiscData.Nodes(2).Nodes.Add(ByteHandling.GetString(ffBytes, startofNameoffset, endofNameoffset))
Dim endOffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {255, 255, 255, 255}, offset + 4).ToString()
node.Nodes.Add("Name Offset: " + startofNameoffset.ToString())
node = Nothing
Next
'Catch ex As Exception
' MessageBox.Show("Could not open .FF file: " + ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error)
'End Try
fileInfo.Size = ByteHandling.GetDWORD(ffBytes, 0, Not fileInfo.BigEndian)
If (fileInfo.Version = MW2Version Or fileInfo.Version = MW2VersionPC) Then
fileInfo.SecondSize = ByteHandling.GetDWORD(ffBytes, 20, Not fileInfo.BigEndian)
Else
fileInfo.SecondSize = ByteHandling.GetDWORD(ffBytes, 24, Not fileInfo.BigEndian)
End If
FileGridView.Refresh()
Catch ex As Exception
MessageBox.Show("Error opening: " + ex.Message)
End Try
End Sub
Private Sub OpenFFToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenFFToolStripMenuItem.Click
OpenFF()
End Sub
Private Sub OpenFF()
Try
If (dragDropFFname = "") Then
OpenDialog.Title = "Open a .FF file"
OpenDialog.Filter = ".FF files(*.ff)|*.ff"
OpenDialog.FileName = ""
OpenDialog.FilterIndex = 1
If (Boolean.Parse(GetPreferenceValue("rememberLF"))) Then
OpenDialog.InitialDirectory = GetPreferenceValue("lastlocation")
Else
OpenDialog.InitialDirectory = Directory.GetCurrentDirectory()
End If
OpenDialog.RestoreDirectory = True
If (OpenDialog.ShowDialog() = Windows.Forms.DialogResult.OK And OpenDialog.CheckFileExists) Then
dragDropFFname = OpenDialog.FileName
Else
Exit Sub
End If
End If
' Load the .FF file
Array.Clear(ffBytes, 0, ffBytes.Length)
RawFiles.Nodes.Clear()
fileInfo.RawFiles.Clear()
CodeBox.Text = ""
Wait.Show()
'If (Boolean.Parse(GetPreferenceValue("reduceram", "True"))) Then
' run backend in 'open' mode
Dim backEnd As Process = System.Diagnostics.Process.Start(Directory.GetCurrentDirectory() + "\FFbackend.exe", "-o """ + dragDropFFname + """")
backEnd.WaitForExit()
fileInfo.DataOffset = Integer.Parse(File.ReadAllLines(Directory.GetCurrentDirectory() + "\prefs\ff.config")(0)) ' read the file the backend makes
fileInfo.IsMultiplayer = Boolean.Parse(File.ReadAllLines(Directory.GetCurrentDirectory() + "\prefs\ff.config")(1))
fileInfo.OrigFileName = File.ReadAllLines(Directory.GetCurrentDirectory() + "\prefs\ff.config")(2)
File.Delete(Directory.GetCurrentDirectory() + "\prefs\ff.config") ' delete it
Me.Cursor = Cursors.Default
currentOpenFFextracted = dragDropFFname.Substring(0, dragDropFFname.LastIndexOf(".")) + "-extract.dat" ' The backend makes this file
fileInfo.FileName = dragDropFFname
dragDropFFname = ""
SetPreferenceValue("lastlocation", fileInfo.FileName.Substring(0, fileInfo.FileName.LastIndexOf("\")))
System.IO.File.Delete("prefs\prefs.ini")
System.IO.File.WriteAllLines("prefs\prefs.ini", Form1.optionsData.ToArray(GetType(System.String)))
ffBytes = File.ReadAllBytes(currentOpenFFextracted)
Me.Text = "FF Viewer v" + versionNum + " [" + fileInfo.FileName + "]"
Dim numOfNulls As Integer = 0
Dim notExtractedFF As Byte()
notExtractedFF = File.ReadAllBytes(fileInfo.FileName)
If (Integer.Parse(notExtractedFF(
.ToString()) <> 0) Then
' the file is little endian (usually pc)
fileInfo.Version = ByteHandling.GetDWORD(notExtractedFF, 8, True)
fileInfo.BigEndian = False
Else
' the file is big endian
fileInfo.Version = ByteHandling.GetDWORD(notExtractedFF, 8, False)
fileInfo.BigEndian = True
End If
If (ffBytes(47) <> 255) Then ' if byte 47 is not FF, the current file is COD4/5!
numOfNulls = ByteHandling.GetDWORD(ffBytes, 44, Not fileInfo.BigEndian) 'and the amount of nulls starts 12 later! (12 more header bytes!)
openedMW2 = False
Else
numOfNulls = ByteHandling.GetDWORD(ffBytes, 32, Not fileInfo.BigEndian)
openedMW2 = True
End If
' Find out where the PreAssetStrings at the top of the FF starts
Dim currentSpacer As Integer = 52
If (Not openedMW2) Then
currentSpacer += 4
End If
While (ffBytes(currentSpacer) = Byte.Parse(255))
currentSpacer += 1
End While
' Now, add all of the PreAssetStrings to fileInfo
If (openedMW2) Then
fileInfo.PreAssetStringCount = ByteHandling.GetDWORD(ffBytes, 40, Not fileInfo.BigEndian) - 1
Dim preAssetStringOffset As Integer = currentSpacer
For i As Integer = 0 To fileInfo.PreAssetStringCount - 1
Dim newOffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {0}, preAssetStringOffset)
Dim stringName As String = ByteHandling.GetString(ffBytes, preAssetStringOffset, newOffset)
fileInfo.PreAssetStrings.Add(New PreAssetStringData(stringName, stringName.Length))
preAssetStringOffset = newOffset + 1
Next
Else
fileInfo.PreAssetStringCount = ByteHandling.GetDWORD(ffBytes, 36, Not fileInfo.BigEndian) - 1
Dim preAssetStringOffset As Integer = currentSpacer
For i As Integer = 0 To fileInfo.PreAssetStringCount - 1
Dim newOffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {0}, preAssetStringOffset)
Dim stringName As String = ByteHandling.GetString(ffBytes, preAssetStringOffset, newOffset)
fileInfo.PreAssetStrings.Add(New PreAssetStringData(stringName, stringName.Length))
preAssetStringOffset = newOffset + 1
Next
End If
numOfNulls = fileInfo.PreAssetStringCount
' Now find out where the string table ends and the assets start!
Dim startAssets As Integer = currentSpacer
While (numOfNulls > 0)
startAssets = ByteHandling.FindBytes(ffBytes, New Byte() {0}, startAssets + 1)
numOfNulls -= 1
End While
If (openedMW2) Then
fileInfo.AssetCount = ByteHandling.GetDWORD(ffBytes, 48, Not fileInfo.BigEndian)
Dim currentOffset As Integer = startAssets + 3
For i As Integer = 0 To fileInfo.AssetCount - 1
If (fileInfo.BigEndian) Then
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset + 1)))
Else
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset)))
End If
currentOffset += 8
Next
Else
fileInfo.AssetCount = ByteHandling.GetDWORD(ffBytes, 44, Not fileInfo.BigEndian)
Dim currentOffset As Integer = startAssets + 3
For i As Integer = 0 To fileInfo.AssetCount - 1
If (fileInfo.BigEndian) Then
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset + 1)))
Else
fileInfo.Assets.Add(New AssetData(ffBytes(currentOffset)))
End If
currentOffset += 8
Next
End If
Dim csvCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {Asc("."), Asc("c"), Asc("s"), Asc("v"), 0})
Dim offset As Integer = 0
For i As Integer = 0 To csvCount - 1
offset = ByteHandling.FindBytes(ffBytes, New Byte() {Asc("."), Asc("c"), Asc("s"), Asc("v"), 0}, offset + 1, True) + 1
Dim startofNameoffset As Integer
startofNameoffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(255), offset) + 1
Dim columns As Integer = ByteHandling.GetDWORD(ffBytes, startofNameoffset - 12, Not fileInfo.BigEndian)
Dim rows As Integer = ByteHandling.GetDWORD(ffBytes, startofNameoffset - 8, Not fileInfo.BigEndian)
If (rows <> -1 And columns <> -1 And offset - startofNameoffset < 25) Then
StringTables.Nodes.Add(ByteHandling.GetString(ffBytes, startofNameoffset, offset + 4))
StringTables.Nodes(StringTables.Nodes.Count - 1).Nodes.Add("Columns: " + columns.ToString())
StringTables.Nodes(StringTables.Nodes.Count - 1).Nodes.Add("Rows: " + rows.ToString())
fileInfo.StringTables.Add(New StringTableData(ByteHandling.GetString(ffBytes, startofNameoffset, offset + 4), columns, rows, startofNameoffset))
End If
Application.DoEvents()
Next
AddRawFileExtension(New Byte() {Asc("."), Asc("g"), Asc("s"), Asc("c"), 0})
AddRawFileExtension(New Byte() {Asc("."), Asc("r"), Asc("m"), Asc("b"), 0})
AddRawFileExtension(New Byte() {Asc("."), Asc("d"), Asc("e"), Asc("f"), 0, 78})
AddRawFileExtension(New Byte() {Asc("."), Asc("c"), Asc("f"), Asc("g"), 0})
AddRawFileExtension(New Byte() {Asc("."), Asc("i"), Asc("n"), Asc("f"), Asc("o"), 0}, 5)
Dim imageOffset As Integer = 0
Dim imageCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {0, 160, 171, 16}, 0)
For i As Integer = 0 To imageCount - 1
imageOffset = ByteHandling.FindBytes(ffBytes, New Byte() {0, 160, 171, 16}, imageOffset + 1)
Dim nameOffsetEnd As Integer = imageOffset ' start of Image name
Dim nameOffset As Integer = 0
If (openedMW2) Then ' for some reason, cod4 uses a FF byte to indicate the start of an image :S?
nameOffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(0), nameOffsetEnd - 1) + 1
Else
nameOffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(255), nameOffsetEnd - 1) + 1
End If
MiscData.Nodes(0).Nodes.Add(ByteHandling.GetString(ffBytes, nameOffset, nameOffsetEnd))
Application.DoEvents()
Next
Dim menuOffset As Integer = 0
Dim menuCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {Asc("."), Asc("m"), Asc("e"), Asc("n"), Asc("u"), 0}, 0)
For i As Integer = 0 To menuCount - 1
menuOffset = ByteHandling.FindBytes(ffBytes, New Byte() {Asc("."), Asc("m"), Asc("e"), Asc("n"), Asc("u"), 0}, menuOffset + 1)
Dim nameOffsetEnd As Integer = menuOffset ' start of menu name
Dim nameOffset As Integer = 0
nameOffset = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(255), nameOffsetEnd - 1) + 1
Dim node As TreeNode = MiscData.Nodes(1).Nodes.Add(ByteHandling.GetString(ffBytes, nameOffset, nameOffsetEnd + 5))
node.Nodes.Add("Name Offset: " + nameOffset.ToString())
node.Nodes.Add("File offset: " + nameOffsetEnd.ToString())
node.Nodes.Add("# of menuDef's: " + ByteHandling.GetDWORD(ffBytes, nameOffset - 8, Not openedMW2).ToString())
Application.DoEvents()
Next
Dim weapCount As Integer = ByteHandling.CountBytes(ffBytes, New Byte() {0, Asc("W"), Asc("E"), Asc("A"), Asc("P")})
offset = 0
For i As Integer = 0 To weapCount - 1
offset = ByteHandling.FindBytes(ffBytes, New Byte() {0, Asc("W"), Asc("E"), Asc("A"), Asc("P")}, offset + 1, True) + 1
Dim startofNameoffset As Integer = ByteHandling.FindByteBackward(ffBytes, Byte.Parse(0), offset) + 1
Dim endofNameoffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {255}, offset) + 1
Dim node As TreeNode = MiscData.Nodes(2).Nodes.Add(ByteHandling.GetString(ffBytes, startofNameoffset, endofNameoffset))
Dim endOffset As Integer = ByteHandling.FindBytes(ffBytes, New Byte() {255, 255, 255, 255}, offset + 4).ToString()
node.Nodes.Add("Name Offset: " + startofNameoffset.ToString())
node = Nothing
Next
'Catch ex As Exception
' MessageBox.Show("Could not open .FF file: " + ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error)
'End Try
fileInfo.Size = ByteHandling.GetDWORD(ffBytes, 0, Not fileInfo.BigEndian)
If (fileInfo.Version = MW2Version Or fileInfo.Version = MW2VersionPC) Then
fileInfo.SecondSize = ByteHandling.GetDWORD(ffBytes, 20, Not fileInfo.BigEndian)
Else
fileInfo.SecondSize = ByteHandling.GetDWORD(ffBytes, 24, Not fileInfo.BigEndian)
End If
FileGridView.Refresh()
Catch ex As Exception
MessageBox.Show("Error opening: " + ex.Message)
End Try
End Sub
Dim backEnd As Process = System.Diagnostics.Process.Start(Directory.GetCurrentDirectory() + "\[COLOR="Red"]FFbackend.exe", "-o """ + dragDropFFname + """"[/COLOR])
Dim backEnd As Process = System.Diagnostics.Process.Start(Directory.GetCurrentDirectory() + "\[COLOR="Red"]FFbackend.exe", "-o """ + dragDropFFname + """"[/COLOR])
Copyright © 2026, NextGenUpdate.
All Rights Reserved.