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

Attack.h

Go to the documentation of this file.
00001 #ifndef ATTACK_H 00002 #define ATTACK_H 00003 00004 #include "GameConstantsAndTypes.h" 00005 #include "PlayerNumber.h" 00006 class Song; 00007 struct PlayerState; 00008 00009 struct Attack 00010 { 00011 AttackLevel level; 00012 float fStartSecond; // -1 = now 00013 float fSecsRemaining; 00014 CString sModifier; 00015 bool bOn; // for GAMESTATE 00016 bool bGlobal; // true for song-wide course mods 00017 00018 void MakeBlank() { sModifier=""; fStartSecond = -1; bOn = false; bGlobal = false; } 00019 Attack() { MakeBlank(); } 00020 Attack( 00021 AttackLevel level_, 00022 float fStartSecond_, 00023 float fSecsRemaining_, 00024 CString sModifier_, 00025 bool bOn_, 00026 bool bGlobal_ ) 00027 { 00028 level = level_; 00029 fStartSecond = fStartSecond_; 00030 fSecsRemaining = fSecsRemaining_; 00031 sModifier = sModifier_; 00032 bOn = bOn_; 00033 bGlobal = bGlobal_; 00034 } 00035 00036 void GetAttackBeats( const Song *song, const PlayerState* pPlayerState, float &fStartBeat, float &fEndBeat ) const; 00037 bool IsBlank() const { return sModifier.empty(); } 00038 bool operator== ( const Attack &rhs ) const; 00039 bool ContainsTransformOrTurn() const; 00040 static Attack FromGlobalCourseModifier( const CString &sModifiers ); 00041 }; 00042 00043 struct AttackArray : public vector<Attack> 00044 { 00045 bool ContainsTransformOrTurn() const; 00046 }; 00047 00048 #endif 00049 00050 /* 00051 * (c) 2003-2004 Chris Danford 00052 * All rights reserved. 00053 * 00054 * Permission is hereby granted, free of charge, to any person obtaining a 00055 * copy of this software and associated documentation files (the 00056 * "Software"), to deal in the Software without restriction, including 00057 * without limitation the rights to use, copy, modify, merge, publish, 00058 * distribute, and/or sell copies of the Software, and to permit persons to 00059 * whom the Software is furnished to do so, provided that the above 00060 * copyright notice(s) and this permission notice appear in all copies of 00061 * the Software and that both the above copyright notice(s) and this 00062 * permission notice appear in supporting documentation. 00063 * 00064 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00065 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00066 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00067 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00068 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00069 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00070 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00071 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00072 * PERFORMANCE OF THIS SOFTWARE. 00073 */

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