36 inline bool rc(u16 r, u16 c)
const
37 {
return !!(
data[r] & (1 << c)); }
39 inline u16
h()
const {
return 8; }
40 inline u16
w()
const {
return 8; }
55 inline bool rc(u16 r, u16 c)
const
56 {
return !!(
data[r] & (1 << c)); }
58 inline u16
h()
const {
return 16; }
59 inline u16
w()
const {
return 16; }
74 inline bool rc(u16 r, u16 c)
const
75 {
return !!(
data[r] & (1 << c)); }
77 inline u16
h()
const {
return 32; }
78 inline u16
w()
const {
return 32; }
86 template <
class T>
class Font {
89 explicit constexpr
Font(
const T* data)
93 const T*
icon(
char c)
const {
94 if (c < 0x20 || c > 0x7E)
return 0;
95 return m_data + unsigned(c - 0x20);
99 const T*
const m_data;
The Font class maps characters to fixed-size icons.
constexpr Font(const T *data)
Link the Font to an array of icon objects in ASCII order.
const T * icon(char c) const
Fetch the icon associated with a given character.
constexpr Animation< Icon16x16 > ANIM_CAT_SIT
Animations of a cat performing various activities.
const Icon16x16 CAT_PAW[8]
Animations of a cat performing various activities.
constexpr Animation< Icon16x16 > ANIM_CAT_GROOM
Animations of a cat performing various activities.
constexpr Animation< Icon16x16 > ANIM_CAT_PAW
Animations of a cat performing various activities.
constexpr Animation< Icon16x16 > ANIM_CAT_WALK
Animations of a cat performing various activities.
const Icon32x32 AEROLOGO_ICON32
The Aerospace Corporation logo in various sizes.
const Icon8x8 PAW_ICON8
A cat's paw or footprint.
const Icon16x16 SATCAT5_ICON16
The SatCat5 mascot in various sizes.
const Icon16x16 CAT_SLEEP[8]
Animations of a cat performing various activities.
const Icon16x16 AEROLOGO_ICON16
The Aerospace Corporation logo in various sizes.
constexpr Animation< Icon16x16 > ANIM_CAT_POUNCE
Animations of a cat performing various activities.
const Icon16x16 CAT_RUN[8]
Animations of a cat performing various activities.
constexpr Animation< Icon16x16 > ANIM_CAT_HISS
Animations of a cat performing various activities.
constexpr Animation< Icon16x16 > ANIM_CAT_RUN
Animations of a cat performing various activities.
const Icon16x16 CAT_WALK[8]
Animations of a cat performing various activities.
constexpr Animation< Icon16x16 > ANIM_CAT_SLEEP
Animations of a cat performing various activities.
const Icon16x16 CAT_GROOM[8]
Animations of a cat performing various activities.
const Icon8x8 SATCAT5_ICON8
The SatCat5 mascot in various sizes.
const Icon16x16 CAT_SIT[8]
Animations of a cat performing various activities.
const Icon16x16 CAT_HISS[8]
Animations of a cat performing various activities.
const Icon16x16 CAT_POUNCE[8]
Animations of a cat performing various activities.
const Font8x8 BASIC_FONT
A basic fixed-width 8x8 font.
A data structure for storing a looping sequence of icons.
unsigned count
An array of icons.
unsigned msec
Number of icon frames.
Plain-old-data struct for a 16x16 monochrome image.
u16 data[16]
16 x 16 pixels = 32 bytes
bool rc(u16 r, u16 c) const
Get pixel value at designated row and column.
u16 w() const
Height of this icon.
u16 h() const
Width of this icon.
Plain-old-data struct for a 32x32 monochrome image.
u16 h() const
Width of this icon.
bool rc(u16 r, u16 c) const
Get pixel value at designated row and column.
u32 data[32]
32 x 32 pixels = 128 bytes
u16 w() const
Height of this icon.
Plain-old-data struct for an 8x8 monochrome image.
bool rc(u16 r, u16 c) const
Get pixel value at designated row and column.
u16 w() const
Height of this icon.
u8 data[8]
8 x 8 pixels = 8 bytes
u16 h() const
Width of this icon.
Basic type aliases and prototypes used throughout SatCat5.