偶然发现sonic4的OBB文件不是一般的RSB(1sbr)格式,文件头如下:
'Offset 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
'00000000 4C 50 4B 00 01 00 0C 09 77 00 01 00 20 00 00 00 LPK w
'00000016 50 24 00 00 60 24 00 00 BD CB C3 17 13 03 01 00 P$ `$ 剿?
Type TSonic4OOB
lSign As Long
iRev As Integer
iNumFiles As Integer
iNumDirs As Integer
iRev1 As Integer
lOffTable1 As Long '0x20
lLenTable1 As Long '0x2450
lOffFileOff As Long '0x2460
lOffNameTable As Long '0x17c3cbbd
lLenNameTable As Long '01031317
End Type
Type TSonicOffTable
lOff As Long
lSize As Long
lSize1 As Long
iDirIndex As Integer
iFileIndex As Integer
End Type
后面是文件索引偏移表,lOffNameTable 是目录名表接着文件名表,这样就可以解包得到了所有文件。
但是它的文件格式很特殊,AMB是ZLib压缩格式,然后解压缩以后有些是ZIP!头的zlib文件,解压缩以后可以用ABMPACKER也可以手动解出DDS文件,但是慢着,里面混杂了KTX文件格式,只好用PVRTEXTOOL再转PNG,这是有多无聊才搞这个?太麻烦了。
main.10050071.com.sega.sonic4ep2.obb: