Transport Tycoon CAT: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>WATTO
No edit summary
imported>Ikskoks
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 8: Line 8:


<tt><b>
<tt><b>
uint32 {4}&nbsp;&nbsp; - Number Of Files <font color="darkgreen">[/8]</font> <br>
<br>
<font color="blue"> ''' // for each file ''' </font> <br>  
<font color="blue"> ''' // for each file ''' </font> <br>  
: uint32 {4}&nbsp;&nbsp; - File Offset <br>  
: uint32 {4}&nbsp;&nbsp; - File Offset <br>  
Line 15: Line 13:
<br>
<br>
<font color="blue"> ''' // for each file ''' </font> <br>  
<font color="blue"> ''' // for each file ''' </font> <br>  
: byte {1}&nbsp;&nbsp;&nbsp;&nbsp; - Filename Length <br>  
: byte {1}&nbsp;&nbsp;&nbsp;&nbsp; - Title Length (including null terminator)<br>  
: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Filename <br>  
: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Title <br>
: byte {1}&nbsp;&nbsp;&nbsp;&nbsp; - null Title Terminator <br>
: byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - File Data <br>  
: byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - File Data <br>  
: byte {1}&nbsp;&nbsp;&nbsp;&nbsp; - <font color="red">''Unknown''</font> <br>
: byte {1}&nbsp;&nbsp;&nbsp;&nbsp; - Filename Length (including null terminator)<br>
: byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - Filename <br>
: byte {1}&nbsp;&nbsp;&nbsp;&nbsp; - null Filename Terminator <br>
<br>
<br>
uint32 {4}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Footer <font color="purple">(BANK)</font> <br>
</b></tt>
</b></tt>


=== MultiEx BMS Script ===  
=== MultiEx BMS Script ===  


Not written yet<br><br>
<pre>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 ;</pre>
 
Note: This script gets the Title and adds the real filename extension to it (since the filename is kinda boring (i.e. ''<font color="green">filetype</font><font color="blue">fileid</font><font color=purple>.extension</font>))


=== Compatible Programs ===  
=== Compatible Programs ===  


* [[Game Extractor|Game Extractor]]<br>
* [[Game Extractor|Game Extractor]]<br>
* [[MultiEx Commander|MultiEx Commander]]<br>
[[Category:File Format]]

Latest revision as of 23:48, 24 January 2021

CAT


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))

Compatible Programs