Skip to content

Instantly share code, notes, and snippets.

@Pharap

Pharap/Easter.h Secret

Created April 15, 2022 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pharap/84c68678fccda2f721ad216aec5489cc to your computer and use it in GitHub Desktop.
Save Pharap/84c68678fccda2f721ad216aec5489cc to your computer and use it in GitHub Desktop.
Example of AB Sprite Editor's output
#pragma once
// For uint8_t
#include <stdint.h>
// For PROGMEM
#include <avr/pgmspace.h>
namespace Images
{
constexpr uint8_t SmallArrowWidth { 8 };
constexpr uint8_t SmallArrowHeight { 8 };
constexpr uint8_t SmallArrow[] PROGMEM
{
// Width, Height
SmallArrowWidth, SmallArrowHeight,
// Frame 0 - SmallArrowImageNorth
0x00, 0x18, 0x10, 0x38, 0x30, 0x7F, 0x7E, 0xFF,
0x7E, 0xFF, 0x30, 0x7F, 0x10, 0x38, 0x00, 0x18,
// Frame 1 - SmallArrowImageEast
0x00, 0x3C, 0x18, 0x3C, 0x18, 0x3C, 0x18, 0xFF,
0x7E, 0xFF, 0x3C, 0x7E, 0x18, 0x3C, 0x00, 0x18,
// Frame 2 - SmallArrowImageSouth
0x00, 0x18, 0x08, 0x1C, 0x0C, 0xFE, 0x7E, 0xFF,
0x7E, 0xFF, 0x0C, 0xFE, 0x08, 0x1C, 0x00, 0x18,
// Frame 3 - SmallArrowImageWest
0x00, 0x18, 0x18, 0x3C, 0x3C, 0x7E, 0x7E, 0xFF,
0x18, 0xFF, 0x18, 0x3C, 0x18, 0x3C, 0x00, 0x3C,
};
constexpr uint8_t SmallRabbitWidth { 8 };
constexpr uint8_t SmallRabbitHeight { 8 };
constexpr uint8_t SmallRabbit[] PROGMEM
{
// Width, Height
SmallRabbitWidth, SmallRabbitHeight,
// Frame 0 - SmallRabbitB
0x00, 0x3F, 0x1E, 0xFF, 0x7E, 0xFF, 0x1E, 0xFF,
0x1E, 0xFF, 0x7E, 0xFF, 0x1E, 0xFF, 0x00, 0x3F,
// Frame 1 - SmallRabbitR
0x00, 0x00, 0x00, 0x3F, 0x1E, 0xFF, 0x7E, 0xFF,
0x12, 0xFF, 0x1E, 0x3F, 0x00, 0x3F, 0x00, 0x00,
// Frame 2 - SmallRabbitF
0x00, 0x3F, 0x1E, 0xFF, 0x72, 0xFF, 0x1E, 0xFF,
0x1E, 0xFF, 0x72, 0xFF, 0x1E, 0xFF, 0x00, 0x3F,
// Frame 3 - SmallRabbitL
0x00, 0x00, 0x00, 0x3F, 0x1E, 0x3F, 0x12, 0xFF,
0x7E, 0xFF, 0x1E, 0xFF, 0x00, 0x3F, 0x00, 0x00,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment