Merge branch 'master' of http://github.com/stepmania/stepmania into PlayMusicPart_loopable

This commit is contained in:
Kyzentun
2014-02-14 18:49:32 -07:00
9 changed files with 37 additions and 5 deletions
+2
View File
@@ -783,6 +783,7 @@
<Function name='IsSideJoined'/>
<Function name='IsWinner'/>
<Function name='JoinPlayer'/>
<Function name='JoinInput'/>
<Function name='PlayerIsUsingModifier'/>
<Function name='PlayersCanJoin'/>
<Function name='RefreshNoteSkinData'/>
@@ -1377,6 +1378,7 @@
</Class>
<Class base='Screen' name='ScreenWithMenuElements'>
<Function name='Cancel'/>
<Function name='SetAllowLateJoin'/>
</Class>
<Class base='ScreenWithMenuElements' name='ScreenWithMenuElementsSimple'/>
<Class name='Song'>
+7 -1
View File
@@ -2329,7 +2329,10 @@ save yourself some time, copy this for undocumented things:
Returns <code>true</code> if player <code>pn</code> is the winner.
</Function>
<Function name='JoinPlayer' return='void' arguments='PlayerNumber pn'>
Joins player <code>pn</code>.
Joins player <code>pn</code>. Does not deduct coins.
</Function>
<Function name='JoinInput' return='bool' arguments='PlayerNumber pn'>
Similar to JoinPlayer, but checks whether the player is allowed to join and returns false if the player is not allowed to join. Also deducts coins for joining. A player can't join if PlayersCanJoin() returns false, or that side is already joined (is true for both sides when in a style that is OnePlayerTwoSides), or there are not enough coins.
</Function>
<Function name='PlayerIsUsingModifier' return='bool' arguments='PlayerNumber pn, string sModifier'>
Returns <code>true</code> if player <code>pn</code> is using modifier <code>sModifier</code>.
@@ -3905,6 +3908,9 @@ save yourself some time, copy this for undocumented things:
<Function name='Cancel' return='void' arguments=''>
Tells the screen to go to the previous screen.
</Function>
<Function name='SetAllowLateJoin' return='void' arguments='bool'>
Sets whether the screen allows late joining. This only works for screens that are just ScreenWithMenuElements, as most derived screens have their own hard coded function for whether late joining is allowed.
</Function>
</Class>
<Class name='Song'>
<Function name='GetAllSteps' return='{Steps}' arguments=''>
+1
View File
@@ -4423,6 +4423,7 @@ BodyHeight=38
[ComboGraph]
BodyWidth=140
BodyHeight=11
# Arcade #################################
[ScreenLogo]
+8
View File
@@ -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 );
}
+1
View File
@@ -24,6 +24,7 @@ public:
private:
ThemeMetric<float> BODY_WIDTH;
ThemeMetric<float> BODY_HEIGHT;
Actor *m_pBacking;
Actor *m_pNormalCombo;
Actor *m_pMaxCombo;
+6
View File
@@ -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 );
+1 -4
View File
@@ -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
+8
View File
@@ -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 );
}
};
+3
View File
@@ -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 );