Function chaining for actors and singletons.

This commit is contained in:
Kyzentun
2014-12-01 22:31:30 -07:00
parent 3b36858cf8
commit 4f95bf08ad
59 changed files with 475 additions and 423 deletions
+15 -15
View File
@@ -1048,7 +1048,7 @@ public:
RageTextureID ID( SArg(1) );
p->Load( ID );
}
return 0;
COMMON_RETURN_SELF;
}
static int LoadBackground( T* p, lua_State *L )
{
@@ -1069,8 +1069,8 @@ public:
/* Commands that go in the tweening queue:
* Commands that take effect immediately (ignoring the tweening queue): */
static int customtexturerect( T* p, lua_State *L ) { p->SetCustomTextureRect( RectF(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
static int SetCustomImageRect( T* p, lua_State *L ) { p->SetCustomImageRect( RectF(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
static int customtexturerect( T* p, lua_State *L ) { p->SetCustomTextureRect( RectF(FArg(1),FArg(2),FArg(3),FArg(4)) ); COMMON_RETURN_SELF; }
static int SetCustomImageRect( T* p, lua_State *L ) { p->SetCustomImageRect( RectF(FArg(1),FArg(2),FArg(3),FArg(4)) ); COMMON_RETURN_SELF; }
static int SetCustomPosCoords( T* p, lua_State *L )
{
float coords[8];
@@ -1083,24 +1083,24 @@ public:
}
}
p->SetCustomPosCoords(coords);
return 0;
COMMON_RETURN_SELF;
}
static int StopUsingCustomPosCoords( T* p, lua_State *L ) { p->StopUsingCustomPosCoords(); return 0; }
static int texcoordvelocity( T* p, lua_State *L ) { p->SetTexCoordVelocity( FArg(1),FArg(2) ); return 0; }
static int scaletoclipped( T* p, lua_State *L ) { p->ScaleToClipped( FArg(1),FArg(2) ); return 0; }
static int CropTo( T* p, lua_State *L ) { p->CropTo( FArg(1),FArg(2) ); return 0; }
static int stretchtexcoords( T* p, lua_State *L ) { p->StretchTexCoords( FArg(1),FArg(2) ); return 0; }
static int addimagecoords( T* p, lua_State *L ) { p->AddImageCoords( FArg(1),FArg(2) ); return 0; }
static int setstate( T* p, lua_State *L ) { p->SetState( IArg(1) ); return 0; }
static int StopUsingCustomPosCoords( T* p, lua_State *L ) { p->StopUsingCustomPosCoords(); COMMON_RETURN_SELF; }
static int texcoordvelocity( T* p, lua_State *L ) { p->SetTexCoordVelocity( FArg(1),FArg(2) ); COMMON_RETURN_SELF; }
static int scaletoclipped( T* p, lua_State *L ) { p->ScaleToClipped( FArg(1),FArg(2) ); COMMON_RETURN_SELF; }
static int CropTo( T* p, lua_State *L ) { p->CropTo( FArg(1),FArg(2) ); COMMON_RETURN_SELF; }
static int stretchtexcoords( T* p, lua_State *L ) { p->StretchTexCoords( FArg(1),FArg(2) ); COMMON_RETURN_SELF; }
static int addimagecoords( T* p, lua_State *L ) { p->AddImageCoords( FArg(1),FArg(2) ); COMMON_RETURN_SELF; }
static int setstate( T* p, lua_State *L ) { p->SetState( IArg(1) ); COMMON_RETURN_SELF; }
static int GetState( T* p, lua_State *L ) { lua_pushnumber( L, p->GetState() ); return 1; }
static int GetAnimationLengthSeconds( T* p, lua_State *L ) { lua_pushnumber( L, p->GetAnimationLengthSeconds() ); return 1; }
static int SetSecondsIntoAnimation( T* p, lua_State *L ) { p->SetSecondsIntoAnimation(FArg(0)); return 0; }
static int SetSecondsIntoAnimation( T* p, lua_State *L ) { p->SetSecondsIntoAnimation(FArg(0)); COMMON_RETURN_SELF; }
static int SetTexture( T* p, lua_State *L )
{
RageTexture *pTexture = Luna<RageTexture>::check(L, 1);
pTexture = TEXTUREMAN->CopyTexture( pTexture );
p->SetTexture( pTexture );
return 0;
COMMON_RETURN_SELF;
}
static int GetTexture( T* p, lua_State *L )
{
@@ -1115,10 +1115,10 @@ public:
{
EffectMode em = Enum::Check<EffectMode>(L, 1);
p->SetEffectMode( em );
return 0;
COMMON_RETURN_SELF;
}
static int GetNumStates( T* p, lua_State *L ) { lua_pushnumber( L, p->GetNumStates() ); return 1; }
static int SetAllStateDelays( T* p, lua_State *L ) { p->SetAllStateDelays(FArg(1)); return 0; }
static int SetAllStateDelays( T* p, lua_State *L ) { p->SetAllStateDelays(FArg(1)); COMMON_RETURN_SELF; }
LunaSprite()
{