Allow linking against system libraries for almost everything (#1790)

This commit is contained in:
Tatsh
2019-02-16 08:32:52 -08:00
committed by Colby Klein
parent 021d494157
commit b8a79cd0f6
78 changed files with 4870 additions and 4776 deletions
+28 -27
View File
@@ -12,7 +12,7 @@
/** @brief Act on each non empty row in the specified track within the specified range. */
#define FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( nd, track, row, start, last ) \
for( int row = start-1; (nd).GetNextTapNoteRowForTrack(track,row) && row < (last); )
/** @brief Act on each non empty row in the specified track within the specified range,
/** @brief Act on each non empty row in the specified track within the specified range,
going in reverse order. */
#define FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE_REVERSE( nd, track, row, start, last ) \
for( int row = last; (nd).GetPrevTapNoteRowForTrack(track,row) && row >= (start); )
@@ -32,7 +32,7 @@ public:
typedef map<int,TapNote>::const_iterator const_iterator;
typedef map<int,TapNote>::reverse_iterator reverse_iterator;
typedef map<int,TapNote>::const_reverse_iterator const_reverse_iterator;
NoteData(): m_TapNotes() {}
iterator begin( int iTrack ) { return m_TapNotes[iTrack].begin(); }
@@ -62,7 +62,7 @@ public:
ND *m_pNoteData;
vector<iter> m_vBeginIters;
/* There isn't a "past the beginning" iterator so this is hard to make a true bidirectional iterator.
/* There isn't a "past the beginning" iterator so this is hard to make a true bidirectional iterator.
* Use the "past the end" iterator in place of the "past the beginning" iterator when in reverse. */
vector<iter> m_vCurrentIters;
@@ -107,35 +107,35 @@ private:
// There's no point in inserting empty notes into the map.
// Any blank space in the map is defined to be empty.
vector<TrackMap> m_TapNotes;
/**
* @brief Determine whether this note is for Player 1 or Player 2.
* @param track the track/column the note is in.
* @param tn the note in question. Required for routine mode.
* @return true if it's for player 1, false for player 2. */
bool IsPlayer1(const int track, const TapNote &tn) const;
/**
* @brief Determine if the note in question should be counted as a tap.
* @param tn the note in question.
* @param row the row it lives in.
* @return true if it's a tap, false otherwise. */
bool IsTap(const TapNote &tn, const int row) const;
/**
* @brief Determine if the note in question should be counted as a mine.
* @param tn the note in question.
* @param row the row it lives in.
* @return true if it's a mine, false otherwise. */
bool IsMine(const TapNote &tn, const int row) const;
/**
* @brief Determine if the note in question should be counted as a lift.
* @param tn the note in question.
* @param row the row it lives in.
* @return true if it's a lift, false otherwise. */
bool IsLift(const TapNote &tn, const int row) const;
/**
* @brief Determine if the note in question should be counted as a fake.
* @param tn the note in question.
@@ -159,14 +159,14 @@ private:
// Mina stuf (Used for chartkey hashing)
std::vector<int> NonEmptyRowVector;
public:
void Init();
// Mina stuf (Used for chartkey hashing)
void LogNonEmptyRows();
std::vector<int>& GetNonEmptyRowVector() { return NonEmptyRowVector; };
int GetNumTracks() const { return m_TapNotes.size(); }
void SetNumTracks( int iNewNumTracks );
bool IsComposite() const;
@@ -193,10 +193,10 @@ public:
/**
* @brief Return an iterator range for [rowBegin,rowEnd).
*
* This can be used to efficiently iterate trackwise over a range of notes.
* It's like FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE, except it only requires
* This can be used to efficiently iterate trackwise over a range of notes.
* It's like FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE, except it only requires
* two map searches (iterating is constant time), but the iterators will
* become invalid if the notes they represent disappear, so you need to
* become invalid if the notes they represent disappear, so you need to
* pay attention to how you modify the data.
* @param iTrack the column to use.
* @param iStartRow the starting point.
@@ -319,8 +319,8 @@ public:
{
return GetNumRowsWithSimultaneousTaps( 2, iStartIndex, iEndIndex );
}
// This row needs at least iMinSimultaneousPresses either tapped or held.
bool RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses, int row ) const;
@@ -344,31 +344,31 @@ public:
// the couple/routine style variants of the above.
pair<int, int> GetNumTapNotesTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumJumpsTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumHandsTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumQuadsTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumHoldNotesTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumMinesTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumRollsTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumLiftsTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
pair<int, int> GetNumFakesTwoPlayer(int startRow = 0,
int endRow = MAX_NOTE_ROW) const;
// Transformations
void LoadTransformed(const NoteData& original,
int iNewNumTracks,
@@ -382,7 +382,8 @@ public:
/** @brief Allow a quick way to swap notedata. */
namespace std
{
template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 ) { nd1.swap( nd2 ); }
template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 ) noexcept(is_nothrow_move_constructible<NoteData>::value &&
is_nothrow_move_assignable<NoteData>::value) { nd1.swap( nd2 ); }
}
#endif
@@ -390,7 +391,7 @@ namespace std
/*
* (c) 2001-2004 Chris Danford, Glenn Maynard
* All rights reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -400,7 +401,7 @@ namespace std
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF