First Flight

From XentaxWiki
Jump to: navigation, search

CAT

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

Format Specifications

char {4}     - Header ("CAT" + null)
byte {12}    - null
uint32 {4}   - Number Of Files
uint32 {4}   - Number Of File Types
uint32 {4}   - File Data Length

// for each file

uint32 {4}   - File Offset
uint32 {4}   - Filename Length (including null)
char {X}     - Filename
byte {1}     - null Filename Terminator


// for each file type

uint32 {4}   - File Type Name Length (including null)
char {X}     - File Type Name
byte {1}     - null File Type Name Terminator


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