Last time updated: 2024-08-17 03:48:24.598592+00:00
*.FSH image archive. ShpiBlock
*.ENV image archive. ShpiBlock
*.VIV archive with some data. BigfBlock
Did not find what you need or some given data is wrong? Please submit an issue
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 4 | UTF-8 string. Always == "SHPI" | Resource ID |
4 | length | 4 | 4-bytes unsigned integer (little endian) | The length of this SHPI block in bytes |
8 | num_items | 4 | 4-bytes unsigned integer (little endian) | An amount of items |
12 | shpi_dir | 4 | UTF-8 string | One of: "LN32", "GIMX", "WRAP". The purpose is unknown |
16 | items_descr | num_items*8 | Array of num_items itemsItem size: 8 bytes Item type: 8-bytes record, first 4 bytes is a UTF-8 string, last 4 bytes is an unsigned integer (little-endian) |
An array of items, each of them represents name of SHPI item (image or palette) and offset to item data in file, relatively to SHPI block start (where resource id string is presented). Names are not always unique |
16 + num_items*8 | children | ? | Array of num_items + ? itemsItem size: ? bytes Item type: One of types: - Bitmap8Bit - Bitmap16Bit0565 - Bitmap16Bit1555 - Bitmap24Bit - Bitmap32Bit - Palette16BitDos - Palette16Bit - Palette32Bit - Bytes |
A part of block, where items data is located. Offsets to some of the entries are defined in items_descr block. Between them there can be non-indexed entries (palettes and texts) |
Description: A block-container with various data: image archives, GEO geometries, sound banks, other BIGF blocks...
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 4 | UTF-8 string. Always == "BIGF" | Resource ID |
4 | length | 4 | 4-bytes unsigned integer (big endian) | The length of this BIGF block in bytes |
8 | num_items | 4 | 4-bytes unsigned integer (big endian) | An amount of items |
12 | unk0 | 4 | 4-bytes unsigned integer (little endian) | Unknown purpose |
16 | items_descr | num_items*8..? | Array of num_items itemsItem type: CompoundBlock |
- |
? | children | ? | Array of num_items itemsItem size: ? bytes Item type: One of types: - ShpiBlock - BigfBlock - Bytes |
Description: 8bit bitmap can be serialized to image only with palette. Basically, for every pixel it uses 8-bit index of color in assigned palette. The tricky part is to determine how the game understands which palette to use. In most cases, if bitmap has embedded palette, it should be used, EXCEPT Autumn Valley fence texture: there embedded palette should be ignored. In all other cases it is tricky even more: it uses !pal or !PAL palette from own SHPI archive, if it is WWWW archive, palette can be in a different SHPI before this one. In CONTROL directory most of QFS files use !pal even from different QFS file! It is a mystery how to reliably pick palette
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x7b | Resource ID |
1 | block_size | 3 | 3-bytes unsigned integer (little endian) | Bitmap block size 16+width*height + trailing bytes length |
4 | width | 2 | 2-bytes unsigned integer (little endian) | Bitmap width in pixels |
6 | height | 2 | 2-bytes unsigned integer (little endian) | Bitmap height in pixels |
8 | unk | 2 | 2-bytes unsigned integer (little endian) | Unknown purpose |
10 | pivot_y | 2 | 2-bytes unsigned integer (little endian) | For "horz" bitmap in TNFS FAM files: Y coordinate of the horizon line on the image. Higher value = image as horizon will be put higher on the screen. Seems to affect only open tracks |
12 | x | 2 | 2-bytes unsigned integer (little endian) | X coordinate of bitmap position on screen. Used for menu/dash sprites |
14 | y | 2 | 2-bytes unsigned integer (little endian) | Y coordinate of bitmap position on screen. Used for menu/dash sprites |
16 | bitmap | width*height | Array of width*height itemsItem size: 1 byte Item type: 1-byte unsigned integer |
Color indexes of bitmap pixels. The actual colors are in assigned to this bitmap palette |
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x78 | Resource ID |
1 | block_size | 3 | 3-bytes unsigned integer (little endian) | Bitmap block size 16+2*width*height + trailing bytes length |
4 | width | 2 | 2-bytes unsigned integer (little endian) | Bitmap width in pixels |
6 | height | 2 | 2-bytes unsigned integer (little endian) | Bitmap height in pixels |
8 | unk | 4 | Bytes | Unknown purpose |
12 | x | 2 | 2-bytes unsigned integer (little endian) | X coordinate of bitmap position on screen. Used for menu/dash sprites |
14 | y | 2 | 2-bytes unsigned integer (little endian) | Y coordinate of bitmap position on screen. Used for menu/dash sprites |
16 | bitmap | width*height*2 | Array of width*height itemsItem size: 2 bytes Item type: EA games 16-bit 0565 color, rrrrrggg_gggbbbbb. 0x7c0 (0x00FB00 RGB) is always transparent |
Colors of bitmap pixels |
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x7e | Resource ID |
1 | block_size | 3 | 3-bytes unsigned integer (little endian) | Bitmap block size 16+2*width*height + trailing bytes length |
4 | width | 2 | 2-bytes unsigned integer (little endian) | Bitmap width in pixels |
6 | height | 2 | 2-bytes unsigned integer (little endian) | Bitmap height in pixels |
8 | unk | 4 | Bytes | Unknown purpose |
12 | x | 2 | 2-bytes unsigned integer (little endian) | X coordinate of bitmap position on screen. Used for menu/dash sprites |
14 | y | 2 | 2-bytes unsigned integer (little endian) | Y coordinate of bitmap position on screen. Used for menu/dash sprites |
16 | bitmap | width*height*2 | Array of width*height itemsItem size: 2 bytes Item type: EA games 16-bit 1555 color, arrrrrgg_gggbbbbb |
Colors of bitmap pixels |
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x7f | Resource ID |
1 | block_size | 3 | 3-bytes unsigned integer (little endian) | Bitmap block size 16+3*width*height + trailing bytes length |
4 | width | 2 | 2-bytes unsigned integer (little endian) | Bitmap width in pixels |
6 | height | 2 | 2-bytes unsigned integer (little endian) | Bitmap height in pixels |
8 | unk | 4 | Bytes | Unknown purpose |
12 | x | 2 | 2-bytes unsigned integer (little endian) | X coordinate of bitmap position on screen. Used for menu/dash sprites |
14 | y | 2 | 2-bytes unsigned integer (little endian) | Y coordinate of bitmap position on screen. Used for menu/dash sprites |
16 | bitmap | width*height*3 | Array of width*height itemsItem size: 3 bytes Item type: EA games 24-bit color (little-endian), rrrrrrrr_gggggggg_bbbbbbbb |
Colors of bitmap pixels |
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x7d | Resource ID |
1 | block_size | 3 | 3-bytes unsigned integer (little endian) | Bitmap block size 16+4*width*height + trailing bytes length |
4 | width | 2 | 2-bytes unsigned integer (little endian) | Bitmap width in pixels |
6 | height | 2 | 2-bytes unsigned integer (little endian) | Bitmap height in pixels |
8 | unk | 4 | Bytes | Unknown purpose |
12 | x | 2 | 2-bytes unsigned integer (little endian) | X coordinate of bitmap position on screen. Used for menu/dash sprites |
14 | y | 2 | 2-bytes unsigned integer (little endian) | Y coordinate of bitmap position on screen. Used for menu/dash sprites |
16 | bitmap | width*height*4 | Array of width*height itemsItem size: 4 bytes Item type: EA games 32-bit ARGB color, aaaaaaaa_rrrrrrrr_gggggggg_bbbbbbbb |
Colors of bitmap pixels |
Description: Resource with colors LUT (look-up table). EA 8-bit bitmaps have 1-byte value per pixel, meaning the index of color in LUT of assigned palette. Has special colors: 255th in most cases means transparent color, 254th in car textures is replaced by tail light color, 250th - 253th in car textures are rendered black for unknown reason
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x29 | Resource ID |
1 | unk0 | 3 | Bytes | Unknown purpose |
4 | num_colors | 2 | 2-bytes unsigned integer (little endian) | Amount of colors |
6 | unk1 | 2 | Bytes | Unknown purpose |
8 | num_colors1 | 2 | 2-bytes unsigned integer (little endian) | Always equal to num_colors? |
10 | unk2 | 6 | Bytes | Unknown purpose |
16 | colors | num_colors*2 | Array of num_colors itemsItem size: 2 bytes Item type: 16-bit color, not tested properly |
Colors LUT |
Description: Resource with colors LUT (look-up table). EA 8-bit bitmaps have 1-byte value per pixel, meaning the index of color in LUT of assigned palette. Has special colors: 255th in most cases means transparent color, 254th in car textures is replaced by tail light color, 250th - 253th in car textures are rendered black for unknown reason
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x2d | Resource ID |
1 | unk0 | 3 | Bytes | Unknown purpose |
4 | num_colors | 2 | 2-bytes unsigned integer (little endian) | Amount of colors |
6 | unk1 | 2 | Bytes | Unknown purpose |
8 | num_colors1 | 2 | 2-bytes unsigned integer (little endian) | Always equal to num_colors? |
10 | unk2 | 6 | Bytes | Unknown purpose |
16 | colors | num_colors*2 | Array of num_colors itemsItem size: 2 bytes Item type: EA games 16-bit 0565 color, rrrrrggg_gggbbbbb. 0x7c0 (0x00FB00 RGB) is always transparent |
Colors LUT |
Description: Resource with colors LUT (look-up table). EA 8-bit bitmaps have 1-byte value per pixel, meaning the index of color in LUT of assigned palette. Has special colors: 255th in most cases means transparent color, 254th in car textures is replaced by tail light color, 250th - 253th in car textures are rendered black for unknown reason
Offset | Name | Size (bytes) | Type | Description |
---|---|---|---|---|
0 | resource_id | 1 | 1-byte unsigned integer. Always == 0x2a | Resource ID |
1 | unk0 | 3 | Bytes | Unknown purpose |
4 | num_colors | 2 | 2-bytes unsigned integer (little endian) | Amount of colors |
6 | unk1 | 2 | Bytes | Unknown purpose |
8 | num_colors1 | 2 | 2-bytes unsigned integer (little endian) | Always equal to num_colors? |
10 | unk2 | 6 | Bytes | Unknown purpose |
16 | colors | num_colors*4 | Array of num_colors itemsItem size: 4 bytes Item type: EA games 32-bit ARGB color, aaaaaaaa_rrrrrrrr_gggggggg_bbbbbbbb |
Colors LUT |