00001 #ifndef CONDITIONALBGA_H 00002 #define CONDITIONALBGA_H 00003 00004 #include "PlayerOptions.h" 00005 #include "GameConstantsAndTypes.h" 00006 #include "BGAnimation.h" 00007 #include "Difficulty.h" 00008 00009 class Style; 00010 00011 enum CBGACLEAREDSTATES 00012 { 00013 CBGA_CSUNUSED = 0, // unused is if the condition doesnt matter 00014 CBGA_CSCLEARED, // if the player must have cleared the stage 00015 CBGA_CSFAILED, // if the player must have failed the stage 00016 CBGA_CSMAXCOMBO, // if the player cleared the song with full combo 00017 CBGA_CSBROKECOMBO // if the player cleared the song with a broken combo 00018 }; 00019 00020 struct BgaCondInfo 00021 { 00022 // char bganame[512]; 00023 CString bganame; 00024 // char songtitle[512]; 00025 CString songtitle; 00026 // char songartist[512]; 00027 CString songartist; 00028 int cleared; 00029 vector<Difficulty> difficulties; // heavy, light e.t.c. 00030 vector<int> songmeters; // footmeter 00031 vector<int> songdays; 00032 vector<int> songdows; 00033 vector<int> songmonths; 00034 vector<int> grades; 00035 vector<const Style*> styles; 00036 PlayerOptions disallowedpo; 00037 bool dpoused; // indicate if disallowed po has been set 00038 }; 00039 00040 00041 class ConditionalBGA 00042 { 00043 public: 00044 ConditionalBGA(); 00045 ~ConditionalBGA(); 00046 void Load(CString szScreenName); 00047 void Update( float fDeltaTime ); 00048 void DrawPrimitives(); 00049 private: 00050 void ClearINFO(int iEntry); 00051 void CheckBgaRequirements(BgaCondInfo info); 00052 vector<BgaCondInfo> m_bgainfo; 00053 // BgaCondInfo bestmatch; 00054 BGAnimation bganim; 00055 CString bganimtouse; 00056 }; 00057 00058 00059 #endif 00060 00061 /* 00062 * (c) 2004 Andrew Livy 00063 * All rights reserved. 00064 * 00065 * Permission is hereby granted, free of charge, to any person obtaining a 00066 * copy of this software and associated documentation files (the 00067 * "Software"), to deal in the Software without restriction, including 00068 * without limitation the rights to use, copy, modify, merge, publish, 00069 * distribute, and/or sell copies of the Software, and to permit persons to 00070 * whom the Software is furnished to do so, provided that the above 00071 * copyright notice(s) and this permission notice appear in all copies of 00072 * the Software and that both the above copyright notice(s) and this 00073 * permission notice appear in supporting documentation. 00074 * 00075 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00076 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00077 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00078 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00079 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00080 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00081 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00082 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00083 * PERFORMANCE OF THIS SOFTWARE. 00084 */