From 977322be050786da56319988fe2f507bdd266f15 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 26 Aug 2005 19:11:01 +0000 Subject: [PATCH] add list of scores and judgments to multiplayer gameplay --- stepmania/Themes/default/Scripts/Other.lua | 30 ++++++++++++++++++++++ stepmania/Themes/default/metrics.ini | 29 +++++++++++++++++++-- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/stepmania/Themes/default/Scripts/Other.lua b/stepmania/Themes/default/Scripts/Other.lua index 6b029ba834..62e6a688ef 100644 --- a/stepmania/Themes/default/Scripts/Other.lua +++ b/stepmania/Themes/default/Scripts/Other.lua @@ -8,6 +8,36 @@ function FormatNumSongsPlayed( num ) return s end +function JudgmentTransformCommand( self, pn, mp, iEnabledPlayerIndex, iNumEnabledPlayers, bUsingBothSides, bReverse, bCenetered ) + if GAMESTATE:GetMultiplayer() then + local x = 0 + local y = -20 + local judgmentHeight = 50 + + local iNumOnLeft = math.ceil( iNumEnabledPlayers/2 ) + local iNumOnRight = iNumEnabledPlayers - iNumOnLeft + local bOnLeft = iEnabledPlayerIndex < iNumOnLeft + local iIndexOnThisSide = (bOnLeft and iEnabledPlayerIndex) or (not bOnLeft and (iEnabledPlayerIndex-iNumOnLeft)) + local iNumOnThisSide = (bOnLeft and iNumOnLeft) or (not bOnLeft and iNumOnRight) + if bOnLeft then + x = -216 + else + x = 216 + end + y = y + (iIndexOnThisSide - (iNumOnThisSide-1)/2) * judgmentHeight + self:x( x ) + self:y( y ) + else + local x = 0 + local y = -30 + if bReverse then y = y * -1 end + if bCentered then y = y * 2 end + self:x( x ) + self:y( y ) + end +end + + -- (c) 2005 Chris Danford -- All rights reserved. -- diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 47c155aaf3..e30c857ffe 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -2672,6 +2672,7 @@ ShowMissCombo=0 ReceptorArrowsYStandard=-144 ReceptorArrowsYReverse=144 ReceptorNoSinkScoreCutoff=4 +JudgmentTransformCommandFunction=JudgmentTransformCommand JudgmentXOffsetOneSideP1=0 JudgmentXOffsetOneSideP2=0 JudgmentXOffsetBothSides=0 @@ -4536,15 +4537,39 @@ Fallback=ScreenGameplay PlayerDummyOnCommand= PlayerDummyOffCommand= PlayerDummyOnePlayerOneSideX=SCREEN_CENTER_X +PlayerP1OnePlayerOneSideX=SCREEN_CENTER_X +PlayerP2OnePlayerOneSideX=SCREEN_CENTER_X +PlayerP3OnePlayerOneSideX=SCREEN_CENTER_X +PlayerP4OnePlayerOneSideX=SCREEN_CENTER_X +PlayerP5OnePlayerOneSideX=SCREEN_CENTER_X +PlayerP6OnePlayerOneSideX=SCREEN_CENTER_X +PlayerP7OnePlayerOneSideX=SCREEN_CENTER_X +PlayerP8OnePlayerOneSideX=SCREEN_CENTER_X ActiveAttackListDummyX= ActiveAttackListDummyY= ActiveAttackListDummyOnCommand=hidden,1 ActiveAttackListDummyOffCommand= -ScoreP1X=SCREEN_LEFT+100 +ScoreP1X=SCREEN_LEFT ScoreP1Y=SCREEN_CENTER_Y-20 ScoreP1OnCommand=addx,-100;sleep,0.5;linear,1;addx,100 ScoreP1OffCommand=linear,1;addx,-100 -ScoreP2X=SCREEN_LEFT+100 +ScoreP2X=SCREEN_LEFT ScoreP2Y=SCREEN_CENTER_Y+20 ScoreP2OnCommand=addx,-100;sleep,0.5;linear,1;addx,100 ScoreP2OffCommand=linear,1;addx,-100 +PlayerScoreListX=SCREEN_CENTER_X +PlayerScoreListY=SCREEN_BOTTOM-36 +PlayerScoreListOnCommand=draworder,-1;addy,150;sleep,0.5;decelerate,0.5;addy,-150 +PlayerScoreListOffCommand=accelerate,0.5;addy,150 + +[PlayerScoreItem Percent] +Fallback=ScoreDisplayPercentage Percent +PercentP1X=0 +PercentP1Y=2 +PercentP1OnCommand=@"x,3;zoomx,0.42;shadowlength,0;diffuse,"..PlayerColor(PLAYER_1) +PercentP1OffCommand= +DancePointsDigits=5 +PercentUseRemainder=0 + +[PlayerScoreList] +ItemPositionCommandFunction=function(self,itemIndex,numItems) local indexOffset = itemIndex-(numItems-1)/2; self:x(indexOffset*72) end