diff --git a/radio/src/bitmaps/480x272/CMakeLists.txt b/radio/src/bitmaps/480x272/CMakeLists.txt index a9cc0fcd1..9432649ad 100644 --- a/radio/src/bitmaps/480x272/CMakeLists.txt +++ b/radio/src/bitmaps/480x272/CMakeLists.txt @@ -16,7 +16,9 @@ set(MASK_RLE_ARGS ${MASK_ARGS} --rle) set(BITMAP_LZ4_ARGS ${BITMAP_ARGS} --lz4) set(MASK_LZ4_ARGS ${MASK_ARGS} --lz4) -add_bitmaps_target(${BITMAP_TARGET_PREFIX}_splash "${RADIO_SRC_DIR}/bitmaps/480x272/splash.png" "5/6/5" "${BITMAP_LZ4_ARGS}") +add_bitmaps_target(${BITMAP_TARGET_PREFIX}_splash_logo "${RADIO_SRC_DIR}/bitmaps/480x272/splash_logo.png" "4/4/4/4" "${BITMAP_LZ4_ARGS}") +add_bitmaps_target(${BITMAP_TARGET_PREFIX}_splash_bg "${RADIO_SRC_DIR}/bitmaps/480x272/splash_bg.png" "4/4/4/4" "${BITMAP_LZ4_ARGS}") +add_bitmaps_target(${BITMAP_TARGET_PREFIX}_splash_bg2 "${RADIO_SRC_DIR}/bitmaps/480x272/splash_bg2.png" "4/4/4/4" "${BITMAP_LZ4_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_button_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/button/alpha_*.png" "4/4/4/4" "${BITMAP_LZ4_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_masks "${RADIO_SRC_DIR}/bitmaps/480x272/mask_*.png" 8bits "${MASK_LZ4_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_slider_masks "${RADIO_SRC_DIR}/bitmaps/480x272/slider/*.png" 8bits "${MASK_LZ4_ARGS}") @@ -30,7 +32,9 @@ add_bitmaps_target(${BITMAP_TARGET_PREFIX}_bootloader_icons "${RADIO_SRC_DIR}/bi add_custom_target(${BITMAP_TARGET_PREFIX}_bitmaps) add_dependencies(${BITMAP_TARGET_PREFIX}_bitmaps - ${BITMAP_TARGET_PREFIX}_splash + ${BITMAP_TARGET_PREFIX}_splash_logo + ${BITMAP_TARGET_PREFIX}_splash_bg + ${BITMAP_TARGET_PREFIX}_splash_bg2 ${BITMAP_TARGET_PREFIX}_button_bitmaps ${BITMAP_TARGET_PREFIX}_masks ${BITMAP_TARGET_PREFIX}_slider_masks diff --git a/radio/src/bitmaps/480x272/mask_splash_bg.png b/radio/src/bitmaps/480x272/mask_splash_bg.png new file mode 100644 index 000000000..57d54f08a Binary files /dev/null and b/radio/src/bitmaps/480x272/mask_splash_bg.png differ diff --git a/radio/src/bitmaps/480x272/splash_bg.png b/radio/src/bitmaps/480x272/splash_bg.png new file mode 100644 index 000000000..b2b1a4840 Binary files /dev/null and b/radio/src/bitmaps/480x272/splash_bg.png differ diff --git a/radio/src/bitmaps/480x272/splash_bg2.png b/radio/src/bitmaps/480x272/splash_bg2.png new file mode 100644 index 000000000..8d2f19abf Binary files /dev/null and b/radio/src/bitmaps/480x272/splash_bg2.png differ diff --git a/radio/src/bitmaps/480x272/big_logo.png b/radio/src/bitmaps/480x272/splash_logo.png similarity index 100% rename from radio/src/bitmaps/480x272/big_logo.png rename to radio/src/bitmaps/480x272/splash_logo.png diff --git a/radio/src/gui/colorlcd/splash.cpp b/radio/src/gui/colorlcd/splash.cpp index 8bc17087b..64ec63a73 100644 --- a/radio/src/gui/colorlcd/splash.cpp +++ b/radio/src/gui/colorlcd/splash.cpp @@ -23,10 +23,22 @@ #if defined(SPLASH) -const uint8_t __bmp_splash[] { -#include "splash.lbm" +const uint8_t __bmp_splash_bg[] { +#include "splash_bg.lbm" }; +//const uint8_t __bmp_splash_bg2[] { +//#include "splash_bg2.lbm" +//}; + +const uint8_t __bmp_splash_logo[] { +#include "splash_logo.lbm" +}; + +//static const uint8_t mask_splash_bg[] = { +//#include "mask_splash_bg.lbm" +//}; + void draw_splash_cb(lv_event_t * e) { auto draw_ctx = lv_event_get_draw_ctx(e); @@ -63,7 +75,17 @@ void drawSplash() loadSplashImg = false; if (splashImg == nullptr) { - splashImg = new LZ4Bitmap(BMP_RGB565, __bmp_splash); + splashImg = new BitmapBuffer(BMP_RGB565, LCD_W, LCD_H); + BitmapBuffer* splashBg = new LZ4Bitmap(BMP_ARGB4444, __bmp_splash_bg); + BitmapBuffer* splashLogo = new LZ4Bitmap(BMP_ARGB4444, __bmp_splash_logo); + for (int i=0; iwidth()) { + for (int j=0; jheight()) { + splashImg->drawBitmap(i, j, splashBg); + } + } + splashImg->drawBitmap((LCD_W/2) - (splashLogo->width()/2), + (LCD_H/2) - (splashLogo->height()/2), + splashLogo); } splashScreen = window_create(nullptr);