From d75e089cf2713f1f6efeb9451c906b6b4521af6e Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 24 May 2009 03:29:52 +0000 Subject: [PATCH] With checkpoints comes the graphics to load. Not integrated with default theme at this time. --- .../Graphics/Player judgment/_judgments.redir | 1 + .../pump/Graphics/Player judgment/default.lua | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 stepmania/Themes/pump/Graphics/Player judgment/_judgments.redir create mode 100644 stepmania/Themes/pump/Graphics/Player judgment/default.lua diff --git a/stepmania/Themes/pump/Graphics/Player judgment/_judgments.redir b/stepmania/Themes/pump/Graphics/Player judgment/_judgments.redir new file mode 100644 index 0000000000..d1f050f687 --- /dev/null +++ b/stepmania/Themes/pump/Graphics/Player judgment/_judgments.redir @@ -0,0 +1 @@ +../../../default/Graphics/Player judgment/_judgments 2x6 (doubleres).png diff --git a/stepmania/Themes/pump/Graphics/Player judgment/default.lua b/stepmania/Themes/pump/Graphics/Player judgment/default.lua new file mode 100644 index 0000000000..b2da66d5c5 --- /dev/null +++ b/stepmania/Themes/pump/Graphics/Player judgment/default.lua @@ -0,0 +1,57 @@ +local c; +local player = Var "Player"; + +local JudgeCmds = { + TapNoteScore_W1 = THEME:GetMetric( "Judgment", "JudgmentW1Command" ); + TapNoteScore_W2 = THEME:GetMetric( "Judgment", "JudgmentW2Command" ); + TapNoteScore_W3 = THEME:GetMetric( "Judgment", "JudgmentW3Command" ); + TapNoteScore_W4 = THEME:GetMetric( "Judgment", "JudgmentW4Command" ); + TapNoteScore_W5 = THEME:GetMetric( "Judgment", "JudgmentW5Command" ); + TapNoteScore_Miss = THEME:GetMetric( "Judgment", "JudgmentMissCommand" ); + TapNoteScore_CheckpointHit = GAMESTATE:ShowW1() and THEME:GetMetric( "Judgment", "JudgmentW1Command" ) or THEME:GetMetric( "Judgment", "JudgmentW2Command" ); + TapNoteScore_CheckpointMiss = THEME:GetMetric( "Judgment", "JudgmentMissCommand" ); +}; + +local TNSFrames = { + TapNoteScore_W1 = 0; + TapNoteScore_W2 = 1; + TapNoteScore_W3 = 2; + TapNoteScore_W4 = 3; + TapNoteScore_W5 = 4; + TapNoteScore_Miss = 5; + TapNoteScore_CheckpointHit = GAMESTATE:ShowW1() and 0 or 1; + TapNoteScore_CheckpointMiss = 5; +}; + +local t = Def.ActorFrame { + LoadActor("_judgments") .. { + Name="Judgment"; + InitCommand=cmd(pause;visible,false); + ResetCommand=cmd(finishtweening;x,0;y,0;stopeffect;visible,false); + }; + InitCommand = function(self) + c = self:GetChildren(); + end; + + JudgmentMessageCommand=function(self, param) + if param.Player ~= player then return end; + if param.HoldNoteScore then return end; + + local iNumStates = c.Judgment:GetNumStates(); + local iFrame = TNSFrames[param.TapNoteScore]; + if not iFrame then return end + if iNumStates == 12 then + iFrame = iFrame * 2; + if not param.Early then + iFrame = iFrame + 1; + end + end + self:playcommand("Reset"); + + c.Judgment:visible( true ); + c.Judgment:setstate( iFrame ); + JudgeCmds[param.TapNoteScore](c.Judgment); + end; +}; + +return t;