GTA Series IMG DIR: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Hellion00
imported>Hellion00
Line 28: Line 28:
=== MultiEx BMS ===  
=== MultiEx BMS ===  


ImpType Standard ;
ImpType Standard ;<br>
IDString VER2 ;
IDString VER2 ;<br>
Get NUMFILES Long 0 ;
Get NUMFILES Long 0 ;<br>
For T = 1 To NUMFILES ;
For T = 1 To NUMFILES ;<br>
SavePos CURPOS 0 ;
SavePos CURPOS 0 ;<br>
SavePos FOO ;
SavePos FOO ;<br>
Get FILEOFF Long 0 ;
Get FILEOFF Long 0 ;<br>
Math FILEOFF *= 2048 ;
Math FILEOFF *= 2048 ;<br>
SavePos FSO ;
SavePos FSO ;<br>
Get FILESIZE Long 0 ;
Get FILESIZE Long 0 ;<br>
Math FILESIZE *= 2048 ;
Math FILESIZE *= 2048 ;<br>
Get FILENAME String 0 ;
Get FILENAME String 0 ;<br>
Log FILENAME FILEOFF FILESIZE FOO FSO ;
Log FILENAME FILEOFF FILESIZE FOO FSO ;<br>
Math CURPOS += 32 ;
Math CURPOS += 32 ;<br>
GoTo CURPOS 0 ;
GoTo CURPOS 0 ;<br>
Next T ;
Next T ;<br>


=== Supported Programs ===  
=== Supported Programs ===  


* [[Game Extractor|Game Extractor]]<br>
* [[Game Extractor|Game Extractor]]<br>

Revision as of 15:17, 9 August 2006

IMG


Format Specifications

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

// for each file

uint32 {4}   - File Offset [*2048]
uint32 {4}   - File Length [*2048] (includes padding at the end of the file)
char {X}     - Filename
byte {1}     - null Filename Terminator
byte {0-3}   - null Padding so filenameLength+1 is a multiple of 4 bytes


// repeat until this file entry has length 32 bytes
uint16 {2}   - Unknown ID (incremental from 166 (from start of filename))


// for each file

byte {X}     - File Data
byte {X}     - Padding to a multiple of 2048 bytes

MultiEx BMS

ImpType Standard ;
IDString VER2 ;
Get NUMFILES Long 0 ;
For T = 1 To NUMFILES ;
SavePos CURPOS 0 ;
SavePos FOO ;
Get FILEOFF Long 0 ;
Math FILEOFF *= 2048 ;
SavePos FSO ;
Get FILESIZE Long 0 ;
Math FILESIZE *= 2048 ;
Get FILENAME String 0 ;
Log FILENAME FILEOFF FILESIZE FOO FSO ;
Math CURPOS += 32 ;
GoTo CURPOS 0 ;
Next T ;

Supported Programs