Created
February 7, 2016 20:22
-
-
Save joshgoebel/56e6f289117e76f5d608 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MASKED | |
void drawExternalMask(int16_t x, int16_t y, const uint8_t *bitmap, | |
const uint8_t *mask, uint8_t frame, uint8_t mask_frame); | |
// = sprite UNMASKED | |
void drawOverwrite(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame); | |
// AND (~sprite) SPRITE_IS_MASK_ERASE | |
void drawErase(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame); | |
// OR (sprite) SPRITE_IS_MASK | |
void drawSelfMasked(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame); | |
// internal masking SPRITE_PLUS_MASK | |
void drawPlusMask(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t frame); |
// drawOverwrite() replaces the existing content completely
//
// image before after
//
// ..... ..... .....
// ..O.. ..... ..O..
// OO.OO ..... OO.OO
// ..O.. ..... ..O..
// ..... ..... .....
//
// image before after
//
// ..... OOOOO .....
// ..O.. OOOOO ..O..
// OO.OO OOOOO OO.OO
// ..O.. OOOOO ..O..
// ..... OOOOO .....
//
// drawExternMask() replaces the existing content completely
//
// image Mask before after
//
// ........ ........ ........ ........
// ........ .------. ........ ........
// ..OOOO.. .------. ........ ..OOOO..
// ..O..O.. .------. ........ ..O..O..
// ...OO... .------. ........ ...OO...
// ........ .------. ........ ........
// ........ ........ ........ ........
//
// image Mask before after
//
// ........ ........ OOOOOOOO OOOOOOOO
// ........ .------. OOOOOOOO O......O
// ..OOOO.. .------. OOOOOOOO O.OOOO.O
// ..O..O.. .------. OOOOOOOO O.O..O.O
// ...OO... .------. OOOOOOOO O..OO..O
// ........ .------. OOOOOOOO O......O
// ........ ........ OOOOOOOO OOOOOOOO
//
// drawPlusMask() replaces the existing content completely
//
// image before after
//
// ........ ........ ........
// .------. ........ ........
// .-OOOO-. ........ ..OOOO..
// .-O--O-. ........ ..O..O..
// .--OO--. ........ ...OO...
// .------. ........ ........
// ........ ........ ........
//
// image before after
//
// ........ OOOOOOOO OOOOOOOO
// .------. OOOOOOOO O......O
// .-OOOO-. OOOOOOOO O.OOOO.O
// .-O--O-. OOOOOOOO O.O..O.O
// .--OO--. OOOOOOOO O..OO..O
// .------. OOOOOOOO O......O
// ........ OOOOOOOO OOOOOOOO
//
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
drawExternMask = use a bitmap as a sprite with masking, but masking is done by an other bitmap(both are separate arrays, and can have different amount of frames)
drawOverwrite = use a bitmap as a sprite, nothing is masked
drawErase = use a bitmap for negative sprite (this means you will see black on white)
drawSelfMasked = use a bitmap as a sprite, the same bitmap is being used as sprite
drawPlusMask = use a bitmap as a sprite with masking, but masking has been included in the same bitmap