1#ifndef BackgroundUtil_H
2#define BackgroundUtil_H
10extern const std::string RANDOM_BACKGROUND_FILE;
11extern const std::string NO_SONG_BG_FILE;
12extern const std::string SONG_BACKGROUND_FILE;
14extern const std::string SBE_UpperLeft;
15extern const std::string SBE_Centered;
16extern const std::string SBE_StretchNormal;
17extern const std::string SBE_StretchNoLoop;
18extern const std::string SBE_StretchRewind;
19extern const std::string SBT_CrossFade;
25 [[nodiscard]]
bool IsEmpty()
const {
return m_sFile1.empty() && m_sFile2.empty(); }
26 std::string m_sEffect;
29 std::string m_sColor1;
30 std::string m_sColor2;
32 [[nodiscard]]
XNode* CreateNode()
const;
50 const std::string& f1,
51 const std::string& f2)
71 std::string f2 = std::string(),
73 std::string e = SBE_Centered,
74 std::string t = std::string())
83 float m_fStartBeat{ -1 };
85 std::string m_sTransition;
87 [[nodiscard]] std::string GetTextDescription()
const;
92 [[nodiscard]] std::string
ToString()
const;
97AddBackgroundChange(std::vector<BackgroundChange>& vBackgroundChanges,
100SortBackgroundChangesArray(std::vector<BackgroundChange>& vBackgroundChanges);
103GetBackgroundEffects(
const std::string& sName,
104 std::vector<std::string>& vsPathsOut,
105 std::vector<std::string>& vsNamesOut);
107GetBackgroundTransitions(
const std::string& sName,
108 std::vector<std::string>& vsPathsOut,
109 std::vector<std::string>& vsNamesOut);
112GetSongBGAnimations(
const Song* pSong,
113 const std::string& sMatch,
114 std::vector<std::string>& vsPathsOut,
115 std::vector<std::string>& vsNamesOut);
117GetSongMovies(
const Song* pSong,
118 const std::string& sMatch,
119 std::vector<std::string>& vsPathsOut,
120 std::vector<std::string>& vsNamesOut);
122GetSongBitmaps(
const Song* pSong,
123 const std::string& sMatch,
124 std::vector<std::string>& vsPathsOut,
125 std::vector<std::string>& vsNamesOut);
127GetGlobalBGAnimations(
const Song* pSong,
128 const std::string& sMatch,
129 std::vector<std::string>& vsPathsOut,
130 std::vector<std::string>& vsNamesOut);
132BakeAllBackgroundChanges(
Song* pSong);
Holds all music metadata and steps for one song.
Definition Song.h:65
Shared background-related routines.
Definition BackgroundUtil.h:95
Definition BackgroundUtil.h:62
std::string ToString() const
Get the string representation of the change.
Definition BackgroundUtil.cpp:83
Definition BackgroundUtil.h:22
BackgroundDef()
Set up the BackgroundDef with default values.
Definition BackgroundUtil.h:35
BackgroundDef(const std::string &effect, const std::string &f1, const std::string &f2)
Set up the BackgroundDef with some defined values.
Definition BackgroundUtil.h:49