Added AdvSplash plugin and remove UberSplash. NSIS installer updated.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1283 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8653a3358d
commit
ac5eb0f61a
11 changed files with 549 additions and 302 deletions
332
Contrib/AdvSplash/advsplash.c
Normal file
332
Contrib/AdvSplash/advsplash.c
Normal file
|
@ -0,0 +1,332 @@
|
|||
// For layered windows
|
||||
#define _WIN32_WINNT 0x0500
|
||||
|
||||
#include <windows.h>
|
||||
#include "../exdll/exdll.h"
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
#define RESOLUTION 20 // 50 fps ;)
|
||||
#define KEYCOLOR_8BIT_RGBSUPPORT 1 // Includes (1) code for
|
||||
// specifing key color for 8bit images as RGB
|
||||
|
||||
BITMAP bm;
|
||||
HBITMAP g_hbm;
|
||||
int g_rv=-1;
|
||||
int resolution = RESOLUTION;
|
||||
int sleep_val, fadein_val, fadeout_val, state, timeleft, keycolor, nt50, alphaparam;
|
||||
int call = -1;
|
||||
|
||||
BOOL (_stdcall *SetLayeredWindowAttributesProc)(HWND hwnd, // handle to the layered window
|
||||
COLORREF crKey, // specifies the color key
|
||||
BYTE bAlpha, // value for the blend function
|
||||
DWORD dwFlags // action
|
||||
);
|
||||
|
||||
static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (uMsg == WM_CREATE)
|
||||
{
|
||||
RECT vp;
|
||||
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &vp, 0);
|
||||
SetWindowLong(hwnd,GWL_STYLE,0);
|
||||
SetWindowPos(hwnd,NULL,
|
||||
vp.left+(vp.right-vp.left-bm.bmWidth)/2,
|
||||
vp.top+(vp.bottom-vp.top-bm.bmHeight)/2,
|
||||
bm.bmWidth,bm.bmHeight,
|
||||
SWP_NOZORDER);
|
||||
ShowWindow(hwnd,SW_SHOW);
|
||||
|
||||
return 0;
|
||||
}
|
||||
if (uMsg == WM_PAINT)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
RECT r;
|
||||
|
||||
HDC curdc=BeginPaint(hwnd,&ps);
|
||||
HDC hdc=CreateCompatibleDC(curdc);
|
||||
HBITMAP oldbm;
|
||||
oldbm=(HBITMAP)SelectObject(hdc,g_hbm);
|
||||
GetClientRect(hwnd,&r);
|
||||
|
||||
BitBlt(curdc,r.left,r.top,r.right-r.left,r.bottom-r.top,hdc,0,0,SRCCOPY);
|
||||
|
||||
SelectObject(hdc,oldbm);
|
||||
DeleteDC(hdc);
|
||||
EndPaint(hwnd,&ps);
|
||||
return 0;
|
||||
}
|
||||
if (uMsg == WM_CLOSE) return 0;
|
||||
if (uMsg == WM_TIMER || uMsg == WM_LBUTTONDOWN)
|
||||
{
|
||||
g_rv=(uMsg == WM_LBUTTONDOWN);
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
return DefWindowProc(hwnd,uMsg,wParam,lParam);
|
||||
}
|
||||
|
||||
BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
g_hInstance=hInst;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int myatoi(char *s)
|
||||
{
|
||||
unsigned int v=0;
|
||||
if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
|
||||
{
|
||||
s+=2;
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++;
|
||||
if (c >= '0' && c <= '9') c-='0';
|
||||
else if (c >= 'a' && c <= 'f') c-='a'-10;
|
||||
else if (c >= 'A' && c <= 'F') c-='A'-10;
|
||||
else break;
|
||||
v<<=4;
|
||||
v+=c;
|
||||
}
|
||||
}
|
||||
else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
|
||||
{
|
||||
s++;
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++;
|
||||
if (c >= '0' && c <= '7') c-='0';
|
||||
else break;
|
||||
v<<=3;
|
||||
v+=c;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int sign=0;
|
||||
if (*s == '-') { s++; sign++; }
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++ - '0';
|
||||
if (c < 0 || c > 9) break;
|
||||
v*=10;
|
||||
v+=c;
|
||||
}
|
||||
if (sign) return -(int) v;
|
||||
}
|
||||
return (int)v;
|
||||
}
|
||||
|
||||
void CALLBACK TimeProc(
|
||||
UINT uID,
|
||||
UINT uMsg,
|
||||
DWORD dwUser,
|
||||
DWORD dw1,
|
||||
DWORD dw2)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
// FadeIN
|
||||
case 0: if (timeleft == 0)
|
||||
{
|
||||
timeleft = sleep_val;
|
||||
state++;
|
||||
if (nt50) call = 255;
|
||||
} else { call = ((fadein_val-timeleft)*255)/fadein_val; break; }
|
||||
// Sleep
|
||||
case 1: if (timeleft == 0)
|
||||
{
|
||||
timeleft = fadeout_val;
|
||||
state++;
|
||||
} else break;
|
||||
// FadeOUT
|
||||
case 2: if (timeleft == 0)
|
||||
{
|
||||
PostMessage((HWND)dwUser, WM_TIMER, 0, 0);
|
||||
return;
|
||||
} else { call = ((timeleft)*255)/fadeout_val; break; }
|
||||
}
|
||||
// Transparency value aquired, and could be set...
|
||||
if ((call >= 0) && nt50)
|
||||
SetLayeredWindowAttributesProc((HWND)dwUser, keycolor,
|
||||
call,
|
||||
alphaparam);
|
||||
call = -1;
|
||||
// Time is running out...
|
||||
timeleft--;
|
||||
}
|
||||
|
||||
void __declspec(dllexport) show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
|
||||
{
|
||||
char fn[MAX_PATH];
|
||||
char temp[64];
|
||||
char *sleep=temp;
|
||||
|
||||
EXDLL_INIT();
|
||||
|
||||
popstring(temp);
|
||||
sleep_val = myatoi(temp) / RESOLUTION;
|
||||
popstring(temp);
|
||||
fadein_val = myatoi(temp) / RESOLUTION;
|
||||
popstring(temp);
|
||||
fadeout_val = myatoi(temp) / RESOLUTION;
|
||||
popstring(temp);
|
||||
keycolor = myatoi(temp);
|
||||
popstring(fn);
|
||||
|
||||
// Check for winXP/2k
|
||||
nt50 = (LOBYTE(LOWORD(GetVersion())) >= 5);
|
||||
if (!nt50)
|
||||
{
|
||||
// Fading is unsupported at old windows versions...
|
||||
resolution = (sleep_val + fadein_val + fadeout_val) * RESOLUTION;
|
||||
fadeout_val = fadein_val = 0;
|
||||
sleep_val = 1;
|
||||
} else alphaparam = LWA_ALPHA | ((keycolor == -1)?(0):(LWA_COLORKEY));
|
||||
|
||||
if (fn[0] && sleep_val>0)
|
||||
{
|
||||
MSG msg;
|
||||
char classname[4]="_sp";
|
||||
static WNDCLASS wc;
|
||||
wc.lpfnWndProc = WndProc;
|
||||
wc.hInstance = g_hInstance;
|
||||
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
|
||||
wc.lpszClassName = classname;
|
||||
if (RegisterClass(&wc))
|
||||
{
|
||||
char fn2[MAX_PATH];
|
||||
lstrcpy(fn2,fn);
|
||||
lstrcat(fn,".bmp");
|
||||
lstrcat(fn2,".wav");
|
||||
g_hbm=LoadImage(NULL,fn,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE);
|
||||
if (g_hbm)
|
||||
{
|
||||
HWND myWnd;
|
||||
UINT timerEvent;
|
||||
|
||||
PlaySound(fn2,NULL,SND_ASYNC|SND_FILENAME|SND_NODEFAULT);
|
||||
|
||||
// Get Bitmap Information
|
||||
GetObject(g_hbm, sizeof(bm), (LPSTR)&bm);
|
||||
|
||||
myWnd = CreateWindowEx(WS_EX_TOOLWINDOW | ((nt50)?(WS_EX_LAYERED):(0)),classname,classname,
|
||||
0,0,0,0,0,(HWND)hwndParent,NULL,g_hInstance,NULL);
|
||||
|
||||
// Set transparency / key color
|
||||
if (nt50)
|
||||
{
|
||||
// Get blending proc address
|
||||
HANDLE user32 = GetModuleHandle("user32");
|
||||
SetLayeredWindowAttributesProc = GetProcAddress(user32, "SetLayeredWindowAttributes");
|
||||
// Use win2k method
|
||||
SetLayeredWindowAttributesProc(myWnd, keycolor,
|
||||
(fadein_val > 0)?(0):(255),
|
||||
alphaparam);
|
||||
} else
|
||||
if (keycolor != -1)
|
||||
{
|
||||
// Use simpliest region method
|
||||
int x, y, wdelta;
|
||||
HRGN region, cutrgn;
|
||||
BYTE *bmp = bm.bmBits;
|
||||
|
||||
region = CreateRectRgn(0,0,bm.bmWidth,bm.bmHeight);
|
||||
//region = CreateRectRgn(0,0,0,0);
|
||||
|
||||
if (bm.bmBitsPixel == 8)
|
||||
{
|
||||
#if (KEYCOLOR_8BIT_RGBSUPPORT == 1)
|
||||
HDC hMemDC;
|
||||
HBITMAP hOldBitmap;
|
||||
int rgb[256];
|
||||
int nColors;
|
||||
|
||||
// Find out how many colors are in the color table
|
||||
nColors = 1 << bm.bmBitsPixel;
|
||||
// Create a memory DC and select the DIBSection into it
|
||||
hMemDC = CreateCompatibleDC(NULL);
|
||||
hOldBitmap = SelectObject(hMemDC,g_hbm);
|
||||
// Get the DIBSection's color table
|
||||
GetDIBColorTable(hMemDC,0,nColors,(RGBQUAD*)rgb);
|
||||
|
||||
// Find our keycolor at palette
|
||||
if (keycolor < 0x1000000)
|
||||
{
|
||||
for (x = 0; x < nColors; x++)
|
||||
if (rgb[x] == keycolor) { keycolor = x; break; }
|
||||
} else keycolor &= 0xff;
|
||||
|
||||
// Free used objects
|
||||
SelectObject(hMemDC,hOldBitmap);
|
||||
DeleteDC(hMemDC);
|
||||
#endif
|
||||
|
||||
// Bitmap is DWORD aligned by width
|
||||
//wdelta = (( bm.bmWidth + 3 ) & ~3) - bm.bmWidth;
|
||||
wdelta = ((bm.bmWidth + 3) & 3) ^ 3;
|
||||
// Search for transparent pixels
|
||||
for (y = bm.bmHeight-1; y >= 0; y--, bmp += wdelta)
|
||||
for (x = 0; x < bm.bmWidth; x++, bmp++)
|
||||
if (*bmp == (BYTE) keycolor)
|
||||
{
|
||||
int j = x;
|
||||
while ((x < bm.bmWidth) && (*bmp == (BYTE) keycolor)) x++, bmp++;
|
||||
|
||||
// Cut transparent pixels from the original region
|
||||
cutrgn = CreateRectRgn(j, y, x, y+1);
|
||||
CombineRgn(region, region, cutrgn, RGN_XOR);
|
||||
DeleteObject(cutrgn);
|
||||
}
|
||||
} else if (bm.bmBitsPixel == 24)
|
||||
{
|
||||
// Bitmap is DWORD aligned by width
|
||||
wdelta = ((bm.bmWidth*3 + 3 ) & 3) ^ 3;
|
||||
// Search for transparent pixels
|
||||
for (y = bm.bmHeight-1; y >= 0; y--, bmp += wdelta)
|
||||
for (x = 0; x < bm.bmWidth; bmp += 3, x++)
|
||||
if ((*(int*)bmp & 0xFFFFFF) == keycolor)
|
||||
{
|
||||
int j = x;
|
||||
while ((x < bm.bmWidth) && ((*(int*)bmp & 0xFFFFFF) == keycolor)) bmp+=3, x++;
|
||||
|
||||
// Cut transparent pixels from the original region
|
||||
cutrgn = CreateRectRgn(j, y, x, y+1);
|
||||
CombineRgn(region, region, cutrgn, RGN_XOR);
|
||||
DeleteObject(cutrgn);
|
||||
}
|
||||
}
|
||||
|
||||
// Set resulting region.
|
||||
SetWindowRgn(myWnd, region, TRUE);
|
||||
}
|
||||
|
||||
// Start up timer...
|
||||
state = 0; timeleft = fadein_val;
|
||||
timerEvent = timeSetEvent(resolution, RESOLUTION/4, TimeProc, (DWORD_PTR)myWnd, TIME_PERIODIC);
|
||||
|
||||
while (IsWindow(myWnd) && GetMessage(&msg,myWnd,0,0))
|
||||
{
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
// Kill the timer...
|
||||
timeKillEvent(timerEvent);
|
||||
|
||||
// Stop currently playing wave, we want to exit
|
||||
PlaySound(0,0,0);
|
||||
|
||||
DeleteObject(g_hbm);
|
||||
}
|
||||
}
|
||||
}
|
||||
wsprintf(temp,"%d",g_rv);
|
||||
pushstring(temp);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void main()
|
||||
{
|
||||
}
|
||||
#endif
|
114
Contrib/AdvSplash/advsplash.dsp
Normal file
114
Contrib/AdvSplash/advsplash.dsp
Normal file
|
@ -0,0 +1,114 @@
|
|||
# Microsoft Developer Studio Project File - Name="advsplash" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=advsplash - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "advsplash.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "advsplash.mak" CFG="advsplash - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "advsplash - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "advsplash - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "advsplash - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /Og /Os /Oy /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
|
||||
# SUBTRACT CPP /Ox /Ow /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /entry:"_DllMainCRTStartup" /subsystem:windows /dll /machine:I386 /nodefaultlib /out:"../../Plugins/advsplash.dll" /opt:nowin98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "advsplash - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "advsplash - Win32 Release"
|
||||
# Name "advsplash - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\advsplash.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ExDLL\exdll.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
29
Contrib/AdvSplash/advsplash.dsw
Normal file
29
Contrib/AdvSplash/advsplash.dsw
Normal file
|
@ -0,0 +1,29 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "advsplash"=.\advsplash.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
58
Contrib/AdvSplash/advsplash.txt
Normal file
58
Contrib/AdvSplash/advsplash.txt
Normal file
|
@ -0,0 +1,58 @@
|
|||
AdvSplash.exe - small (5.5k), simple plugin that lets you throw
|
||||
up a splash screen in NSIS installers with cool fading effects (win2k/xp)
|
||||
and transparency (24bit/8bit bitmaps).
|
||||
|
||||
To use:
|
||||
|
||||
Create a .BMP file of your splash screen.
|
||||
(optional) Create a .WAV file to play while your splash screen shows.
|
||||
|
||||
Add the following lines to your .NSI file:
|
||||
|
||||
Function .onInit
|
||||
SetOutPath $TEMP
|
||||
File /oname=spltmp.bmp "my_splash.bmp"
|
||||
|
||||
; optional
|
||||
; File /oname=spltmp.wav "my_splashshit.wav"
|
||||
|
||||
advsplash::show 1000 600 400 -1 $TEMP\spltmp
|
||||
|
||||
Pop $0 ; $0 has '1' if the user closed the splash screen early,
|
||||
; '0' if everything closed normal, and '-1' if some error occured.
|
||||
|
||||
Delete $TEMP\spltmp.bmp
|
||||
; Delete $TEMP\spltmp.wav
|
||||
FunctionEnd
|
||||
|
||||
Calling format
|
||||
advsplash::show Delay FadeIn FadeOut KeyColor FileName
|
||||
|
||||
Delay - length to show the screen for (in milliseconds)
|
||||
FadeIn - length to show the fadein scene (in ms) (not included in Delay)
|
||||
FadeOut - length to show the fadeout scene (in ms) (not included in Delay)
|
||||
KeyColor - color used for transparency. For 24 bit bitmaps could be any RGB
|
||||
value (for ex. R=255 G=100 B=16 -> KeyColor=0xFF6410), for 8 bit bitmaps
|
||||
could be either RGB value or index of the color at bitmap palette
|
||||
(if such RGB color present in your image and you'd like to use palette
|
||||
index, use (0x1000000+index) as KeyColor [you should calculate
|
||||
this value by yourself]). Use KeyColor=-1 if there is now transparent
|
||||
color at your image.
|
||||
FileName - splash bitmap filename (without the .bmp). The BMP file used will be
|
||||
this parameter.bmp, and the wave file used (if present) will be this
|
||||
parameter.wav.
|
||||
|
||||
(If you already have an .onInit function, put that in it)
|
||||
|
||||
Note 1: fadein/fadeout supported only on win2k/winxp systems, all other systems
|
||||
will show simple splash screen with Delay = Delay + FadeIn + FadeOut.
|
||||
|
||||
Note 2: transparency supported only for 24bit and 8bit bitmaps.
|
||||
|
||||
Note 3: the return value of splash is 1 if the user closed the splash
|
||||
screen early (pop it from the stack)
|
||||
|
||||
-Justin
|
||||
Converted to a plugin DLL by Amir Szekely (kichik)
|
||||
Fading and transparency by Nik Medved (brainsucker)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue