Add four animated KonoSuba ESPHome pages

Megumin's daily explosion, the Adventurers' Guild quest board (agenda,
weather, solar), Megumin's adventurer card and a party battle against a
giant toad with a live-data battle log. Original 1-bit pixel art lives in
tools/konosuba_sprites.py, which generates konosuba_sprites.h and can
render a preview PNG.

Home data and drawing helpers shared by the themed pages move to
el512_pages.h; the display gains dither_mask() for a dissolve-in intro.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-18 23:46:24 +02:00
1 parent 50ee17b3f6
commit e9b91c5628
11 files changed
+1655 -61

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
// KonoSuba-themed animated pages for the ESPHome display: Megumin's daily
// explosion, the Adventurers' Guild quest board, Megumin's adventurer card and
// a party battle against a giant toad. Fan art: the pixel art
// (konosuba_sprites.h, from tools/konosuba_sprites.py) and all texts are
// original; no material from the series is used.
//
// Each function draws a whole page. Call it from a page lambda and list that
// page under animated_pages; the animation clock is the display's page_age_ms().
#pragma once
#include "el512_pages.h"
#include "esphome/components/display/display.h"
#include "esphome/core/time.h"
namespace esphome::el512 {
class EL512Display;
namespace konosuba {
struct Fonts {
display::BaseFont *title{nullptr}; // fantasy serif headers (Cinzel)
display::BaseFont *big{nullptr}; // "EXPLOSION!" (Cinzel Decorative)
display::BaseFont *text{nullptr}; // rounded body text (Nunito)
display::BaseFont *pixel{nullptr}; // 8 px pixel font (Press Start 2P)
display::BaseFont *pixel_l{nullptr}; // 16 px pixel font
display::BaseFont *jp{nullptr}; // a few Japanese words (Noto Sans JP)
display::BaseFont *jp_big{nullptr}; // 爆裂魔法 (Dela Gothic One)
display::BaseFont *weather{nullptr}; // weather icons (Material Design Icons)
};
void explosion(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
void guild_board(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
void adventurer_card(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
void party_battle(EL512Display &it, const Fonts &f, const HomeData &d);
// Explosions cast on the Explosion page since midnight.
uint32_t explosions_today();
} // namespace konosuba
} // namespace esphome::el512