GTA Series IMG DIR: Difference between revisions
Jump to navigation
Jump to search
imported>Ikskoks |
imported>Ikskoks No edit summary |
||
| Line 39: | Line 39: | ||
</b></tt> | </b></tt> | ||
=== | |||
=== Notes and Comments === | |||
None. | |||
=== Games === | |||
List of games using this file format: | |||
* GTA 3 (PC) (*.IMG / *.DIR) | |||
* GTA Vice City (PC) (*.IMG / *.DIR) | |||
* GTA San Andreas (PC) (*.IMG) | |||
=== QuickBMS Script === | |||
ImpType Standard ;<br> | ImpType Standard ;<br> | ||
| Line 58: | Line 69: | ||
Next T ;<br> | Next T ;<br> | ||
=== | === Compatible Programs === | ||
* [[Game Extractor|Game Extractor]]<br> | * [[Game Extractor|Game Extractor]]<br> | ||
=== See Also === | === See Also === | ||
* [https://gtamods.com/wiki/IMG_archive IMG Archive (gtamods.com)] | * [https://gtamods.com/wiki/IMG_archive IMG Archive (gtamods.com)] | ||
<br/><br> | |||
Revision as of 17:28, 20 May 2022
IMG, DIR
- Format Type : Archive
- Endian Order : Little Endian
- Signature : VER2
Format Specifications
// header 4 bytes (char) - signature
Format Specifications (version 2)
char {4} - Signature (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))
- 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
Notes and Comments
None.
Games
List of games using this file format:
- GTA 3 (PC) (*.IMG / *.DIR)
- GTA Vice City (PC) (*.IMG / *.DIR)
- GTA San Andreas (PC) (*.IMG)
QuickBMS Script
ImpType Standard ;
IDString VER2 ;
Get NUMFILES Long 0 ;
SavePos CURPOS 0 ;
For T = 1 To NUMFILES ;
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 ;
Compatible Programs
See Also