[default -> splittiming] Staying caught up.

This commit is contained in:
Jason Felds
2011-05-10 15:53:44 -04:00
6 changed files with 27 additions and 8 deletions
+13 -1
View File
@@ -204,7 +204,8 @@ void BPMDisplay::SetBpmFromCourse( const Course* pCourse )
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
Trail *pTrail = pCourse->GetTrail( st );
ASSERT( pTrail );
// GetTranslitFullTitle because "Crashinfo.txt is garbled because of the ANSI output as usual." -f
ASSERT_M( pTrail, ssprintf("Course '%s' has no trail for StepsType '%s'", pCourse->GetTranslitFullTitle(), StringConversion::ToString(st).c_str() ) );
m_fCycleTime = 0.2f;
@@ -304,12 +305,23 @@ public:
}
return 0;
}
static int SetFromCourse( T* p, lua_State *L )
{
if( lua_isnil(L,1) ) { p->NoBPM(); }
else
{
const Course* pCourse = Luna<Course>::check( L, 1, true );
p->SetBpmFromCourse(pCourse);
}
return 0;
}
static int GetText( T* p, lua_State *L ) { lua_pushstring( L, p->GetText() ); return 1; }
LunaBPMDisplay()
{
ADD_METHOD( SetFromGameState );
ADD_METHOD( SetFromSong );
ADD_METHOD( SetFromCourse );
ADD_METHOD( GetText );
}
};