use bound types

This commit is contained in:
Glenn Maynard
2006-09-26 09:09:38 +00:00
parent 46b2444705
commit cc49e8d56d
3 changed files with 5 additions and 35 deletions
+2 -2
View File
@@ -470,8 +470,8 @@ StageOnCommand=draworder,101;bounceend,0.5;addx,SCREEN_WIDTH*0.6
StageOffCommand=bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6
CDTitleX=-170
CDTitleY=SCREEN_CENTER_Y-98
CDTitleFrontCommand=roll,1;spin;effectmagnitude,0,150,0;cullmode,back;
CDTitleBackCommand=roll,1;spin;effectmagnitude,0,150,0;cullmode,front;diffuse,#606060;
CDTitleFrontCommand=roll,1;spin;effectmagnitude,0,150,0;cullmode,"CullMode_Back";
CDTitleBackCommand=roll,1;spin;effectmagnitude,0,150,0;cullmode,"CullMode_Front";diffuse,#606060;
CDTitleOnCommand=bounceend,0.5;addx,SCREEN_WIDTH*0.6;draworder,101
CDTitleOffCommand=bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6
ScoreFrameP1X=SCREEN_CENTER_X-265+SCREEN_WIDTH*0.6
+3 -30
View File
@@ -1182,33 +1182,6 @@ void Actor::TweenState::MakeWeightedAverage( TweenState& average_out, const Twee
average_out.aux = lerp( fPercentBetween, ts1.aux, ts2.aux );
}
void Actor::SetBlendModeString( const RString &s )
{
if (s.EqualsNoCase("normal")) this->SetBlendMode( BLEND_NORMAL );
else if(s.EqualsNoCase("add")) this->SetBlendMode( BLEND_ADD );
else if(s.EqualsNoCase("weightedmultiply")) this->SetBlendMode( BLEND_WEIGHTED_MULTIPLY );
else if(s.EqualsNoCase("invertdest")) this->SetBlendMode( BLEND_INVERT_DEST );
else if(s.EqualsNoCase("noeffect")) this->SetBlendMode( BLEND_NO_EFFECT );
else ASSERT(0);
}
void Actor::SetCullModeString( const RString &s )
{
if (s.EqualsNoCase("back")) this->SetCullMode( CULL_BACK );
else if(s.EqualsNoCase("front")) this->SetCullMode( CULL_FRONT );
else if(s.EqualsNoCase("none")) this->SetCullMode( CULL_NONE );
else ASSERT(0);
}
void Actor::SetZTestModeString( const RString &s )
{
// for metrics backward compatibility
if(s.EqualsNoCase("off")) this->SetZTestMode( ZTEST_OFF );
else if(s.EqualsNoCase("writeonpass")) this->SetZTestMode( ZTEST_WRITE_ON_PASS );
else if(s.EqualsNoCase("writeonfail")) this->SetZTestMode( ZTEST_WRITE_ON_FAIL );
else ASSERT(0);
}
void Actor::Sleep( float time )
{
BeginTweening( time, TWEEN_LINEAR );
@@ -1447,15 +1420,15 @@ public:
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 blend( T* p, lua_State *L ) { p->SetBlendMode( Enum::Check<BlendMode>(L, 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 ztestmode( T* p, lua_State *L ) { p->SetZTestMode( Enum::Check<ZTestMode>(L, 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 cullmode( T* p, lua_State *L ) { p->SetCullMode( Enum::Check<CullMode>(L, 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; }
-3
View File
@@ -314,16 +314,13 @@ public:
// render states
//
void SetBlendMode( BlendMode mode ) { m_BlendMode = mode; }
void SetBlendModeString( const RString &s ); // convenience
void SetTextureWrapping( bool b ) { m_bTextureWrapping = b; }
void SetClearZBuffer( bool b ) { m_bClearZBuffer = b; }
void SetUseZBuffer( bool b ) { SetZTestMode(b?ZTEST_WRITE_ON_PASS:ZTEST_OFF); SetZWrite(b); }
virtual void SetZTestMode( ZTestMode mode ) { m_ZTestMode = mode; }
void SetZTestModeString( const RString &s ); // convenience
virtual void SetZWrite( bool b ) { m_bZWrite = b; }
void SetZBias( float f ) { m_fZBias = f; }
virtual void SetCullMode( CullMode mode ) { m_CullMode = mode; }
void SetCullModeString( const RString &s ); // convenience
//
// Lua