From c1b24a67e7887b3ab8b87cc57a1151dc9b0f89f6 Mon Sep 17 00:00:00 2001 From: koolsmoky <> Date: Thu, 25 Nov 2004 19:07:31 +0000 Subject: [PATCH] Prepare for newer splash screens --- glide3x/cvg/glide3/src/gsst.c | 51 ++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/glide3x/cvg/glide3/src/gsst.c b/glide3x/cvg/glide3/src/gsst.c index f79cc28..2e9bbd0 100644 --- a/glide3x/cvg/glide3/src/gsst.c +++ b/glide3x/cvg/glide3/src/gsst.c @@ -19,6 +19,9 @@ ** ** $Header$ ** $Log$ +** Revision 1.1.1.1.8.3 2004/10/08 06:28:35 dborca +** small matters concerning "ActiveWindow" on non-Windows +** ** Revision 1.1.1.1.8.2 2004/02/16 07:42:15 dborca ** grSetNumPendingBuffers visible with grGetProcAddress ** @@ -1505,12 +1508,52 @@ __errSliExit: HMODULE newSplash; if (newSplash = LoadLibrary("3dfxspl3.dll")) { + FxBool didLoad; FARPROC fxSplash; + FARPROC fxSplashInit; + FARPROC fxSplashPlug; + FARPROC fxSplashShutdown; - if (fxSplash = GetProcAddress(newSplash, "_fxSplash@16")) { - fxSplash(hWnd, gc->state.screen_width, gc->state.screen_height, nAuxBuffers); - _GlideRoot.environment.noSplash = 1; - } + fxSplash = GetProcAddress(newSplash, "_fxSplash@20"); + fxSplashInit = GetProcAddress(newSplash, "_fxSplashInit@24"); + fxSplashPlug = GetProcAddress(newSplash, "_fxSplashPlug@16"); + fxSplashShutdown = GetProcAddress(newSplash, "_fxSplashShutdown@0"); + + didLoad = ((fxSplash != NULL) && + (fxSplashInit != NULL) && + (fxSplashPlug != NULL) && + (fxSplashShutdown != NULL)); + + if (0 & didLoad) { + GrState glideState; + + grGlideGetState(&glideState); + { + didLoad = fxSplashInit(hWnd, + gc->state.screen_width, gc->state.screen_height, + nColBuffers, nAuxBuffers, + format); + if (didLoad) { + fxSplash(0.0f, 0.0f, + (float)gc->state.screen_width, + (float)gc->state.screen_height, + 0); + _GlideRoot.environment.noSplash = 1; + } else { + fxSplashShutdown(); + } + } + grGlideSetState((const void*)&glideState); + } + + if (!_GlideRoot.environment.noSplash) { + if (fxSplash = GetProcAddress(newSplash, "_fxSplash@16")) { + fxSplash(hWnd, gc->state.screen_width, gc->state.screen_height, nAuxBuffers); + _GlideRoot.environment.noSplash = 1; + } + } + + FreeLibrary(newSplash); } } #endif /* (GLIDE_PLATFORM & GLIDE_OS_WIN32) */