From ed3dc0841ea376abb20f546344386f5cdffeb81c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 15 Feb 2007 11:28:11 +0000 Subject: [PATCH] bind GetTextureCoordRect --- stepmania/src/RageTexture.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stepmania/src/RageTexture.cpp b/stepmania/src/RageTexture.cpp index aa63cf0446..5342306cc8 100644 --- a/stepmania/src/RageTexture.cpp +++ b/stepmania/src/RageTexture.cpp @@ -76,12 +76,22 @@ public: static int position( T* p, lua_State *L ) { p->SetPosition( FArg(1) ); return 0; } static int loop( T* p, lua_State *L ) { p->SetLooping( BIArg(1) ); return 0; } static int rate( T* p, lua_State *L ) { p->SetPlaybackRate( FArg(1) ); return 0; } + static int GetTextureCoordRect( T* p, lua_State *L ) + { + const RectF *pRect = p->GetTextureCoordRect( IArg(1) ); + lua_pushnumber( L, pRect->left ); + lua_pushnumber( L, pRect->top ); + lua_pushnumber( L, pRect->right ); + lua_pushnumber( L, pRect->bottom ); + return 4; + } LunaRageTexture() { ADD_METHOD( position ); ADD_METHOD( loop ); ADD_METHOD( rate ); + ADD_METHOD( GetTextureCoordRect ); } };