Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
TheROPFather committed Nov 15, 2018
2 parents d9d9722 + 56aaf5f commit d775f38
Show file tree
Hide file tree
Showing 19 changed files with 101 additions and 82 deletions.
2 changes: 1 addition & 1 deletion 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 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
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,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
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion Themes/Til Death/BGAnimations/_chartpreview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
110 changes: 59 additions & 51 deletions Themes/Til Death/BGAnimations/_chorddensitygraph.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local cdg

-- hurrrrr nps quadzapalooza -mina
local imcrazy = 500
local wodth = capWideScale(280, 300)
local hidth = 40
local txtoff = 10
Expand All @@ -16,62 +16,77 @@ 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

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)
Expand All @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions Themes/Til Death/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Themes/Til Death/Graphics/ScreenTitleMenu scroll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 2 additions & 0 deletions Themes/Til Death/Scripts/02 CustomizeGameplay.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
local keymode
local allowedCustomization
local usingReverse
local WIDESCREENWHY = -5
local WIDESCREENWHX = -5

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
Expand Down
Binary file modified Themes/_fallback/Graphics/Common splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions src/ActorFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,8 @@ ActorFrame::UpdateInternal(float fDeltaTime)
Actor::UpdateInternal(fDeltaTime);

// update all sub-Actors
for (vector<Actor*>::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();
Expand Down
1 change: 0 additions & 1 deletion src/DifficultyList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion src/GameState.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
13 changes: 4 additions & 9 deletions src/NoteDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ MakeNoteResource(const RString& sButton,
NOTESKIN->GetCurrentNoteSkin(), sElementAndType, pn, gc);

map<NoteSkinAndPath, NoteResource*>::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);

Expand Down Expand Up @@ -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<RString, map<NoteSkinAndPath, NoteResource*>>::iterator it2;
map<NoteSkinAndPath, NoteResource*>::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
Expand Down
2 changes: 1 addition & 1 deletion src/ProductInfo.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
11 changes: 6 additions & 5 deletions src/XMLProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion stepmania.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d775f38

Please sign in to comment.