add comment about snapshot format
This commit is contained in:
@@ -123,8 +123,8 @@ bool PSOGCSnapshotFile::checksum_correct() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t decode_rgb565(uint16_t c) {
|
static uint32_t decode_rgb565(uint16_t c) {
|
||||||
// Input: rrrrrggg gggbbbbb
|
// Input bits: rrrrrggg gggbbbbb
|
||||||
// Output: rrrrrrrr gggggggg bbbbbbbb aaaaaaaa
|
// Output bits: rrrrrrrr gggggggg bbbbbbbb aaaaaaaa
|
||||||
return ((c << 16) & 0xF8000000) | ((c << 11) & 0x07000000) | // R
|
return ((c << 16) & 0xF8000000) | ((c << 11) & 0x07000000) | // R
|
||||||
((c << 13) & 0x00FC0000) | ((c << 7) & 0x00030000) | // G
|
((c << 13) & 0x00FC0000) | ((c << 7) & 0x00030000) | // G
|
||||||
((c << 11) & 0x0000F800) | ((c << 6) & 0x00000700) | // B
|
((c << 11) & 0x0000F800) | ((c << 6) & 0x00000700) | // B
|
||||||
|
|||||||
@@ -282,6 +282,8 @@ struct PSOGCSnapshotFile {
|
|||||||
/* 00000 */ be_uint32_t checksum;
|
/* 00000 */ be_uint32_t checksum;
|
||||||
/* 00004 */ be_uint16_t width;
|
/* 00004 */ be_uint16_t width;
|
||||||
/* 00006 */ be_uint16_t height;
|
/* 00006 */ be_uint16_t height;
|
||||||
|
// Pixels are stored as 4x4 blocks of RGB565 values. See the implementation
|
||||||
|
// of decode_image for details.
|
||||||
/* 00008 */ parray<be_uint16_t, 0xC000> pixels;
|
/* 00008 */ parray<be_uint16_t, 0xC000> pixels;
|
||||||
/* 18008 */ uint8_t unknown_a1; // Always 0x18?
|
/* 18008 */ uint8_t unknown_a1; // Always 0x18?
|
||||||
/* 18009 */ uint8_t unknown_a2;
|
/* 18009 */ uint8_t unknown_a2;
|
||||||
|
|||||||
Reference in New Issue
Block a user