Arduboy2 Library  6.0.0
SpritesB.h
Go to the documentation of this file.
1 
8 #ifndef SpritesB_h
9 #define SpritesB_h
10 
11 #include "Arduboy2.h"
12 #include "SpritesCommon.h"
13 
40 class SpritesB
41 {
42  public:
55  static void drawExternalMask(int16_t x, int16_t y, const uint8_t *bitmap,
56  const uint8_t *mask, uint8_t frame, uint8_t mask_frame);
57 
67  static void drawPlusMask(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame);
68 
78  static void drawOverwrite(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame);
79 
89  static void drawErase(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame);
90 
100  static void drawSelfMasked(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame);
101 
102  // Master function. Needs to be abstracted into separate function for
103  // every render type.
104  // (Not officially part of the API)
105  static void draw(int16_t x, int16_t y,
106  const uint8_t *bitmap, uint8_t frame,
107  const uint8_t *mask, uint8_t sprite_frame,
108  uint8_t drawMode);
109 
110  // (Not officially part of the API)
111  static void drawBitmap(int16_t x, int16_t y,
112  const uint8_t *bitmap, const uint8_t *mask,
113  uint8_t w, uint8_t h, uint8_t draw_mode);
114 };
115 
116 #endif
SpritesB::drawErase
static void drawErase(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame)
"Erase" a sprite.
Definition: SpritesB.cpp:21
SpritesCommon.h
Common header file for sprite functions.
SpritesB::drawPlusMask
static void drawPlusMask(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame)
Draw a sprite using an array containing both image and mask values.
Definition: SpritesB.cpp:31
SpritesB::drawExternalMask
static void drawExternalMask(int16_t x, int16_t y, const uint8_t *bitmap, const uint8_t *mask, uint8_t frame, uint8_t mask_frame)
Draw a sprite using a separate image and mask array.
Definition: SpritesB.cpp:10
Arduboy2.h
The Arduboy2Base and Arduboy2 classes and support objects and definitions.
SpritesB::drawSelfMasked
static void drawSelfMasked(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame)
Draw a sprite using only the bits set to 1.
Definition: SpritesB.cpp:26
SpritesB
A class for drawing animated sprites from image and mask bitmaps. Optimized for small code size.
Definition: SpritesB.h:41
SpritesB::drawOverwrite
static void drawOverwrite(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame)
Draw a sprite by replacing the existing content completely.
Definition: SpritesB.cpp:16