diff --git a/stepmania/src/RageSurface_Load.cpp b/stepmania/src/RageSurface_Load.cpp index a658dd1d76..59544ae8d3 100644 --- a/stepmania/src/RageSurface_Load.cpp +++ b/stepmania/src/RageSurface_Load.cpp @@ -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 -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 ) {