wavelength 1.0.0
Loading...
Searching...
No Matches
songentry.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "script/dataarray.h"
6
13class SongEntry {
14public:
15 SongEntry() = default;
16
22 explicit SongEntry(DataArray *pData) : mData(pData) {
23 }
24
33
41 int GetType() const;
42
50 const char *GetName() const;
51
59 int GetId() const;
60
68 const char *GetTitle() const;
69
77 const char *GetArtist() const;
78
88 const char *GetLabel() const;
89
97 const char *GetArtistShort() const;
98
107 const char *GetArtistShortest() const;
108
116 const char *GetBio() const;
117
125 const char *GetWww() const;
126
135 const char *GetGenre() const;
136
144 const char *GetGenreName() const;
145
156 const char *GetRemixTitle() const;
157
165 float GetBpm() const;
166
174 float GetTunnelScale() const;
175
183 int GetBars() const;
184
192 int GetRemixBars() const;
193
202 int GetDuelBars() const;
203
214 const char *GetTitleShort() const;
215
225 const char *GetArenaPath() const;
226
238 bool IsAvailable(int nSkillLevel) const;
239
249 bool IsDuel() const;
250
260 bool IsRemixable() const;
261
271 bool IsGameable() const;
272
284 static DataArray *Find(const std::vector<SongEntry> &songs, const char *pszName);
285
287 void SetData(DataArray *pData) {
288 mData = pData;
289 }
290
291private:
292 DataArray *mData;
293};
Reference-counted array of script data nodes.
Definition dataarray.h:20
const char * GetRemixTitle() const
Report the localised name of a remix of the song, the token <name>_REMIX_TITLE.
const char * GetBio() const
Report the localised biography, the token <name>_BIO.
Type
Values of GetType().
Definition songentry.h:26
@ kTypeNormal
Definition songentry.h:27
@ kTypeSecret
Definition songentry.h:30
@ kTypeBonus
Definition songentry.h:29
@ kTypeBoss
Definition songentry.h:28
@ kTypeTutorial
Definition songentry.h:31
const char * GetArtist() const
Report the localised artist, the token <name>_ARTIST.
const char * GetTitle() const
Report the localised title of the song.
const char * GetGenreName() const
Report the localised genre, the token <name>_GENRE, without the tempo.
int GetId() const
Report the number of the song, the id of the entry.
SongEntry()=default
const char * GetArtistShortest() const
Report the localised shortest form of the artist, the token <name>_ARTIST_SHORTEST,...
const char * GetArenaPath() const
Report the arena_path of the entry.
bool IsRemixable() const
Report whether a remix can be made of the song, from its not_remix.
const char * GetWww() const
Report the localised web address, the token <name>_WWW.
int GetType() const
Report the type of the song.
bool IsDuel() const
Report whether a duel can play the song, from its duel.
int GetRemixBars() const
Report the remix_song_bars of the song.
float GetBpm() const
Report the bpm of the song.
bool IsAvailable(int nSkillLevel) const
Report whether the song is available at a skill level, which its skill sets the lowest of.
static DataArray * Find(const std::vector< SongEntry > &songs, const char *pszName)
Find a song in a list by name.
int GetBars() const
Report the song_bars of the song.
SongEntry(DataArray *pData)
Construct the entry of a song.
Definition songentry.h:22
void SetData(DataArray *pData)
Definition songentry.h:287
const char * GetTitleShort() const
Report the short title of the song.
const char * GetLabel() const
Report the localised record label, the token <name>_LABEL.
int GetDuelBars() const
Report the duel_song_bars of the song, or the remix_song_bars when the entry does not specify it.
bool IsGameable() const
Report whether a game can play the song, from its not_game.
const char * GetName() const
Report the name of the song, the first symbol of the entry.
const char * GetArtistShort() const
Report the localised short form of the artist, the token <name>_ARTIST_SHORT.
float GetTunnelScale() const
Report the tunnel_scale of the song.
const char * GetGenre() const
Report the localised genre, the token <name>_GENRE, with the tempo when the genre is not empty.