From 5238dc27e33dc814b9ee985fb16490d6b4ec0586 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 19 May 2007 01:02:54 +0000 Subject: [PATCH] don't HasBanner/HasBackground. It accesses the disk. --- stepmania/src/Song.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index a6cc2ef8ba..3ffd23d6c5 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1383,8 +1383,8 @@ public: return 1; } static int GetSongDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongDir() ); return 1; } - static int GetBannerPath( T* p, lua_State *L ) { if( !p->HasBanner() ) lua_pushnil(L); else lua_pushstring(L, p->GetBannerPath()); return 1; } - static int GetBackgroundPath( T* p, lua_State *L ) { if( !p->HasBackground() ) lua_pushnil(L); else lua_pushstring(L, p->GetBackgroundPath()); return 1; } + static int GetBannerPath( T* p, lua_State *L ) { RString s = p->GetBannerPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; } + static int GetBackgroundPath( T* p, lua_State *L ) { RString s = p->GetBackgroundPath(); if( s.empty() ) return 0; lua_pushstring(L, s); return 1; } static int IsTutorial( T* p, lua_State *L ) { lua_pushboolean(L, p->IsTutorial()); return 1; } static int GetGroupName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGroupName); return 1; } static int MusicLengthSeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_fMusicLengthSeconds); return 1; }