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:
@@ -117,7 +117,7 @@ END
|
||||
IDD_NHTEXT DIALOGEX 0, 0, 172, 178
|
||||
STYLE DS_SETFOREGROUND | WS_CHILD | WS_THICKFRAME
|
||||
EXSTYLE WS_EX_STATICEDGE
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,54,163,50,14
|
||||
EDITTEXT IDC_TEXT_CONTROL,0,0,170,160,ES_MULTILINE |
|
||||
@@ -127,7 +127,7 @@ END
|
||||
IDD_MENU DIALOGEX 0, 0, 187, 153
|
||||
STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_THICKFRAME
|
||||
EXSTYLE WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT | WS_EX_STATICEDGE
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,7,132,50,14,BS_FLAT
|
||||
PUSHBUTTON "Cancel",IDCANCEL,130,132,50,14,BS_FLAT
|
||||
@@ -192,17 +192,19 @@ END
|
||||
IDD_NHRIP DIALOGEX 0, 0, 281, 209
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Here lies..."
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,82,188,50,14
|
||||
END
|
||||
|
||||
IDD_SPLASH DIALOGEX 0, 0, 281, 209
|
||||
IDD_SPLASH DIALOG DISCARDABLE 0, 0, 281, 257
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Welcome to NetHack"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,82,188,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,224,236,50,14
|
||||
EDITTEXT IDC_EXTRAINFO,7,191,267,37,ES_MULTILINE | ES_READONLY |
|
||||
WS_VSCROLL
|
||||
END
|
||||
|
||||
|
||||
@@ -300,6 +302,13 @@ BEGIN
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 202
|
||||
END
|
||||
|
||||
IDD_SPLASH, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 274
|
||||
BOTTOMMARGIN, 250
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user