Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PlayerOptions.h

Go to the documentation of this file.
00001 /* PlayerOptions - Per-player options that are not saved between sessions. */ 00002 00003 #ifndef PLAYER_OPTIONS_H 00004 #define PLAYER_OPTIONS_H 00005 00006 class Song; 00007 class Steps; 00008 class Course; 00009 class Trail; 00010 00011 #include "GameConstantsAndTypes.h" 00012 00013 struct PlayerOptions 00014 { 00015 PlayerOptions() { Init(); }; 00016 void Init(); 00017 void Approach( const PlayerOptions& other, float fDeltaSeconds ); 00018 CString GetString() const; 00019 CString GetSavedPrefsString() const; // only the basic options that players would want for every song 00020 void ResetSavedPrefs(); 00021 static CString ThemeMod( CString sOneMod ); 00022 CString GetThemedString() const; 00023 void FromString( CString sOptions ); 00024 void ChooseRandomMofifiers(); 00025 bool ContainsTransformOrTurn() const; 00026 00027 bool operator==( const PlayerOptions &other ) const; 00028 bool operator!=( const PlayerOptions &other ) const { return !operator==(other); } 00029 00030 00031 enum Accel { 00032 ACCEL_BOOST, 00033 ACCEL_BRAKE, 00034 ACCEL_WAVE, 00035 ACCEL_EXPAND, 00036 ACCEL_BOOMERANG, 00037 NUM_ACCELS 00038 }; 00039 enum Effect { 00040 EFFECT_DRUNK, 00041 EFFECT_DIZZY, 00042 EFFECT_MINI, 00043 EFFECT_FLIP, 00044 EFFECT_TORNADO, 00045 EFFECT_TIPSY, 00046 EFFECT_BUMPY, 00047 EFFECT_BEAT, 00048 NUM_EFFECTS 00049 }; 00050 enum Appearance { 00051 APPEARANCE_HIDDEN, 00052 APPEARANCE_SUDDEN, 00053 APPEARANCE_STEALTH, 00054 APPEARANCE_BLINK, 00055 APPEARANCE_RANDOMVANISH, 00056 NUM_APPEARANCES 00057 }; 00058 enum Turn { 00059 TURN_NONE=0, 00060 TURN_MIRROR, 00061 TURN_LEFT, 00062 TURN_RIGHT, 00063 TURN_SHUFFLE, 00064 TURN_SUPER_SHUFFLE, 00065 NUM_TURNS 00066 }; 00067 enum Transform { 00068 TRANSFORM_NOHOLDS, 00069 TRANSFORM_NOMINES, 00070 TRANSFORM_LITTLE, 00071 TRANSFORM_WIDE, 00072 TRANSFORM_BIG, 00073 TRANSFORM_QUICK, 00074 TRANSFORM_BMRIZE, 00075 TRANSFORM_SKIPPY, 00076 TRANSFORM_MINES, 00077 TRANSFORM_ECHO, 00078 TRANSFORM_STOMP, 00079 TRANSFORM_PLANTED, 00080 TRANSFORM_FLOORED, 00081 TRANSFORM_TWISTER, 00082 TRANSFORM_NOJUMPS, 00083 TRANSFORM_NOHANDS, 00084 TRANSFORM_NOQUADS, 00085 NUM_TRANSFORMS 00086 }; 00087 enum Scroll { 00088 SCROLL_REVERSE=0, 00089 SCROLL_SPLIT, 00090 SCROLL_ALTERNATE, 00091 SCROLL_CROSS, 00092 SCROLL_CENTERED, 00093 NUM_SCROLLS 00094 }; 00095 enum ScoreDisplay { 00096 SCORING_ADD=0, 00097 SCORING_SUBTRACT, 00098 SCORING_AVERAGE, 00099 NUM_SCOREDISPLAYS 00100 }; 00101 00102 float GetReversePercentForColumn( int iCol ) const; // accounts for all Directions 00103 00104 /* All floats have a corresponding speed setting, which determines how fast 00105 * PlayerOptions::Approach approaches. */ 00106 float m_fTimeSpacing, m_SpeedfTimeSpacing; // instead of Beat spacing 00107 float m_fScrollSpeed, m_SpeedfScrollSpeed; // used if !m_bTimeSpacing 00108 float m_fScrollBPM, m_SpeedfScrollBPM; // used if m_bTimeSpacing 00109 float m_fAccels[NUM_ACCELS], m_SpeedfAccels[NUM_ACCELS]; 00110 float m_fEffects[NUM_EFFECTS],m_SpeedfEffects[NUM_EFFECTS]; 00111 float m_fAppearances[NUM_APPEARANCES],m_SpeedfAppearances[NUM_APPEARANCES]; 00112 float m_fScrolls[NUM_SCROLLS],m_SpeedfScrolls[NUM_SCROLLS]; 00113 float m_fDark, m_SpeedfDark; 00114 float m_fBlind, m_SpeedfBlind; 00115 float m_fCover, m_SpeedfCover; // hide the background per-player--can't think of a good name 00116 float m_fPerspectiveTilt, m_SpeedfPerspectiveTilt; // -1 = near, 0 = overhead, +1 = space 00117 float m_fSkew, m_SpeedfSkew; // 0 = vanish point is in center of player, 1 = vanish point is in center of screen 00118 00119 float m_fRandomSpeed, m_SpeedfRandomSpeed; 00120 00121 /* If this is > 0, then the player must have life above this value at the end of 00122 * the song to pass. This is independent of SongOptions::m_FailType. */ 00123 float m_fPassmark, m_SpeedfPassmark; 00124 00125 bool m_bTurns[NUM_TURNS]; 00126 bool m_bTransforms[NUM_TRANSFORMS]; 00127 ScoreDisplay m_ScoreDisplay; 00128 00129 CString m_sNoteSkin; 00130 00131 void NextAccel(); 00132 void NextEffect(); 00133 void NextAppearance(); 00134 void NextTurn(); 00135 void NextTransform(); 00136 void NextPerspective(); 00137 void NextScroll(); 00138 00139 Accel GetFirstAccel(); 00140 Effect GetFirstEffect(); 00141 Appearance GetFirstAppearance(); 00142 Scroll GetFirstScroll(); 00143 00144 void SetOneAccel( Accel a ); 00145 void SetOneEffect( Effect e ); 00146 void SetOneAppearance( Appearance a ); 00147 void SetOneScroll( Scroll s ); 00148 void ToggleOneTurn( Turn t ); 00149 00150 00151 // return true if any mods being used will make the song(s) easier 00152 bool IsEasierForSongAndSteps( Song* pSong, Steps* pSteps ); 00153 bool IsEasierForCourseAndTrail( Course* pCourse, Trail* pTrail ); 00154 }; 00155 00156 #endif 00157 00158 /* 00159 * (c) 2001-2004 Chris Danford, Glenn Maynard 00160 * All rights reserved. 00161 * 00162 * Permission is hereby granted, free of charge, to any person obtaining a 00163 * copy of this software and associated documentation files (the 00164 * "Software"), to deal in the Software without restriction, including 00165 * without limitation the rights to use, copy, modify, merge, publish, 00166 * distribute, and/or sell copies of the Software, and to permit persons to 00167 * whom the Software is furnished to do so, provided that the above 00168 * copyright notice(s) and this permission notice appear in all copies of 00169 * the Software and that both the above copyright notice(s) and this 00170 * permission notice appear in supporting documentation. 00171 * 00172 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00173 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00174 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00175 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00176 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00177 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00178 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00179 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00180 * PERFORMANCE OF THIS SOFTWARE. 00181 */

Generated on Thu Jan 27 20:57:26 2005 for StepMania by doxygen 1.3.7