Transport Tycoon CAT
CAT
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
// for each file
- uint32 {4} - File Offset
- uint32 {4} - File Length
// for each file
- byte {1} - Title Length (including null terminator)
- char {X} - Title
- byte {1} - null Title Terminator
- byte {X} - File Data
- byte {1} - Unknown
- byte {1} - Filename Length (including null terminator)
- byte {X} - Filename
- byte {1} - null Filename Terminator
uint32 {4} - Footer (BANK)
MultiEx BMS Script
Get FILENUM Long 0 ; GoTo EOF 0 ; SavePos EOFX 0 ; Math EOFX -= 3 ; GoTo EOFX 0 ; Get FOOTER Long 0 ; If FOOTER <> 1263419714 ; CleanExit ; EndIf ; Set CRAP String ? ; Math FILENUM /= 8 ; GoTo SOF 0 ; For F = 1 To FILENUM ; SavePos FOFFSETX 0 ; Get FOFFSET Long 0 ; SavePOS FSIZEX 0 ; Get FSIZE Long 0 ; SavePos NEXTFILE 0 ; GoTo FOFFSET 0 ; Get FNSIZE Byte 0 ; Math FOFFSET += FNSIZE ; Math FOFFSET += 1 ; GetDString FNAME FNSIZE 0 ; String FNAME -= CRAP ; SavePos TEMP 0 ; Math TEMP += FSIZE ; Math TEMP += 1 ; GoTo TEMP 0 ; Get EXTSIZE Byte 0 ; Math EXTSIZE -= 1 ; Do ; Get EXTB Byte 0 ; Math EXTSIZE -= 1 ; While EXTB <> 46 ; GetDString FNAMEEXT EXTSIZE 0 ; Set DOT String . ; String FNAME += DOT ; String FNAME += FNAMEEXT ; Log FNAME FOFFSET FSIZE 0 0 ; GoTo NEXTFILE 0 ; Next F ;
Note: This script gets the Title and adds the real filename extension to it (since the filename is kinda boring (i.e. filetypefileid.extension))