2004-05-31 21:35:31 +00:00
|
|
|
/* SongOptions - Options that apply to an entire song (not per-player). */
|
2002-07-27 19:29:51 +00:00
|
|
|
|
2004-05-31 21:35:31 +00:00
|
|
|
#ifndef SONG_OPTIONS_H
|
|
|
|
|
#define SONG_OPTIONS_H
|
2002-07-27 19:29:51 +00:00
|
|
|
|
2005-11-29 23:15:11 +00:00
|
|
|
class SongOptions
|
2002-07-27 19:29:51 +00:00
|
|
|
{
|
2005-11-29 23:15:11 +00:00
|
|
|
public:
|
2005-04-21 04:27:13 +00:00
|
|
|
enum LifeType
|
|
|
|
|
{
|
|
|
|
|
LIFE_BAR=0,
|
|
|
|
|
LIFE_BATTERY,
|
|
|
|
|
LIFE_TIME,
|
|
|
|
|
NUM_LIFE_TYPES
|
|
|
|
|
};
|
2002-07-27 19:29:51 +00:00
|
|
|
LifeType m_LifeType;
|
2005-04-21 04:27:13 +00:00
|
|
|
enum DrainType
|
|
|
|
|
{
|
|
|
|
|
DRAIN_NORMAL,
|
|
|
|
|
DRAIN_NO_RECOVER,
|
|
|
|
|
DRAIN_SUDDEN_DEATH
|
|
|
|
|
};
|
2002-07-27 19:29:51 +00:00
|
|
|
DrainType m_DrainType; // only used with LifeBar
|
|
|
|
|
int m_iBatteryLives;
|
2004-07-31 19:14:53 +00:00
|
|
|
enum FailType {
|
2006-11-09 07:49:49 +00:00
|
|
|
FAIL_IMMEDIATE=0, // fail immediately when life touches 0
|
|
|
|
|
FAIL_IMMEDIATE_CONTINUE, // fail immediately when life touches 0, but allow playing the rest of the song
|
2006-11-09 09:09:40 +00:00
|
|
|
FAIL_AT_END, // fail if life is at 0 when the song ends
|
2004-07-31 19:14:53 +00:00
|
|
|
FAIL_OFF }; // never fail
|
2003-02-12 23:11:37 +00:00
|
|
|
FailType m_FailType;
|
2006-08-05 02:38:05 +00:00
|
|
|
float m_fMusicRate, m_SpeedfMusicRate;
|
2006-11-30 08:22:30 +00:00
|
|
|
float m_fHaste, m_SpeedfHaste;
|
2007-01-25 11:03:41 +00:00
|
|
|
bool m_bAssistClap;
|
|
|
|
|
bool m_bAssistMetronome;
|
2005-04-11 04:50:39 +00:00
|
|
|
enum AutosyncType {
|
|
|
|
|
AUTOSYNC_OFF,
|
|
|
|
|
AUTOSYNC_SONG,
|
2005-05-19 23:29:39 +00:00
|
|
|
AUTOSYNC_MACHINE,
|
2006-10-26 22:41:40 +00:00
|
|
|
AUTOSYNC_TEMPO,
|
2005-05-19 23:29:39 +00:00
|
|
|
NUM_AUTOSYNC_TYPES
|
2005-04-11 04:50:39 +00:00
|
|
|
};
|
|
|
|
|
AutosyncType m_AutosyncType;
|
|
|
|
|
bool m_bSaveScore;
|
2007-01-16 01:28:59 +00:00
|
|
|
enum SoundEffectType {
|
|
|
|
|
SOUNDEFFECT_OFF,
|
|
|
|
|
SOUNDEFFECT_SPEED,
|
|
|
|
|
SOUNDEFFECT_PITCH,
|
|
|
|
|
NUM_SOUNDEFFECT
|
|
|
|
|
};
|
|
|
|
|
SoundEffectType m_SoundEffectType;
|
2002-07-27 19:29:51 +00:00
|
|
|
|
2006-08-05 02:38:05 +00:00
|
|
|
|
2002-08-01 13:42:56 +00:00
|
|
|
SongOptions() { Init(); };
|
2003-08-13 18:30:46 +00:00
|
|
|
void Init();
|
2006-08-05 02:38:05 +00:00
|
|
|
void Approach( const SongOptions& other, float fDeltaSeconds );
|
2006-02-05 20:30:37 +00:00
|
|
|
void GetMods( vector<RString> &AddTo ) const;
|
|
|
|
|
void GetLocalizedMods( vector<RString> &AddTo ) const;
|
2006-01-22 01:00:06 +00:00
|
|
|
RString GetString() const;
|
2006-02-05 20:30:37 +00:00
|
|
|
RString GetLocalizedString() const;
|
|
|
|
|
void FromString( const RString &sOptions );
|
2004-01-11 04:33:21 +00:00
|
|
|
|
2004-01-18 07:44:39 +00:00
|
|
|
bool operator==( const SongOptions &other ) const;
|
|
|
|
|
bool operator!=( const SongOptions &other ) const { return !operator==(other); }
|
2002-07-27 19:29:51 +00:00
|
|
|
};
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|
2004-05-31 21:35:31 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* (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
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* 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
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|