cleanup
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "RageDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageSurface_Load.h"
|
||||
#include "BannerCache.h"
|
||||
#include "Sprite.h"
|
||||
#include "PrefsManager.h"
|
||||
@@ -303,7 +304,7 @@ void BannerCache::CacheBanner( CString BannerPath )
|
||||
|
||||
void BannerCache::CacheBannerInternal( CString BannerPath )
|
||||
{
|
||||
SDL_Surface *img = SDL_LoadImage( BannerPath );
|
||||
SDL_Surface *img = RageSurface::LoadFile( BannerPath );
|
||||
if( img == NULL )
|
||||
{
|
||||
LOG->Warn( "BannerCache::CacheBanner: Couldn't load %s: %s", BannerPath.c_str(), SDL_GetError() );
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "SDL_rotozoom.h"
|
||||
#include "SDL_utils.h"
|
||||
#include "SDL_dither.h"
|
||||
#include "RageSurface_Load.h"
|
||||
|
||||
static void GetResolutionFromFileName( CString sPath, int &Width, int &Height )
|
||||
{
|
||||
@@ -70,7 +71,7 @@ void RageBitmapTexture::Create()
|
||||
|
||||
/* Create (and return) a surface ready to be loaded to OpenGL */
|
||||
/* Load the image into an SDL surface. */
|
||||
SDL_Surface *img = SDL_LoadImage( actualID.filename );
|
||||
SDL_Surface *img = RageSurface::LoadFile( actualID.filename );
|
||||
|
||||
/* Tolerate corrupt/unknown images. */
|
||||
if( img == NULL )
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "SDL_image.h"
|
||||
|
||||
SDL_Surface *LoadSurface( const CString &sPath )
|
||||
SDL_Surface *RageSurface::LoadFile( const CString &sPath )
|
||||
{
|
||||
const CString ext = GetExtension( sPath );
|
||||
if( ext.CompareNoCase( "png" ) )
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#ifndef RAGE_SURFACE_LOAD_H
|
||||
#define RAGE_SURFACE_LOAD_H
|
||||
|
||||
#include "SDL_utils.h"
|
||||
|
||||
SDL_Surface *LoadSurface( const CString &sPath );
|
||||
struct SDL_Surface;
|
||||
namespace RageSurface
|
||||
{
|
||||
SDL_Surface *LoadFile( const CString &sPath );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,7 +162,6 @@ static SDL_Surface *RageSurface_Load_PNG( RageFile *f, const char *fn, char erro
|
||||
int num_palette;
|
||||
png_color *palette;
|
||||
int ret = png_get_PLTE( png, info_ptr, &palette, &num_palette );
|
||||
/* XXX: test with a paletted image that has had its palette deleted */
|
||||
ASSERT( ret == PNG_INFO_PLTE );
|
||||
|
||||
png_byte *trans = NULL;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "SDL_utils.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_image.h"
|
||||
#include "SDL_rotozoom.h" // for setting icon
|
||||
#include "RageSurface_Load.h"
|
||||
#include "RageFile.h"
|
||||
#include "RageLog.h"
|
||||
@@ -491,8 +492,6 @@ Uint8 mySDL_EventState( Uint8 type, int state )
|
||||
return ret;
|
||||
}
|
||||
|
||||
#include "SDL_rotozoom.h" // for setting icon
|
||||
|
||||
void mySDL_WM_SetIcon( CString sIconFile )
|
||||
{
|
||||
#if !defined(DARWIN)
|
||||
@@ -502,7 +501,7 @@ void mySDL_WM_SetIcon( CString sIconFile )
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_Surface *srf = SDL_LoadImage(sIconFile);
|
||||
SDL_Surface *srf = RageSurface::LoadFile(sIconFile);
|
||||
if( srf == NULL )
|
||||
return;
|
||||
|
||||
@@ -1093,11 +1092,6 @@ SDL_RWops *OpenRWops( const CString &sPath, bool Write )
|
||||
return rw;
|
||||
}
|
||||
|
||||
SDL_Surface *SDL_LoadImage( const CString &sPath )
|
||||
{
|
||||
return LoadSurface( sPath );
|
||||
}
|
||||
|
||||
struct RWString
|
||||
{
|
||||
CString *buf;
|
||||
|
||||
@@ -82,8 +82,6 @@ void mySDL_FixupPalettedAlpha( SDL_Surface *img );
|
||||
void mySDL_AddColorKey( SDL_Surface *img, Uint32 color );
|
||||
void ApplyHotPinkColorKey( SDL_Surface *&img );
|
||||
|
||||
SDL_Surface *SDL_LoadImage( const CString &sPath );
|
||||
|
||||
SDL_RWops *OpenRWops( const CString &sPath, bool Write=false );
|
||||
SDL_RWops *OpenRWops( CString &sBuf );
|
||||
SDL_Surface *mySDL_MakeDummySurface( int height, int width );
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "IniFile.h"
|
||||
#include "NoteData.h"
|
||||
#include "RageSoundReader_FileReader.h"
|
||||
#include "RageSurface_Load.h"
|
||||
#include "RageException.h"
|
||||
#include "SongManager.h"
|
||||
#include "SongCacheIndex.h"
|
||||
@@ -683,7 +684,7 @@ void Song::TidyUpData()
|
||||
continue; // skip
|
||||
|
||||
CString sPath = m_sSongDir + arrayImages[i];
|
||||
SDL_Surface *img = SDL_LoadImage( sPath );
|
||||
SDL_Surface *img = RageSurface::LoadFile( sPath );
|
||||
if( !img )
|
||||
{
|
||||
LOG->Trace("Couldn't load '%s': %s", sPath.c_str(), SDL_GetError());
|
||||
|
||||
Reference in New Issue
Block a user