diff --git a/CMake/SMDefs.cmake b/CMake/SMDefs.cmake index 0abe50e483..bac18cdd9f 100644 --- a/CMake/SMDefs.cmake +++ b/CMake/SMDefs.cmake @@ -1,7 +1,7 @@ # Set up version numbers according to the new scheme. set(SM_VERSION_MAJOR 0) set(SM_VERSION_MINOR 62) -set(SM_VERSION_PATCH 0) +set(SM_VERSION_PATCH 1) set(SM_VERSION_TRADITIONAL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}") execute_process(COMMAND git rev-parse --short HEAD diff --git a/Data/splash.png b/Data/splash.png index afc303bbc2..ced5e95e5d 100644 Binary files a/Data/splash.png and b/Data/splash.png differ diff --git a/Themes/Til Death/BGAnimations/ScreenGameplay overlay/default.lua b/Themes/Til Death/BGAnimations/ScreenGameplay overlay/default.lua index 82821bcea2..c1003b51e3 100644 --- a/Themes/Til Death/BGAnimations/ScreenGameplay overlay/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenGameplay overlay/default.lua @@ -1,12 +1,17 @@ -- Everything relating to the gameplay screen is gradually moved to WifeJudgmentSpotting.lua +local inReplay = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerController() == "PlayerController_Replay" +local inCustomize = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay local t = Def.ActorFrame {} t[#t + 1] = LoadActor("WifeJudgmentSpotting") t[#t + 1] = LoadActor("titlesplash") t[#t + 1] = LoadActor("leaderboard") -if GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerController() == "PlayerController_Replay" then +if inReplay then t[#t + 1] = LoadActor("replayscrolling") end -if playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay then +if inCustomize then t[#t + 1] = LoadActor("messagebox") end +if inReplay or inCustomize then + t[#t + 1] = LoadActor("../_cursor") +end return t diff --git a/Themes/Til Death/BGAnimations/ScreenGameplay overlay/leaderboard.lua b/Themes/Til Death/BGAnimations/ScreenGameplay overlay/leaderboard.lua index c388386fd3..be11a63d7f 100644 --- a/Themes/Til Death/BGAnimations/ScreenGameplay overlay/leaderboard.lua +++ b/Themes/Til Death/BGAnimations/ScreenGameplay overlay/leaderboard.lua @@ -174,7 +174,7 @@ function scoreEntry(i) addLabel( "wife", function(self, hs) - self:settextf("%05.2f%%", hs:GetWifeScore() * 100):diffuse(byGrade(hs:GetWifeGrade())) + self:settextf("%05.2f%%", hs:GetWifeScore() * 100):diffuse(byGrade(GetGradeFromPercent(hs:GetWifeScore()))) end, 1.8 * WIDTH ) diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/default.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/default.lua index eb3b79f0b8..d0ee07d08e 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/default.lua @@ -29,7 +29,7 @@ t[#t + 1] = end, TabChangedMessageCommand = function(self) self:finishtweening() - if getTabIndex() < 3 then + if getTabIndex() < 3 and GAMESTATE:GetCurrentSong() then self:playcommand("On") else self:playcommand("Off") @@ -50,6 +50,12 @@ t[#t + 1] = DLMAN:RequestChartLeaderBoardFromOnline(chartkey) end end, + ChartPreviewOnMessageCommand=function(self) + self:addx(capWideScale(12, 0)):addy(capWideScale(18, 0)) + end, + ChartPreviewOffMessageCommand=function(self) + self:addx(capWideScale(-12, 0)):addy(capWideScale(-18, 0)) + end, Def.StepsDisplayList { Name = "StepsDisplayListRow", CursorP1 = Def.ActorFrame { diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua index ae4089b50d..ea4d72b89d 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua @@ -583,6 +583,12 @@ t[#t + 1] = end, RefreshChartInfoMessageCommand = function(self) self:queuecommand("Set") + end, + ChartPreviewOnMessageCommand=function(self) + self:addx(capWideScale(34,0)) + end, + ChartPreviewOffMessageCommand=function(self) + self:addx(capWideScale(-34,0)) end } diff --git a/Themes/Til Death/BGAnimations/_chartpreview.lua b/Themes/Til Death/BGAnimations/_chartpreview.lua index 1c72bb9e83..a827d576c4 100644 --- a/Themes/Til Death/BGAnimations/_chartpreview.lua +++ b/Themes/Til Death/BGAnimations/_chartpreview.lua @@ -4,7 +4,7 @@ local prevZoom = 0.65 local musicratio = 1 -- hurrrrr nps quadzapalooza -mina -local wodth = 300 +local wodth = capWideScale(280, 300) local hidth = 40 local yeet local cd diff --git a/Themes/Til Death/BGAnimations/_chorddensitygraph.lua b/Themes/Til Death/BGAnimations/_chorddensitygraph.lua index d601155e0a..80fc8ab849 100644 --- a/Themes/Til Death/BGAnimations/_chorddensitygraph.lua +++ b/Themes/Til Death/BGAnimations/_chorddensitygraph.lua @@ -1,6 +1,6 @@ +local cdg -- hurrrrr nps quadzapalooza -mina -local imcrazy = 500 local wodth = capWideScale(280, 300) local hidth = 40 local txtoff = 10 @@ -16,46 +16,65 @@ local function textmover(self) end end -local function updateGraph(self) - local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) +local function makeABar(vertices, x, y, barWidth, barHeight, prettycolor) + vertices[#vertices + 1] = {{x,y-barHeight,0},prettycolor} + vertices[#vertices + 1] = {{x-barWidth,y-barHeight,0},prettycolor} + vertices[#vertices + 1] = {{x-barWidth,y,0},prettycolor} + vertices[#vertices + 1] = {{x,y,0},prettycolor} +end + +local function getColorForDensity(density) + if density == 1 then + return color(".75,.75,.75") -- nps color + elseif density == 2 then + return color(".5,.5,.5") -- jumps color + elseif density == 3 then + return color(".25,.25,.25") -- hands color + else + return color(".1,.1,.1") -- quads color + end +end + +local function updateGraphMultiVertex(parent, realgraph) + local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) if steps then - local groot = steps:GetCDGraphVectors() - if groot == nil then - for j=1,4 do - for i=1,imcrazy do - self:GetChild(i..j):visible(false) - end - end - return + local graphVectors = steps:GetCDGraphVectors() + if graphVectors == nil then + -- reset everything if theres nothing to show + realgraph:SetVertices({}) + realgraph:SetDrawState( {Mode = "DrawMode_Quads", First = 0, Num = 0} ) + realgraph:visible(false) + return end - - local moot = groot[1] - local thingers = math.min(imcrazy,#moot) - local wid = wodth/thingers + + local npsVector = graphVectors[1] -- refers to the cps vector for 1 (tap notes) + local numberOfColumns = #npsVector + local columnWidth = wodth/numberOfColumns + + -- set height scale of graph relative to the max nps local hodth = 0 - for i=1,#moot do - if moot[i] * 2 > hodth then - hodth = moot[i] * 2 + for i=1,#npsVector do + if npsVector[i] * 2 > hodth then + hodth = npsVector[i] * 2 end end - self:GetChild("npsline"):y(-hidth * 0.7) - self:GetChild("npstext"):settext(hodth/2 * 0.7 .. "nps"):y(-hidth * 0.9) + parent:GetChild("npsline"):y(-hidth * 0.7) + parent:GetChild("npstext"):settext(hodth / 2 * 0.7 .. "nps"):y(-hidth * 0.9) hodth = hidth/hodth - for j=1,4 do - for i=1,imcrazy do - if i <= thingers then - if groot[j][i] > 0 then - self:GetChild(i..j):x(i * wid):zoomto(wid,groot[j][i]*2*hodth) - self:GetChild(i..j):visible(true) - else - self:GetChild(i..j):visible(false) + local verts = {} -- reset the vertices for the graph + local yOffset = 0 -- completely unnecessary, just a Y offset from the graph + for density = 1,4 do + for column = 1,numberOfColumns do + if graphVectors[density][column] > 0 then + local barColor = getColorForDensity(density) + makeABar(verts, column * columnWidth, yOffset, columnWidth, graphVectors[density][column] * 2 * hodth, barColor) end - else - self:GetChild(i..j):visible(false) - end end end + + realgraph:SetVertices(verts) + realgraph:SetDrawState( {Mode = "DrawMode_Quads", First = 1, Num = #verts} ) end end @@ -63,15 +82,11 @@ local t = Def.ActorFrame { Name = "ChordDensityGraph", InitCommand=function(self) self:SetUpdateFunction(textmover) + cdg = self end, DelayedChartUpdateMessageCommand = function(self) self:queuecommand("GraphUpdate") end, - GraphUpdateCommand = function(self) - if self:GetVisible() then - updateGraph(self) - end - end, Def.Quad { Name = "cdbg", InitCommand = function(self) @@ -80,22 +95,15 @@ local t = Def.ActorFrame { } } -local function makeaquad(i,n, col) - local o = Def.Quad { - Name = i..n, - InitCommand = function(self) - self:zoomto(20, 0):valign(1):diffuse(color(col)):halign(1) - end, +t[#t+1] = + Def.ActorMultiVertex { + Name = "CDGraphDrawer", + GraphUpdateCommand = function(self) + if self:GetVisible() then + updateGraphMultiVertex(cdg, self) + end + end } - return o -end - -for i=1,imcrazy do - t[#t + 1] = makeaquad(i,1, ".75,.75,.75") -- nps - t[#t + 1] = makeaquad(i,2, ".5,.5,.5") -- jumps - t[#t + 1] = makeaquad(i,3, ".25,.25,.25") -- hands - t[#t + 1] = makeaquad(i,4, ".1,.1,.1") -- quads -end -- down here for draw order t[#t + 1] = Def.Quad { diff --git a/Themes/Til Death/BGAnimations/offsetplot.lua b/Themes/Til Death/BGAnimations/offsetplot.lua index 3d4b294bc1..eb95cc6824 100644 --- a/Themes/Til Death/BGAnimations/offsetplot.lua +++ b/Themes/Til Death/BGAnimations/offsetplot.lua @@ -32,6 +32,7 @@ local handspecific = false local left = false local function fitX(x) -- Scale time values to fit within plot width. + if finalSecond == 0 then return 0 end return x / finalSecond * plotWidth - plotWidth / 2 end diff --git a/Themes/Til Death/Graphics/ScreenTitleMenu scroll.lua b/Themes/Til Death/Graphics/ScreenTitleMenu scroll.lua index c4c6e1313b..338ba6e292 100644 --- a/Themes/Til Death/Graphics/ScreenTitleMenu scroll.lua +++ b/Themes/Til Death/Graphics/ScreenTitleMenu scroll.lua @@ -11,7 +11,7 @@ return Def.ActorFrame { self:zoom(0.57):diffuse(getMainColor('positive')) end, LoseFocusCommand = function(self) - self:zoom(0.55):diffuse(color("#b87cf0")) + self:zoom(0.55):diffuse(getTitleColor('Line_Left')) end } } diff --git a/Themes/Til Death/Scripts/02 CustomizeGameplay.lua b/Themes/Til Death/Scripts/02 CustomizeGameplay.lua index 3b74a48838..b2cbaff20a 100644 --- a/Themes/Til Death/Scripts/02 CustomizeGameplay.lua +++ b/Themes/Til Death/Scripts/02 CustomizeGameplay.lua @@ -1,5 +1,6 @@ local keymode local allowedCustomization +local usingReverse local WIDESCREENWHY = -5 local WIDESCREENWHX = -5 @@ -7,6 +8,7 @@ MovableValues = {} local function loadValuesTable() allowedCustomization = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay + usingReverse = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() MovableValues.JudgeX = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplayXYCoordinates[keymode].JudgeX MovableValues.JudgeY = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplayXYCoordinates[keymode].JudgeY MovableValues.JudgeZoom = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplaySizes[keymode].JudgeZoom diff --git a/Themes/_fallback/Graphics/Common splash.png b/Themes/_fallback/Graphics/Common splash.png index afc303bbc2..ced5e95e5d 100644 Binary files a/Themes/_fallback/Graphics/Common splash.png and b/Themes/_fallback/Graphics/Common splash.png differ diff --git a/src/ActorFrame.cpp b/src/ActorFrame.cpp index 745b226e8f..11aadeb3d3 100644 --- a/src/ActorFrame.cpp +++ b/src/ActorFrame.cpp @@ -499,12 +499,8 @@ ActorFrame::UpdateInternal(float fDeltaTime) Actor::UpdateInternal(fDeltaTime); // update all sub-Actors - for (vector::iterator it = m_SubActors.begin(); - it != m_SubActors.end(); - it++) { - Actor* pActor = *it; - pActor->Update(fDeltaTime); - } + for (auto* a : m_SubActors) + a->Update(fDeltaTime); if (unlikely(!m_UpdateFunction.IsNil())) { Lua* L = LUA->Get(); diff --git a/src/DifficultyList.cpp b/src/DifficultyList.cpp index f730226bc9..8491ee2c43 100644 --- a/src/DifficultyList.cpp +++ b/src/DifficultyList.cpp @@ -320,7 +320,6 @@ StepsDisplayList::TweenOnScreen() for (int m = 0; m < MAX_METERS; ++m) ON_COMMAND(m_Lines[m].m_Meter); - this->SetHibernate(0.5f); m_bShown = true; for (unsigned m = 0; m < m_Rows.size(); ++m) { Line& l = m_Lines[m]; diff --git a/src/GameState.h b/src/GameState.h index b83dcda69e..5a1bd55d31 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -224,7 +224,7 @@ class GameState bool m_bLoadingNextSong; int GetLoadingCourseSongIndex() const; - RString GetEtternaVersion() { return "0.62.0"; } + RString GetEtternaVersion() { return "0.62.1"; } bool isplaylistcourse = false; bool IsPlaylistCourse() { return isplaylistcourse; } bool CountNotesSeparately(); diff --git a/src/NoteDisplay.cpp b/src/NoteDisplay.cpp index bf948f03be..b8ca279b66 100644 --- a/src/NoteDisplay.cpp +++ b/src/NoteDisplay.cpp @@ -217,7 +217,7 @@ MakeNoteResource(const RString& sButton, NOTESKIN->GetCurrentNoteSkin(), sElementAndType, pn, gc); map::iterator it = - g_NoteResource[Color].find(nsap); + g_NoteResource["4th"].find(nsap); // i cant figure out how color changes what actors are loaded... -mina if (it == g_NoteResource[Color].end()) { auto* pRes = new NoteResource(nsap); @@ -734,14 +734,9 @@ NoteDisplay::Update(float fDeltaTime) { /* This function is static: it's called once per game loop, not once per * NoteDisplay. Update each cached item exactly once. */ - map>::iterator it2; - map::iterator it; - for (it2 = g_NoteResource.begin(); it2 != g_NoteResource.end(); it2++) { - for (it = it2->second.begin(); it != it2->second.end(); it++) { - NoteResource* pRes = it->second; - pRes->m_pActor->Update(fDeltaTime); - } - } + for (auto& c : g_NoteResource) + for (auto& a : c.second) + a.second->m_pActor->Update(fDeltaTime); } void diff --git a/src/ProductInfo.inc b/src/ProductInfo.inc index eb32b562fe..dc58167261 100644 --- a/src/ProductInfo.inc +++ b/src/ProductInfo.inc @@ -6,7 +6,7 @@ !define PRODUCT_ID "Etterna" ; TODO: This needs to be updated with the git rev hash -!define PRODUCT_VER "v0.62.0" +!define PRODUCT_VER "v0.62.1" !define PRODUCT_DISPLAY "${PRODUCT_FAMILY} ${PRODUCT_VER}" !define PRODUCT_BITMAP "ett" diff --git a/src/XMLProfile.cpp b/src/XMLProfile.cpp index c3d4087b11..14eb7ca933 100644 --- a/src/XMLProfile.cpp +++ b/src/XMLProfile.cpp @@ -621,11 +621,12 @@ XMLProfile::SaveEttGeneralDataCreateNode(const Profile* profile) const pGeneralDataNode->AppendChild("SortOrder", SortOrderToString(profile->m_SortOrder)); - ASSERT_M(profile->m_LastDifficulty >= 0, - ssprintf("congrats you just confirmed the cause of a rare " - "non-repdroducible bug. pd: %i", - GAMESTATE->m_pCurSteps[PLAYER_1]->GetDifficulty())); - if (profile->m_LastDifficulty < Difficulty_Invalid) + if (profile->m_LastDifficulty < 0) // force set difficulty to current steps if this is somehow -1 for ??? reasons -mina + pGeneralDataNode->AppendChild( + "LastDifficulty", + DifficultyToString( + GAMESTATE->m_pCurSteps[PLAYER_1]->GetDifficulty())); + else if (profile->m_LastDifficulty < Difficulty_Invalid) pGeneralDataNode->AppendChild( "LastDifficulty", DifficultyToString(profile->m_LastDifficulty)); if (profile->m_LastStepsType != StepsType_Invalid) diff --git a/stepmania.nsi b/stepmania.nsi index 8efc34446c..2cc46af75b 100644 --- a/stepmania.nsi +++ b/stepmania.nsi @@ -43,7 +43,7 @@ ; don't forget to change this before releasing a new version. ; wish this could be automated, but it requires "X.Y.Z.a" format. -aj - VIProductVersion "0.62.0.0" + VIProductVersion "0.62.1.0" VIAddVersionKey "ProductName" "${PRODUCT_ID}" VIAddVersionKey "FileVersion" "${PRODUCT_VER}" VIAddVersionKey "FileDescription" "${PRODUCT_ID} Installer"