-
Notifications
You must be signed in to change notification settings - Fork 3
BIF File Format
mrfearless edited this page Jan 6, 2019
·
13 revisions
Header v1.0
| Offset | Size | Type | Description |
|---|---|---|---|
| 0 | 4 | CHAR | Signature 'BIFF' |
| 4 | 4 | CHAR | Version 'V1 ' |
| 8 | 4 | DWORD | Number of FileEntries |
| 12 | 4 | DWORD | Number of TileEntries |
| 16 | 4 | DWORD | Offset to FileEntries |
FileEntries v1.0
| Offset | Size | Type | Description |
|---|---|---|---|
| 0 | 4 | DWORD | ResourceLocator |
| 4 | 4 | DWORD | ResourceOffset |
| 8 | 4 | DWORD | ResourceSize |
| 12 | 2 | WORD | ResourceType |
| 14 | 2 | WORD | Unknown |
Note: The IE resource manager uses 32-bit values as a 'resource index', which codifies the source of the resource as well as which source it refers to. The layout of this value is:
- bits 31-20: source index (the ordinal value giving the index of the corresponding BIF entry)
- bits 19-14: tileset index
- bits 13- 0: non-tileset file index ( 12 bit value, that matches the value used in the BIF file)
TileEntries v1.0
| Offset | Size | Type | Description |
|---|---|---|---|
| 0 | 4 | DWORD | ResourceLocator |
| 4 | 4 | DWORD | ResourceOffset |
| 8 | 4 | DWORD | Tiles count |
| 12 | 4 | DWORD | Tile size |
| 16 | 2 | WORD | ResourceType |
| 18 | 2 | WORD | Unknown |
Header v1.1
| Offset | Size | Type | Description |
|---|---|---|---|
| 0 | 4 | CHAR | Signature 'BIFF' |
| 4 | 4 | CHAR | Version 'V1.1' |
| 8 | 4 | DWORD | Number of FileEntries |
| 12 | 4 | DWORD | NULL |
| 16 | 4 | DWORD | Offset to FileEntries |
FileEntries v1.1
| Offset | Size | Type | Description |
|---|---|---|---|
| 0 | 4 | DWORD | ResourceLocator |
| 4 | 4 | DWORD | ResourceOffset |
| 8 | 4 | DWORD | ResourceSize |
| 12 | 2 | WORD | ResourceType |
| 14 | 2 | WORD | Unknown |
Note: The IE resource manager uses 32-bit values as a 'resource index', which codifies the source of the resource as well as which source it refers to. The layout of this value is:
- bits 31-20: source index (the ordinal value giving the index of the corresponding BIF entry)
- bits 19-14: tileset index
- bits 13- 0: non-tileset file index ( 12 bit value, that matches the value used in the BIF file)
Note: There are no TileEntries in BIF v1.1 files