From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PIG (Descent)" |
|---|
| claim | "A Descent 2 PIG bitmap header is 18 bytes: name[8], dflags, width (low 8 bits), height (low 8 bits), wh_extra (bits 0-3 width high, bits 4-7 height high), flags, avg_color and an int32 offset relative to the end of the bitmap header table." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Descent 2 PIG (DXX_BUILD_DESCENT 2 build of Rebirth; static_assert sizeof == 0x12)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "DiskBitmapHeader" |
|---|
| size | 18 |
|---|
| endianness | "little" |
|---|
| variant | "descent2" |
|---|
| fields | | offset | 0 |
|---|
| size | 8 |
|---|
| type | "char[8]" |
|---|
| name | "name" |
|---|
|
| offset | 8 |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "dflags" |
|---|
| bits | | bit | "0-5" |
|---|
| name | "frame_number" |
|---|
|
| bit | "6" |
|---|
| name | "abm" |
|---|
| notes | "animated bitmap; name printed as name#frame" |
|---|
|
|
|---|
|
| offset | 9 |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "width" |
|---|
|
| offset | 10 |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "height" |
|---|
|
| offset | 11 |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "wh_extra" |
|---|
| notes | "real width = width + ((wh_extra & 0x0f) << 8); real height = height + ((wh_extra & 0xf0) << 4)" |
|---|
|
| offset | 12 |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "flags" |
|---|
|
| offset | 13 |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "avg_color" |
|---|
|
| offset | 14 |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "offset" |
|---|
| notes | "data position = offset + data_start (file position after the header table)" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct DiskBitmapHeader with static_assert(sizeof == 0x12) for Descent 2; DiskBitmapHeader_read reads fields in this order; width/height composition and offset use" |
|---|
| repo | "https://github.com/dxx-rebirth/dxx-rebirth" |
|---|
| commit | "6943b924bea749543ef5729f31a28345e79716d2" |
|---|
| path | "similar/main/piggy.cpp" |
|---|
| lines | "189-210, 329-342, 788-815" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "DiskBitmapHeader (Descent 2, 18 bytes)" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T09:35:45.377Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:56:53.802Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read piggy.cpp 189-210, 329-342, 786-815: field order name[8], dflags, width, height, wh_extra, flags, avg_color, int offset (static_assert 0x12); width + ((wh_extra&0x0f)<<8), height + ((wh_extra&0xf0)<<4); offset + data_start where data_start is the position after the N_bitmaps header table." |
|---|
|
|
|---|