New animation "heart" added.

This commit is contained in:
Fabian Schlenz 2019-05-30 01:35:57 +02:00
commit 63a65c5b44
3 changed files with 20 additions and 31 deletions

View File

@ -95,24 +95,11 @@ uint16_t animation_couple_snow_offsets[] = {0, 291, 580, 875, 1162, 1443, 1728,
AnimationData animation_couple_snow = {&animation_couple_snow_colors[0], &animation_couple_snow_data[0], &animation_couple_snow_offsets[0], &animation_couple_snow_delays[0], false, 10, 32, 32, 32}; AnimationData animation_couple_snow = {&animation_couple_snow_colors[0], &animation_couple_snow_data[0], &animation_couple_snow_offsets[0], &animation_couple_snow_delays[0], false, 10, 32, 32, 32};
uint8_t animation_heart_colors[] PROGMEM = {0, 0, 0, 171, 33, 33, 255, 30, 0, 255, 106, 7}; uint8_t animation_heart_colors[] PROGMEM = {255, 0, 43, 255, 141, 174, 255, 174, 206, 255, 255, 255, 255, 100, 138, 255, 122, 149};
uint8_t animation_heart_data[] PROGMEM = { uint8_t animation_heart_data[] PROGMEM = {
255, 167, 2, 3, 255, 5, 4, 3, 255, 4, 2, 3, 255, 5, 4, 3, 255, 13, 2, 255, 9, 4, 2, 2, 255, 9, 4, 255, 11, 2, 4, 4, 4, 5, 5, 255, 17, 4, 255, 9, 2, 3, 4, 4, 255, 4, 5, 255, 16, 4, 3, 255, 8, 2, 4, 4, 4, 255, 4, 5, 255, 17, 4, 255, 7, 2, 3, 4, 4, 4, 255, 4, 5, 255, 17, 4, 3, 255, 6, 2, 3, 255, 4, 4, 5, 5, 255, 18, 4, 3, 255, 6, 2, 3, 255, 24, 4, 3, 255, 6, 2, 3, 255, 24, 4, 3, 255, 7, 2, 255, 24, 4, 255, 8, 2, 3, 255, 22, 4, 3, 255, 9, 2, 3, 255, 20, 4, 3, 255, 11, 2, 255, 20, 4, 255, 13, 2, 255, 18, 4, 255, 15, 2, 255, 16, 4, 255, 17, 2, 255, 14, 4, 255, 19, 2, 255, 12, 4, 255, 21, 2, 255, 10, 4, 255, 23, 2, 255, 8, 4, 255, 25, 2, 255, 6, 4, 255, 27, 2, 255, 4, 4, 255, 29, 2, 4, 4, 255, 175, 2, 255,24,1,2,2,1,2,2,255,10,1,2,5,4,2,7,6,2,255,9,1,2,4,3,7,7,6,2,255,10,1,2,2,6,2,2,255,13,1,2,255,38,1,2,2,2,1,1,1,2,2,2,255,6,1,2,3,4,3,2,1,2,7,7,6,2,255,5,1,2,4,5,4,3,2,3,3,7,6,2,255,5,1,2,3,4,255,4,3,7,7,6,2,255,6,1,2,6,6,7,7,7,6,6,2,255,8,1,2,2,6,7,6,2,2,255,11,1,2,6,2,255,14,1,2,255,10,1,
255, 136, 0, 255, 5, 3, 255, 6, 0, 255, 5, 3, 255, 15, 0, 4, 255, 5, 0, 4, 255, 4, 0, 4, 255, 5, 0, 4, 255, 75, 0, 4, 255, 22, 0, 4, 255, 39, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 62, 0, 4, 255, 30, 0, 4, 255, 10, 0, 3, 255, 32, 0, 3, 255, 18, 0, 3, 255, 13, 0, 3, 255, 16, 0, 3, 255, 15, 0, 3, 255, 14, 0, 3, 255, 17, 0, 3, 255, 12, 0, 3, 255, 19, 0, 3, 255, 10, 0, 3, 255, 21, 0, 3, 255, 8, 0, 3, 255, 23, 0, 3, 255, 6, 0, 3, 255, 25, 0, 3, 255, 4, 0, 3, 255, 27, 0, 3, 0, 0, 3, 255, 174, 0, 255,6,0,2,2,2,0,0,0,2,2,2,255,6,0,2,3,4,3,0,0,0,7,7,6,2,255,5,0,2,4,5,4,3,0,3,3,7,6,2,255,5,0,2,3,4,3,0,3,3,7,7,6,2,255,6,0,2,6,6,7,7,7,6,6,2,255,8,0,2,2,6,7,6,2,2,255,11,0,2,6,2,255,14,0,2,255,6,0,1,1,1,0,0,0,1,1,1,255,6,0,255,5,1,0,255,5,1,255,5,0,1,1,1,2,2,1,2,2,1,1,1,255,5,0,1,1,2,5,4,2,7,6,2,1,1,255,6,0,1,2,4,3,0,0,0,2,1,255,8,0,1,0,2,6,2,0,1,255,11,0,1,2,1,255,14,0,1,255,10,0
255, 103, 0, 255, 6, 3, 255, 6, 0, 255, 6, 3, 255, 13, 0, 255, 7, 4, 3, 255, 4, 0, 3, 255, 6, 4, 3, 255, 11, 0, 4, 4, 255, 7, 0, 3, 0, 0, 3, 255, 7, 0, 4, 3, 255, 9, 0, 4, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 3, 255, 8, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 9, 0, 5, 0, 0, 0, 4, 255, 28, 0, 5, 0, 4, 255, 89, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 23, 0, 3, 255, 7, 0, 4, 4, 255, 21, 0, 4, 255, 9, 0, 4, 255, 20, 0, 4, 255, 10, 0, 4, 4, 255, 18, 0, 4, 4, 255, 11, 0, 4, 4, 255, 16, 0, 4, 4, 255, 12, 0, 4, 4, 4, 255, 14, 0, 4, 4, 4, 255, 13, 0, 4, 4, 4, 255, 12, 0, 4, 4, 4, 255, 15, 0, 4, 4, 4, 255, 10, 0, 4, 4, 4, 255, 17, 0, 4, 4, 4, 255, 8, 0, 4, 4, 4, 255, 19, 0, 4, 4, 4, 255, 6, 0, 4, 4, 4, 255, 21, 0, 4, 4, 4, 255, 4, 0, 4, 4, 4, 255, 23, 0, 4, 4, 4, 0, 0, 4, 4, 4, 255, 25, 0, 3, 255, 4, 4, 3, 255, 141, 0,
255, 103, 0, 255, 6, 2, 255, 6, 0, 255, 6, 2, 255, 13, 0, 2, 2, 255, 5, 3, 2, 255, 4, 0, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 2, 255, 7, 0, 2, 0, 0, 2, 255, 7, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 8, 0, 2, 0, 0, 4, 0, 5, 255, 17, 0, 2, 255, 7, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 6, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 9, 0, 4, 0, 0, 0, 5, 255, 28, 0, 4, 0, 5, 255, 89, 0, 2, 255, 24, 0, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 7, 0, 2, 3, 255, 20, 0, 3, 2, 255, 9, 0, 3, 255, 20, 0, 3, 255, 10, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 25, 0, 255, 6, 2, 255, 141, 0,
255, 136, 0, 255, 5, 2, 255, 6, 0, 255, 5, 2, 255, 15, 0, 3, 255, 5, 0, 3, 255, 4, 0, 3, 255, 5, 0, 3, 255, 75, 0, 3, 255, 22, 0, 3, 255, 39, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 104, 0, 2, 255, 20, 0, 2, 255, 11, 0, 2, 255, 18, 0, 2, 255, 13, 0, 2, 255, 16, 0, 2, 255, 15, 0, 2, 255, 14, 0, 2, 255, 17, 0, 2, 255, 12, 0, 2, 255, 19, 0, 2, 255, 10, 0, 2, 255, 21, 0, 2, 255, 8, 0, 2, 255, 23, 0, 2, 255, 6, 0, 2, 255, 25, 0, 2, 255, 4, 0, 2, 255, 27, 0, 2, 0, 0, 2, 255, 174, 0,
255, 135, 0, 3, 255, 5, 4, 3, 255, 4, 0, 3, 255, 5, 4, 3, 255, 13, 0, 3, 4, 255, 5, 0, 4, 3, 0, 0, 3, 4, 255, 5, 0, 4, 3, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 4, 0, 5, 0, 0, 0, 4, 255, 16, 0, 4, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 0, 5, 0, 4, 255, 18, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 3, 4, 255, 20, 0, 4, 3, 255, 9, 0, 4, 255, 20, 0, 4, 255, 11, 0, 4, 255, 18, 0, 4, 255, 12, 0, 3, 4, 255, 16, 0, 4, 3, 255, 13, 0, 3, 4, 255, 14, 0, 4, 3, 255, 15, 0, 3, 4, 255, 12, 0, 4, 3, 255, 17, 0, 3, 4, 255, 10, 0, 4, 3, 255, 19, 0, 3, 4, 255, 8, 0, 4, 3, 255, 21, 0, 3, 4, 255, 6, 0, 4, 3, 255, 23, 0, 3, 4, 255, 4, 0, 4, 3, 255, 26, 0, 4, 0, 0, 4, 255, 29, 0, 3, 3, 255, 143, 0,
255, 135, 0, 255, 7, 2, 255, 4, 0, 255, 7, 2, 255, 13, 0, 2, 2, 255, 6, 3, 2, 0, 0, 2, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 3, 255, 7, 0, 3, 2, 2, 3, 255, 7, 0, 2, 2, 255, 9, 0, 2, 3, 0, 4, 0, 5, 255, 5, 0, 3, 3, 255, 9, 0, 2, 2, 255, 7, 0, 2, 2, 0, 4, 0, 0, 0, 5, 255, 16, 0, 2, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 0, 4, 0, 5, 255, 17, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 7, 0, 2, 2, 255, 20, 0, 2, 2, 255, 9, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 26, 0, 2, 3, 3, 2, 255, 29, 0, 2, 2, 255, 143, 0,
255, 167, 0, 3, 255, 5, 4, 255, 5, 0, 3, 255, 5, 4, 3, 255, 13, 0, 4, 255, 7, 0, 4, 0, 0, 4, 255, 7, 0, 4, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 3, 255, 22, 0, 3, 255, 8, 0, 4, 255, 22, 0, 4, 255, 7, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 4, 255, 22, 0, 4, 255, 8, 0, 3, 255, 22, 0, 3, 255, 9, 0, 3, 255, 20, 0, 3, 255, 11, 0, 4, 255, 18, 0, 4, 255, 13, 0, 4, 255, 16, 0, 4, 255, 15, 0, 4, 255, 14, 0, 4, 255, 17, 0, 4, 255, 12, 0, 4, 255, 19, 0, 4, 255, 10, 0, 4, 255, 21, 0, 4, 255, 8, 0, 4, 255, 23, 0, 4, 255, 6, 0, 4, 255, 25, 0, 4, 255, 4, 0, 4, 255, 27, 0, 4, 0, 0, 4, 255, 29, 0, 4, 4, 255, 175, 0,
255, 136, 0, 255, 5, 3, 255, 6, 0, 255, 5, 3, 255, 15, 0, 4, 255, 5, 0, 4, 255, 4, 0, 4, 255, 5, 0, 4, 255, 75, 0, 4, 255, 22, 0, 4, 255, 39, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 62, 0, 4, 255, 30, 0, 4, 255, 10, 0, 3, 255, 32, 0, 3, 255, 18, 0, 3, 255, 13, 0, 3, 255, 16, 0, 3, 255, 15, 0, 3, 255, 14, 0, 3, 255, 17, 0, 3, 255, 12, 0, 3, 255, 19, 0, 3, 255, 10, 0, 3, 255, 21, 0, 3, 255, 8, 0, 3, 255, 23, 0, 3, 255, 6, 0, 3, 255, 25, 0, 3, 255, 4, 0, 3, 255, 27, 0, 3, 0, 0, 3, 255, 174, 0,
255, 103, 0, 255, 6, 3, 255, 6, 0, 255, 6, 3, 255, 13, 0, 255, 7, 4, 3, 255, 4, 0, 3, 255, 6, 4, 3, 255, 11, 0, 4, 4, 255, 7, 0, 3, 0, 0, 3, 255, 7, 0, 4, 3, 255, 9, 0, 4, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 3, 255, 8, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 9, 0, 5, 0, 0, 0, 4, 255, 28, 0, 5, 0, 4, 255, 89, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 23, 0, 3, 255, 7, 0, 4, 4, 255, 21, 0, 4, 255, 9, 0, 4, 255, 20, 0, 4, 255, 10, 0, 4, 4, 255, 18, 0, 4, 4, 255, 11, 0, 4, 4, 255, 16, 0, 4, 4, 255, 12, 0, 4, 4, 4, 255, 14, 0, 4, 4, 4, 255, 13, 0, 4, 4, 4, 255, 12, 0, 4, 4, 4, 255, 15, 0, 4, 4, 4, 255, 10, 0, 4, 4, 4, 255, 17, 0, 4, 4, 4, 255, 8, 0, 4, 4, 4, 255, 19, 0, 4, 4, 4, 255, 6, 0, 4, 4, 4, 255, 21, 0, 4, 4, 4, 255, 4, 0, 4, 4, 4, 255, 23, 0, 4, 4, 4, 0, 0, 4, 4, 4, 255, 25, 0, 3, 255, 4, 4, 3, 255, 141, 0,
255, 103, 0, 255, 6, 2, 255, 6, 0, 255, 6, 2, 255, 13, 0, 2, 2, 255, 5, 3, 2, 255, 4, 0, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 2, 255, 7, 0, 2, 0, 0, 2, 255, 7, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 8, 0, 2, 0, 0, 4, 0, 5, 255, 17, 0, 2, 255, 7, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 6, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 9, 0, 4, 0, 0, 0, 5, 255, 28, 0, 4, 0, 5, 255, 89, 0, 2, 255, 24, 0, 2, 255, 6, 0, 2, 3, 255, 23, 0, 2, 255, 7, 0, 2, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 20, 0, 2, 255, 10, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 25, 0, 255, 6, 2, 255, 141, 0,
255, 136, 0, 255, 5, 2, 255, 6, 0, 255, 5, 2, 255, 15, 0, 3, 255, 5, 0, 3, 255, 4, 0, 3, 255, 5, 0, 3, 255, 75, 0, 3, 255, 22, 0, 3, 255, 39, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 62, 0, 3, 255, 30, 0, 3, 255, 10, 0, 2, 255, 32, 0, 2, 255, 18, 0, 2, 255, 13, 0, 2, 255, 16, 0, 2, 255, 15, 0, 2, 255, 14, 0, 2, 255, 17, 0, 2, 255, 12, 0, 2, 255, 19, 0, 2, 255, 10, 0, 2, 255, 21, 0, 2, 255, 8, 0, 2, 255, 23, 0, 2, 255, 6, 0, 2, 255, 25, 0, 2, 255, 4, 0, 2, 255, 27, 0, 2, 0, 0, 2, 255, 174, 0,
255, 135, 0, 3, 255, 5, 4, 3, 255, 4, 0, 3, 255, 5, 4, 3, 255, 13, 0, 3, 4, 255, 5, 0, 4, 3, 0, 0, 3, 4, 255, 5, 0, 4, 3, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 4, 0, 5, 0, 0, 0, 4, 255, 16, 0, 4, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 0, 5, 0, 4, 255, 18, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 3, 4, 255, 20, 0, 4, 3, 255, 9, 0, 4, 255, 20, 0, 4, 255, 11, 0, 4, 255, 18, 0, 4, 255, 12, 0, 3, 4, 255, 16, 0, 4, 3, 255, 13, 0, 3, 4, 255, 14, 0, 4, 3, 255, 15, 0, 3, 4, 255, 12, 0, 4, 3, 255, 17, 0, 3, 4, 255, 10, 0, 4, 3, 255, 19, 0, 3, 4, 255, 8, 0, 4, 3, 255, 21, 0, 3, 4, 255, 6, 0, 4, 3, 255, 23, 0, 3, 4, 255, 4, 0, 4, 3, 255, 26, 0, 4, 0, 0, 4, 255, 29, 0, 3, 3, 255, 143, 0,
255, 135, 0, 255, 7, 2, 255, 4, 0, 255, 7, 2, 255, 13, 0, 2, 2, 255, 6, 3, 2, 0, 0, 2, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 3, 255, 7, 0, 3, 2, 2, 3, 255, 7, 0, 2, 2, 255, 9, 0, 2, 3, 0, 4, 0, 5, 255, 5, 0, 3, 3, 255, 9, 0, 2, 2, 255, 7, 0, 2, 2, 0, 4, 0, 0, 0, 5, 255, 16, 0, 2, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 0, 4, 0, 5, 255, 17, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 7, 0, 2, 2, 255, 20, 0, 2, 2, 255, 9, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 26, 0, 2, 3, 3, 2, 255, 29, 0, 2, 2, 255, 143, 0,
255, 167, 0, 3, 255, 5, 4, 255, 5, 0, 3, 255, 5, 4, 3, 255, 13, 0, 4, 255, 7, 0, 4, 0, 0, 4, 255, 7, 0, 4, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 3, 255, 22, 0, 3, 255, 8, 0, 4, 255, 22, 0, 4, 255, 7, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 4, 255, 22, 0, 4, 255, 8, 0, 3, 255, 22, 0, 3, 255, 9, 0, 3, 255, 20, 0, 3, 255, 11, 0, 4, 255, 18, 0, 4, 255, 13, 0, 4, 255, 16, 0, 4, 255, 15, 0, 4, 255, 14, 0, 4, 255, 17, 0, 4, 255, 12, 0, 4, 255, 19, 0, 4, 255, 10, 0, 4, 255, 21, 0, 4, 255, 8, 0, 4, 255, 23, 0, 4, 255, 6, 0, 4, 255, 25, 0, 4, 255, 4, 0, 4, 255, 27, 0, 4, 0, 0, 4, 255, 29, 0, 4, 4, 255, 175, 0
}; };
uint16_t animation_heart_delays[] = {100, 100, 100, 100, 100, 100, 100, 400, 100, 100, 100, 100, 100, 100, 200}; uint16_t animation_heart_delays[] = {500,500};
uint16_t animation_heart_offsets[] = {0, 190, 344, 608, 875, 1025, 1291, 1588, 1790, 1944, 2208, 2473, 2627, 2893, 3190, 3392}; uint16_t animation_heart_offsets[] = {0,128,299};
AnimationData animation_heart = {&animation_heart_colors[0], &animation_heart_data[0], &animation_heart_offsets[0], &animation_heart_delays[0], false, 4, 15, 32, 32}; AnimationData animation_heart = {&animation_heart_colors[0], &animation_heart_data[0], &animation_heart_offsets[0], &animation_heart_delays[0], false, 6, 2, 16, 16};

View File

@ -25,6 +25,7 @@ BellEffect effect_bell;
StaticEffect effect_off(CRGB(0x000000)); StaticEffect effect_off(CRGB(0x000000));
AnimationEffect effect_anim_koopa(&animation_koopa, CRGB(0x000000), 0, 0); AnimationEffect effect_anim_koopa(&animation_koopa, CRGB(0x000000), 0, 0);
AnimationEffect effect_anim_couple_rain(&animation_couple_rain, CRGB(0x000000), -8, -16); AnimationEffect effect_anim_couple_rain(&animation_couple_rain, CRGB(0x000000), -8, -16);
AnimationEffect effect_anim_heart(&animation_heart, CRGB(0x000000), 0, 0);
SingleDynamicEffect effect_single_dynamic; SingleDynamicEffect effect_single_dynamic;
MultiDynamicEffect effect_multi_dynamic; MultiDynamicEffect effect_multi_dynamic;
MatrixEffect effect_matrix; MatrixEffect effect_matrix;
@ -49,6 +50,7 @@ void setup_effects() {
effects->add((EffectEntry){"matrix", (Effect *)&effect_matrix}); effects->add((EffectEntry){"matrix", (Effect *)&effect_matrix});
effects->add((EffectEntry){"cycle", (Effect *)&effect_cycle}); effects->add((EffectEntry){"cycle", (Effect *)&effect_cycle});
effects->add((EffectEntry){"twirl", (Effect *)&effect_twirl}); effects->add((EffectEntry){"twirl", (Effect *)&effect_twirl});
effects->add((EffectEntry){"heart", (Effect*)&effect_anim_heart});
cycle_effects->add(&effect_sinematrix3); cycle_effects->add(&effect_sinematrix3);
cycle_effects->add(&effect_single_dynamic); cycle_effects->add(&effect_single_dynamic);

View File

@ -75,7 +75,7 @@ colors = []
frames.each do |frame| frames.each do |frame|
frame.columns.times do |x| frame.columns.times do |x|
frame.rows.times do |y| frame.rows.times do |y|
color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true) color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)[1,8].to_i(16)
colors << color colors << color
end end
end end
@ -84,19 +84,19 @@ colors = colors.uniq
STDERR.puts " Found #{colors.count} colors." STDERR.puts " Found #{colors.count} colors."
transparent = colors.select{|c| c.end_with? "00"} transparent = colors.select{|c| c & 0xFF == 0}
STDERR.puts "#{transparent.count} color(s) being transparent." STDERR.puts "#{transparent.count} color(s) being transparent."
# color[0] is "keep the color from the previous frame" # color[0] is "keep the color from the previous frame"
# color[1] is "background color" # color[1] is "background color"
colors = (["#00000012", "#00000013"] + (colors - transparent)).uniq colors = ([0x00000012, 0x00000013] + (colors - transparent)).uniq
STDERR.puts "Using #{colors.count} colors." STDERR.puts "Using #{colors.count} colors."
raise "Number of colors has to be 255 or less!" if colors.count>255 raise "Number of colors has to be 255 or less!" if colors.count>255
STDERR.puts STDERR.puts
puts puts
puts "uint32_t #{name}_colors[] = {#{colors.map{|c| "0x" + c[1, 6]}.join(", ")}};" puts "uint8_t animation_#{name}_colors[] PROGMEM = {#{colors[2..-1].map{|c| [c>>24 & 0xFF, c>>16 & 0xFF, c>>8 & 0xFF]}.flatten.join(", ")}};"
p_frame = nil p_frame = nil
frames_data = [] frames_data = []
@ -106,7 +106,7 @@ frames.each_with_index do |frame, index|
if index==0 # first frame if index==0 # first frame
frame.rows.times do |y| frame.rows.times do |y|
frame.columns.times do |x| frame.columns.times do |x|
color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true) color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)[1,8].to_i(16)
if transparent.include? color if transparent.include? color
data << 1 data << 1
else else
@ -117,8 +117,8 @@ frames.each_with_index do |frame, index|
else else
frame.rows.times do |y| frame.rows.times do |y|
frame.columns.times do |x| frame.columns.times do |x|
color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true) color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)[1,8].to_i(16)
p_color = p_frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true) p_color = p_frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)[1,8].to_i(16)
if color==p_color if color==p_color
data << 0 data << 0
@ -143,16 +143,16 @@ end
data = frames_data.map{|d| compress(d, true)} data = frames_data.map{|d| compress(d, true)}
puts "uint8_t #{name}_data[] PROGMEM = {\n #{data.map{|d| d.join(",")}.join(",\n ")}\n};" puts "uint8_t animation_#{name}_data[] PROGMEM = {\n #{data.map{|d| d.join(",")}.join(",\n ")}\n};"
puts "uint16_t #{name}_delays[] = {#{times.join(",")}};" puts "uint16_t animation_#{name}_delays[] = {#{times.join(",")}};"
s=0 s=0
puts "uint16_t #{name}_offsets[] = {#{(data.map{|d| t=s; s+=d.count; t} + [s]).join(",")}};" puts "uint16_t animation_#{name}_offsets[] = {#{(data.map{|d| t=s; s+=d.count; t} + [s]).join(",")}};"
puts "AnimationData #{name} = {&#{name}_colors[0], &#{name}_data[0], &#{name}_offsets[0], &#{name}_delays[0], #{individual_frame_times}, #{colors.count}, #{frames_data.count}, #{frames.first.columns}, #{frames.first.rows}};" puts "AnimationData animation_#{name} = {&animation_#{name}_colors[0], &animation_#{name}_data[0], &animation_#{name}_offsets[0], &animation_#{name}_delays[0], #{individual_frame_times}, #{colors.count-2}, #{frames_data.count}, #{frames.first.columns}, #{frames.first.rows}};"
puts puts
STDERR.puts STDERR.puts
STDERR.puts "Space usage:" STDERR.puts "Space usage:"
STDERR.puts " Colors: %6d bytes." % [s1=colors.count * 4] # colors are 3-bytes, but we have to use uint32_t, which takes up 4 bytes. STDERR.puts " Colors: %6d bytes." % [s1=(colors.count-2) * 3] # colors are 3-bytes, but we have to use uint32_t, which takes up 4 bytes.
STDERR.puts " Data: %6d bytes." % [s2=data.flatten.count] STDERR.puts " Data: %6d bytes." % [s2=data.flatten.count]
STDERR.puts " Delays: %6d bytes." % [s5=times.count * 3 + 1] STDERR.puts " Delays: %6d bytes." % [s5=times.count * 3 + 1]
STDERR.puts " Offsets: %6d bytes." % [s3=data.count * 2] STDERR.puts " Offsets: %6d bytes." % [s3=data.count * 2]