Skip to content

Instantly share code, notes, and snippets.

@joshgoebel
Created February 7, 2016 20:22
Show Gist options
  • Save joshgoebel/56e6f289117e76f5d608 to your computer and use it in GitHub Desktop.
Save joshgoebel/56e6f289117e76f5d608 to your computer and use it in GitHub Desktop.
// 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);
Copy link

ghost commented Feb 8, 2016

// 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