Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extern/crashpad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ endif()

set(GN_WIN_LINK_FLAG "") # Dynamically link to C runtime library
if(WIN32)
set(GN_WIN_LINK_FLAG /MT) # Dynamically link to C runtime library
set(GN_WIN_LINK_FLAG "/GL- /MT") # Dynamically link to C runtime library
if(CMAKE_BUILD_TYPE STREQUAL Debug) #TODO: Fix for multi-config generators
string(APPEND GN_WIN_LINK_FLAG d)
endif()
Expand Down
2 changes: 1 addition & 1 deletion extern/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ endif()

if(MSVC)
# Disable default manifest added by CMake
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")

add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
# if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
Expand Down
7 changes: 3 additions & 4 deletions src/Etterna/Actor/Base/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,9 @@ Actor::UpdateInternal(float delta_time)
}
break;
case CLOCK_TIMER_GLOBAL:
generic_global_timer_update(
RageTimer::GetTimeSinceStart(),
m_fEffectDelta,
m_fSecsIntoEffect);
generic_global_timer_update(RageTimer::GetTimeSinceStart(),
m_fEffectDelta,
m_fSecsIntoEffect);
break;
case CLOCK_BGM_BEAT:
generic_global_timer_update(
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Base/ActorMultiVertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ ActorMultiVertex::GetSpline(size_t i)
}

