mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
Remove hard coded paths pass 1
- displaySplashWindow() now takes an optional path to a bitmap file. - Missing, unavailable and warning texture paths now come from GFXTextureManager static methods.
This commit is contained in:
parent
27a81f9c0d
commit
2824bcf649
11 changed files with 67 additions and 17 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "console/console.h"
|
||||
|
|
@ -120,12 +121,20 @@ void CloseSplashWindow(HINSTANCE hinst)
|
|||
|
||||
}
|
||||
|
||||
bool Platform::displaySplashWindow()
|
||||
bool Platform::displaySplashWindow( String path )
|
||||
{
|
||||
if(path.isEmpty())
|
||||
return false;
|
||||
|
||||
gSplashImage = (HBITMAP) ::LoadImage(0, L"art\\gui\\splash.bmp",
|
||||
#ifdef UNICODE
|
||||
const UTF16 *lFileName = path.utf16();
|
||||
#else
|
||||
const UTF8 *lFileName = path.c_str();
|
||||
#endif
|
||||
|
||||
gSplashImage = (HBITMAP) ::LoadImage(0, lFileName,
|
||||
IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
|
||||
|
||||
|
||||
if (!gSplashImage)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue