use RageSurface_Load_BMP

This commit is contained in:
Glenn Maynard
2004-06-14 20:32:15 +00:00
parent 74134ec257
commit b3265ff301
+1 -26
View File
@@ -3,37 +3,12 @@
#include "RageSurface_Load_PNG.h"
#include "RageSurface_Load_JPEG.h"
#include "RageSurface_Load_GIF.h"
#include "RageSurface_Load_BMP.h"
#include "RageUtil.h"
#include "RageFile.h"
#include "RageLog.h"
#include "SDL_utils.h"
#include <set>
static RageSurfaceUtils::OpenResult RageSurface_Load_BMP( const CString &sPath, RageSurface *&ret, bool bHeaderOnly, CString &error )
{
RageFile f;
if( !f.Open(sPath) )
{
error = f.GetError();
return RageSurfaceUtils::OPEN_FATAL_ERROR;
}
SDL_RWops rw;
OpenRWops( &rw, &f );
SDL_Surface *pSDLSurface = SDL_LoadBMP_RW( &rw, false );
SDL_RWclose( &rw );
if( pSDLSurface == NULL )
{
error = SDL_GetError();
return RageSurfaceUtils::OPEN_UNKNOWN_FILE_FORMAT;
}
ret = RageSurfaceFromSDLSurface( pSDLSurface );
return RageSurfaceUtils::OPEN_OK;
}
static RageSurface *TryOpenFile( CString sPath, bool bHeaderOnly, CString &error, CString format, bool &bKeepTrying )
{