void
ActorMultiVertex::SetState(size_t i)
ActorMultiVertex::SetState(int i)
{
ASSERT(i < _states.size());
_cur_state = i;
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Base/ActorMultiVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class ActorMultiVertex : public Actor
_states = new_states;
SetState(0);
}
void SetState(size_t i);
void SetState(int i) override;
void SetAllStateDelays(float delay);
[[nodiscard]] float GetAnimationLengthSeconds() const override;
void SetSecondsIntoAnimation(float seconds) override;
Expand Down
3 changes: 0 additions & 3 deletions src/Etterna/Actor/Gameplay/Background.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ static Preference<RandomBackgroundMode> g_RandomBackgroundMode(
static Preference<int> g_iNumBackgrounds("NumBackgrounds", 10);
static Preference<bool> g_bSongBackgrounds("SongBackgrounds", true);

// Width of the region separating the left and right brightness areas:
static float g_fBackgroundCenterWidth = 40;

class BrightnessOverlay : public ActorFrame
{
public:
Expand Down
6 changes: 2 additions & 4 deletions src/Etterna/Actor/Gameplay/NoteDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

using std::map;

static const double PI_180 = PI / 180.0;
static const double PI_180R = 180.0 / PI;

const std::string&
Expand Down Expand Up @@ -1894,7 +1893,6 @@ NoteColumnRenderer::DrawPrimitives()
m_column_render_args.zoom_handler = &NCR_current.m_zoom_handler;
m_column_render_args.diffuse = m_pTempState->diffuse[0];
m_column_render_args.glow = m_pTempState->glow;
auto any_upcoming = false;
// Build lists of holds and taps for each player number, then pass those
// lists to the displays to draw.
// The vector in the NUM_PlayerNumber slot should stay empty, not worth
Expand Down Expand Up @@ -1935,11 +1933,11 @@ NoteColumnRenderer::DrawPrimitives()

// Draw holds before taps to make sure taps dont hide behind holds
if (!holds.empty())
any_upcoming |= m_displays[PLAYER_1]->DrawHoldsInRange(
m_displays[PLAYER_1]->DrawHoldsInRange(
*m_field_render_args, m_column_render_args, holds);

if (!taps.empty())
any_upcoming |= m_displays[PLAYER_1]->DrawTapsInRange(
m_displays[PLAYER_1]->DrawTapsInRange(
*m_field_render_args, m_column_render_args, taps);
}

Expand Down
11 changes: 2 additions & 9 deletions src/Etterna/Actor/Gameplay/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ Player::UpdateHoldsAndRolls(float fDeltaTime,
}

std::vector<TrackRowTapNote> vHoldNotesToGradeTogether;
auto iRowOfLastHoldNote = -1;
auto iter = *m_pIterNeedsHoldJudging; // copy
for (; !iter.IsAtEnd() && iter.Row() <= iSongRow; ++iter) {
auto& tn = *iter;
Expand Down Expand Up @@ -906,7 +905,6 @@ Player::UpdateHoldsAndRolls(float fDeltaTime,
iSongRow, fDeltaTime, vHoldNotesToGradeTogether);
vHoldNotesToGradeTogether.clear();
}
iRowOfLastHoldNote = iRow;
vHoldNotesToGradeTogether.push_back(trtn);
}

Expand Down Expand Up @@ -2180,8 +2178,8 @@ Player::Step(int col,
// TapNoteScore, so that they can logically match up with
// the current timing windows. -aj
{
auto fWindowW1 = GetWindowSeconds(TW_W1);
auto fWindowW2 = GetWindowSeconds(TW_W2);
// auto fWindowW1 = GetWindowSeconds(TW_W1);
// auto fWindowW2 = GetWindowSeconds(TW_W2);
auto fWindowW3 = GetWindowSeconds(TW_W3);
auto fWindowW4 = GetWindowSeconds(TW_W4);
auto fWindowW5 = GetWindowSeconds(TW_W5);
Expand Down Expand Up @@ -2325,8 +2323,6 @@ Player::FlashGhostRow(int iRow)
{
const auto lastTNS =
NoteDataWithScoring::LastTapNoteWithResult(m_NoteData, iRow).result.tns;
const auto bBlind =
Comment thread
poco0317 marked this conversation as resolved.
(m_pPlayerState->m_PlayerOptions.GetCurrent().m_fBlind != 0);
const auto bBright =
((m_pPlayerStageStats != nullptr) &&
m_pPlayerStageStats->m_iCurCombo >
Expand Down Expand Up @@ -3321,9 +3317,6 @@ Player::IncrementComboOrMissCombo(const bool bComboOrMissCombo)
void
Player::RenderAllNotesIgnoreScores()
{
auto firstRow = 0;
auto lastRow = m_NoteData.GetLastRow() + 1;

// Go over every single non empty row and their tracks
FOREACH_NONEMPTY_ROW_ALL_TRACKS(m_NoteData, row)
{
Expand Down
4 changes: 0 additions & 4 deletions src/Etterna/Actor/Gameplay/PlayerReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ PlayerReplay::UpdateHoldsAndRolls(
}

std::vector<TrackRowTapNote> vHoldNotesToGradeTogether;
auto iRowOfLastHoldNote = -1;
auto iter = *m_pIterNeedsHoldJudging; // copy
for (; !iter.IsAtEnd() && iter.Row() <= iSongRow; ++iter) {
auto& tn = *iter;
Expand Down Expand Up @@ -207,7 +206,6 @@ PlayerReplay::UpdateHoldsAndRolls(
iSongRow, fDeltaTime, vHoldNotesToGradeTogether);
vHoldNotesToGradeTogether.clear();
}
iRowOfLastHoldNote = iRow;
vHoldNotesToGradeTogether.push_back(trtn);
}

Expand Down Expand Up @@ -642,8 +640,6 @@ PlayerReplay::Step(int col,
NOTESKIN->SetLastSeenColor(
NoteTypeToString(GetNoteType(iRowOfOverlappingNoteOrRow)));

const auto fSecondsFromExact = fabsf(fNoteOffset);

TapNote* pTN = nullptr;
auto iter = m_NoteData.FindTapNote(
col,
Expand Down
1 change: 0 additions & 1 deletion src/Etterna/Actor/GameplayAndMenus/MeterDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class MeterDisplay : public ActorFrame

private:
float m_fStreamWidth = 0.f;
float m_fPercent = 0.5f;
AutoActor m_sprStream;
AutoActor m_sprTip;
};
Expand Down
2 changes: 0 additions & 2 deletions src/Etterna/Actor/Menus/ModIconRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ OptionToPreferredColumn(std::string sOptionText)
void
ModIconRow::SetFromGameState()
{
PlayerNumber pn = m_pn;

std::string sOptions =
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetStage().GetString();
std::vector<std::string> vsOptions;
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Menus/MusicWheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ MusicWheel::FilterByAndAgainstStepKeys(std::vector<Song*>& inv)
{
std::vector<Song*> tmp;
const std::function<bool(Song*, std::vector<string>&)> check =
[this](Song* x, std::vector<string>& hl) {
[](Song* x, std::vector<string>& hl) {
for (auto& ck : hl) {
if (x->HasChartByHash(ck)) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Menus/MusicWheel.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MusicWheel : public WheelBase
return dynamic_cast<const MusicWheelItemData*>(m_CurWheelItemData[i]);
}

virtual void ReloadSongList(bool searching, const std::string& findme);
void ReloadSongList(bool searching, const std::string& findme) override;
void SetHashList(const std::vector<string>& newHashList);
void SetOutHashList(const std::vector<string>& newOutHashList);

Expand Down
9 changes: 0 additions & 9 deletions src/Etterna/Actor/Menus/MusicWheelItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,6 @@ MusicWheelItem::RefreshGrades()
if (pWID->m_pSong == nullptr)
return;

Difficulty dc;
if (GAMESTATE->m_pCurSteps)
dc = GAMESTATE->m_pCurSteps->GetDifficulty();
else
dc = GAMESTATE->m_PreferredDifficulty;

ProfileSlot ps;
ps = static_cast<ProfileSlot>(PLAYER_1);

StepsType st;
if (GAMESTATE->m_pCurSteps)
st = GAMESTATE->m_pCurSteps->m_StepsType;
Expand Down
31 changes: 0 additions & 31 deletions src/Etterna/Actor/Menus/OptionRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,6 @@ OptionRow::AfterImportOptions(PlayerNumber pn)
for (auto& c : m_Underline)
c->SetVisible(false);

// Make all selections the same if bOneChoiceForAllPlayers.
// Hack: we only import active players, so if only player 2 is imported,
// we need to copy p2 to p1, not p1 to p2.
if (m_pHand->m_Def.m_bOneChoiceForAllPlayers) {
PlayerNumber pnCopyFrom = GAMESTATE->GetMasterPlayerNumber();
if (GAMESTATE->GetMasterPlayerNumber() == PLAYER_INVALID)
pnCopyFrom = PLAYER_1;
}

switch (m_pHand->m_Def.m_selectType) {
case SELECT_ONE: {
// Make sure the row actually has a selection.
Expand All @@ -434,9 +425,6 @@ OptionRow::PositionUnderlines(PlayerNumber pn)
if (vpUnderlines.empty())
return;

PlayerNumber pnTakeSelectedFrom =
m_pHand->m_Def.m_bOneChoiceForAllPlayers ? PLAYER_1 : pn;

for (int i = 0; i < static_cast<int>(vpUnderlines.size()); i++) {
OptionsCursor& ul = *vpUnderlines[i];

Expand Down Expand Up @@ -544,9 +532,6 @@ OptionRow::UpdateEnabledDisabled()
bool bThisRowHasFocusByAny = false;
bThisRowHasFocusByAny |= static_cast<int>(m_bRowHasFocus);

bool bThisRowHasFocusByAll = true;
bThisRowHasFocusByAll &= static_cast<int>(m_bRowHasFocus);

bool bRowEnabled = !m_pHand->m_Def.m_vEnabledForPlayers.empty();

// Don't tween selection colors at all.
Expand All @@ -570,18 +555,6 @@ OptionRow::UpdateEnabledDisabled()
m_textTitle->PlayCommand(sCmdName);

for (unsigned j = 0; j < m_textItems.size(); j++) {
bool bThisItemHasFocusByAny = false;
if (m_bRowHasFocus) {
if (static_cast<int>(j) == GetChoiceInRowWithFocus()) {
bThisItemHasFocusByAny = true;
break;
}
}

// Logically dead code
// if (bThisItemHasFocusByAny)
// m_textItems[j]->PlayCommand("GainFocus");
// else
m_textItems[j]->PlayCommand("LoseFocus");
}

Expand Down Expand Up @@ -905,8 +878,6 @@ OptionRow::ImportOptions(const PlayerNumber& vpns)
{
ASSERT(!m_pHand->m_Def.m_vsChoices.empty());

PlayerNumber p = PLAYER_1;

FOREACH(bool, m_vbSelected, b)
*b = false;

Expand All @@ -926,8 +897,6 @@ OptionRow::ExportOptions(const PlayerNumber& vpns, bool bRowHasFocus)
ASSERT(!m_pHand->m_Def.m_vsChoices.empty());

int iChangeMask = 0;

PlayerNumber p = PLAYER_1;
const bool bFocus = bRowHasFocus;

VerifySelected(
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Menus/OptionsCursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OptionsCursor : public ActorFrame
void Load(const std::string& sMetricsGroup, bool bLoadCanGos);

void StopTweening() override;
void BeginTweening(float fSecs, TweenType tt = TWEEN_DECELERATE);
void BeginTweening(float fSecs, TweenType tt = TWEEN_DECELERATE) override;
void SetBarWidth(int iWidth);
int GetBarWidth() const;
void SetCanGo(bool bCanGoLeft, bool bCanGoRight);
Expand Down
5 changes: 3 additions & 2 deletions src/Etterna/Actor/Menus/OptionsList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ OptionsList::Input(const InputEventPlus& input)
if (input.MenuI == GAME_BUTTON_SELECT) {
if (input.type != IET_FIRST_PRESS)
return false;
//if( input.type == IET_RELEASE )
// if( input.type == IET_RELEASE )
{
Close();
return true;
Expand Down Expand Up @@ -641,7 +641,8 @@ OptionsList::SelectionsChanged(const std::string& sRowName)
std::vector<bool>& bSelections = m_bSelections[sRowName];

if (pHandler->m_Def.m_bOneChoiceForAllPlayers && m_pLinked != nullptr) {
std::vector<bool>& bLinkedSelections = m_pLinked->m_bSelections[sRowName];
std::vector<bool>& bLinkedSelections =
m_pLinked->m_bSelections[sRowName];
bLinkedSelections = bSelections;

if (m_pLinked->IsOpened())
Expand Down
3 changes: 0 additions & 3 deletions src/Etterna/Actor/Menus/WheelBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,12 @@ WheelBase::RebuildWheelItems(int iDist)
// iIndex is now the index of the lowest WheelItem to draw

int iFirst = 0;
int iLast = NUM_WHEEL_ITEMS - 1;

if (iDist != INT_MAX) {
// Shift items and refresh only those that have changed.
CircularShift(items, iDist);
if (iDist > 0)
iFirst = NUM_WHEEL_ITEMS - iDist;
else if (iDist < 0)
iLast = -iDist - 1;
}

for (size_t i = iFirst; i < items.size(); i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Menus/WheelBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class WheelBase : public ActorFrame
void RebuildWheelItems(int dist = INT_MAX); // INT_MAX = refresh all
// Update the list of songs to match whatever songs are indexed by the song
// manager (SONGMAN)
virtual void ReloadSongList() {}
virtual void ReloadSongList(bool searching, const std::string& findme) {}

virtual auto GetNumItems() const -> unsigned int
{
Expand Down
2 changes: 2 additions & 0 deletions src/Etterna/Globals/SoloCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
using namespace ::std;

// multipliers to each skillset
/*
static const std::array<float, NUM_Skillset> basescalars = {
0.F, 1.F, 1.F, 1.F, 1.F, 1.F, 1.F, 1.F
};
*/

// global multiplier for baseline standardization
static constexpr float finalscaler = 2.6f * 1.4f;
Expand Down
1 change: 0 additions & 1 deletion src/Etterna/Globals/StepMania.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ AdjustForChangedSystemCapabilities()
* Actually, Windows lops off a meg or two; cut off a little lower to treat
* 192-meg systems as high-memory. */
const bool HighMemory = (Memory >= 190);
const bool LowMemory = (Memory < 100); // 64 and 96-meg systems

/* Two memory-consuming features that we can disable are texture caching and
* preloaded banners. Texture caching can use a lot of memory; disable it
Expand Down
16 changes: 14 additions & 2 deletions src/Etterna/Globals/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ ShowWarningOrTrace(const char* file,
const char* message,
bool bWarning); // don't pull in LOG here


#ifdef DEBUG
// No reason to kill the program. A lot of these don't produce a crash in NDEBUG
// so why stop?
Expand Down Expand Up @@ -141,8 +140,21 @@ template<int>
struct CompileAssertDecl
{
};

// Ignore "unused-local-typedef" warnings for COMPILE_ASSERT
#if defined(__clang__)
#define COMPILE_ASSERT_PRE \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-local-typedef\"")
#define COMPILE_ASSERT_POST _Pragma("clang diagnostic pop")
#else
#define COMPILE_ASSERT_PRE
#define COMPILE_ASSERT_POST
#endif
#define COMPILE_ASSERT(COND) \
typedef CompileAssertDecl<sizeof(CompileAssert<!!(COND)>)> CompileAssertInst
COMPILE_ASSERT_PRE \
typedef CompileAssertDecl<sizeof(CompileAssert<!!(COND)>)> \
CompileAssertInst COMPILE_ASSERT_POST

#include "RageUtil/Misc/RageException.h"
/* Don't include our own headers here, since they tend to change often. */
Expand Down
Loading