From 96ff16629c18b759535c919330f4284c44b035ec Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Sat, 11 Aug 2012 12:10:28 +0000 Subject: [PATCH] Ideenpark-Logo --- animations/Makefile | 4 ++ animations/config.in | 1 + animations/ideenpark.c | 115 +++++++++++++++++++++++++++++++++++++++++ animations/ideenpark.h | 6 +++ display_loop.c | 13 +++-- 5 files changed, 136 insertions(+), 3 deletions(-) create mode 100644 animations/ideenpark.c create mode 100644 animations/ideenpark.h diff --git a/animations/Makefile b/animations/Makefile index 1b7b4b8..88b1a80 100644 --- a/animations/Makefile +++ b/animations/Makefile @@ -57,6 +57,10 @@ ifeq ($(ANIMATION_FAIRYDUST),y) SRC += fairydust.c endif +ifeq ($(ANIMATION_IDEENPARK),y) + SRC += ideenpark.c +endif + ifneq (,$(filter y,$(ANIMATION_PLASMA) $(ANIMATION_PSYCHEDELIC))) SRC += fpmath_patterns.c endif diff --git a/animations/config.in b/animations/config.in index b4dead8..d8992d2 100644 --- a/animations/config.in +++ b/animations/config.in @@ -54,6 +54,7 @@ comment "Animations" dep_bool "Amphibian" ANIMATION_AMPHIBIAN $ANIMATION_BMSCROLLER dep_bool "Out of Spec Logo" ANIMATION_LOGO_OOS $ANIMATION_BMSCROLLER dep_bool "Fairydust" ANIMATION_FAIRYDUST $ANIMATION_BMSCROLLER + dep_bool "Ideenpark" ANIMATION_IDEENPARK $ANIMATION_BMSCROLLER endmenu mainmenu_option next_comment diff --git a/animations/ideenpark.c b/animations/ideenpark.c new file mode 100644 index 0000000..6345dbc --- /dev/null +++ b/animations/ideenpark.c @@ -0,0 +1,115 @@ +#include +#include + +#include "../compat/pgmspace.h" +#include "bitmapscroller.h" +#include "ideenpark.h" + + +static uint8_t const aIdeenparkBitmap[2][42][6] PROGMEM = + {{{0x00, 0x1f, 0xf0, 0x07, 0xf0, 0x00}, + {0x00, 0x0f, 0xf0, 0x07, 0xf8, 0x00}, + {0x00, 0x3f, 0xf8, 0x1f, 0xf8, 0x00}, + {0x00, 0x1f, 0xf8, 0x0f, 0xfe, 0x00}, + {0x00, 0x7f, 0xf8, 0x3f, 0xfc, 0x00}, + {0x00, 0x7f, 0xfc, 0x1f, 0xff, 0x00}, + {0x00, 0xff, 0xfc, 0x7f, 0xff, 0x00}, + {0x00, 0x3f, 0xff, 0x7f, 0xfe, 0x00}, + {0x00, 0x7f, 0xfe, 0x7f, 0xfe, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xfc, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00}, + {0x00, 0x07, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x0f, 0xff, 0xff, 0xe0, 0x00}, + {0x00, 0x03, 0xff, 0xff, 0xe0, 0x00}, + {0x10, 0x07, 0xff, 0xff, 0xe0, 0x00}, + {0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc}, + {0x1f, 0xff, 0xff, 0xf3, 0xff, 0xfc}, + {0x67, 0x7f, 0xff, 0xc3, 0xff, 0x3c}, + {0x64, 0xb3, 0x9e, 0xc0, 0x9f, 0xb7}, + {0x61, 0x7f, 0xff, 0x48, 0x7f, 0xd6}, + {0xe5, 0xc4, 0x02, 0x0b, 0x24, 0x1f}, + {0xe7, 0x6f, 0x71, 0x0b, 0xe5, 0x1e}, + {0x67, 0xe0, 0x09, 0x0e, 0x03, 0x8f}, + {0x61, 0x5f, 0xb9, 0x8e, 0xe5, 0x24}, + {0x1c, 0x73, 0x9f, 0xff, 0x9f, 0xf8}, + {0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc}, + {0x10, 0x07, 0xff, 0xff, 0xe0, 0x00}, + {0x00, 0x03, 0xff, 0xff, 0xe0, 0x00}, + {0x00, 0x0f, 0xff, 0xff, 0xe0, 0x00}, + {0x00, 0x07, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xfc, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x7f, 0xfe, 0x7f, 0xfe, 0x00}, + {0x00, 0x3f, 0xff, 0x3f, 0xff, 0x00}, + {0x00, 0xff, 0xfc, 0x7f, 0xff, 0x00}, + {0x00, 0x7f, 0xfc, 0x1f, 0xff, 0x00}, + {0x00, 0x7f, 0xf8, 0x3f, 0xfc, 0x00}, + {0x00, 0x1f, 0xf8, 0x0f, 0xfe, 0x00}, + {0x00, 0x3f, 0xf8, 0x0f, 0xf8, 0x00}, + {0x00, 0x0f, 0xe0, 0x07, 0xf8, 0x00}}, + + {{0x00, 0x0f, 0xe0, 0x07, 0xf8, 0x00}, + {0x00, 0x1f, 0xf0, 0x0f, 0xf8, 0x00}, + {0x00, 0x1f, 0xf0, 0x0f, 0xfc, 0x00}, + {0x00, 0x3f, 0xf8, 0x1f, 0xfc, 0x00}, + {0x00, 0x3f, 0xfc, 0x1f, 0xfe, 0x00}, + {0x00, 0x7f, 0xfc, 0x3f, 0xfe, 0x00}, + {0x00, 0x7f, 0xfe, 0x3f, 0xfe, 0x00}, + {0x00, 0x7f, 0xfe, 0x7f, 0xfe, 0x00}, + {0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00}, + {0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x0f, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00}, + {0x00, 0x07, 0xff, 0xff, 0xf0, 0x00}, + {0x00, 0x07, 0xff, 0xff, 0xe0, 0x00}, + {0x0f, 0xff, 0xff, 0xff, 0xff, 0xf8}, + {0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8}, + {0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc}, + {0x2f, 0xbf, 0xff, 0xe1, 0xff, 0xbe}, + {0x6f, 0x3f, 0xff, 0xed, 0xff, 0x3e}, + {0xec, 0x21, 0x08, 0x6d, 0x88, 0x2f}, + {0xe9, 0x29, 0x69, 0x61, 0xc9, 0x8f}, + {0x69, 0x80, 0x0b, 0x67, 0x0b, 0x8f}, + {0x69, 0x0f, 0x7b, 0x6f, 0x69, 0x26}, + {0x2c, 0x21, 0x0b, 0x6f, 0x0b, 0xb6}, + {0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc}, + {0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8}, + {0x0f, 0xff, 0xff, 0xff, 0xff, 0xf8}, + {0x00, 0x07, 0xff, 0xff, 0xe0, 0x00}, + {0x00, 0x07, 0xff, 0xff, 0xf0, 0x00}, + {0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00}, + {0x00, 0x0f, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00}, + {0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00}, + {0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00}, + {0x00, 0x7f, 0xfe, 0x7f, 0xfe, 0x00}, + {0x00, 0x7f, 0xfe, 0x3f, 0xfe, 0x00}, + {0x00, 0x7f, 0xfc, 0x3f, 0xfe, 0x00}, + {0x00, 0x3f, 0xfc, 0x1f, 0xfe, 0x00}, + {0x00, 0x3f, 0xf8, 0x1f, 0xfc, 0x00}, + {0x00, 0x1f, 0xf0, 0x0f, 0xfc, 0x00}, + {0x00, 0x1f, 0xf0, 0x0f, 0xf8, 0x00}}}; + + +static uint8_t logo_Ideenpark_getChunk(unsigned char const nBitPlane, + unsigned char const nChunkX, + unsigned char const nChunkY, + unsigned int const nFrame) +{ + assert(nBitPlane < 2); + assert(nChunkX < 6); + assert(nChunkY < 42); + + return pgm_read_byte(&aIdeenparkBitmap[nBitPlane][nChunkY][nChunkX]); +} + + +void logo_Ideenpark() +{ + // width 48, height 42, 2 bitplanes (4 colors), 600 frames à 50ms (20 fps) + // frame change and viewport movement after every cyle (both dividers are 1) + bitmap_scroll(48, 42, 2, 600, 50, 1, 1, logo_Ideenpark_getChunk); +} diff --git a/animations/ideenpark.h b/animations/ideenpark.h new file mode 100644 index 0000000..ffcb59d --- /dev/null +++ b/animations/ideenpark.h @@ -0,0 +1,6 @@ +#ifndef IDEENPARK_H_ +#define IDEENPARK_H_ + +void logo_Ideenpark(); + +#endif /* IDEENPARK_H_ */ diff --git a/display_loop.c b/display_loop.c index 10e23e4..4549def 100644 --- a/display_loop.c +++ b/display_loop.c @@ -16,6 +16,7 @@ #include "animations/laborlogo.h" #include "animations/outofspec.h" #include "animations/fairydust.h" +#include "animations/ideenpark.h" #include "animations/fpmath_patterns.h" #include "animations/mherweg.h" #include "animations/blackhole.h" @@ -215,20 +216,26 @@ void display_loop(){ break; #endif -#ifdef ANIMATION_PLASMA +#ifdef ANIMATION_IDEENPARK case 21: + logo_Ideenpark(); + break; +#endif + +#ifdef ANIMATION_PLASMA + case 22: plasma(); break; #endif #ifdef ANIMATION_PSYCHEDELIC - case 22: + case 23: psychedelic(); break; #endif #ifdef ANIMATION_BLACKHOLE - case 23: + case 24: blackhole(); break; #endif