Splash screen easter egg

This commit is contained in:
2023-11-14 22:41:25 +00:00
parent 9d27635972
commit 648c036337
4 changed files with 14 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

@@ -908,6 +908,7 @@ if(WITH_BLENDER)
# Images.
data_to_c_simple(../../../../release/datafiles/splash.png SRC)
data_to_c_simple(../../../../release/datafiles/splash_alt.png SRC)
data_to_c_simple(../../../../release/datafiles/alert_icons.png SRC)
data_to_c_simple(../../../../release/datafiles/blender_logo.png SRC)
# XXX These are handy, but give nasty "false changes" in svn :/
@@ -41,6 +41,9 @@ extern const char datatoc_blender_logo_png[];
extern int datatoc_splash_png_size;
extern const char datatoc_splash_png[];
extern int datatoc_splash_alt_png_size;
extern const char datatoc_splash_alt_png[];
extern int datatoc_bfont_pfb_size;
extern const char datatoc_bfont_pfb[];
@@ -146,8 +146,18 @@ static ImBuf *wm_block_splash_image(int width, int *r_height)
}
if (ibuf == nullptr) {
bTheme *btheme = UI_GetTheme();
unsigned char* menu_color = btheme->tui.wcol_menu_back.inner;
int sum = menu_color[0] + menu_color[1] + menu_color[2];
const uchar *splash_data = (const uchar *)datatoc_splash_png;
size_t splash_data_size = datatoc_splash_png_size;
if (sum > 380) {
splash_data = (const uchar *)datatoc_splash_alt_png;
splash_data_size = datatoc_splash_alt_png_size;
}
ibuf = IMB_ibImageFromMemory(
splash_data, splash_data_size, IB_rect, nullptr, "<splash screen>");
}