remove return value; always true and never checked (texture load errors

are handled with warnings and a dummy texture)
This commit is contained in:
Glenn Maynard
2005-10-11 02:15:27 +00:00
parent a736d97aa2
commit a808a49b65
8 changed files with 20 additions and 26 deletions
+9 -11
View File
@@ -103,17 +103,15 @@ RageTextureID Sprite::SongBannerTexture( RageTextureID ID )
}
/* deprecated */
bool Sprite::LoadBG( RageTextureID ID )
void Sprite::LoadBG( RageTextureID ID )
{
return Load( SongBGTexture(ID) );
Load( SongBGTexture(ID) );
}
bool Sprite::Load( RageTextureID ID )
void Sprite::Load( RageTextureID ID )
{
if( ID.filename.empty() )
return true;
else
return LoadFromTexture( ID );
if( !ID.filename.empty() )
LoadFromTexture( ID );
};
void Sprite::LoadFromNode( const CString& sDir, const XNode* pNode )
@@ -937,19 +935,19 @@ public:
static int Load( T* p, lua_State *L )
{
RageTextureID ID( SArg(1) );
lua_pushboolean( L, p->Load(ID) );
return 1;
p->Load( ID );
return 0;
}
static int LoadBackground( T* p, lua_State *L )
{
RageTextureID ID( SArg(1) );
lua_pushboolean( L, p->Load(Sprite::SongBGTexture(ID)) );
p->Load( Sprite::SongBGTexture(ID) );
return 1;
}
static int LoadBanner( T* p, lua_State *L )
{
RageTextureID ID( SArg(1) );
lua_pushboolean( L, p->Load(Sprite::SongBannerTexture(ID)) );
p->Load( Sprite::SongBannerTexture(ID) );
return 1;
}