Merge branch 'master' of http://github.com/stepmania/stepmania into PlayMusicPart_loopable
This commit is contained in:
@@ -22,6 +22,11 @@ ComboGraph::ComboGraph()
|
||||
void ComboGraph::Load( RString sMetricsGroup )
|
||||
{
|
||||
BODY_WIDTH.Load( sMetricsGroup, "BodyWidth" );
|
||||
BODY_HEIGHT.Load( sMetricsGroup, "BodyHeight" );
|
||||
|
||||
// These need to be set so that a theme can use zoomtowidth/zoomtoheight and get correct behavior.
|
||||
this->SetWidth(BODY_WIDTH);
|
||||
this->SetHeight(BODY_HEIGHT);
|
||||
|
||||
Actor *pActor = NULL;
|
||||
|
||||
@@ -29,6 +34,7 @@ void ComboGraph::Load( RString sMetricsGroup )
|
||||
if( m_pBacking != NULL )
|
||||
{
|
||||
m_pBacking->ZoomToWidth( BODY_WIDTH );
|
||||
m_pBacking->ZoomToHeight( BODY_HEIGHT );
|
||||
this->AddChild( m_pBacking );
|
||||
}
|
||||
|
||||
@@ -36,6 +42,7 @@ void ComboGraph::Load( RString sMetricsGroup )
|
||||
if( m_pNormalCombo != NULL )
|
||||
{
|
||||
m_pNormalCombo->ZoomToWidth( BODY_WIDTH );
|
||||
m_pNormalCombo->ZoomToHeight( BODY_HEIGHT );
|
||||
this->AddChild( m_pNormalCombo );
|
||||
}
|
||||
|
||||
@@ -43,6 +50,7 @@ void ComboGraph::Load( RString sMetricsGroup )
|
||||
if( m_pMaxCombo != NULL )
|
||||
{
|
||||
m_pMaxCombo->ZoomToWidth( BODY_WIDTH );
|
||||
m_pMaxCombo->ZoomToHeight( BODY_HEIGHT );
|
||||
this->AddChild( m_pMaxCombo );
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
|
||||
private:
|
||||
ThemeMetric<float> BODY_WIDTH;
|
||||
ThemeMetric<float> BODY_HEIGHT;
|
||||
Actor *m_pBacking;
|
||||
Actor *m_pNormalCombo;
|
||||
Actor *m_pMaxCombo;
|
||||
|
||||
@@ -2474,6 +2474,11 @@ public:
|
||||
static int Reset( T* p, lua_State *L ) { p->Reset(); return 0; }
|
||||
static int JoinPlayer( T* p, lua_State *L ) { p->JoinPlayer(Enum::Check<PlayerNumber>(L, 1)); return 0; }
|
||||
static int UnjoinPlayer( T* p, lua_State *L ) { p->UnjoinPlayer(Enum::Check<PlayerNumber>(L, 1)); return 0; }
|
||||
static int JoinInput( T* p, lua_State *L )
|
||||
{
|
||||
lua_pushboolean(L, p->JoinInput(Enum::Check<PlayerNumber>(L, 1)));
|
||||
return 1;
|
||||
}
|
||||
static int GetSongPercent( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongPercent(FArg(1))); return 1; }
|
||||
DEFINE_METHOD( GetCurMusicSeconds, m_Position.m_fMusicSeconds )
|
||||
|
||||
@@ -2606,6 +2611,7 @@ public:
|
||||
ADD_METHOD( Reset );
|
||||
ADD_METHOD( JoinPlayer );
|
||||
ADD_METHOD( UnjoinPlayer );
|
||||
ADD_METHOD( JoinInput );
|
||||
ADD_METHOD( GetSongPercent );
|
||||
ADD_METHOD( GetCurMusicSeconds );
|
||||
ADD_METHOD( GetCharacter );
|
||||
|
||||
@@ -586,13 +586,10 @@ void ScoreKeeperNormal::HandleHoldScore( const TapNote &tn )
|
||||
// update dance points totals
|
||||
if( !m_pPlayerStageStats->m_bFailed )
|
||||
m_pPlayerStageStats->m_iActualDancePoints += HoldNoteScoreToDancePoints( holdScore );
|
||||
// increment the current total possible dance score
|
||||
m_pPlayerStageStats->m_iCurPossibleDancePoints += HoldNoteScoreToDancePoints( HNS_Held );
|
||||
m_pPlayerStageStats->m_iHoldNoteScores[holdScore] ++;
|
||||
|
||||
// increment the current total possible dance score
|
||||
|
||||
m_pPlayerStageStats->m_iCurPossibleDancePoints += HoldNoteScoreToDancePoints( HNS_Held );
|
||||
|
||||
AddHoldScore( holdScore );
|
||||
|
||||
// TODO: Remove indexing with PlayerNumber
|
||||
|
||||
@@ -25,6 +25,7 @@ ScreenWithMenuElements::ScreenWithMenuElements()
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_MemoryCardDisplay[p] = NULL;
|
||||
m_MenuTimer = NULL;
|
||||
m_bShouldAllowLateJoin= false;
|
||||
}
|
||||
|
||||
void ScreenWithMenuElements::Init()
|
||||
@@ -377,11 +378,18 @@ class LunaScreenWithMenuElements: public Luna<ScreenWithMenuElements>
|
||||
public:
|
||||
static int Cancel( T* p, lua_State *L ) { p->Cancel( SM_GoToPrevScreen ); return 0; }
|
||||
static int IsTransitioning( T* p, lua_State *L ) { lua_pushboolean( L, p->IsTransitioning() ); return 1; }
|
||||
static int SetAllowLateJoin( T* p, lua_State *L )
|
||||
{
|
||||
p->m_bShouldAllowLateJoin= BArg(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
LunaScreenWithMenuElements()
|
||||
{
|
||||
ADD_METHOD( Cancel );
|
||||
ADD_METHOD( IsTransitioning );
|
||||
ADD_METHOD( SetAllowLateJoin );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ public:
|
||||
// Lua
|
||||
virtual void PushSelf( lua_State *L );
|
||||
|
||||
virtual bool AllowLateJoin() const { return m_bShouldAllowLateJoin; }
|
||||
bool m_bShouldAllowLateJoin; // So that it can be exposed to Lua.
|
||||
|
||||
protected:
|
||||
virtual void StartPlayingMusic();
|
||||
void SetHelpText( RString s );
|
||||
|
||||
Reference in New Issue
Block a user