feat(lcd): add compressed GFX idle expression animation
Integrate esp_emote_gfx for idle rendering with symmetric mesh-based blinking and LCD DMA flush synchronization. Store cropped face layers with lossless RLE, decode once into PSRAM, and retain the PNG backend for other expressions. Include source layers and asset generation tools.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* 每个游程四字节:像素数、RGB565 高字节、低字节、透明度。
|
||||
* 解压输出保持 GFX 的 RGB565 色彩平面 + A8 透明度平面布局。 */
|
||||
typedef struct {
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
size_t compressed_size;
|
||||
const uint8_t *data;
|
||||
} lcd_emote_rle_asset_t;
|
||||
|
||||
extern const lcd_emote_rle_asset_t idle_base_rle_asset;
|
||||
extern const lcd_emote_rle_asset_t idle_eyes_open_rle_asset;
|
||||
|
||||
/* 调用方提供至少 pixel_count * 3 字节。拒绝截断、越界或像素数不符的流。 */
|
||||
bool lcd_emote_decode_rle(const uint8_t *src, size_t src_size,
|
||||
uint8_t *dst, size_t pixel_count);
|
||||
Reference in New Issue
Block a user