splash screen patches (from <Someone>)

- Show splash on "Help - About" with all version information
- Show splash with news on startup (if show_splash is on of course).
I made another small patch to the splash screen. Because the greenish background colour always seemed a little odd to me, I decided
to make it transparent. Doing that, I found the following:
- The splash picture was a 24-bit bitmap, although it had less than 256 colours. That makes the size of the final executable about
200K larger than necessary. I changed it to a 256-colour bitmap. I also changed the background colour to the default tile background
colour, for consistency. The new bitmap is attached here. My excuses if the large file means a problem to anyone.
- In Microsoft's documentation (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_2y9g.asp) is is
stated that on Windows 95/98 "TransparentBlt contains a memory leak that can exhaust system resources." It is recommended to use
different code to draw transparent bitmaps, to be precise: the alternative code that is already in nhapply_image_transparent(). I'm
almost convinced that this is the cause for Betabug B08008 reported bij <Someone>. Can anyone confirm he is using 95/98? I decided
for the easy way out and removed the code that uses TransparentBlt completely. I see not much reason to use it if it is a) buggy and
b) we have an alternative that works perfectly. This is attached as trans.patch.
- The rest of the patch only changes the BitBlt() in mhsplash.c to a nhapply_image_transparent().
This commit is contained in:
nethack.allison
2002-11-03 15:26:41 +00:00
parent 2b31ea2c96
commit 04f845f87b
8 changed files with 2465 additions and 7077 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ typedef struct mswin_nethack_main_window {
static TCHAR szMainWindowClass[] = TEXT("MSNHMainWndClass");
static TCHAR szTitle[MAX_LOADSTRING];
extern void mswin_display_splash_window(void);
extern void mswin_display_splash_window(BOOL);
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
@@ -702,7 +702,7 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
switch (wmId)
{
case IDM_ABOUT:
mswin_display_splash_window();
mswin_display_splash_window(TRUE);
break;
case IDM_EXIT: