Skip to content

Commit

Permalink
Merge branch '0.56.2-Experimental' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 15, 2017
2 parents dc484e6 + ba5c5c6 commit 616b0fc
Show file tree
Hide file tree
Showing 35 changed files with 771 additions and 110 deletions.
4 changes: 2 additions & 2 deletions CMake/SMDefs.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Set up version numbers according to the new scheme.
set(SM_VERSION_MAJOR 0)
set(SM_VERSION_MINOR 55)
set(SM_VERSION_PATCH 3)
set(SM_VERSION_MINOR 56)
set(SM_VERSION_PATCH 2)
set(SM_VERSION_TRADITIONAL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")

execute_process(COMMAND git rev-parse --short HEAD
Expand Down
Binary file modified Data/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
local t = Def.ActorFrame{}

local enabledCustomWindows = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomEvaluationWindowTimings
PROFILEMAN:SaveProfile(PLAYER_1)

local customWindows = timingWindowConfig:get_data().customWindows

local scoreType = themeConfig:get_data().global.DefaultScoreType

if GAMESTATE:GetNumPlayersEnabled() == 1 and themeConfig:get_data().eval.ScoreBoardEnabled then
Expand Down Expand Up @@ -95,9 +98,12 @@ function scoreBoard(pn,position)
end
}

local judge = GetTimingDifficulty()
local customWindow
local judge = enabledCustomWindows and 0 or GetTimingDifficulty()
local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn)
local score = SCOREMAN:GetMostRecentScore()
local dvt = pss:GetOffsetVector()
local totalTaps = pss:GetTotalTaps()

t[#t+1] = Def.Quad{
InitCommand=function(self)
Expand Down Expand Up @@ -169,17 +175,33 @@ function scoreBoard(pn,position)
self:settextf("%05.2f%% (%s)",notShit.floor(pss:GetWifeScore()*10000)/100, "Wife")
end,
CodeMessageCommand=function(self,params)
if params.Name == "PrevJudge" and judge > 1 then
local totalHolds = pss:GetRadarPossible():GetValue("RadarCategory_Holds") + pss:GetRadarPossible():GetValue("RadarCategory_Rolls")
local holdsHit = pss:GetRadarActual():GetValue("RadarCategory_Holds") + pss:GetRadarActual():GetValue("RadarCategory_Rolls")
local minesHit = pss:GetRadarPossible():GetValue("RadarCategory_Mines") - pss:GetRadarActual():GetValue("RadarCategory_Mines")
if enabledCustomWindows then
if params.Name == "PrevJudge" then
judge = judge < 2 and #customWindows or judge - 1
customWindow = timingWindowConfig:get_data()[customWindows[judge]]
self:settextf("%05.2f%% (%s)", getRescoredCustomPercentage(dvt, customWindow, totalHolds, holdsHit, minesHit, totalTaps), customWindow.name)
elseif params.Name == "NextJudge" then
judge = judge == #customWindows and 1 or judge + 1
customWindow = timingWindowConfig:get_data()[customWindows[judge]]
self:settextf("%05.2f%% (%s)", getRescoredCustomPercentage(dvt, customWindow, totalHolds, holdsHit, minesHit, totalTaps), customWindow.name)
end
elseif params.Name == "PrevJudge" and judge > 1 then
judge = judge - 1
self:settextf("%05.2f%% (%s)", notShit.floor(score:RescoreToWifeJudge(judge)*10000)/100, "Wife J"..judge)
self:settextf("%05.2f%% (%s)", getRescoredWifeJudge(dvt, judge, totalHolds - holdsHit, minesHit, totalTaps), "Wife J"..judge)
elseif params.Name == "NextJudge" and judge < 9 then
judge = judge + 1
if judge == 9 then
self:settextf("%05.2f%% (%s)", notShit.floor(score:RescoreToWifeJudge(judge)*10000)/100, "Wife Justice")
self:settextf("%05.2f%% (%s)", getRescoredWifeJudge(dvt, judge, (totalHolds - holdsHit), minesHit, totalTaps), "Wife Justice")
else
self:settextf("%05.2f%% (%s)", notShit.floor(score:RescoreToWifeJudge(judge)*10000)/100, "Wife J"..judge)
self:settextf("%05.2f%% (%s)", getRescoredWifeJudge(dvt, judge, (totalHolds - holdsHit), minesHit, totalTaps), "Wife J"..judge)
end

end
if params.Name == "ResetJudge" then
judge = enabledCustomWindows and 0 or GetTimingDifficulty()
self:playcommand("Set")
end
end,
};
Expand Down Expand Up @@ -211,8 +233,15 @@ function scoreBoard(pn,position)
end,
CodeMessageCommand=function(self,params)
if params.Name == "PrevJudge" or params.Name == "NextJudge" then
local rescoreJudges = score:RescoreJudges(judge)
self:zoomx(frameWidth*rescoreJudges[k]/pss:GetTotalTaps())
if enabledCustomWindows then
self:finishtweening():decelerate(2):zoomx(frameWidth*getRescoredCustomJudge(dvt, customWindow.judgeWindows, k)/totalTaps)
else
local rescoreJudges = getRescoredJudge(dvt, judge, k)
self:finishtweening():decelerate(2):zoomx(frameWidth*rescoreJudges/totalTaps)
end
end
if params.Name == "ResetJudge" then
self:finishtweening():decelerate(2):zoomx(frameWidth*pss:GetPercentageOfTaps(v))
end
end,
};
Expand All @@ -225,7 +254,15 @@ function scoreBoard(pn,position)
end,
SetCommand=function(self)
self:settext(getJudgeStrings(v))
end
end,
CodeMessageCommand=function(self,params)
if enabledCustomWindows and (params.Name == "PrevJudge" or params.Name == "NextJudge") then
self:settext(getCustomJudgeString(customWindow.judgeNames, k))
end
if params.Name == "ResetJudge" then
self:playcommand("Set")
end
end,
};
t[#t+1] = LoadFont("Common Large")..{
InitCommand=function(self)
Expand All @@ -239,8 +276,14 @@ function scoreBoard(pn,position)
end,
CodeMessageCommand=function(self,params)
if params.Name == "PrevJudge" or params.Name == "NextJudge" then
local rescoreJudges = score:RescoreJudges(judge)
self:settext(rescoreJudges[k])
if enabledCustomWindows then
self:settext(getRescoredCustomJudge(dvt, customWindow.judgeWindows, k))
else
self:settext(getRescoredJudge(dvt, judge, k))
end
end
if params.Name == "ResetJudge" then
self:playcommand("Set")
end
end,
};
Expand All @@ -256,8 +299,16 @@ function scoreBoard(pn,position)
end,
CodeMessageCommand=function(self,params)
if params.Name == "PrevJudge" or params.Name == "NextJudge" then
local rescoreJudges = score:RescoreJudges(judge)
self:settextf("(%03.2f%%)",rescoreJudges[k]/pss:GetTotalTaps()*100)
local rescoredJudge
if enabledCustomWindows then
rescoredJudge = getRescoredCustomJudge(dvt, customWindow.judgeWindows, k)
else
rescoredJudge = getRescoredJudge(dvt, judge, k)
end
self:settextf("(%03.2f%%)", rescoredJudge/totalTaps * 100)
end
if params.Name == "ResetJudge" then
self:playcommand("Set")
end
end,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ local function scoreitem(pn,index,scoreIndex,drawindex)
end,
BeginCommand=function(self)
if #hsTable >= 1 and index>= 1 then
self:settext(gradestring(hsTable[index]:GetGrade()))
self:diffuse(getGradeColor(hsTable[index]:GetGrade()))
self:settext(gradestring(hsTable[index]:GetWifeGrade()))
self:diffuse(getGradeColor(hsTable[index]:GetWifeGrade()))
end
end
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,7 @@ t[#t+1] = Def.ActorFrame{
end,
OnCommand=function(self)
local text= {
"Enable AutoplayCPU with shift+f8\n",
"Hold the following and press the arrow",
"keys to alter the associated element\n",
"1: Judgement Text Position",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ t[#t+1] = LoadFont("Common Large")..{
end,
SetCommand=function(self)
if score and update then
self:settext(THEME:GetString("Grade",ToEnumShortString(score:GetGrade())))
self:diffuse(getGradeColor(score:GetGrade()))
self:settext(THEME:GetString("Grade",ToEnumShortString(score:GetWifeGrade())))
self:diffuse(getGradeColor(score:GetWifeGrade()))
else
self:settext("")
end
Expand All @@ -153,7 +153,7 @@ t[#t+1] = LoadFont("Common Large")..{
t[#t+1] = LoadFont("Common Normal")..{
Name="Score",
InitCommand=function(self)
self:xy(frameX+offsetX+55,frameY+offsetY+28):zoom(0.5):halign(0)
self:xy(frameX+offsetX+55,frameY+offsetY+15):zoom(0.5):halign(0)
end,
SetCommand=function(self)
if score and update then
Expand All @@ -171,48 +171,26 @@ t[#t+1] = LoadFont("Common Normal")..{
end
}

-- Rescoring stuff
-- t[#t+1] = LoadFont("Common Normal")..{
-- Name="Score",
-- InitCommand=function(self)
-- self:xy(frameX+offsetX+155,frameY+offsetY+14):zoom(0.5):halign(0)
-- end,
-- SetCommand=function(self)
-- if score and update then
-- if score:GetWifeScore() == 0 then
-- self:settextf("NA (%s)", "Wife")
-- else
-- self:settextf("%05.2f%% (%s)", notShit.floor(score:RescoreToWifeJudge(4)*10000)/100, "Wife J4")
-- end
-- else
-- self:settextf("00.00%% (%s)", "Wife")
-- end
-- end,
-- ScoreUpdateMessageCommand=function(self)
-- self:queuecommand("Set")
-- end
-- }

-- t[#t+1] = LoadFont("Common Normal")..{
-- Name="Score",
-- InitCommand=function(self)
-- self:xy(frameX+offsetX+155,frameY+offsetY+58):zoom(0.5):halign(0)
-- end,
-- SetCommand=function(self)
-- if score and update then
-- if score:GetWifeScore() == 0 then
-- self:settext("")
-- else
-- self:settextf("%5.2f", score:GetSkillsetSSR(5))
-- end
-- else
-- self:settext("")
-- end
-- end,
-- ScoreUpdateMessageCommand=function(self)
-- self:queuecommand("Set")
-- end
-- }
t[#t+1] = LoadFont("Common Normal")..{
Name="Score",
InitCommand=function(self)
self:xy(frameX+offsetX+55,frameY+offsetY+33):zoom(0.5):halign(0)
end,
SetCommand=function(self)
if score and update then
if score:GetWifeScore() == 0 then
self:settext("")
else
self:settextf("Highest SSR: %5.2f", score:GetSkillsetSSR("Overall"))
end
else
self:settext("")
end
end,
ScoreUpdateMessageCommand=function(self)
self:queuecommand("Set")
end
}

t[#t+1] = LoadFont("Common Normal")..{
Name="ClearType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ local t = Def.ActorFrame{
end,
OnCommand=function(self)
self:bouncebegin(0.2):xy(0,0):diffusealpha(1)
SCREENMAN:GetTopScreen():GetMusicWheel():Move(1)
SCREENMAN:GetTopScreen():GetMusicWheel():Move(-1)
SCREENMAN:GetTopScreen():GetMusicWheel():Move(0)
end,
SetCommand=function(self)
self:finishtweening()
Expand Down
70 changes: 54 additions & 16 deletions Themes/Til Death/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
local judge = GetTimingDifficulty()
local judges = { "marv", "perf", "great", "good", "boo", "miss" }
local tst = { 1.50,1.33,1.16,1.00,0.84,0.66,0.50,0.33,0.20 }
local judge = GetTimingDifficulty()
local tso = tst[judge]

local enabledCustomWindows = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomEvaluationWindowTimings
judge = enabledCustomWindows and 0 or judge
local customWindowsData = timingWindowConfig:get_data()
local customWindows = customWindowsData.customWindows
local customWindow

local plotWidth, plotHeight = 400,120
local plotX, plotY = SCREEN_WIDTH - 9 - plotWidth/2, SCREEN_HEIGHT - 56 - plotHeight/2
local dotDims, plotMargin = 2, 4
local maxOffset = 180*tst[judge]
local maxOffset = math.max(180, 180*tso)

local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1)
local dvt = pss:GetOffsetVector()
local nrt = pss:GetNoteRowVector()
Expand Down Expand Up @@ -42,28 +51,56 @@ local o = Def.ActorFrame{
self:xy(plotX,plotY)
end,
CodeMessageCommand=function(self,params)
if params.Name == "PrevJudge" and judge > 1 then
if enabledCustomWindows then
if params.Name == "PrevJudge" then
judge = judge < 2 and #customWindows or judge - 1
customWindow = customWindowsData[customWindows[judge]]
elseif params.Name == "NextJudge" then
judge = judge == #customWindows and 1 or judge + 1
customWindow = customWindowsData[customWindows[judge]]
end
elseif params.Name == "PrevJudge" and judge > 1 then
judge = judge - 1
tso = tst[judge]
elseif params.Name == "NextJudge" and judge < 9 then
judge = judge + 1
tso = tst[judge]
end
if params.Name == "ResetJudge" then
judge = enabledCustomWindows and 0 or GetTimingDifficulty()
tso = tst[GetTimingDifficulty()]
end
maxOffset = 180*tst[judge]
maxOffset = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows.boo or math.max(180, 180*tso)
MESSAGEMAN:Broadcast("JudgeDisplayChanged")
end,
}
-- Center Bar
o[#o+1] = Def.Quad{InitCommand=function(self)
self:zoomto(plotWidth+plotMargin,1):diffuse(byJudgment("TapNoteScore_W1"))
end}
o[#o+1] = Def.Quad{
InitCommand=function(self)
self:zoomto(plotWidth+plotMargin,1):diffuse(byJudgment("TapNoteScore_W1"))
end
}
local fantabars = {22.5, 45, 90, 135}
local bantafars = {"TapNoteScore_W2", "TapNoteScore_W3", "TapNoteScore_W4", "TapNoteScore_W5"}
for i=1, #fantabars do
o[#o+1] = Def.Quad{InitCommand=function(self)
self:y( fitY(tst[judge]*fantabars[i])): zoomto(plotWidth+plotMargin,1):diffuse(byJudgment(bantafars[i]))
end}
o[#o+1] = Def.Quad{InitCommand=function(self)
self:y( fitY(-tst[judge]*fantabars[i])): zoomto(plotWidth+plotMargin,1):diffuse(byJudgment(bantafars[i]))
end}
o[#o+1] = Def.Quad{
InitCommand=function(self)
self:y( fitY(tso*fantabars[i])):zoomto(plotWidth+plotMargin,1):diffuse(byJudgment(bantafars[i]))
end,
JudgeDisplayChangedMessageCommand=function(self)
local fit = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows[judges[i]] or tso*fantabars[i]
self:y( fitY(fit))
end,
}
o[#o+1] = Def.Quad{
InitCommand=function(self)
self:y( fitY(-tso*fantabars[i])):zoomto(plotWidth+plotMargin,1):diffuse(byJudgment(bantafars[i]))
end,
JudgeDisplayChangedMessageCommand=function(self)
local fit = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows[judges[i]] or tso*fantabars[i]
self:y( fitY(-fit))
end,
}
end
-- Background
o[#o+1] = Def.Quad{InitCommand=function(self)
Expand All @@ -87,7 +124,7 @@ o[#o+1] = Def.ActorMultiVertex{
local x = fitX(wuab[i]);
local y = fitY(dvt[i]);
if math.abs(y) > plotHeight/2 then
y = fitY(tst[judge]*183);
y = fitY(math.max(183, 183*tso));
end
verts[#verts+1] = {{x-dotWidth,y+dotWidth,0}, color}
verts[#verts+1] = {{x+dotWidth,y+dotWidth,0}, color}
Expand All @@ -102,9 +139,10 @@ o[#o+1] = Def.ActorMultiVertex{
for i=1,#nrt do
local x = fitX(wuab[i]);
local y = fitY(dvt[i]);
local color = offsetToJudgeColor(dvt[i]/1000, tst[judge]);
local fit = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows.boo + 3 or math.max(183, 183*tso)
local color = (enabledCustomWindows and judge ~= 0) and customOffsetToJudgeColor(dvt[i], customWindow.judgeWindows) or offsetToJudgeColor(dvt[i]/1000, tst[judge]);
if math.abs(y) > plotHeight/2 then
y = fitY(tst[judge]*183);
y = fitY(fit);
end
verts[#verts+1] = {{x-dotWidth,y+dotWidth,0}, color}
verts[#verts+1] = {{x+dotWidth,y+dotWidth,0}, color}
Expand Down
Loading

0 comments on commit 616b0fc

Please sign in to comment.