Original author: Pierre Sarrazin. Preserve upstream GPLv3-or-later and file-specific notices. Source: http://sarrazip.com/dev/coco-planes-0.1.0.tar.gz Archive SHA-256: 29191e6ba225965caa637ee726e1189639dc7fcdf2b68310fb93fbffd56c9c52
29 lines
806 B
C
29 lines
806 B
C
#ifndef _H_PreShiftedBitmap
|
|
#define _H_PreShiftedBitmap
|
|
|
|
#include <coco.h>
|
|
|
|
|
|
// A PreShiftedBitmap is always 16 pixels wide.
|
|
//
|
|
typedef struct PreShiftedBitmap
|
|
{
|
|
byte height; // in pixel rows, non zero
|
|
|
|
// Offsets in bytes[].
|
|
// A PreShiftedBitmap can be only be written horizontal pixel positions
|
|
// that are even, and less than 240.
|
|
// This horiz. position is thus equal to {0, 2, 4, 6} modulo 8.
|
|
// That modulo 8 value is the index into preShiftOffsets[].
|
|
// The offset obtained this way is an index in bytes[].
|
|
// At that offset in bytes[], there are six bytes for each row of the bitmap.
|
|
// The first 3 bytes are mask bytes. The last 3 are image bytes.
|
|
//
|
|
word preShiftOffsets[4];
|
|
|
|
byte bytes[];
|
|
} PreShiftedBitmap;
|
|
|
|
|
|
#endif /* _H_PreShiftedBitmap */
|