Call To Power 2

From XentaxWiki
Jump to: navigation, search

Choose archive extension:

ZFS


Format Specifications

char {4}     - Header (ZFS3)
uint32 {4}   - Unknown
uint32 {4}   - Unknown
uint32 {4}   - Unknown
uint32 {4}   - Number Of Files
uint32 {4}   - Unknown
uint32 {4}   - Unknown
uint32 {4}   - Unknown

// for each file

char {16}    - Filename (null)
uint32 {4}   - File Offset
uint32 {4}   - Unknown
uint32 {4}   - File Length
uint64 {8}   - Unknown


byte {X}     - File Data

MultiEx BMS Script

IDString 0 ZFS3 ;
Get DUMMYL Long 0 ;
Get DUMMYL Long 0 ;
Get TAILSIZEB Long 0 ;
Get FILECNTL Long 0 ;
Get DUMMYL Long 0 ;
Get DUMMYL Long 0 ;
Get FILEJMP Long 0 ;
SavePos FILESTART 0 ;
Set TAILOFF Long FILECNTL ;
Math TAILOFF /= TAILSIZEB ;
Set TAILOFF Long TAILSIZEB ;
Math TAILOFF *= TAILOFF ;
Set DUMMYL Long TAILOFF ;
Set TAILOFF Long FILECNTL ;
Math TAILOFF -= DUMMYL ;
Set DUMMYL Long 0 ;
Do ;
Math DUMMYL += 1 ;
GoTo FILESTART 0 ;
GetDString FILENAME 16 0 ;
Get FILEOFF Long 0 ;
Math FILESTART += 24 ;
GoTo FILESTART 0 ;
Get FILESIZE Long 0 ;
Math FILESTART += 12 ;
Log FILENAME FILEOFF FILESIZE 0 0 ;
While DUMMYL <> TAILSIZEB ;
If EXTRCNT = FILECNTL ;
CleanExit ;
EndIf ;
GoTo FILEJMP 0 ;
Get FILEJMP Long 0 ;
SavePos FILESTART 0 ;
Set DUMMYL Long FILECNTL ;
Math DUMMYL -= EXTRCNT ;
Set FILEOFF Long TAILOFF ;
Math FILEOFF /= DUMMYL ;
Set FILEOFF Long TAILOFF ;
Math FILEOFF *= FILEOFF ;
Set FILESIZE Long DUMMYL ;
Math FILESIZE /= TAILSIZEB ;
Set FILESIZE Long TAILSIZEB ;
Math FILESIZE *= FILESIZE ;
Set TAILSIZEB Long FILESIZE ;
Math TAILSIZEB += FILEOFF ;
Set DUMMYL Long 0 ;
Do ;
GoTo FILESTART 0 ;
GetDString FILENAME 16 0 ;
Get FILEOFF Long 0 ;
Math FILESTART += 24 ;
GoTo FILESTART 0 ;
Get FILESIZE Long 0 ;
Math FILESTART += 12 ;
Log FILENAME FILEOFF FILESIZE 0 0 ;
Math DUMMYL += 1 ;
While DUMMYL <> TAILSIZEB ;
If EXTRCNT = FILECNTL ;
CleanExit ;
EndIf ;
GoTo FILEJMP 0 ;
Get FILEJMP Long 0 ;
SavePos FILESTART 0 ;
Set DUMMYL Long FILECNTL ;
Math DUMMYL -= EXTRCNT ;
Set FILEOFF Long TAILOFF ;
Math FILEOFF /= DUMMYL ;
Set FILEOFF Long TAILOFF ;
Math FILEOFF *= FILEOFF ;
Set FILESIZE Long DUMMYL ;
Math FILESIZE /= TAILSIZEB ;
Set FILESIZE Long TAILSIZEB ;
Math FILESIZE *= FILESIZE ;
Set TAILSIZEB Long FILESIZE ;
Math TAILSIZEB += FILEOFF ;
Set DUMMYL Long 0 ;
Do ;
GoTo FILESTART 0 ;
GetDString FILENAME 16 0 ;
Get FILEOFF Long 0 ;
Math FILESTART += 24 ;
GoTo FILESTART 0 ;
Get FILESIZE Long 0 ;
Math FILESTART += 12 ;
Log FILENAME FILEOFF FILESIZE 0 0 ;
Math DUMMYL += 1 ;
While DUMMYL <> TAILSIZEB ;

Compatible Programs