cleanpu
This commit is contained in:
+70
-72
@@ -205,9 +205,9 @@ void Actor::LoadFromNode( const CString& sDir, const XNode* pNode )
|
||||
bool bOptional = false;
|
||||
pChild->GetAttrValue( "Optional", bOptional );
|
||||
|
||||
Lua *L = LUA->Get();
|
||||
this->PushSelf( L );
|
||||
LuaHelpers::Push( sName, L );
|
||||
Lua *L = LUA->Get();
|
||||
this->PushSelf( L );
|
||||
LuaHelpers::Push( sName, L );
|
||||
ActorUtil::GetParam( L, sName );
|
||||
|
||||
if( lua_isnil(L, -1) && !bOptional )
|
||||
@@ -336,8 +336,6 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
m_pTempState = &tempState;
|
||||
tempState = m_current;
|
||||
|
||||
/*
|
||||
*/
|
||||
const float fTotalPeriod = GetEffectPeriod();
|
||||
ASSERT( fTotalPeriod > 0 );
|
||||
const float fTimeIntoEffect = fmodfp( m_fSecsIntoEffect+m_fEffectOffset, fTotalPeriod );
|
||||
@@ -627,9 +625,9 @@ void Actor::UpdateTweening( float fDeltaTime )
|
||||
float fPercentAlongPath = 0.f;
|
||||
switch( TI.m_TweenType )
|
||||
{
|
||||
case TWEEN_LINEAR: fPercentAlongPath = fPercentThroughTween; break;
|
||||
case TWEEN_ACCELERATE: fPercentAlongPath = fPercentThroughTween * fPercentThroughTween; break;
|
||||
case TWEEN_DECELERATE: fPercentAlongPath = 1 - (1-fPercentThroughTween) * (1-fPercentThroughTween); break;
|
||||
case TWEEN_LINEAR: fPercentAlongPath = fPercentThroughTween; break;
|
||||
case TWEEN_ACCELERATE: fPercentAlongPath = fPercentThroughTween * fPercentThroughTween; break;
|
||||
case TWEEN_DECELERATE: fPercentAlongPath = 1 - (1-fPercentThroughTween) * (1-fPercentThroughTween); break;
|
||||
case TWEEN_SMOOTH:
|
||||
{
|
||||
/* Accelerate, reaching full speed at fShift, then decelerate the rest of
|
||||
@@ -651,9 +649,9 @@ void Actor::UpdateTweening( float fDeltaTime )
|
||||
break;
|
||||
}
|
||||
|
||||
case TWEEN_BOUNCE_BEGIN:fPercentAlongPath = 1 - RageFastSin( 1.1f + fPercentThroughTween*(PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_BOUNCE_END: fPercentAlongPath = RageFastSin( 1.1f + (1-fPercentThroughTween)*(PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_SPRING: fPercentAlongPath = 1 - RageFastCos( fPercentThroughTween*PI*2.5f )/(1+fPercentThroughTween*3); break;
|
||||
case TWEEN_BOUNCE_BEGIN:fPercentAlongPath = 1 - RageFastSin( 1.1f + fPercentThroughTween*(PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_BOUNCE_END: fPercentAlongPath = RageFastSin( 1.1f + (1-fPercentThroughTween)*(PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_SPRING: fPercentAlongPath = 1 - RageFastCos( fPercentThroughTween*PI*2.5f )/(1+fPercentThroughTween*3); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
@@ -841,7 +839,7 @@ void Actor::ScaleTo( const RectF &rect, StretchType st )
|
||||
|
||||
void Actor::SetHorizAlignString( const CString &s )
|
||||
{
|
||||
if (s.CompareNoCase("left")==0) this->SetHorizAlign( align_left ); /* call derived */
|
||||
if (s.CompareNoCase("left")==0) this->SetHorizAlign( align_left ); /* call derived */
|
||||
else if(s.CompareNoCase("center")==0) this->SetHorizAlign( align_center );
|
||||
else if(s.CompareNoCase("right")==0) this->SetHorizAlign( align_right );
|
||||
else ASSERT(0);
|
||||
@@ -849,7 +847,7 @@ void Actor::SetHorizAlignString( const CString &s )
|
||||
|
||||
void Actor::SetVertAlignString( const CString &s )
|
||||
{
|
||||
if (s.CompareNoCase("top")==0) this->SetVertAlign( align_top ); /* call derived */
|
||||
if (s.CompareNoCase("top")==0) this->SetVertAlign( align_top ); /* call derived */
|
||||
else if(s.CompareNoCase("middle")==0) this->SetVertAlign( align_middle );
|
||||
else if(s.CompareNoCase("bottom")==0) this->SetVertAlign( align_bottom );
|
||||
else ASSERT(0);
|
||||
@@ -858,9 +856,9 @@ void Actor::SetVertAlignString( const CString &s )
|
||||
void Actor::SetEffectClockString( const CString &s )
|
||||
{
|
||||
if (s.CompareNoCase("timer")==0) this->SetEffectClock( CLOCK_TIMER );
|
||||
else if(s.CompareNoCase("beat")==0) this->SetEffectClock( CLOCK_BGM_BEAT );
|
||||
else if(s.CompareNoCase("beat")==0) this->SetEffectClock( CLOCK_BGM_BEAT );
|
||||
else if(s.CompareNoCase("music")==0) this->SetEffectClock( CLOCK_BGM_TIME );
|
||||
else if(s.CompareNoCase("bgm")==0) this->SetEffectClock( CLOCK_BGM_BEAT ); // compat, deprecated
|
||||
else if(s.CompareNoCase("bgm")==0) this->SetEffectClock( CLOCK_BGM_BEAT ); // compat, deprecated
|
||||
else
|
||||
{
|
||||
CabinetLight cl = StringToCabinetLight( s );
|
||||
@@ -1117,7 +1115,7 @@ float Actor::GetTweenTimeLeft() const
|
||||
*/
|
||||
void Actor::SetGlobalDiffuseColor( RageColor c )
|
||||
{
|
||||
for(int i=0; i<4; i++) /* color, not alpha */
|
||||
for( int i=0; i<4; i++ ) /* color, not alpha */
|
||||
{
|
||||
for( unsigned ts = 0; ts < m_Tweens.size(); ++ts )
|
||||
{
|
||||
@@ -1144,7 +1142,7 @@ void Actor::SetGlobalX( float x )
|
||||
|
||||
void Actor::SetDiffuseColor( RageColor c )
|
||||
{
|
||||
for(int i=0; i<4; i++)
|
||||
for( int i=0; i<4; i++ )
|
||||
{
|
||||
DestTweenState().diffuse[i].r = c.r;
|
||||
DestTweenState().diffuse[i].g = c.g;
|
||||
@@ -1188,11 +1186,11 @@ bool Actor::TweenState::operator==( const TweenState &other ) const
|
||||
|
||||
void Actor::TweenState::MakeWeightedAverage( TweenState& average_out, const TweenState& ts1, const TweenState& ts2, float fPercentBetween )
|
||||
{
|
||||
average_out.pos = ts1.pos + (ts2.pos - ts1.pos )*fPercentBetween;
|
||||
average_out.scale = ts1.scale + (ts2.scale - ts1.scale )*fPercentBetween;
|
||||
average_out.rotation = ts1.rotation + (ts2.rotation - ts1.rotation)*fPercentBetween;
|
||||
average_out.pos = ts1.pos + (ts2.pos - ts1.pos )*fPercentBetween;
|
||||
average_out.scale = ts1.scale + (ts2.scale - ts1.scale )*fPercentBetween;
|
||||
average_out.rotation = ts1.rotation + (ts2.rotation - ts1.rotation )*fPercentBetween;
|
||||
RageQuatSlerp(&average_out.quat, ts1.quat, ts2.quat, fPercentBetween);
|
||||
average_out.fSkewX = ts1.fSkewX + (ts2.fSkewX - ts1.fSkewX)*fPercentBetween;
|
||||
average_out.fSkewX = ts1.fSkewX + (ts2.fSkewX - ts1.fSkewX)*fPercentBetween;
|
||||
|
||||
average_out.crop.left = ts1.crop.left + (ts2.crop.left - ts1.crop.left )*fPercentBetween;
|
||||
average_out.crop.top = ts1.crop.top + (ts2.crop.top - ts1.crop.top )*fPercentBetween;
|
||||
@@ -1205,31 +1203,31 @@ void Actor::TweenState::MakeWeightedAverage( TweenState& average_out, const Twee
|
||||
average_out.fade.bottom = ts1.fade.bottom+ (ts2.fade.bottom - ts1.fade.bottom)*fPercentBetween;
|
||||
|
||||
for(int i=0; i<4; i++)
|
||||
average_out.diffuse[i] = ts1.diffuse[i]+ (ts2.diffuse[i] - ts1.diffuse[i])*fPercentBetween;
|
||||
average_out.glow = ts1.glow + (ts2.glow - ts1.glow )*fPercentBetween;
|
||||
average_out.aux = ts1.aux + (ts2.aux - ts1.aux )*fPercentBetween;
|
||||
average_out.diffuse[i] = ts1.diffuse[i]+ (ts2.diffuse[i] - ts1.diffuse[i])*fPercentBetween;
|
||||
average_out.glow = ts1.glow + (ts2.glow - ts1.glow )*fPercentBetween;
|
||||
average_out.aux = ts1.aux + (ts2.aux - ts1.aux )*fPercentBetween;
|
||||
}
|
||||
|
||||
void Actor::SetBlendModeString( const CString &s )
|
||||
{
|
||||
if (s.CompareNoCase("normal")==0) this->SetBlendMode( BLEND_NORMAL );
|
||||
else if(s.CompareNoCase("add")==0) this->SetBlendMode( BLEND_ADD );
|
||||
else if(s.CompareNoCase("add")==0) this->SetBlendMode( BLEND_ADD );
|
||||
else if(s.CompareNoCase("noeffect")==0) this->SetBlendMode( BLEND_NO_EFFECT );
|
||||
else ASSERT(0);
|
||||
}
|
||||
|
||||
void Actor::SetCullModeString( const CString &s )
|
||||
{
|
||||
if (s.CompareNoCase("back")==0) this->SetCullMode( CULL_BACK );
|
||||
if (s.CompareNoCase("back")==0) this->SetCullMode( CULL_BACK );
|
||||
else if(s.CompareNoCase("front")==0) this->SetCullMode( CULL_FRONT );
|
||||
else if(s.CompareNoCase("none")==0) this->SetCullMode( CULL_NONE );
|
||||
else if(s.CompareNoCase("none")==0) this->SetCullMode( CULL_NONE );
|
||||
else ASSERT(0);
|
||||
}
|
||||
|
||||
void Actor::SetZTestModeString( const CString &s )
|
||||
{
|
||||
// for metrics backward compatibility
|
||||
if(s.CompareNoCase("off")==0) this->SetZTestMode( ZTEST_OFF );
|
||||
if(s.CompareNoCase("off")==0) this->SetZTestMode( ZTEST_OFF );
|
||||
else if(s.CompareNoCase("writeonpass")==0) this->SetZTestMode( ZTEST_WRITE_ON_PASS );
|
||||
else if(s.CompareNoCase("writeonfail")==0) this->SetZTestMode( ZTEST_WRITE_ON_FAIL );
|
||||
else ASSERT(0);
|
||||
@@ -1254,7 +1252,7 @@ void Actor::QueueMessage( const CString& sMessageName )
|
||||
// command, so we don't have to add yet another element to every tween
|
||||
// state for this rarely-used command.
|
||||
BeginTweening( 0, TWEEN_LINEAR );
|
||||
TweenInfo &TI = m_Tweens.back()->info;
|
||||
TweenInfo &TI = m_Tweens.back()->info;
|
||||
TI.m_sCommandName = "!" + sMessageName;
|
||||
}
|
||||
|
||||
@@ -1331,12 +1329,12 @@ public:
|
||||
static int accelerate( T* p, lua_State *L ) { p->BeginTweening(FArg(1),Actor::TWEEN_ACCELERATE); return 0; }
|
||||
static int decelerate( T* p, lua_State *L ) { p->BeginTweening(FArg(1),Actor::TWEEN_DECELERATE); return 0; }
|
||||
static int smooth( T* p, lua_State *L ) { p->BeginTweening(FArg(1),Actor::TWEEN_SMOOTH); return 0; }
|
||||
static int bouncebegin( T* p, lua_State *L ) { p->BeginTweening(FArg(1),Actor::TWEEN_BOUNCE_BEGIN); return 0; }
|
||||
static int bouncebegin( T* p, lua_State *L ) { p->BeginTweening(FArg(1),Actor::TWEEN_BOUNCE_BEGIN); return 0; }
|
||||
static int bounceend( T* p, lua_State *L ) { p->BeginTweening(FArg(1),Actor::TWEEN_BOUNCE_END); return 0; }
|
||||
static int spring( T* p, lua_State *L ) { p->BeginTweening(FArg(1),Actor::TWEEN_SPRING); return 0; }
|
||||
static int stoptweening( T* p, lua_State *L ) { p->StopTweening(); p->BeginTweening( 0.0001f, Actor::TWEEN_LINEAR ); return 0; }
|
||||
static int finishtweening( T* p, lua_State *L ) { p->FinishTweening(); return 0; }
|
||||
static int hurrytweening( T* p, lua_State *L ) { p->HurryTweening(FArg(1)); return 0; }
|
||||
static int stoptweening( T* p, lua_State *L ) { p->StopTweening(); p->BeginTweening( 0.0001f, Actor::TWEEN_LINEAR ); return 0; }
|
||||
static int finishtweening( T* p, lua_State *L ) { p->FinishTweening(); return 0; }
|
||||
static int hurrytweening( T* p, lua_State *L ) { p->HurryTweening(FArg(1)); return 0; }
|
||||
static int x( T* p, lua_State *L ) { p->SetX(FArg(1)); return 0; }
|
||||
static int y( T* p, lua_State *L ) { p->SetY(FArg(1)); return 0; }
|
||||
static int z( T* p, lua_State *L ) { p->SetZ(FArg(1)); return 0; }
|
||||
@@ -1348,8 +1346,8 @@ public:
|
||||
static int zoomy( T* p, lua_State *L ) { p->SetZoomY(FArg(1)); return 0; }
|
||||
static int zoomz( T* p, lua_State *L ) { p->SetZoomZ(FArg(1)); return 0; }
|
||||
static int zoomto( T* p, lua_State *L ) { p->ZoomTo(FArg(1), FArg(2)); return 0; }
|
||||
static int zoomtowidth( T* p, lua_State *L ) { p->ZoomToWidth(FArg(1)); return 0; }
|
||||
static int zoomtoheight( T* p, lua_State *L ) { p->ZoomToHeight(FArg(1)); return 0; }
|
||||
static int zoomtowidth( T* p, lua_State *L ) { p->ZoomToWidth(FArg(1)); return 0; }
|
||||
static int zoomtoheight( T* p, lua_State *L ) { p->ZoomToHeight(FArg(1)); return 0; }
|
||||
static int setsize( T* p, lua_State *L ) { p->SetWidth(FArg(1)); p->SetHeight(FArg(2)); return 0; }
|
||||
static int basealpha( T* p, lua_State *L ) { p->SetBaseAlpha(FArg(1)); return 0; }
|
||||
static int basezoomx( T* p, lua_State *L ) { p->SetBaseZoomX(FArg(1)); return 0; }
|
||||
@@ -1363,7 +1361,7 @@ public:
|
||||
static int fadetop( T* p, lua_State *L ) { p->SetFadeTop(FArg(1)); return 0; }
|
||||
static int faderight( T* p, lua_State *L ) { p->SetFadeRight(FArg(1)); return 0; }
|
||||
static int fadebottom( T* p, lua_State *L ) { p->SetFadeBottom(FArg(1)); return 0; }
|
||||
static int diffuse( T* p, lua_State *L ) { p->SetDiffuse( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffuse( T* p, lua_State *L ) { p->SetDiffuse( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffuseupperleft( T* p, lua_State *L ) { p->SetDiffuseUpperLeft( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffuseupperright( T* p, lua_State *L ) { p->SetDiffuseUpperRight( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffuselowerleft( T* p, lua_State *L ) { p->SetDiffuseLowerLeft( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
@@ -1372,29 +1370,29 @@ public:
|
||||
static int diffuserightedge( T* p, lua_State *L ) { p->SetDiffuseRightEdge( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffusetopedge( T* p, lua_State *L ) { p->SetDiffuseTopEdge( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffusebottomedge( T* p, lua_State *L ) { p->SetDiffuseBottomEdge( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffusealpha( T* p, lua_State *L ) { p->SetDiffuseAlpha(FArg(1)); return 0; }
|
||||
static int diffusecolor( T* p, lua_State *L ) { p->SetDiffuseColor( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int diffusealpha( T* p, lua_State *L ) { p->SetDiffuseAlpha(FArg(1)); return 0; }
|
||||
static int diffusecolor( T* p, lua_State *L ) { p->SetDiffuseColor( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int glow( T* p, lua_State *L ) { p->SetGlow( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }
|
||||
static int aux( T* p, lua_State *L ) { p->SetAux( FArg(1) ); return 0; }
|
||||
static int getaux( T* p, lua_State *L ) { lua_pushnumber( L, p->GetAux() ); return 1; }
|
||||
static int rotationx( T* p, lua_State *L ) { p->SetRotationX(FArg(1)); return 0; }
|
||||
static int rotationy( T* p, lua_State *L ) { p->SetRotationY(FArg(1)); return 0; }
|
||||
static int rotationz( T* p, lua_State *L ) { p->SetRotationZ(FArg(1)); return 0; }
|
||||
static int getrotation( T* p, lua_State *L ) { lua_pushnumber(L, p->GetRotationX()); lua_pushnumber(L, p->GetRotationY()); lua_pushnumber(L, p->GetRotationZ()); return 3; }
|
||||
static int baserotationx( T* p, lua_State *L ) { p->SetBaseRotationX(FArg(1)); return 0; }
|
||||
static int baserotationy( T* p, lua_State *L ) { p->SetBaseRotationY(FArg(1)); return 0; }
|
||||
static int baserotationz( T* p, lua_State *L ) { p->SetBaseRotationZ(FArg(1)); return 0; }
|
||||
static int getrotation( T* p, lua_State *L ) { lua_pushnumber(L, p->GetRotationX()); lua_pushnumber(L, p->GetRotationY()); lua_pushnumber(L, p->GetRotationZ()); return 3; }
|
||||
static int baserotationx( T* p, lua_State *L ) { p->SetBaseRotationX(FArg(1)); return 0; }
|
||||
static int baserotationy( T* p, lua_State *L ) { p->SetBaseRotationY(FArg(1)); return 0; }
|
||||
static int baserotationz( T* p, lua_State *L ) { p->SetBaseRotationZ(FArg(1)); return 0; }
|
||||
static int skewx( T* p, lua_State *L ) { p->SetSkewX(FArg(1)); return 0; }
|
||||
static int heading( T* p, lua_State *L ) { p->AddRotationH(FArg(1)); return 0; }
|
||||
static int pitch( T* p, lua_State *L ) { p->AddRotationP(FArg(1)); return 0; }
|
||||
static int roll( T* p, lua_State *L ) { p->AddRotationR(FArg(1)); return 0; }
|
||||
static int shadowlength( T* p, lua_State *L ) { p->SetShadowLength(FArg(1)); return 0; }
|
||||
static int shadowlength( T* p, lua_State *L ) { p->SetShadowLength(FArg(1)); return 0; }
|
||||
static int horizalign( T* p, lua_State *L ) { p->SetHorizAlignString(SArg(1)); return 0; }
|
||||
static int vertalign( T* p, lua_State *L ) { p->SetVertAlignString(SArg(1)); return 0; }
|
||||
static int luaeffect( T* p, lua_State *L ) { p->SetEffectLua(SArg(1)); return 0; }
|
||||
static int diffuseblink( T* p, lua_State *L ) { p->SetEffectDiffuseBlink(); return 0; }
|
||||
static int diffuseshift( T* p, lua_State *L ) { p->SetEffectDiffuseShift(); return 0; }
|
||||
static int diffuseramp( T* p, lua_State *L ) { p->SetEffectDiffuseRamp(); return 0; }
|
||||
static int diffuseblink( T* p, lua_State *L ) { p->SetEffectDiffuseBlink(); return 0; }
|
||||
static int diffuseshift( T* p, lua_State *L ) { p->SetEffectDiffuseShift(); return 0; }
|
||||
static int diffuseramp( T* p, lua_State *L ) { p->SetEffectDiffuseRamp(); return 0; }
|
||||
static int glowblink( T* p, lua_State *L ) { p->SetEffectGlowBlink(); return 0; }
|
||||
static int glowshift( T* p, lua_State *L ) { p->SetEffectGlowShift(); return 0; }
|
||||
static int rainbow( T* p, lua_State *L ) { p->SetEffectRainbow(); return 0; }
|
||||
@@ -1414,26 +1412,26 @@ public:
|
||||
static int effectmagnitude( T* p, lua_State *L ) { p->SetEffectMagnitude( RageVector3(FArg(1),FArg(2),FArg(3)) ); return 0; }
|
||||
static int geteffectmagnitude( T* p, lua_State *L ) { RageVector3 v = p->GetEffectMagnitude(); lua_pushnumber(L, v[0]); lua_pushnumber(L, v[1]); lua_pushnumber(L, v[2]); return 3; }
|
||||
static int scaletocover( T* p, lua_State *L ) { p->ScaleToCover( RectF(FArg(1), FArg(2), FArg(3), FArg(4)) ); return 0; }
|
||||
static int scaletofit( T* p, lua_State *L ) { p->ScaleToFitInside( RectF(FArg(1), FArg(2), FArg(3), FArg(4)) ); return 0; }
|
||||
static int animate( T* p, lua_State *L ) { p->EnableAnimation(!!IArg(1)); return 0; }
|
||||
static int play( T* p, lua_State *L ) { p->EnableAnimation(true); return 0; }
|
||||
static int pause( T* p, lua_State *L ) { p->EnableAnimation(false); return 0; }
|
||||
static int setstate( T* p, lua_State *L ) { p->SetState(IArg(1)); return 0; }
|
||||
static int scaletofit( T* p, lua_State *L ) { p->ScaleToFitInside( RectF(FArg(1), FArg(2), FArg(3), FArg(4)) ); return 0; }
|
||||
static int animate( T* p, lua_State *L ) { p->EnableAnimation(!!IArg(1)); return 0; }
|
||||
static int play( T* p, lua_State *L ) { p->EnableAnimation(true); return 0; }
|
||||
static int pause( T* p, lua_State *L ) { p->EnableAnimation(false); return 0; }
|
||||
static int setstate( T* p, lua_State *L ) { p->SetState(IArg(1)); return 0; }
|
||||
static int texturewrapping( T* p, lua_State *L ) { p->SetTextureWrapping(!!IArg(1)); return 0; }
|
||||
static int additiveblend( T* p, lua_State *L ) { p->SetBlendMode(!!IArg(1) ? BLEND_ADD : BLEND_NORMAL); return 0; }
|
||||
static int blend( T* p, lua_State *L ) { p->SetBlendModeString(SArg(1)); return 0; }
|
||||
static int zbuffer( T* p, lua_State *L ) { p->SetUseZBuffer(!!IArg(1)); return 0; }
|
||||
static int ztest( T* p, lua_State *L ) { p->SetZTestMode((!!IArg(1))?ZTEST_WRITE_ON_PASS:ZTEST_OFF); return 0; }
|
||||
static int ztestmode( T* p, lua_State *L ) { p->SetZTestModeString(SArg(1)); return 0; }
|
||||
static int zwrite( T* p, lua_State *L ) { p->SetZWrite(!!IArg(1)); return 0; }
|
||||
static int zbias( T* p, lua_State *L ) { p->SetZBias(FArg(1)); return 0; }
|
||||
static int blend( T* p, lua_State *L ) { p->SetBlendModeString(SArg(1)); return 0; }
|
||||
static int zbuffer( T* p, lua_State *L ) { p->SetUseZBuffer(!!IArg(1)); return 0; }
|
||||
static int ztest( T* p, lua_State *L ) { p->SetZTestMode((!!IArg(1))?ZTEST_WRITE_ON_PASS:ZTEST_OFF); return 0; }
|
||||
static int ztestmode( T* p, lua_State *L ) { p->SetZTestModeString(SArg(1)); return 0; }
|
||||
static int zwrite( T* p, lua_State *L ) { p->SetZWrite(!!IArg(1)); return 0; }
|
||||
static int zbias( T* p, lua_State *L ) { p->SetZBias(FArg(1)); return 0; }
|
||||
static int clearzbuffer( T* p, lua_State *L ) { p->SetClearZBuffer(!!IArg(1)); return 0; }
|
||||
static int backfacecull( T* p, lua_State *L ) { p->SetCullMode((!!IArg(1)) ? CULL_BACK : CULL_NONE); return 0; }
|
||||
static int cullmode( T* p, lua_State *L ) { p->SetCullModeString(SArg(1)); return 0; }
|
||||
static int visible( T* p, lua_State *L ) { p->SetVisible(!!IArg(1)); return 0; }
|
||||
static int hidden( T* p, lua_State *L ) { p->SetHidden(!!IArg(1)); return 0; }
|
||||
static int hibernate( T* p, lua_State *L ) { p->SetHibernate(FArg(1)); return 0; }
|
||||
static int draworder( T* p, lua_State *L ) { p->SetDrawOrder(IArg(1)); return 0; }
|
||||
static int cullmode( T* p, lua_State *L ) { p->SetCullModeString(SArg(1)); return 0; }
|
||||
static int visible( T* p, lua_State *L ) { p->SetVisible(!!IArg(1)); return 0; }
|
||||
static int hidden( T* p, lua_State *L ) { p->SetHidden(!!IArg(1)); return 0; }
|
||||
static int hibernate( T* p, lua_State *L ) { p->SetHibernate(FArg(1)); return 0; }
|
||||
static int draworder( T* p, lua_State *L ) { p->SetDrawOrder(IArg(1)); return 0; }
|
||||
static int playcommand( T* p, lua_State *L ) { p->PlayCommand(SArg(1),NULL); return 0; }
|
||||
static int queuecommand( T* p, lua_State *L ) { p->QueueCommand(SArg(1)); return 0; }
|
||||
static int queuemessage( T* p, lua_State *L ) { p->QueueMessage(SArg(1)); return 0; }
|
||||
@@ -1445,22 +1443,22 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int GetX( T* p, lua_State *L ) { lua_pushnumber( L, p->GetX() ); return 1; }
|
||||
static int GetY( T* p, lua_State *L ) { lua_pushnumber( L, p->GetY() ); return 1; }
|
||||
static int GetZ( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZ() ); return 1; }
|
||||
static int GetWidth( T* p, lua_State *L ) { lua_pushnumber( L, p->GetUnzoomedWidth() ); return 1; }
|
||||
static int GetHeight( T* p, lua_State *L ) { lua_pushnumber( L, p->GetUnzoomedHeight() ); return 1; }
|
||||
static int GetZoom( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoom() ); return 1; }
|
||||
static int GetZoomX( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoomX() ); return 1; }
|
||||
static int GetZoomY( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoomY() ); return 1; }
|
||||
static int GetZoomZ( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoomZ() ); return 1; }
|
||||
static int GetX( T* p, lua_State *L ) { lua_pushnumber( L, p->GetX() ); return 1; }
|
||||
static int GetY( T* p, lua_State *L ) { lua_pushnumber( L, p->GetY() ); return 1; }
|
||||
static int GetZ( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZ() ); return 1; }
|
||||
static int GetWidth( T* p, lua_State *L ) { lua_pushnumber( L, p->GetUnzoomedWidth() ); return 1; }
|
||||
static int GetHeight( T* p, lua_State *L ) { lua_pushnumber( L, p->GetUnzoomedHeight() ); return 1; }
|
||||
static int GetZoom( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoom() ); return 1; }
|
||||
static int GetZoomX( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoomX() ); return 1; }
|
||||
static int GetZoomY( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoomY() ); return 1; }
|
||||
static int GetZoomZ( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoomZ() ); return 1; }
|
||||
static int GetBaseZoomX( T* p, lua_State *L ) { lua_pushnumber( L, p->GetBaseZoomX() ); return 1; }
|
||||
static int GetRotationY( T* p, lua_State *L ) { lua_pushnumber( L, p->GetRotationY() ); return 1; }
|
||||
static int GetSecsIntoEffect( T* p, lua_State *L ) { lua_pushnumber( L, p->GetSecsIntoEffect() ); return 1; }
|
||||
static int GetEffectDelta( T* p, lua_State *L ) { lua_pushnumber( L, p->GetEffectDelta() ); return 1; }
|
||||
static int GetDiffuseAlpha( T* p, lua_State *L ) { lua_pushnumber( L, p->GetDiffuseAlpha() ); return 1; }
|
||||
|
||||
static int GetName( T* p, lua_State *L ) { lua_pushstring( L, p->GetName() ); return 1; }
|
||||
static int GetName( T* p, lua_State *L ) { lua_pushstring( L, p->GetName() ); return 1; }
|
||||
|
||||
static void Register(lua_State *L) {
|
||||
ADD_METHOD( sleep );
|
||||
|
||||
Reference in New Issue
Block a user