嗯...前两个已经解决了,
" ]/ T$ u& i/ h3 J后面两个外国大叔给了code,但是我不会用orz
- F+ c% P' e5 J+ K' q1 |: Z& ~$ H1 { s& |! I- i7 @4 j0 B, U9 S( b
Wizard Land .PAK files (not fully tested yet):- The whole file is encoded, this is the way to decode it:
- ... read the whole file to the Buffer, and ...
- For I := 0 To FILE_SIZE - 1 Do
- Buffer[I] := Buffer[I] Xor (3*I) Xor 166;
- The (possible) structure of the decoded PAK file:
- -> Header: (8 bytes)
- - ID : DWORD; // $BAC04AC0
- - Zero : DWORD; // 0
- -> Directory:
- REPEAT
- - Flag: Byte;
- if Flag==0
- - FileNameLen : Byte;
- - FileName : Array Of Char; // example: 'images\\backgrounds\\background_01.jpg'
- - FileSize : DWORD;
- - FileTime : TFileTime; // 8 bytes long, Windows _FILETIME format
- else if Flag==$80
- END_OF_THE_DIRECTORY
- endif
- UNTIL END_OF_THE_DIRECTORY
- -> File_Data
复制代码 2 K1 f4 [! \1 g3 \/ l7 K* p4 g6 l
) o0 _9 O) i/ x. {$ [8 f+ KMagic Encyclopedia First Story "magic.vfn" file WORK-IN-PROGRESS- -> Header: (44 bytes = $2c)
- -ID : Array[0..3] Of Char; // 'ASDb'
- -Something : DWORD; // nr of files???
- -DirectoryStartPos : DWORD; // Points to the end of the file
- -Unknown1 : DWORD; // 03 00 31 07
- -Unknown2 : DWORD; // 08 00 44 53
- -Unknown3 : DWORD; // 00 00 34 86
- -Unknown4 : DWORD; // 88 85 B8 3A
- -Unknown5 : DWORD; // E3 40 55 3F
- -Unknown6 : DWORD; // FB 61 E1 2A
- -Unknown7 : DWORD; // CB 6D 29 52
- -Unknown8 : DWORD; // E3 C9 AD F0
- -> SomethingAfterHeader (12 bytes)
- -SomeBytes : Array[0..11] Of Byte; // 40 87 00 00 00 00 00 00 00 00 00 00
- -> FILE_DATA, ZLIB compression???
- -> Directory, for each file:
- -FileNameLen : DWORD;
- -FileName : Array Of Char;
- -RelativeStartPos : DWORD; // relative from the Header's end, so add 44 to this value to get the real filestartpos
复制代码 |