From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PIG (Descent)" |
|---|
| claim | "A Descent 1 PIG bitmap header is 17 bytes: name[8], dflags, width, height, flags, avg_color, int32 offset; there is no wh_extra, and bit 7 of dflags (DBM_FLAG_LARGE, 128) adds 256 to the width." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Descent 1 PIG and the Descent 1 PIG read by the Descent 2 build (static_assert sizeof == 0x11; DISKBITMAPHEADER_D1_SIZE 17)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "DiskBitmapHeaderD1" |
|---|
| size | 17 |
|---|
| endianness | "little" |
|---|
| variant | "descent1" |
|---|
| 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 | "7" |
|---|
| name | "large" |
|---|
| notes | "width + 256" |
|---|
|
|
|---|
|
| 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 | "flags" |
|---|
|
| offset | 12 |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "avg_color" |
|---|
|
| offset | 13 |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "offset" |
|---|
| notes | "data position = offset + header table size (17*N_bitmaps + 20*N_sounds) + 8 + Pigdata_start" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct with static_assert(sizeof == 0x11), DBM_FLAG_LARGE use for iwidth, offset computation in properties_init" |
|---|
| repo | "https://github.com/dxx-rebirth/dxx-rebirth" |
|---|
| commit | "6943b924bea749543ef5729f31a28345e79716d2" |
|---|
| path | "similar/main/piggy.cpp" |
|---|
| lines | "149, 189-210, 646-667" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "DiskBitmapHeader (Descent 1, 17 bytes)" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T09:35:45.453Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:56:53.732Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read piggy.cpp 149-210, 640-667 at the cited commit: D1 struct has no wh_extra (static_assert 0x11), DBM_FLAG_LARGE (128) adds 256 to width, offset = bmh.offset + header_size + 2*sizeof(int) + Pigdata_start with header_size = N_bitmaps*17 + N_sounds*20." |
|---|
|
|
|---|