From fa497db8c7fd6af3803019a99dad13ba5dd5e0bd Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 25 Apr 2008 23:33:00 +0000 Subject: Generate transparency mask for the application icon from black parts of the image. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1128 --- src/Makefile.am | 2 +- src/i_video.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 8c69a161..f4565395 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -178,7 +178,7 @@ EXTRA_DIST = \ if HAVE_PYTHON -icon.c : ../data/doom.png +icon.c : ../data/doom.ico ../data/convert-icon $^ $@ endif diff --git a/src/i_video.c b/src/i_video.c index 66b9ccaf..7222d1b0 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -849,6 +849,23 @@ void I_SetWindowCaption(void) void I_SetWindowIcon(void) { SDL_Surface *surface; + Uint8 *mask; + int i; + + // Generate the mask + + mask = malloc(icon_w * icon_h / 8); + memset(mask, 0, icon_w * icon_h / 8); + + for (i=0; i