00001 /* GameManager - Manages Games and Styles. */ 00002 00003 #ifndef GAMEMANAGER_H 00004 #define GAMEMANAGER_H 00005 00006 class Style; 00007 class Game; 00008 00009 #include "GameConstantsAndTypes.h" 00010 #include "GameInput.h" 00011 00012 class GameManager 00013 { 00014 public: 00015 GameManager(); 00016 ~GameManager(); 00017 00018 void GetStylesForGame( const Game* pGame, vector<const Style*>& aStylesAddTo, bool editor=false ) const; 00019 void GetAllStyles( vector<const Style*>& aStylesAddTo, bool editor=false ) const; 00020 void GetStepsTypesForGame( const Game* pGame, vector<StepsType>& aStepsTypeAddTo ) const; 00021 const Style* GetEditorStyleForStepsType( StepsType st ) const; 00022 const Style* GetDemonstrationStyleForGame( const Game* pGame ) const; 00023 const Style* GetHowToPlayStyleForGame( const Game* pGame ) const; 00024 00025 void GetEnabledGames( vector<const Game*>& aGamesOut ) const; 00026 const Game* GetDefaultGame() const; 00027 bool IsGameEnabled( const Game* pGame ) const; 00028 int GetIndexFromGame( const Game* pGame ) const; 00029 const Game* GetGameFromIndex( int index ) const; 00030 00031 static int StepsTypeToNumTracks( StepsType st ); 00032 static StepsType StringToStepsType( CString sStepsType ); 00033 static CString StepsTypeToString( StepsType st ); 00034 static CString StepsTypeToThemedString( StepsType st ); 00035 static const Game* StringToGameType( CString sGameType ); 00036 const Style* GameAndStringToStyle( const Game* pGame, CString sStyle ); 00037 static CString StyleToThemedString( const Style* s ); 00038 CString GetMenuButtonSecondaryFunction( const Game *pGame, GameButton gb ) const; 00039 }; 00040 00041 extern GameManager* GAMEMAN; // global and accessable from anywhere in our program 00042 00043 #endif 00044 00045 /* 00046 * (c) 2001-2004 Chris Danford, Glenn Maynard 00047 * All rights reserved. 00048 * 00049 * Permission is hereby granted, free of charge, to any person obtaining a 00050 * copy of this software and associated documentation files (the 00051 * "Software"), to deal in the Software without restriction, including 00052 * without limitation the rights to use, copy, modify, merge, publish, 00053 * distribute, and/or sell copies of the Software, and to permit persons to 00054 * whom the Software is furnished to do so, provided that the above 00055 * copyright notice(s) and this permission notice appear in all copies of 00056 * the Software and that both the above copyright notice(s) and this 00057 * permission notice appear in supporting documentation. 00058 * 00059 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00060 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00061 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00062 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00063 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00064 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00065 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00066 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00067 * PERFORMANCE OF THIS SOFTWARE. 00068 */