This commit is contained in:
Glenn Maynard
2005-10-29 21:08:37 +00:00
parent f3d55ef26e
commit 7c42b794ea
@@ -12,16 +12,10 @@
static HBITMAP g_hBitmap = NULL;
/* Load a file into a GDI surface. */
HBITMAP LoadWin32Surface( CString fn )
/* Load a RageSurface into a GDI surface. */
static HBITMAP LoadWin32Surface( RageSurface *s )
{
CString error;
RageSurface *s = RageSurfaceUtils::LoadFile( fn, error );
if( s == NULL )
return NULL;
RageSurfaceUtils::ConvertSurface( s, s->w, s->h, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0 );
HBITMAP bitmap = CreateCompatibleBitmap( GetDC(NULL), s->w, s->h );
ASSERT( bitmap );
@@ -47,6 +41,18 @@ HBITMAP LoadWin32Surface( CString fn )
return bitmap;
}
static HBITMAP LoadWin32Surface( CString sFile )
{
CString error;
RageSurface *pSurface = RageSurfaceUtils::LoadFile( sFile, error );
if( pSurface == NULL )
return NULL;
HBITMAP ret = LoadWin32Surface( pSurface );
delete pSurface;
return ret;
}
BOOL CALLBACK LoadingWindow_Win32::WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
switch( msg )