From 43d99724f90388b195493b691fe3fe62e7cdd65e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 15 Apr 2003 02:47:24 +0000 Subject: [PATCH] Win and Lose messages in ScreenGameplay and ScreenEvaluation --- stepmania/Themes/default/metrics.ini | 396 +++++++++++++++++++++------ stepmania/src/ActorUtil.h | 34 ++- stepmania/src/GameState.cpp | 9 + stepmania/src/GameState.h | 1 + stepmania/src/Screen.cpp | 2 + stepmania/src/ScreenEvaluation.cpp | 318 +++++++++++++-------- stepmania/src/ScreenEvaluation.h | 16 ++ stepmania/src/ScreenGameplay.cpp | 5 +- 8 files changed, 576 insertions(+), 205 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index d3ec373aed..274bc416df 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -556,8 +556,8 @@ NextScreenArcade=ScreenEvaluationStage NextScreenNonstop=ScreenEvaluationNonstop NextScreenOni=ScreenEvaluationOni NextScreenEndless=ScreenEvaluationEndless -NextScreenBattle=ScreenEvaluationStage -NextScreenRave=ScreenEvaluationStage +NextScreenBattle=ScreenEvaluationBattle +NextScreenRave=ScreenEvaluationRave BPMX=999 // don't show by default BPMY=999 BPMOnCommand=zoom,0 @@ -760,172 +760,353 @@ TickEarlySeconds=0.05 [ScreenEvaluation] BannerWidth=248 BannerHeight=92 -LargeBannerOnCommand=x,320;y,100;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +LargeBannerX=320 +LargeBannerY=100 +LargeBannerOnCommand=addy,480;sleep,0.0;decelerate,0.3;addy,-480 LargeBannerOffCommand=sleep,0.8;accelerate,0.3;addy,480 -StageOnCommand=x,320;y,66;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +StageX=320 +StageY=66 +StageOnCommand=addy,480;sleep,0.0;decelerate,0.3;addy,-480 StageOffCommand=sleep,0.8;accelerate,0.3;addy,480 -DifficultyIconP1OnCommand=x,214;y,70;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +DifficultyIconP1X=214 +DifficultyIconP1Y=70 +DifficultyIconP1OnCommand=addy,480;sleep,0.0;decelerate,0.3;addy,-480 DifficultyIconP1OffCommand=sleep,0.8;accelerate,0.3;addy,480 -DifficultyIconP2OnCommand=x,426;y,70;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +DifficultyIconP2X=426 +DifficultyIconP2Y=70 +DifficultyIconP2OnCommand=addy,480;sleep,0.0;decelerate,0.3;addy,-480 DifficultyIconP2OffCommand=sleep,0.8;accelerate,0.3;addy,480 -PlayerOptionsP1OnCommand=horizalign,left;vertalign,bottom;x,200;y,140;zoom,0.5;shadowlength,2;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +PlayerOptionsP1X=200 +PlayerOptionsP1Y=140 +PlayerOptionsP1OnCommand=horizalign,left;vertalign,bottom;zoom,0.5;shadowlength,2;addy,480;sleep,0.0;decelerate,0.3;addy,-480 PlayerOptionsP1OffCommand=sleep,0.8;accelerate,0.3;addy,480 -PlayerOptionsP2OnCommand=horizalign,right;vertalign,bottom;x,440;y,140;zoom,0.5;shadowlength,2;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +PlayerOptionsP2X=440 +PlayerOptionsP2Y=140 +PlayerOptionsP2OnCommand=horizalign,right;vertalign,bottom;zoom,0.5;shadowlength,2;addy,480;sleep,0.0;decelerate,0.3;addy,-480 PlayerOptionsP2OffCommand=sleep,0.8;accelerate,0.3;addy,480 -SmallBanner1OnCommand=x,260;y,80;zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +SmallBanner1X=260 +SmallBanner1Y=80 +SmallBanner1OnCommand=zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 SmallBanner1OffCommand=sleep,0.8;accelerate,0.3;addy,480 -SmallBanner2OnCommand=x,290;y,90;zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +SmallBanner2X=290 +SmallBanner2Y=90 +SmallBanner2OnCommand=zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 SmallBanner2OffCommand=sleep,0.8;accelerate,0.3;addy,480 -SmallBanner3OnCommand=x,320;y,100;zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +SmallBanner3X=320 +SmallBanner3Y=100 +SmallBanner3OnCommand=zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 SmallBanner3OffCommand=sleep,0.8;accelerate,0.3;addy,480 -SmallBanner4OnCommand=x,350;y,110;zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +SmallBanner4X=350 +SmallBanner4Y=110 +SmallBanner4OnCommand=zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 SmallBanner4OffCommand=sleep,0.8;accelerate,0.3;addy,480 -SmallBanner5OnCommand=x,380;y,120;zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 +SmallBanner5X=380 +SmallBanner5Y=120 +SmallBanner5OnCommand=zoom,0.5;addy,480;sleep,0.0;decelerate,0.3;addy,-480 SmallBanner5OffCommand=sleep,0.8;accelerate,0.3;addy,480 -GradeFrameP1OnCommand=x,94;y,100;addx,-320;sleep,0.0;decelerate,0.3;addx,320 +GradeFrameP1X=94 +GradeFrameP1Y=100 +GradeFrameP1OnCommand=addx,-320;sleep,0.0;decelerate,0.3;addx,320 GradeFrameP1OffCommand=sleep,0.8;accelerate,0.3;addx,-320 -GradeFrameP2OnCommand=x,546;y,100;addx,320;sleep,0.0;decelerate,0.3;addx,-320 +GradeFrameP2X=546 +GradeFrameP2Y=100 +GradeFrameP2OnCommand=addx,320;sleep,0.0;decelerate,0.3;addx,-320 GradeFrameP2OffCommand=sleep,0.8;accelerate,0.3;addx,320 -GradeP1OnCommand=x,94;y,100;glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 +GradeP1X=94 +GradeP1Y=100 +GradeP1OnCommand=glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 GradeP1OffCommand=sleep,0.8;accelerate,0.3;addx,-320 -GradeP2OnCommand=x,546;y,100;glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 +GradeP2X=546 +GradeP2Y=100 +GradeP2OnCommand=glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 GradeP2OffCommand=sleep,0.8;accelerate,0.3;addx,320 -PercentFrameP1OnCommand=x,94;y,100;addx,-320;sleep,0.0;decelerate,0.3;addx,320 +PercentFrameP1X=94 +PercentFrameP1Y=100 +PercentFrameP1OnCommand=addx,-320;sleep,0.0;decelerate,0.3;addx,320 PercentFrameP1OffCommand=sleep,0.8;accelerate,0.3;addx,-320 -PercentFrameP2OnCommand=x,546;y,100;addx,320;sleep,0.0;decelerate,0.3;addx,-320 +PercentFrameP2X=546 +PercentFrameP2Y=100 +PercentFrameP2OnCommand=addx,320;sleep,0.0;decelerate,0.3;addx,-320 PercentFrameP2OffCommand=sleep,0.8;accelerate,0.3;addx,320 -PercentWholeP1OnCommand=horizalign,right;vertalign,bottom;x,120;y,132;glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 +PercentWholeP1X=120 +PercentWholeP1Y=132 +PercentWholeP1OnCommand=horizalign,right;vertalign,bottom;glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 PercentWholeP1OffCommand=sleep,0.8;accelerate,0.3;addx,-320 -PercentWholeP2OnCommand=horizalign,right;vertalign,bottom;x,572;y,132;glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 +PercentWholeP2X=572 +PercentWholeP2Y=132 +PercentWholeP2OnCommand=horizalign,right;vertalign,bottom;glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 PercentWholeP2OffCommand=sleep,0.8;accelerate,0.3;addx,320 -PercentRemainderP1OnCommand=horizalign,left;vertalign,bottom;x,120;y,132;zoom,0.5;glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 +PercentRemainderP1X=120 +PercentRemainderP1Y=132 +PercentRemainderP1OnCommand=horizalign,left;vertalign,bottom;zoom,0.5;glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 PercentRemainderP1OffCommand=sleep,0.8;accelerate,0.3;addx,-320 -PercentRemainderP2OnCommand=horizalign,left;vertalign,bottom;x,572;y,132;zoom,0.5;glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 +PercentRemainderP2X=572 +PercentRemainderP2Y=132 +PercentRemainderP2OnCommand=horizalign,left;vertalign,bottom;zoom,0.5;glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 PercentRemainderP2OffCommand=sleep,0.8;accelerate,0.3;addx,320 -DancePointsP1OnCommand=x,94;y,100;glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 +DancePointsP1X=94 +DancePointsP1Y=100 +DancePointsP1OnCommand=glowshift;effectperiod,2;addx,-320;sleep,0.0;decelerate,0.3;addx,320 DancePointsP1OffCommand=sleep,0.8;accelerate,0.3;addx,-320 -DancePointsP2OnCommand=x,546;y,100;glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 +DancePointsP2X=546 +DancePointsP2Y=100 +DancePointsP2OnCommand=glowshift;effectperiod,2;addx,320;sleep,0.0;decelerate,0.3;addx,-320 DancePointsP2OffCommand=sleep,0.8;accelerate,0.3;addx,320 -MarvelousLabelOnCommand=x,320;y,160;addy,480;sleep,0.1;decelerate,0.3;addy,-480 +MarvelousLabelX=320 +MarvelousLabelY=160 +MarvelousLabelOnCommand=addy,480;sleep,0.1;decelerate,0.3;addy,-480 MarvelousLabelOffCommand=sleep,0.7;accelerate,0.3;addy,480 -MarvelousNumberP1OnCommand=x,230;y,160;addx,-320;sleep,0.1;decelerate,0.3;addx,320 +MarvelousNumberP1X=230 +MarvelousNumberP1Y=160 +MarvelousNumberP1OnCommand=addx,-320;sleep,0.1;decelerate,0.3;addx,320 MarvelousNumberP1OffCommand=sleep,0.7;accelerate,0.3;addx,-320 -MarvelousNumberP2OnCommand=x,410;y,160;addx,320;sleep,0.1;decelerate,0.3;addx,-320 +MarvelousNumberP2X=410 +MarvelousNumberP2Y=160 +MarvelousNumberP2OnCommand=addx,320;sleep,0.1;decelerate,0.3;addx,-320 MarvelousNumberP2OffCommand=sleep,0.7;accelerate,0.3;addx,320 -PerfectLabelOnCommand=x,320;y,192;addy,480;sleep,0.2;decelerate,0.3;addy,-480 +PerfectLabelX=320 +PerfectLabelY=192 +PerfectLabelOnCommand=addy,480;sleep,0.2;decelerate,0.3;addy,-480 PerfectLabelOffCommand=sleep,0.6;accelerate,0.3;addy,480 -PerfectNumberP1OnCommand=x,230;y,192;addx,-320;sleep,0.2;decelerate,0.3;addx,320 +PerfectNumberP1X=230 +PerfectNumberP1Y=192 +PerfectNumberP1OnCommand=addx,-320;sleep,0.2;decelerate,0.3;addx,320 PerfectNumberP1OffCommand=sleep,0.6;accelerate,0.3;addx,-320 -PerfectNumberP2OnCommand=x,410;y,192;addx,320;sleep,0.2;decelerate,0.3;addx,-320 +PerfectNumberP2X=410 +PerfectNumberP2Y=192 +PerfectNumberP2OnCommand=addx,320;sleep,0.2;decelerate,0.3;addx,-320 PerfectNumberP2OffCommand=sleep,0.6;accelerate,0.3;addx,320 -GreatLabelOnCommand=x,320;y,224;addy,480;sleep,0.3;decelerate,0.3;addy,-480 +GreatLabelX=320 +GreatLabelY=224 +GreatLabelOnCommand=addy,480;sleep,0.3;decelerate,0.3;addy,-480 GreatLabelOffCommand=sleep,0.5;accelerate,0.3;addy,480 -GreatNumberP1OnCommand=x,230;y,224;addx,-320;sleep,0.3;decelerate,0.3;addx,320 +GreatNumberP1X=230 +GreatNumberP1Y=224 +GreatNumberP1OnCommand=addx,-320;sleep,0.3;decelerate,0.3;addx,320 GreatNumberP1OffCommand=sleep,0.5;accelerate,0.3;addx,-320 -GreatNumberP2OnCommand=x,410;y,224;addx,320;sleep,0.3;decelerate,0.3;addx,-320 +GreatNumberP2X=410 +GreatNumberP2Y=224 +GreatNumberP2OnCommand=addx,320;sleep,0.3;decelerate,0.3;addx,-320 GreatNumberP2OffCommand=sleep,0.5;accelerate,0.3;addx,320 -GoodLabelOnCommand=x,320;y,256;addy,480;sleep,0.4;decelerate,0.3;addy,-480 +GoodLabelX=320 +GoodLabelY=256 +GoodLabelOnCommand=addy,480;sleep,0.4;decelerate,0.3;addy,-480 GoodLabelOffCommand=sleep,0.4;accelerate,0.3;addy,480 -GoodNumberP1OnCommand=x,230;y,256;addx,-320;sleep,0.4;decelerate,0.3;addx,320 +GoodNumberP1X=230 +GoodNumberP1Y=256 +GoodNumberP1OnCommand=addx,-320;sleep,0.4;decelerate,0.3;addx,320 GoodNumberP1OffCommand=sleep,0.4;accelerate,0.3;addx,-320 -GoodNumberP2OnCommand=x,410;y,256;addx,320;sleep,0.4;decelerate,0.3;addx,-320 +GoodNumberP2X=410 +GoodNumberP2Y=256 +GoodNumberP2OnCommand=addx,320;sleep,0.4;decelerate,0.3;addx,-320 GoodNumberP2OffCommand=sleep,0.4;accelerate,0.3;addx,320 -BooLabelOnCommand=x,320;y,288;addy,480;sleep,0.5;decelerate,0.3;addy,-480 +BooLabelX=320 +BooLabelY=288 +BooLabelOnCommand=addy,480;sleep,0.5;decelerate,0.3;addy,-480 BooLabelOffCommand=sleep,0.3;accelerate,0.3;addy,480 -BooNumberP1OnCommand=x,230;y,288;addx,-320;sleep,0.5;decelerate,0.3;addx,320 +BooNumberP1X=230 +BooNumberP1Y=288 +BooNumberP1OnCommand=addx,-320;sleep,0.5;decelerate,0.3;addx,320 BooNumberP1OffCommand=sleep,0.3;accelerate,0.3;addx,-320 -BooNumberP2OnCommand=x,410;y,288;addx,320;sleep,0.5;decelerate,0.3;addx,-320 +BooNumberP2X=410 +BooNumberP2Y=288 +BooNumberP2OnCommand=addx,320;sleep,0.5;decelerate,0.3;addx,-320 BooNumberP2OffCommand=sleep,0.3;accelerate,0.3;addx,320 -MissLabelOnCommand=x,320;y,320;addy,480;sleep,0.6;decelerate,0.3;addy,-480 +MissLabelX=320 +MissLabelY=320 +MissLabelOnCommand=addy,480;sleep,0.6;decelerate,0.3;addy,-480 MissLabelOffCommand=sleep,0.2;accelerate,0.3;addy,480 -MissNumberP1OnCommand=x,230;y,320;addx,-320;sleep,0.6;decelerate,0.3;addx,320 +MissNumberP1X=230 +MissNumberP1Y=320 +MissNumberP1OnCommand=addx,-320;sleep,0.6;decelerate,0.3;addx,320 MissNumberP1OffCommand=sleep,0.2;accelerate,0.3;addx,-320 -MissNumberP2OnCommand=x,410;y,320;addx,320;sleep,0.6;decelerate,0.3;addx,-320 +MissNumberP2X=410 +MissNumberP2Y=320 +MissNumberP2OnCommand=addx,320;sleep,0.6;decelerate,0.3;addx,-320 MissNumberP2OffCommand=sleep,0.2;accelerate,0.3;addx,320 -OKLabelOnCommand=x,320;y,352;addy,480;sleep,0.7;decelerate,0.3;addy,-480 +OKLabelX=320 +OKLabelY=352 +OKLabelOnCommand=addy,480;sleep,0.7;decelerate,0.3;addy,-480 OKLabelOffCommand=sleep,0.1;accelerate,0.3;addy,480 -OKNumberP1OnCommand=x,230;y,352;addx,-320;sleep,0.7;decelerate,0.3;addx,320 +OKNumberP1X=230 +OKNumberP1Y=352 +OKNumberP1OnCommand=addx,-320;sleep,0.7;decelerate,0.3;addx,320 OKNumberP1OffCommand=sleep,0.1;accelerate,0.3;addx,-320 -OKNumberP2OnCommand=x,410;y,352;addx,320;sleep,0.7;decelerate,0.3;addx,-320 +OKNumberP2X=410 +OKNumberP2Y=352 +OKNumberP2OnCommand=addx,320;sleep,0.7;decelerate,0.3;addx,-320 OKNumberP2OffCommand=sleep,0.1;accelerate,0.3;addx,320 +MaxComboLabelX=0 +MaxComboLabelY=0 MaxComboLabelOnCommand=diffusealpha,0 MaxComboLabelOffCommand= -MaxComboNumberP1OnCommand=x,134;y,334;zoom,1.2;diffusealpha,0;linear,0.7;diffuse,1,1,0,1 +MaxComboNumberP1X=134 +MaxComboNumberP1Y=334 +MaxComboNumberP1OnCommand=zoom,1.2;diffusealpha,0;linear,0.7;diffuse,1,1,0,1 MaxComboNumberP1OffCommand=linear,0.7;diffusealpha,0 -MaxComboNumberP2OnCommand=x,580;y,334;zoom,1.2;diffusealpha,0;linear,0.7;diffuse,1,1,0,1 +MaxComboNumberP2X=580 +MaxComboNumberP2Y=334 +MaxComboNumberP2OnCommand=zoom,1.2;diffusealpha,0;linear,0.7;diffuse,1,1,0,1 MaxComboNumberP2OffCommand=linear,0.7;diffusealpha,0 -BonusFrameP1OnCommand=x,96;y,256;diffusealpha,0;linear,0.7;diffusealpha,1 +BonusFrameP1X=96 +BonusFrameP1Y=256 +BonusFrameP1OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 BonusFrameP1OffCommand=linear,0.7;diffusealpha,0 -BonusFrameP2OnCommand=x,544;y,256;diffusealpha,0;linear,0.7;diffusealpha,1 +BonusFrameP2X=544 +BonusFrameP2Y=256 +BonusFrameP2OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 BonusFrameP2OffCommand=linear,0.7;diffusealpha,0 -BarPossible1P1OnCommand=horizalign,left;x,176;y,194;rotationz,180;zoomx,0;sleep,0.2;linear,1.0;zoomx,1 +BarPossible1P1X=176 +BarPossible1P1Y=194 +BarPossible1P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,0.2;linear,1.0;zoomx,1 BarPossible1P1OffCommand=linear,0.7;diffusealpha,0 -BarPossible1P2OnCommand=horizalign,left;x,466;y,194;rotationz,0;zoomx,0;sleep,0.2;linear,1.0;zoomx,1 +BarPossible1P2X=466 +BarPossible1P2Y=194 +BarPossible1P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,0.2;linear,1.0;zoomx,1 BarPossible1P2OffCommand=linear,0.7;diffusealpha,0 -BarPossible2P1OnCommand=horizalign,left;x,176;y,221;rotationz,180;zoomx,0;sleep,0.3;linear,1.0;zoomx,1 +BarPossible2P1X=176 +BarPossible2P1Y=221 +BarPossible2P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,0.3;linear,1.0;zoomx,1 BarPossible2P1OffCommand=linear,0.7;diffusealpha,0 -BarPossible2P2OnCommand=horizalign,left;x,466;y,221;rotationz,0;zoomx,0;sleep,0.3;linear,1.0;zoomx,1 +BarPossible2P2X=466 +BarPossible2P2Y=221 +BarPossible2P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,0.3;linear,1.0;zoomx,1 BarPossible2P2OffCommand=linear,0.7;diffusealpha,0 -BarPossible3P1OnCommand=horizalign,left;x,176;y,248;rotationz,180;zoomx,0;sleep,0.4;linear,1.0;zoomx,1 +BarPossible3P1X=176 +BarPossible3P1Y=248 +BarPossible3P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,0.4;linear,1.0;zoomx,1 BarPossible3P1OffCommand=linear,0.7;diffusealpha,0 -BarPossible3P2OnCommand=horizalign,left;x,466;y,248;rotationz,0;zoomx,0;sleep,0.4;linear,1.0;zoomx,1 +BarPossible3P2X=466 +BarPossible3P2Y=248 +BarPossible3P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,0.4;linear,1.0;zoomx,1 BarPossible3P2OffCommand=linear,0.7;diffusealpha,0 -BarPossible4P1OnCommand=horizalign,left;x,176;y,275;rotationz,180;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 +BarPossible4P1X=176 +BarPossible4P1Y=275 +BarPossible4P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 BarPossible4P1OffCommand=linear,0.7;diffusealpha,0 -BarPossible4P2OnCommand=horizalign,left;x,466;y,275;rotationz,0;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 +BarPossible4P2X=466 +BarPossible4P2Y=275 +BarPossible4P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 BarPossible4P2OffCommand=linear,0.7;diffusealpha,0 -BarPossible5P1OnCommand=horizalign,left;x,176;y,302;rotationz,180;zoomx,0;sleep,0.6;linear,1.0;zoomx,1 +BarPossible5P1X=176 +BarPossible5P1Y=302 +BarPossible5P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,0.6;linear,1.0;zoomx,1 BarPossible5P1OffCommand=linear,0.7;diffusealpha,0 -BarPossible5P2OnCommand=horizalign,left;x,466;y,302;rotationz,0;zoomx,0;sleep,0.6;linear,1.0;zoomx,1 +BarPossible5P2X=466 +BarPossible5P2Y=302 +BarPossible5P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,0.6;linear,1.0;zoomx,1 BarPossible5P2OffCommand=linear,0.7;diffusealpha,0 -BarActual1P1OnCommand=horizalign,left;x,176;y,194;rotationz,180;zoomx,0;sleep,0.7;linear,1.0;zoomx,1 +BarActual1P1X=176 +BarActual1P1Y=194 +BarActual1P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,0.7;linear,1.0;zoomx,1 BarActual1P1OffCommand=linear,0.7;diffusealpha,0 -BarActual1P2OnCommand=horizalign,left;x,466;y,194;rotationz,0;zoomx,0;sleep,0.7;linear,1.0;zoomx,1 +BarActual1P2X=466 +BarActual1P2Y=194 +BarActual1P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,0.7;linear,1.0;zoomx,1 BarActual1P2OffCommand=linear,0.7;diffusealpha,0 -BarActual2P1OnCommand=horizalign,left;x,176;y,221;rotationz,180;zoomx,0;sleep,0.8;linear,1.0;zoomx,1 +BarActual2P1X=176 +BarActual2P1Y=221 +BarActual2P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,0.8;linear,1.0;zoomx,1 BarActual2P1OffCommand=linear,0.7;diffusealpha,0 -BarActual2P2OnCommand=horizalign,left;x,466;y,221;rotationz,0;zoomx,0;sleep,0.8;linear,1.0;zoomx,1 +BarActual2P2X=466 +BarActual2P2Y=221 +BarActual2P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,0.8;linear,1.0;zoomx,1 BarActual2P2OffCommand=linear,0.7;diffusealpha,0 -BarActual3P1OnCommand=horizalign,left;x,176;y,248;rotationz,180;zoomx,0;sleep,0.9;linear,1.0;zoomx,1 +BarActual3P1X=176 +BarActual3P1Y=248 +BarActual3P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,0.9;linear,1.0;zoomx,1 BarActual3P1OffCommand=linear,0.7;diffusealpha,0 -BarActual3P2OnCommand=horizalign,left;x,466;y,248;rotationz,0;zoomx,0;sleep,0.9;linear,1.0;zoomx,1 +BarActual3P2X=466 +BarActual3P2Y=248 +BarActual3P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,0.9;linear,1.0;zoomx,1 BarActual3P2OffCommand=linear,0.7;diffusealpha,0 -BarActual4P1OnCommand=horizalign,left;x,176;y,275;rotationz,180;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 +BarActual4P1X=176 +BarActual4P1Y=275 +BarActual4P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 BarActual4P1OffCommand=linear,0.7;diffusealpha,0 -BarActual4P2OnCommand=horizalign,left;x,466;y,275;rotationz,0;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 +BarActual4P2X=466 +BarActual4P2Y=275 +BarActual4P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,1.0;linear,1.0;zoomx,1 BarActual4P2OffCommand=linear,0.7;diffusealpha,0 -BarActual5P1OnCommand=horizalign,left;x,176;y,302;rotationz,180;zoomx,0;sleep,1.1;linear,1.0;zoomx,1 +BarActual5P1X=176 +BarActual5P1Y=302 +BarActual5P1OnCommand=horizalign,left;rotationz,180;zoomx,0;sleep,1.1;linear,1.0;zoomx,1 BarActual5P1OffCommand=linear,0.7;diffusealpha,0 -BarActual5P2OnCommand=horizalign,left;x,466;y,302;rotationz,0;zoomx,0;sleep,1.1;linear,1.0;zoomx,1 +BarActual5P2X=466 +BarActual5P2Y=302 +BarActual5P2OnCommand=horizalign,left;rotationz,0;zoomx,0;sleep,1.1;linear,1.0;zoomx,1 BarActual5P2OffCommand=linear,0.7;diffusealpha,0 BarActualMaxCommand=glowshift;effectperiod,0.5 -SurvivedFrameP1OnCommand=x,96;y,256;diffusealpha,0;linear,0.7;diffusealpha,1 +SurvivedFrameP1X=96 +SurvivedFrameP1Y=256 +SurvivedFrameP1OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 SurvivedFrameP1OffCommand=linear,0.7;diffusealpha,0 -SurvivedFrameP2OnCommand=x,544;y,256;diffusealpha,0;linear,0.7;diffusealpha,1 +SurvivedFrameP2X=544 +SurvivedFrameP2Y=256 +SurvivedFrameP2OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 SurvivedFrameP2OffCommand=linear,0.7;diffusealpha,0 -SurvivedNumberP1OnCommand=x,96;y,240;diffusealpha,0;linear,0.7;diffusealpha,1 +SurvivedNumberP1X=96 +SurvivedNumberP1Y=240 +SurvivedNumberP1OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 SurvivedNumberP1OffCommand=linear,0.7;diffusealpha,0 -SurvivedNumberP2OnCommand=x,544;y,240;diffusealpha,0;linear,0.7;diffusealpha,1 +SurvivedNumberP2X=544 +SurvivedNumberP2Y=240 +SurvivedNumberP2OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 SurvivedNumberP2OffCommand=linear,0.7;diffusealpha,0 -ScoreLabelOnCommand=x,320;y,380;addy,480;sleep,0.8;decelerate,0.3;addy,-480 +WinFrameP1X=96 +WinFrameP1Y=256 +WinFrameP1OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 +WinFrameP1OffCommand=linear,0.7;diffusealpha,0 +WinFrameP2X=544 +WinFrameP2Y=256 +WinFrameP2OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 +WinFrameP2OffCommand=linear,0.7;diffusealpha,0 +WinP1X=96 +WinP1Y=240 +WinP1OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 +WinP1OffCommand=linear,0.7;diffusealpha,0 +WinP2X=544 +WinP2Y=240 +WinP2OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1 +WinP2OffCommand=linear,0.7;diffusealpha,0 +ScoreLabelX=320 +ScoreLabelY=380 +ScoreLabelOnCommand=addy,480;sleep,0.8;decelerate,0.3;addy,-480 ScoreLabelOffCommand=sleep,0.0;accelerate,0.3;addy,480 -ScoreNumberP1OnCommand=x,160;y,380;addx,-320;sleep,0.8;decelerate,0.3;addx,320 +ScoreNumberP1X=160 +ScoreNumberP1Y=380 +ScoreNumberP1OnCommand=addx,-320;sleep,0.8;decelerate,0.3;addx,320 ScoreNumberP1OffCommand=sleep,0.0;accelerate,0.3;addx,-320 -ScoreNumberP2OnCommand=x,480;y,380;addx,320;sleep,0.8;decelerate,0.3;addx,-320 +ScoreNumberP2X=480 +ScoreNumberP2Y=380 +ScoreNumberP2OnCommand=addx,320;sleep,0.8;decelerate,0.3;addx,-320 ScoreNumberP2OffCommand=sleep,0.0;accelerate,0.3;addx,320 -TimeLabelOnCommand=x,320;y,380;addy,480;sleep,0.8;decelerate,0.3;addy,-480 +TimeLabelX=320 +TimeLabelY=380 +TimeLabelOnCommand=addy,480;sleep,0.8;decelerate,0.3;addy,-480 TimeLabelOffCommand=sleep,0.0;accelerate,0.3;addy,480 -TimeNumberP1OnCommand=x,160;y,380;addx,-320;sleep,0.8;decelerate,0.3;addx,320 +TimeNumberP1X=160 +TimeNumberP1Y=380 +TimeNumberP1OnCommand=addx,-320;sleep,0.8;decelerate,0.3;addx,320 TimeNumberP1OffCommand=sleep,0.0;accelerate,0.3;addx,-320 -TimeNumberP2OnCommand=x,480;y,380;addx,320;sleep,0.8;decelerate,0.3;addx,-320 +TimeNumberP2X=480 +TimeNumberP2Y=380 +TimeNumberP2OnCommand=addx,320;sleep,0.8;decelerate,0.3;addx,-320 TimeNumberP2OffCommand=sleep,0.0;accelerate,0.3;addx,320 -NewRecordP1OnCommand=x,150;y,398;diffusealpha,0;linear,0.7;diffusealpha,1;glowshift +NewRecordP1X=150 +NewRecordP1Y=398 +NewRecordP1OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1;glowshift NewRecordP1OffCommand=linear,0.7;diffusealpha,0 -NewRecordP2OnCommand=x,490;y,398;diffusealpha,0;linear,0.7;diffusealpha,1;glowshift +NewRecordP2X=490 +NewRecordP2Y=398 +NewRecordP2OnCommand=diffusealpha,0;linear,0.7;diffusealpha,1;glowshift NewRecordP2OffCommand=linear,0.7;diffusealpha,0 -TryExtraStageOnCommand=x,320;y,428;diffusealpha,0;linear,0.7;diffusealpha,1;glowshift +TryExtraStageX=320 +TryExtraStageY=428 +TryExtraStageOnCommand=diffusealpha,0;linear,0.7;diffusealpha,1;glowshift TryExtraStageOffCommand=linear,0.7;diffusealpha,0 SpinGrades=1 +CheerDelaySeconds=2.5 [ScreenEvaluationStage] NextScreen=ScreenSelectMusic @@ -935,6 +1116,7 @@ ShowGradeArea=1 ShowPointsArea=0 ShowBonusArea=1 ShowSurvivedArea=0 +ShowWinArea=0 ShowMarvelous=1 ShowPerfect=1 ShowGreat=1 @@ -956,6 +1138,7 @@ ShowGradeArea=1 ShowPointsArea=0 ShowBonusArea=1 ShowSurvivedArea=0 +ShowWinArea=0 ShowMarvelous=1 ShowPerfect=1 ShowGreat=1 @@ -977,6 +1160,7 @@ ShowGradeArea=1 ShowPointsArea=0 ShowBonusArea=0 ShowSurvivedArea=1 +ShowWinArea=0 ShowMarvelous=1 ShowPerfect=1 ShowGreat=1 @@ -998,6 +1182,7 @@ ShowGradeArea=0 ShowPointsArea=1 ShowBonusArea=0 ShowSurvivedArea=1 +ShowWinArea=0 ShowMarvelous=1 ShowPerfect=1 ShowGreat=1 @@ -1019,6 +1204,7 @@ ShowGradeArea=0 ShowPointsArea=1 ShowBonusArea=0 ShowSurvivedArea=1 +ShowWinArea=0 ShowMarvelous=1 ShowPerfect=1 ShowGreat=1 @@ -1032,6 +1218,50 @@ ShowTimeArea=1 HelpText=Press START to continue TimerSeconds=30 +[ScreenEvaluationBattle] +NextScreen=ScreenSelectMusic +EndScreen=ScreenEvaluationSummary +ShowBannerArea=1 +ShowGradeArea=1 +ShowPointsArea=0 +ShowBonusArea=0 +ShowSurvivedArea=0 +ShowWinArea=1 +ShowMarvelous=1 +ShowPerfect=1 +ShowGreat=1 +ShowGood=1 +ShowBoo=1 +ShowMiss=1 +ShowOK=1 +ShowMaxCombo=1 +ShowScoreArea=1 +ShowTimeArea=0 +HelpText=Press START to continue +TimerSeconds=10 + +[ScreenEvaluationRave] +NextScreen=ScreenSelectMusic +EndScreen=ScreenEvaluationSummary +ShowBannerArea=1 +ShowGradeArea=1 +ShowPointsArea=0 +ShowBonusArea=0 +ShowSurvivedArea=0 +ShowWinArea=1 +ShowMarvelous=1 +ShowPerfect=1 +ShowGreat=1 +ShowGood=1 +ShowBoo=1 +ShowMiss=1 +ShowOK=1 +ShowMaxCombo=1 +ShowScoreArea=1 +ShowTimeArea=0 +HelpText=Press START to continue +TimerSeconds=10 + [ScreenMusicScroll] ScrollDelay=0.2 ScrollSpeed=1.0 diff --git a/stepmania/src/ActorUtil.h b/stepmania/src/ActorUtil.h index b754a8a6c8..a869da0342 100644 --- a/stepmania/src/ActorUtil.h +++ b/stepmania/src/ActorUtil.h @@ -14,10 +14,36 @@ #include "Actor.h" -#define SET_XY( actor ) (actor).SetXY( THEME->GetMetricF(m_sName,(actor).GetName()+"X"), THEME->GetMetricF(m_sName,(actor).GetName()+"Y") ); -#define ON_COMMAND( actor ) (actor).Command( THEME->GetMetric(m_sName,(actor).GetName()+"OnCommand") ) -#define OFF_COMMAND( actor ) (actor).Command( THEME->GetMetric(m_sName,(actor).GetName()+"OffCommand") ) -#define SET_XY_AND_ON_COMMAND( actor ) { SET_XY(actor); ON_COMMAND(actor); } +#define SET_XY( actor ) UtilSetXY( actor, m_sName ); +#define ON_COMMAND( actor ) UtilOnCommand( actor, m_sName ); +#define OFF_COMMAND( actor ) UtilOffCommand( actor, m_sName ); +#define SET_XY_AND_ON_COMMAND( actor ) UtilSetXYAndOnCommand( actor, m_sName ); +inline void UtilSetXY( Actor& actor, CString sClassName ) +{ + actor.SetXY( THEME->GetMetricF(sClassName,actor.GetName()+"X"), THEME->GetMetricF(sClassName,actor.GetName()+"Y") ); +} + +inline void UtilOnCommand( Actor& actor, CString sClassName ) +{ + actor.Command( THEME->GetMetric(sClassName,actor.GetName()+"OnCommand") ); +} + +inline void UtilOffCommand( Actor& actor, CString sClassName ) +{ + // HACK: It's very often that we command things to TweenOffScreen + // that we aren't drawing. We know that an Actor is not being + // used if it's name is blank. So, do nothing on Actors with a blank name. + if( actor.GetName().empty() ) + return; + actor.Command( THEME->GetMetric(sClassName,actor.GetName()+"OffCommand") ); +} + +inline void UtilSetXYAndOnCommand( Actor& actor, CString sClassName ) +{ + UtilSetXY( actor, sClassName ); + UtilOnCommand( actor, sClassName ); +} + #endif \ No newline at end of file diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index a6c86285d3..d826c2c991 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -328,6 +328,15 @@ bool GameState::HasEarnedExtraStage() return false; } +PlayerNumber GameState::GetWinner() +{ + PlayerNumber winner = PLAYER_1; + for( int p=0; pm_CurStageStats.iActualDancePoints[p] > GAMESTATE->m_CurStageStats.iActualDancePoints[winner] ) + winner = (PlayerNumber)p; + return winner; +} + void GameState::GetFinalEvalStatsAndSongs( StageStats& statsOut, vector& vSongsOut ) { statsOut = StageStats(); diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 361b241c12..b2437e2dcb 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -182,6 +182,7 @@ public: bool HasEarnedExtraStage(); + PlayerNumber GetWinner(); bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on" diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 1c57a4c73d..bdd95e4992 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -285,6 +285,8 @@ Screen* Screen::Create( CString sClassName ) else if( sClassName=="ScreenEvaluationNonstop" ) ret = new ScreenEvaluationNonstop; else if( sClassName=="ScreenEvaluationOni" ) ret = new ScreenEvaluationOni; else if( sClassName=="ScreenEvaluationEndless" ) ret = new ScreenEvaluationEndless; + else if( sClassName=="ScreenEvaluationBattle" ) ret = new ScreenEvaluationBattle; + else if( sClassName=="ScreenEvaluationRave" ) ret = new ScreenEvaluationRave; else if( sClassName=="ScreenEz2SelectPlayer" ) ret = new ScreenEz2SelectPlayer; else if( sClassName=="ScreenSelectMode" ) ret = new ScreenSelectMode; else if( sClassName=="ScreenGameOver" ) ret = new ScreenGameOver; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index be9e9a6108..5b2e5d6753 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -24,63 +24,68 @@ #include "GrooveRadar.h" #include "ThemeManager.h" #include "RageSoundManager.h" +#include "ActorUtil.h" const int NUM_SCORE_DIGITS = 9; // metrics that are common to all ScreenEvaluation classes #define BANNER_WIDTH THEME->GetMetricF("ScreenEvaluation","BannerWidth") #define BANNER_HEIGHT THEME->GetMetricF("ScreenEvaluation","BannerHeight") -#define LARGE_BANNER_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","LargeBannerOnCommand") -#define LARGE_BANNER_OFF_COMMAND THEME->GetMetric ("ScreenEvaluation","LargeBannerOffCommand") -#define STAGE_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","StageOnCommand") -#define STAGE_OFF_COMMAND THEME->GetMetric ("ScreenEvaluation","StageOffCommand") -#define DIFFICULTY_ICON_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DifficultyIconP%dOnCommand",p+1)) -#define DIFFICULTY_ICON_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DifficultyIconP%dOffCommand",p+1)) -#define PLAYER_OPTIONS_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PlayerOptionsP%dOnCommand",p+1)) -#define PLAYER_OPTIONS_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PlayerOptionsP%dOffCommand",p+1)) -#define SMALL_BANNER_ON_COMMAND( i ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SmallBanner%dOnCommand",i+1)) -#define SMALL_BANNER_OFF_COMMAND( i ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SmallBanner%dOffCommand",i+1)) -#define GRADE_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeFrameP%dOnCommand",p+1)) -#define GRADE_FRAME_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeFrameP%dOffCommand",p+1)) -#define GRADE_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeP%dOnCommand",p+1)) -#define GRADE_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeP%dOffCommand",p+1)) -#define PERCENT_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentFrameP%dOnCommand",p+1)) -#define PERCENT_FRAME_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentFrameP%dOffCommand",p+1)) -#define PERCENT_WHOLE_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentWholeP%dOnCommand",p+1)) -#define PERCENT_WHOLE_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentWholeP%dOffCommand",p+1)) -#define PERCENT_REMAINDER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentRemainderP%dOnCommand",p+1)) -#define PERCENT_REMAINDER_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentRemainderP%dOffCommand",p+1)) -#define DANCE_POINTS_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DancePointsP%dOnCommand",p+1)) -#define DANCE_POINTS_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DancePointsP%dOffCommand",p+1)) const char* JUDGE_STRING[NUM_JUDGE_LINES] = { "Marvelous", "Perfect", "Great", "Good", "Boo", "Miss", "OK", "MaxCombo" }; -#define JUDGE_LABEL_ON_COMMAND( l ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sLabelOnCommand",JUDGE_STRING[l])) -#define JUDGE_LABEL_OFF_COMMAND( l ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sLabelOffCommand",JUDGE_STRING[l])) -#define JUDGE_NUMBER_ON_COMMAND( l, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sNumberP%dOnCommand",JUDGE_STRING[l],p+1)) -#define JUDGE_NUMBER_OFF_COMMAND( l, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sNumberP%dOffCommand",JUDGE_STRING[l],p+1)) -#define SCORE_LABEL_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","ScoreLabelOnCommand") -#define SCORE_LABEL_OFF_COMMAND THEME->GetMetric ("ScreenEvaluation","ScoreLabelOffCommand") -#define SCORE_NUMBER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("ScoreNumberP%dOnCommand",p+1)) -#define SCORE_NUMBER_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("ScoreNumberP%dOffCommand",p+1)) -#define TIME_LABEL_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","TimeLabelOnCommand") -#define TIME_LABEL_OFF_COMMAND THEME->GetMetric ("ScreenEvaluation","TimeLabelOffCommand") -#define TIME_NUMBER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("TimeNumberP%dOnCommand",p+1)) -#define TIME_NUMBER_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("TimeNumberP%dOffCommand",p+1)) -#define BONUS_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BonusFrameP%dOnCommand",p+1)) -#define BONUS_FRAME_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BonusFrameP%dOffCommand",p+1)) -#define BAR_POSSIBLE_ON_COMMAND( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarPossible%dP%dOnCommand",i+1,p+1)) -#define BAR_POSSIBLE_OFF_COMMAND( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarPossible%dP%dOffCommand",i+1,p+1)) -#define BAR_ACTUAL_ON_COMMAND( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarActual%dP%dOnCommand",i+1,p+1)) -#define BAR_ACTUAL_OFF_COMMAND( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarActual%dP%dOffCommand",i+1,p+1)) -#define BAR_ACTUAL_MAX_COMMAND THEME->GetMetric ("ScreenEvaluation","BarActualMaxCommand") -#define SURVIVED_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedFrameP%dOnCommand",p+1)) -#define SURVIVED_FRAME_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedFrameP%dOffCommand",p+1)) -#define SURVIVED_NUMBER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedNumberP%dOnCommand",p+1)) -#define SURVIVED_NUMBER_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedNumberP%dOffCommand",p+1)) -#define NEW_RECORD_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("NewRecordP%dOnCommand",p+1)) -#define NEW_RECORD_OFF_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("NewRecordP%dOffCommand",p+1)) -#define TRY_EXTRA_STAGE_ON_COMMAND THEME->GetMetric ("ScreenEvaluation",ssprintf("TryExtraStageOnCommand")) -#define TRY_EXTRA_STAGE_OFF_COMMAND THEME->GetMetric ("ScreenEvaluation",ssprintf("TryExtraStageOffCommand")) #define SPIN_GRADES THEME->GetMetricB("ScreenEvaluation","SpinGrades") +#define CHEER_DELAY_SECONDS THEME->GetMetricF("ScreenEvaluation","CheerDelaySeconds") +#define BAR_ACTUAL_MAX_COMMAND THEME->GetMetric ("ScreenEvaluation","BarActualMaxCommand") + +/* +#define LARGE_BANNER_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","LargeBannerOnCommand") +#define LARGE_BANNER_UtilOffCommand THEME->GetMetric ("ScreenEvaluation","LargeBannerUtilOffCommand") +#define STAGE_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","StageOnCommand") +#define STAGE_UtilOffCommand THEME->GetMetric ("ScreenEvaluation","StageUtilOffCommand") +#define DIFFICULTY_ICON_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DifficultyIconP%dOnCommand",p+1)) +#define DIFFICULTY_ICON_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DifficultyIconP%dUtilOffCommand",p+1)) +#define PLAYER_OPTIONS_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PlayerOptionsP%dOnCommand",p+1)) +#define PLAYER_OPTIONS_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PlayerOptionsP%dUtilOffCommand",p+1)) +#define SMALL_BANNER_ON_COMMAND( i ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SmallBanner%dOnCommand",i+1)) +#define SMALL_BANNER_UtilOffCommand( i ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SmallBanner%dUtilOffCommand",i+1)) +#define GRADE_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeFrameP%dOnCommand",p+1)) +#define GRADE_FRAME_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeFrameP%dUtilOffCommand",p+1)) +#define GRADE_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeP%dOnCommand",p+1)) +#define GRADE_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("GradeP%dUtilOffCommand",p+1)) +#define PERCENT_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentFrameP%dOnCommand",p+1)) +#define PERCENT_FRAME_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentFrameP%dUtilOffCommand",p+1)) +#define PERCENT_WHOLE_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentWholeP%dOnCommand",p+1)) +#define PERCENT_WHOLE_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentWholeP%dUtilOffCommand",p+1)) +#define PERCENT_REMAINDER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentRemainderP%dOnCommand",p+1)) +#define PERCENT_REMAINDER_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("PercentRemainderP%dUtilOffCommand",p+1)) +#define DANCE_POINTS_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DancePointsP%dOnCommand",p+1)) +#define DANCE_POINTS_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("DancePointsP%dUtilOffCommand",p+1)) +#define JUDGE_LABEL_ON_COMMAND( l ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sLabelOnCommand",JUDGE_STRING[l])) +#define JUDGE_LABEL_UtilOffCommand( l ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sLabelUtilOffCommand",JUDGE_STRING[l])) +#define JUDGE_NUMBER_ON_COMMAND( l, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sNumberP%dOnCommand",JUDGE_STRING[l],p+1)) +#define JUDGE_NUMBER_UtilOffCommand( l, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("%sNumberP%dUtilOffCommand",JUDGE_STRING[l],p+1)) +#define SCORE_LABEL_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","ScoreLabelOnCommand") +#define SCORE_LABEL_UtilOffCommand THEME->GetMetric ("ScreenEvaluation","ScoreLabelUtilOffCommand") +#define SCORE_NUMBER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("ScoreNumberP%dOnCommand",p+1)) +#define SCORE_NUMBER_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("ScoreNumberP%dUtilOffCommand",p+1)) +#define TIME_LABEL_ON_COMMAND THEME->GetMetric ("ScreenEvaluation","TimeLabelOnCommand") +#define TIME_LABEL_UtilOffCommand THEME->GetMetric ("ScreenEvaluation","TimeLabelUtilOffCommand") +#define TIME_NUMBER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("TimeNumberP%dOnCommand",p+1)) +#define TIME_NUMBER_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("TimeNumberP%dUtilOffCommand",p+1)) +#define BONUS_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BonusFrameP%dOnCommand",p+1)) +#define BONUS_FRAME_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BonusFrameP%dUtilOffCommand",p+1)) +#define BAR_POSSIBLE_ON_COMMAND( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarPossible%dP%dOnCommand",i+1,p+1)) +#define BAR_POSSIBLE_UtilOffCommand( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarPossible%dP%dUtilOffCommand",i+1,p+1)) +#define BAR_ACTUAL_ON_COMMAND( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarActual%dP%dOnCommand",i+1,p+1)) +#define BAR_ACTUAL_UtilOffCommand( i, p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("BarActual%dP%dUtilOffCommand",i+1,p+1)) +#define SURVIVED_FRAME_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedFrameP%dOnCommand",p+1)) +#define SURVIVED_FRAME_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedFrameP%dUtilOffCommand",p+1)) +#define SURVIVED_NUMBER_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedNumberP%dOnCommand",p+1)) +#define SURVIVED_NUMBER_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("SurvivedNumberP%dUtilOffCommand",p+1)) +#define NEW_RECORD_ON_COMMAND( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("NewRecordP%dOnCommand",p+1)) +#define NEW_RECORD_UtilOffCommand( p ) THEME->GetMetric ("ScreenEvaluation",ssprintf("NewRecordP%dUtilOffCommand",p+1)) +#define TRY_EXTRA_STAGE_ON_COMMAND THEME->GetMetric ("ScreenEvaluation",ssprintf("TryExtraStageOnCommand")) +#define TRY_EXTRA_STAGE_UtilOffCommand THEME->GetMetric ("ScreenEvaluation",ssprintf("TryExtraStageUtilOffCommand")) +*/ // metrics that are specific to classes derived from ScreenEvaluation #define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen") @@ -90,6 +95,7 @@ const char* JUDGE_STRING[NUM_JUDGE_LINES] = { "Marvelous", "Perfect", "Great", " #define SHOW_POINTS_AREA THEME->GetMetricB(m_sName,"ShowPointsArea") #define SHOW_BONUS_AREA THEME->GetMetricB(m_sName,"ShowBonusArea") #define SHOW_SURVIVED_AREA THEME->GetMetricB(m_sName,"ShowSurvivedArea") +#define SHOW_WIN_AREA THEME->GetMetricB(m_sName,"ShowWinArea") #define SHOW_JUDGMENT( l ) THEME->GetMetricB(m_sName,ssprintf("Show%s",JUDGE_STRING[l])) #define SHOW_SCORE_AREA THEME->GetMetricB(m_sName,"ShowScoreArea") #define SHOW_TIME_AREA THEME->GetMetricB(m_sName,"ShowTimeArea") @@ -257,15 +263,18 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl { m_LargeBanner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); m_LargeBanner.LoadFromSong( GAMESTATE->m_pCurSong ); - m_LargeBanner.Command( LARGE_BANNER_ON_COMMAND ); + m_LargeBanner.SetName( "LargeBanner" ); + UtilSetXYAndOnCommand( m_LargeBanner, "ScreenEvaluation" ); this->AddChild( &m_LargeBanner ); m_sprLargeBannerFrame.Load( THEME->GetPathToG("ScreenEvaluation banner frame") ); - m_sprLargeBannerFrame.Command( LARGE_BANNER_ON_COMMAND ); + m_sprLargeBannerFrame.SetName( "LargeBanner" ); + UtilSetXYAndOnCommand( m_sprLargeBannerFrame, "ScreenEvaluation" ); this->AddChild( &m_sprLargeBannerFrame ); m_sprStage.Load( THEME->GetPathToG("ScreenEvaluation stage "+GAMESTATE->GetStageText()) ); - m_sprStage.Command( STAGE_ON_COMMAND ); + m_sprStage.SetName( "Stage" ); + UtilSetXYAndOnCommand( m_sprStage, "ScreenEvaluation" ); this->AddChild( &m_sprStage ); for( int p=0; pGetPathToG("ScreenEvaluation difficulty icons 1x5") ); m_DifficultyIcon[p].SetFromNotes( (PlayerNumber)p, GAMESTATE->m_pCurNotes[p] ); - m_DifficultyIcon[p].Command( DIFFICULTY_ICON_ON_COMMAND(p) ); + m_DifficultyIcon[p].SetName( ssprintf("DifficultyIconP%d",p+1) ); + UtilSetXYAndOnCommand( m_DifficultyIcon[p], "ScreenEvaluation" ); this->AddChild( &m_DifficultyIcon[p] ); m_textPlayerOptions[p].LoadFromFont( THEME->GetPathToF("Common normal") ); CString sPO = GAMESTATE->m_PlayerOptions[p].GetString(); sPO.Replace( ", ", "\n" ); - m_textPlayerOptions[p].Command( PLAYER_OPTIONS_ON_COMMAND(p) ); + m_textPlayerOptions[p].SetName( ssprintf("PlayerOptionsP%d",p+1) ); + UtilSetXYAndOnCommand( m_textPlayerOptions[p], "ScreenEvaluation" ); m_textPlayerOptions[p].SetText( sPO ); this->AddChild( &m_textPlayerOptions[p] ); } @@ -293,11 +304,13 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl { m_SmallBanner[i].SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); m_SmallBanner[i].LoadFromSong( vSongsToShow[i] ); - m_SmallBanner[i].Command( SMALL_BANNER_ON_COMMAND(i) ); + m_SmallBanner[i].SetName( ssprintf("SmallBanner%d",i+1) ); + UtilSetXYAndOnCommand( m_SmallBanner[i], "ScreenEvaluation" ); this->AddChild( &m_SmallBanner[i] ); m_sprSmallBannerFrame[i].Load( THEME->GetPathToG("ScreenEvaluation banner frame") ); - m_sprSmallBannerFrame[i].Command( SMALL_BANNER_ON_COMMAND(i) ); + m_sprSmallBannerFrame[i].SetName( ssprintf("SmallBanner%d",i+1) ); + UtilSetXYAndOnCommand( m_sprSmallBannerFrame[i], "ScreenEvaluation" ); this->AddChild( &m_sprSmallBannerFrame[i] ); } } @@ -306,11 +319,13 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl { m_LargeBanner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); m_LargeBanner.LoadFromCourse( GAMESTATE->m_pCurCourse ); - m_LargeBanner.Command( LARGE_BANNER_ON_COMMAND ); + m_LargeBanner.SetName( "LargeBanner" ); + UtilSetXYAndOnCommand( m_LargeBanner, "ScreenEvaluation" ); this->AddChild( &m_LargeBanner ); m_sprLargeBannerFrame.Load( THEME->GetPathToG("ScreenEvaluation banner frame") ); - m_sprLargeBannerFrame.Command( LARGE_BANNER_ON_COMMAND ); + m_sprLargeBannerFrame.SetName( "LargeBanner" ); + UtilSetXYAndOnCommand( m_sprLargeBannerFrame, "ScreenEvaluation" ); this->AddChild( &m_sprLargeBannerFrame ); } break; @@ -332,12 +347,14 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_sprGradeFrame[p].Load( THEME->GetPathToG("ScreenEvaluation grade frame 1x2") ); m_sprGradeFrame[p].StopAnimating(); m_sprGradeFrame[p].SetState( p ); - m_sprGradeFrame[p].Command( GRADE_FRAME_ON_COMMAND(p) ); + m_sprGradeFrame[p].SetName( ssprintf("GradeFrameP%d",p+1) ); + UtilSetXYAndOnCommand( m_sprGradeFrame[p], "ScreenEvaluation" ); this->AddChild( &m_sprGradeFrame[p] ); m_Grades[p].Load( THEME->GetPathToG("ScreenEvaluation grades") ); m_Grades[p].SetGrade( (PlayerNumber)p, grade[p] ); - m_Grades[p].Command( GRADE_ON_COMMAND(p) ); + m_Grades[p].SetName( ssprintf("GradeP%d",p+1) ); + UtilSetXYAndOnCommand( m_Grades[p], "ScreenEvaluation" ); if( SPIN_GRADES ) m_Grades[p].Spin(); this->AddChild( &m_Grades[p] ); @@ -354,19 +371,22 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_sprPercentFrame[p].Load( THEME->GetPathToG("ScreenEvaluation percent frame 1x2") ); m_sprPercentFrame[p].StopAnimating(); m_sprPercentFrame[p].SetState( p ); - m_sprPercentFrame[p].Command( PERCENT_FRAME_ON_COMMAND(p) ); + m_sprPercentFrame[p].SetName( ssprintf("PercentFrameP%d",p+1) ); + UtilSetXYAndOnCommand( m_sprPercentFrame[p], "ScreenEvaluation" ); this->AddChild( &m_sprPercentFrame[p] ); if( !PREFSMAN->m_bDancePointsForOni ) { m_textPercentWhole[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation percent") ); m_textPercentWhole[p].EnableShadow( false ); - m_textPercentWhole[p].Command( PERCENT_WHOLE_ON_COMMAND(p) ); + m_textPercentWhole[p].SetName( ssprintf("PercentWholeP%d",p+1) ); + UtilSetXYAndOnCommand( m_textPercentWhole[p], "ScreenEvaluation" ); this->AddChild( &m_textPercentWhole[p] ); m_textPercentRemainder[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation percent") ); m_textPercentRemainder[p].EnableShadow( false ); - m_textPercentRemainder[p].Command( PERCENT_REMAINDER_ON_COMMAND(p) ); + m_textPercentRemainder[p].SetName( ssprintf("PercentRemainderP%d",p+1) ); + UtilSetXYAndOnCommand( m_textPercentRemainder[p], "ScreenEvaluation" ); this->AddChild( &m_textPercentRemainder[p] ); stageStats.iPossibleDancePoints[p] = max( 1, stageStats.iPossibleDancePoints[p] ); @@ -382,7 +402,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_textDancePoints[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation percent") ); m_textDancePoints[p].EnableShadow( false ); m_textDancePoints[p].SetText( ssprintf("%d", stageStats.iActualDancePoints[p]) ); - m_textDancePoints[p].Command( DANCE_POINTS_ON_COMMAND(p) ); + m_textDancePoints[p].SetName( ssprintf("DancePointsP%d",p+1) ); + UtilSetXYAndOnCommand( m_textDancePoints[p], "ScreenEvaluation" ); this->AddChild( &m_textDancePoints[p] ); } } @@ -401,7 +422,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_sprBonusFrame[p].Load( THEME->GetPathToG("ScreenEvaluation bonus frame 2x1") ); m_sprBonusFrame[p].StopAnimating(); m_sprBonusFrame[p].SetState( p ); - m_sprBonusFrame[p].Command( BONUS_FRAME_ON_COMMAND(p) ); + m_sprBonusFrame[p].SetName( ssprintf("BonusFrameP%d",p+1) ); + UtilSetXYAndOnCommand( m_sprBonusFrame[p], "ScreenEvaluation" ); this->AddChild( &m_sprBonusFrame[p] ); for( int r=0; rAddChild( &m_sprPossibleBar[p][r] ); m_sprActualBar[p][r].Load( THEME->GetPathToG("ScreenEvaluation bars actual 1x2") ); m_sprActualBar[p][r].StopAnimating(); m_sprActualBar[p][r].SetState( p ); m_sprActualBar[p][r].SetWidth( m_sprActualBar[p][r].GetUnzoomedWidth() * stageStats.fRadarActual[p][r] ); - m_sprActualBar[p][r].Command( BAR_ACTUAL_ON_COMMAND(r,p) ); + m_sprActualBar[p][r].SetName( ssprintf("BarActual%dP%d",r+1,p+1) ); + UtilSetXYAndOnCommand( m_sprActualBar[p][r], "ScreenEvaluation" ); if( stageStats.fRadarActual[p][r] == stageStats.fRadarPossible[p][r] ) m_sprActualBar[p][r].Command( BAR_ACTUAL_MAX_COMMAND ); this->AddChild( &m_sprActualBar[p][r] ); @@ -438,17 +462,46 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_sprSurvivedFrame[p].Load( THEME->GetPathToG("ScreenEvaluation survived frame 2x1") ); m_sprSurvivedFrame[p].StopAnimating(); m_sprSurvivedFrame[p].SetState( p ); - m_sprSurvivedFrame[p].Command( SURVIVED_FRAME_ON_COMMAND(p) ); + m_sprSurvivedFrame[p].SetName( ssprintf("SurvivedFrameP%d",p+1) ); + UtilSetXYAndOnCommand( m_sprSurvivedFrame[p], "ScreenEvaluation" ); this->AddChild( &m_sprSurvivedFrame[p] ); m_textSurvivedNumber[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation stage") ); m_textSurvivedNumber[p].EnableShadow( false ); m_textSurvivedNumber[p].SetText( ssprintf("%02d", stageStats.iSongsPlayed[p]) ); - m_textSurvivedNumber[p].Command( SURVIVED_NUMBER_ON_COMMAND(p) ); + m_textSurvivedNumber[p].SetName( ssprintf("SurvivedNumberP%d",p+1) ); + UtilSetXYAndOnCommand( m_textSurvivedNumber[p], "ScreenEvaluation" ); this->AddChild( &m_textSurvivedNumber[p] ); } } + // + // init win area + // + if( SHOW_WIN_AREA ) + { + for( p=0; pIsPlayerEnabled( (PlayerNumber)p ) ) + continue; // skip + + m_sprWinFrame[p].Load( THEME->GetPathToG("ScreenEvaluation win frame 2x1") ); + m_sprWinFrame[p].StopAnimating(); + m_sprWinFrame[p].SetState( p ); + m_sprWinFrame[p].SetName( ssprintf("WinFrameP%d",p+1) ); + UtilSetXYAndOnCommand( m_sprWinFrame[p], "ScreenEvaluation" ); + this->AddChild( &m_sprWinFrame[p] ); + + m_sprWin[p].Load( THEME->GetPathToN("ScreenEvaluation win 2x2") ); + m_sprWin[p].StopAnimating(); + bool bIsWinner = GAMESTATE->GetWinner() == p; + m_sprWin[p].SetState( (bIsWinner?0:2) + p ); + m_sprWin[p].SetName( ssprintf("WinP%d",p+1) ); + UtilSetXYAndOnCommand( m_sprWin[p], "ScreenEvaluation" ); + this->AddChild( &m_sprWin[p] ); + } + } + // // init judgment area // @@ -463,7 +516,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_sprJudgeLabels[l].Load( THEME->GetPathToG("ScreenEvaluation judge labels 1x8") ); m_sprJudgeLabels[l].StopAnimating(); m_sprJudgeLabels[l].SetState( l ); - m_sprJudgeLabels[l].Command( JUDGE_LABEL_ON_COMMAND(l) ); + m_sprJudgeLabels[l].SetName( ssprintf("%sLabel",JUDGE_STRING[l]) ); + UtilSetXYAndOnCommand( m_sprJudgeLabels[l], "ScreenEvaluation" ); this->AddChild( &m_sprJudgeLabels[l] ); for( p=0; pGetPathToN("ScreenEvaluation judge") ); m_textJudgeNumbers[l][p].EnableShadow( false ); m_textJudgeNumbers[l][p].SetDiffuse( PlayerToColor(p) ); - m_textJudgeNumbers[l][p].Command( JUDGE_NUMBER_ON_COMMAND(l,p) ); + m_textJudgeNumbers[l][p].SetName( ssprintf("%sNumberP%d",JUDGE_STRING[l],p+1) ); + UtilSetXYAndOnCommand( m_textJudgeNumbers[l][p], "ScreenEvaluation" ); this->AddChild( &m_textJudgeNumbers[l][p] ); int iValue; @@ -500,15 +555,12 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl // if( SHOW_SCORE_AREA ) { - int s; - for( s=0; sGetPathToG("ScreenEvaluation score labels 1x2") ); - m_sprScoreLabel.SetState( s ); - m_sprScoreLabel.StopAnimating(); - m_sprScoreLabel.Command( SCORE_LABEL_ON_COMMAND ); - this->AddChild( &m_sprScoreLabel ); - } + m_sprScoreLabel.Load( THEME->GetPathToG("ScreenEvaluation score labels 1x2") ); + m_sprScoreLabel.SetState( 0 ); + m_sprScoreLabel.StopAnimating(); + m_sprScoreLabel.SetName( "ScoreLabel" ); + UtilSetXYAndOnCommand( m_sprScoreLabel, "ScreenEvaluation" ); + this->AddChild( &m_sprScoreLabel ); for( p=0; pGetPathToN("ScreenEvaluation score") ); m_textScore[p].EnableShadow( false ); m_textScore[p].SetDiffuse( PlayerToColor(p) ); - m_textScore[p].Command( SCORE_NUMBER_ON_COMMAND(p) ); + m_textScore[p].SetName( ssprintf("ScoreNumberP%d",p+1) ); + UtilSetXYAndOnCommand( m_textScore[p], "ScreenEvaluation" ); m_textScore[p].SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, stageStats.fScore[p]) ); - this->AddChild( &m_textScore[p] ); - } } @@ -534,7 +585,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_sprTimeLabel.Load( THEME->GetPathToG("ScreenEvaluation score labels 1x2") ); m_sprTimeLabel.SetState( 1 ); m_sprTimeLabel.StopAnimating(); - m_sprTimeLabel.Command( TIME_LABEL_ON_COMMAND ); + m_sprTimeLabel.SetName( "TimeLabel" ); + UtilSetXYAndOnCommand( m_sprTimeLabel, "ScreenEvaluation" ); this->AddChild( &m_sprTimeLabel ); for( p=0; pGetPathToN("ScreenEvaluation score") ); m_textTime[p].EnableShadow( false ); m_textTime[p].SetDiffuse( PlayerToColor(p) ); - m_textTime[p].Command( TIME_NUMBER_ON_COMMAND(p) ); + m_textTime[p].SetName( ssprintf("ScoreNumberP%d",p+1) ); + UtilSetXYAndOnCommand( m_textTime[p], "ScreenEvaluation" ); m_textTime[p].SetText( SecondsToTime(stageStats.fAliveSeconds[p]) ); this->AddChild( &m_textTime[p] ); } @@ -560,7 +613,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl if( bNewRecord[p] ) { m_sprNewRecord[p].Load( THEME->GetPathToG("ScreenEvaluation new record") ); - m_sprNewRecord[p].Command( NEW_RECORD_ON_COMMAND(p) ); + m_sprNewRecord[p].SetName( ssprintf("NewRecordP%d",p+1) ); + UtilSetXYAndOnCommand( m_sprNewRecord[p], "ScreenEvaluation" ); this->AddChild( &m_sprNewRecord[p] ); } } @@ -573,7 +627,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl if( m_bTryExtraStage ) { m_sprTryExtraStage.Load( THEME->GetPathToG(GAMESTATE->IsExtraStage()?"ScreenEvaluation try extra2":"ScreenEvaluation try extra1") ); - m_sprTryExtraStage.Command( TRY_EXTRA_STAGE_ON_COMMAND ); + m_sprTryExtraStage.SetName( "TryExtraStage" ); + UtilSetXYAndOnCommand( m_sprTryExtraStage, "ScreenEvaluation" ); this->AddChild( &m_sprTryExtraStage ); if( GAMESTATE->IsExtraStage() ) @@ -606,7 +661,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl case GRADE_AA: case GRADE_AAA: case GRADE_AAAA: - this->PostScreenMessage( SM_PlayCheer, 2.5f ); + this->PostScreenMessage( SM_PlayCheer, CHEER_DELAY_SECONDS ); break; } @@ -620,79 +675,114 @@ void ScreenEvaluation::TweenOffScreen() int p; // large banner area - m_LargeBanner.Command( LARGE_BANNER_OFF_COMMAND ); - m_sprLargeBannerFrame.Command( LARGE_BANNER_OFF_COMMAND ); - m_sprStage.Command( STAGE_OFF_COMMAND ); + UtilOffCommand( m_LargeBanner, "ScreenEvaluation" ); + UtilOffCommand( m_sprLargeBannerFrame, "ScreenEvaluation" ); + UtilOffCommand( m_sprStage, "ScreenEvaluation" ); for( p=0; pIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_DifficultyIcon[p], "ScreenEvaluation" ); + UtilOffCommand( m_textPlayerOptions[p], "ScreenEvaluation" ); } // small banner area for( unsigned i=0; iIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_sprGradeFrame[p], "ScreenEvaluation" ); + UtilOffCommand( m_Grades[p], "ScreenEvaluation" ); } // points area for( p=0; pIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_sprPercentFrame[p], "ScreenEvaluation" ); + UtilOffCommand( m_textPercentWhole[p], "ScreenEvaluation" ); + UtilOffCommand( m_textPercentRemainder[p], "ScreenEvaluation" ); + UtilOffCommand( m_textDancePoints[p], "ScreenEvaluation" ); } // bonus area for( p=0; pIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_sprBonusFrame[p], "ScreenEvaluation" ); for( int r=0; rIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_sprSurvivedFrame[p], "ScreenEvaluation" ); + UtilOffCommand( m_textSurvivedNumber[p], "ScreenEvaluation" ); + } + + // win area + for( p=0; pIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_sprWinFrame[p], "ScreenEvaluation" ); + UtilOffCommand( m_sprWin[p], "ScreenEvaluation" ); } // judgement area int l; for( l=0; lIsPlayerEnabled(p) ) + continue; for( l=0; lIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_textScore[p], "ScreenEvaluation" ); + } // time area - m_sprTimeLabel.Command( TIME_LABEL_OFF_COMMAND ); + UtilOffCommand( m_sprTimeLabel, "ScreenEvaluation" ); for( p=0; pIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_textTime[p], "ScreenEvaluation" ); + } // extra area for( p=0; pIsPlayerEnabled(p) ) + continue; + UtilOffCommand( m_sprNewRecord[p], "ScreenEvaluation" ); + } + UtilOffCommand( m_sprTryExtraStage, "ScreenEvaluation" ); } diff --git a/stepmania/src/ScreenEvaluation.h b/stepmania/src/ScreenEvaluation.h index e9dc1273b1..59dde21957 100644 --- a/stepmania/src/ScreenEvaluation.h +++ b/stepmania/src/ScreenEvaluation.h @@ -77,6 +77,10 @@ protected: Sprite m_sprSurvivedFrame[NUM_PLAYERS]; BitmapText m_textSurvivedNumber[NUM_PLAYERS]; + // win area + Sprite m_sprWinFrame[NUM_PLAYERS]; + Sprite m_sprWin[NUM_PLAYERS]; + // judgment area Sprite m_sprJudgeLabels[NUM_JUDGE_LINES]; BitmapText m_textJudgeNumbers[NUM_JUDGE_LINES][NUM_PLAYERS]; @@ -125,4 +129,16 @@ public: ScreenEvaluationEndless() : ScreenEvaluation("ScreenEvaluationEndless",ScreenEvaluation::course) {}; }; +class ScreenEvaluationBattle : public ScreenEvaluation +{ +public: + ScreenEvaluationBattle() : ScreenEvaluation("ScreenEvaluationBattle",ScreenEvaluation::stage) {}; +}; + +class ScreenEvaluationRave : public ScreenEvaluation +{ +public: + ScreenEvaluationRave() : ScreenEvaluation("ScreenEvaluationRave",ScreenEvaluation::stage) {}; +}; + diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 09bce7c106..d7fdfc27f0 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1331,10 +1331,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) { case PLAY_MODE_BATTLE: { - PlayerNumber winner = PLAYER_1; - for( int p=0; pm_CurStageStats.iActualDancePoints[p] > GAMESTATE->m_CurStageStats.iActualDancePoints[winner] ) - winner = (PlayerNumber)p; + PlayerNumber winner = GAMESTATE->GetWinner(); m_Win[winner].StartTransitioning( SM_GoToStateAfterCleared ); } break;