do this with lua

This commit is contained in:
Glenn Maynard
2005-07-04 21:47:16 +00:00
parent 9a6fa1bae8
commit 2d27081573
4 changed files with 0 additions and 36 deletions
-10
View File
@@ -7,16 +7,10 @@
ThemeMetric<apActorCommands> OK_COMMAND ("HoldJudgment","OKCommand"); ThemeMetric<apActorCommands> OK_COMMAND ("HoldJudgment","OKCommand");
ThemeMetric<apActorCommands> NG_COMMAND ("HoldJudgment","NGCommand"); ThemeMetric<apActorCommands> NG_COMMAND ("HoldJudgment","NGCommand");
ThemeMetric<apActorCommands> OK_ODD_COMMAND ("HoldJudgment","OKOddCommand");
ThemeMetric<apActorCommands> NG_ODD_COMMAND ("HoldJudgment","NGOddCommand");
ThemeMetric<apActorCommands> OK_EVEN_COMMAND ("HoldJudgment","OKEvenCommand");
ThemeMetric<apActorCommands> NG_EVEN_COMMAND ("HoldJudgment","NGEvenCommand");
HoldJudgment::HoldJudgment() HoldJudgment::HoldJudgment()
{ {
m_iCount = 0;
m_sprJudgment.Load( THEME->GetPathG("HoldJudgment","label 1x2") ); m_sprJudgment.Load( THEME->GetPathG("HoldJudgment","label 1x2") );
m_sprJudgment.StopAnimating(); m_sprJudgment.StopAnimating();
Reset(); Reset();
@@ -43,19 +37,15 @@ void HoldJudgment::SetHoldJudgment( HoldNoteScore hns )
ASSERT(0); ASSERT(0);
case HNS_OK: case HNS_OK:
m_sprJudgment.SetState( 0 ); m_sprJudgment.SetState( 0 );
m_sprJudgment.RunCommands( (m_iCount%2) ? OK_ODD_COMMAND : OK_EVEN_COMMAND );
m_sprJudgment.RunCommands( OK_COMMAND ); m_sprJudgment.RunCommands( OK_COMMAND );
break; break;
case HNS_NG: case HNS_NG:
m_sprJudgment.SetState( 1 ); m_sprJudgment.SetState( 1 );
m_sprJudgment.RunCommands( (m_iCount%2) ? NG_ODD_COMMAND : NG_EVEN_COMMAND );
m_sprJudgment.RunCommands( NG_COMMAND ); m_sprJudgment.RunCommands( NG_COMMAND );
break; break;
default: default:
ASSERT(0); ASSERT(0);
} }
m_iCount++;
} }
/* /*
-1
View File
@@ -16,7 +16,6 @@ public:
protected: protected:
Sprite m_sprJudgment; Sprite m_sprJudgment;
int m_iCount;
}; };
#endif #endif
-24
View File
@@ -13,24 +13,8 @@ static ThemeMetric<apActorCommands> GOOD_COMMAND ("Judgment","GoodCommand");
static ThemeMetric<apActorCommands> BOO_COMMAND ("Judgment","BooCommand"); static ThemeMetric<apActorCommands> BOO_COMMAND ("Judgment","BooCommand");
static ThemeMetric<apActorCommands> MISS_COMMAND ("Judgment","MissCommand"); static ThemeMetric<apActorCommands> MISS_COMMAND ("Judgment","MissCommand");
static ThemeMetric<apActorCommands> MARVELOUS_ODD_COMMAND ("Judgment","MarvelousOddCommand");
static ThemeMetric<apActorCommands> PERFECT_ODD_COMMAND ("Judgment","PerfectOddCommand");
static ThemeMetric<apActorCommands> GREAT_ODD_COMMAND ("Judgment","GreatOddCommand");
static ThemeMetric<apActorCommands> GOOD_ODD_COMMAND ("Judgment","GoodOddCommand");
static ThemeMetric<apActorCommands> BOO_ODD_COMMAND ("Judgment","BooOddCommand");
static ThemeMetric<apActorCommands> MISS_ODD_COMMAND ("Judgment","MissOddCommand");
static ThemeMetric<apActorCommands> MARVELOUS_EVEN_COMMAND ("Judgment","MarvelousEvenCommand");
static ThemeMetric<apActorCommands> PERFECT_EVEN_COMMAND ("Judgment","PerfectEvenCommand");
static ThemeMetric<apActorCommands> GREAT_EVEN_COMMAND ("Judgment","GreatEvenCommand");
static ThemeMetric<apActorCommands> GOOD_EVEN_COMMAND ("Judgment","GoodEvenCommand");
static ThemeMetric<apActorCommands> BOO_EVEN_COMMAND ("Judgment","BooEvenCommand");
static ThemeMetric<apActorCommands> MISS_EVEN_COMMAND ("Judgment","MissEvenCommand");
Judgment::Judgment() Judgment::Judgment()
{ {
m_iCount = 0;
} }
void Judgment::Load( bool bBeginner ) void Judgment::Load( bool bBeginner )
@@ -66,39 +50,31 @@ void Judgment::SetJudgment( TapNoteScore score, bool bEarly )
{ {
case TNS_MARVELOUS: case TNS_MARVELOUS:
m_sprJudgment.SetState( 0 * iStateMult + iStateAdd ); m_sprJudgment.SetState( 0 * iStateMult + iStateAdd );
m_sprJudgment.RunCommands( (m_iCount%2) ? MARVELOUS_ODD_COMMAND : MARVELOUS_EVEN_COMMAND );
m_sprJudgment.RunCommands( MARVELOUS_COMMAND ); m_sprJudgment.RunCommands( MARVELOUS_COMMAND );
break; break;
case TNS_PERFECT: case TNS_PERFECT:
m_sprJudgment.SetState( 1 * iStateMult + iStateAdd ); m_sprJudgment.SetState( 1 * iStateMult + iStateAdd );
m_sprJudgment.RunCommands( (m_iCount%2) ? PERFECT_ODD_COMMAND : PERFECT_EVEN_COMMAND );
m_sprJudgment.RunCommands( PERFECT_COMMAND ); m_sprJudgment.RunCommands( PERFECT_COMMAND );
break; break;
case TNS_GREAT: case TNS_GREAT:
m_sprJudgment.SetState( 2 * iStateMult + iStateAdd ); m_sprJudgment.SetState( 2 * iStateMult + iStateAdd );
m_sprJudgment.RunCommands( (m_iCount%2) ? GREAT_ODD_COMMAND : GREAT_EVEN_COMMAND );
m_sprJudgment.RunCommands( GREAT_COMMAND ); m_sprJudgment.RunCommands( GREAT_COMMAND );
break; break;
case TNS_GOOD: case TNS_GOOD:
m_sprJudgment.SetState( 3 * iStateMult + iStateAdd ); m_sprJudgment.SetState( 3 * iStateMult + iStateAdd );
m_sprJudgment.RunCommands( (m_iCount%2) ? GOOD_ODD_COMMAND : GOOD_EVEN_COMMAND );
m_sprJudgment.RunCommands( GOOD_COMMAND ); m_sprJudgment.RunCommands( GOOD_COMMAND );
break; break;
case TNS_BOO: case TNS_BOO:
m_sprJudgment.SetState( 4 * iStateMult + iStateAdd ); m_sprJudgment.SetState( 4 * iStateMult + iStateAdd );
m_sprJudgment.RunCommands( (m_iCount%2) ? BOO_ODD_COMMAND : BOO_EVEN_COMMAND );
m_sprJudgment.RunCommands( BOO_COMMAND ); m_sprJudgment.RunCommands( BOO_COMMAND );
break; break;
case TNS_MISS: case TNS_MISS:
m_sprJudgment.SetState( 5 * iStateMult + iStateAdd ); m_sprJudgment.SetState( 5 * iStateMult + iStateAdd );
m_sprJudgment.RunCommands( (m_iCount%2) ? MISS_ODD_COMMAND : MISS_EVEN_COMMAND );
m_sprJudgment.RunCommands( MISS_COMMAND ); m_sprJudgment.RunCommands( MISS_COMMAND );
break; break;
default: default:
ASSERT(0); ASSERT(0);
} }
m_iCount++;
} }
/* /*
-1
View File
@@ -18,7 +18,6 @@ public:
protected: protected:
Sprite m_sprJudgment; Sprite m_sprJudgment;
int m_iCount;
}; };
#endif #endif