From d78b194f099e8ef34a1be9fa51f4ddd77969e5b5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 5 Oct 2005 08:31:46 +0000 Subject: [PATCH] add GetAnimationLengthSeconds --- stepmania/src/Sprite.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index 161c10e22b..c5ced5d4e4 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -963,6 +963,8 @@ public: static int scaletoclipped( T* p, lua_State *L ) { p->ScaleToClipped( FArg(1),FArg(2) ); return 0; } static int stretchtexcoords( T* p, lua_State *L ) { p->StretchTexCoords( FArg(1),FArg(2) ); return 0; } static int setstate( T* p, lua_State *L ) { p->SetState( IArg(1) ); return 0; } + static int GetAnimationLengthSeconds( T* p, lua_State *L ) { lua_pushnumber( L, p->GetAnimationLengthSeconds() ); return 1; } + /* Texture commands; these could be moved to RageTexture* (even though that's * not an Actor) if these are needed for other things that use textures. * We'd need to break the command helpers into a separate function; RageTexture @@ -980,6 +982,7 @@ public: ADD_METHOD( scaletoclipped ); ADD_METHOD( stretchtexcoords ); ADD_METHOD( setstate ); + ADD_METHOD( GetAnimationLengthSeconds ); ADD_METHOD( position ); ADD_METHOD( loop ); ADD_METHOD( rate );