Results 1 to 9 of 9

Thread: has anyone ever heard of a .pak file

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Posts
    130

    has anyone ever heard of a .pak file

    its a grpahics file just dont know how to open it?????
    if you have any ideas please let me know.
    Thanks
    Matt

  2. #2
    New Member
    Join Date
    May 2001
    Posts
    3
    I have a program for viewing PAK files; <a href = "mailto:[email protected]">email me</a> if u want the source.
    Last edited by ddrug; May 1st, 2001 at 12:25 AM.

  3. #3
    New Member
    Join Date
    May 2001
    Posts
    3
    :P damn html code aint on
    anyways dont email at [email protected], use [email protected]

  4. #4
    New Member
    Join Date
    May 2001
    Posts
    3
    damn so now i just type the email and it works
    getting sick of this

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Posts
    130
    well I got one prog it is for quake pak files??? I dont know what this is it is art files from a old 1996 football game???

    Thanks,
    Matt

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I happened to get interested in pak files before i started my own package format a year ago(i found .pak's pretty useless for my purpose) Here's a class i made for reading pak contents, there should be enough .pak editors out there if you search...
    This was coded when i had no service packs installed but the type hearders seems ok. If you have any problems let me know
    Code:
    Option Explicit
    Option Compare Text
    
    Private Type FileInPAK
       named As String * 56
       filepos As Long
       filelen As Long
    End Type
    Private Type PAKFileHeader
      ident As Long
      dirofs As Long
      dirlen As Long
    End Type
    Private PakHeader As PAKFileHeader
    Private PakFiles() As FileInPAK
    Private Pfilename$
    
    Property Get Filename$()
        Filename = Pfilename
    End Property
    Property Let Filename(newvalue$)
    If newvalue = Pfilename Then Exit Property
    Dim ff%
        ff = FreeFile
        Open newvalue For Binary Access Read As ff
            Get #ff, , PakHeader
            ReDim PakFiles(FileCount - 1)
            Get #ff, PakHeader.dirofs + 1, PakFiles()
        Close ff
    End Property
    
    Property Get FileCount() As Integer
        FileCount = Int(PakHeader.dirlen / 64) + 1
    End Property
    
    Property Get Data(ByRef indexOrFilename, Optional ByVal output) As Byte(): Dim index&, ff1%, ff2%, buffer() As Byte
        Select Case VarType(indexOrFilename)
            Case Is < vbInteger
                Exit Property
            Case Is < vbDate
                index = indexOrFilename
            Case vbString
                For index = 0 To FileCount - 1
                    If PakFiles(n).named Like "*" & indexOrFilename & "*" Then Exit For
                Next index
                    If index = FileCount Then Exit Property
            Case Else
                Exit Property
        End Select
        
        If output = "" Then output = index & ".tmp"
        ff1 = FreeFile
        Open Pfilename For Binary Access Read As ff1
            ReDim buffer(PakFiles(index).filelen - 1)
            Get #ff1, PakFiles(index).filepos + 1, buffer
            If IsMissing(output) Then
                    Data = buffer
            Else
                    ff2 = FreeFile
                    Open output For Binary As ff2
                        Put #ff2, , Data
                    Close ff2
            End If
        Close ff1
    End Property
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Posts
    130
    Here is the pak file zipped Up I have no idea how to open it I tried and nohing. Thanks if you can unpack it for me i would appreciate it.

    Thanks,
    Matt

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Posts
    130
    actuallly that file 630 kb was to big so if you know a good unpack utility let me know.

    Thanks,
    Matt

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    i used to have quark
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width