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:
DavidWyand-GG 2013-01-30 14:09:22 -05:00
parent 27a81f9c0d
commit 2824bcf649
11 changed files with 67 additions and 17 deletions

View file

@ -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;