First Flight CAT

From XentaxWiki
Revision as of 13:18, 9 December 2005 by imported>PXR
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CAT

  • Format Type : Archive
  • Endian Order : Little Endian
  • Date Posted : Dec. 9, 2005

Format Specifications

char {3}     - Header (CAT)
byte {13}    - null
uint32 {4}   - Number of files
uint32 {4}   - Number of file types
uint32 {4}   - Length of the file data

// for each file

uint32 {4}   - File Offset
uint32 {4}   - Filename Length (including null terminator)
byte {x}     - Filename
byte {1}     - null

// for each file type

uint32 {4}   - File-Type Length (including null terminator)
byte {x}     - File-Type name
byte {1}     - null

byte {x}    - File Data

MultiEx BMS Script

ImpType SFileOff ;
IDString 0 CAT ;
Set TEMP Long 16 ;
GoTo TEMP 0 ;
Get FILENUM Long 0 ;
Get FOOBAR Long 0 ;
Get FOOBAR Long 0 ;
For X = 1 To FILENUM ;
SavePos FOFFSETX 0 ;
Get FOFFSET Long 0 ;
Get FNSIZE Long 0 ;
GetDString FNAME FNSIZE 0 ;
SavePos TEMP 0 ;
If X = FILENUM ;
GoTo EOF 0 ;
SavePos FSIZE 0 ;
Math FSIZE -= FOFFSET ;
Math FSIZE += 1 ;
Else ;
Get FSIZE Long 0 ;
Math FSIZE -= FOFFSET ;
EndIf ;
Log FNAME FOFFSET FSIZE FOFFSETX 0 ;
GoTo TEMP 0 ;
Next X ;

Supported by Programs