00001 #ifndef SCREEN_SELECT_CHARACTER_H 00002 #define SCREEN_SELECT_CHARACTER_H 00003 00004 #include "ScreenWithMenuElements.h" 00005 #include "Sprite.h" 00006 #include "RandomSample.h" 00007 #include "GameConstantsAndTypes.h" 00008 #include "OptionIcon.h" 00009 #include "Banner.h" 00010 00011 00012 #define MAX_CHAR_ICONS_TO_SHOW 11 00013 00014 class ScreenSelectCharacter : public ScreenWithMenuElements 00015 { 00016 public: 00017 ScreenSelectCharacter( CString sName ); 00018 virtual ~ScreenSelectCharacter(); 00019 00020 virtual void DrawPrimitives(); 00021 virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); 00022 virtual void HandleScreenMessage( const ScreenMessage SM ); 00023 00024 void MenuLeft( PlayerNumber pn ); 00025 void MenuRight( PlayerNumber pn ); 00026 void MenuUp( PlayerNumber pn ); 00027 void MenuDown( PlayerNumber pn ); 00028 void MenuStart( PlayerNumber pn ); 00029 void MenuBack( PlayerNumber pn ); 00030 00031 void TweenOffScreen(); 00032 void TweenOnScreen(); 00033 00034 private: 00035 // These functions take the PlayerNumber of the player making the selections, 00036 // which is not necessarily the same as the PlayerNumber that the options are being 00037 // chosen for. If only one player is joined, they will pick their choices, then 00038 // the CPU's choices. 00039 void BeforeRowChange( PlayerNumber pn ); 00040 void AfterRowChange( PlayerNumber pn ); 00041 void AfterValueChange( PlayerNumber pn ); 00042 void Move( PlayerNumber pn, int deltaValue ); 00043 bool AllAreFinishedChoosing() const; 00044 00045 int m_iSelectedCharacter[NUM_PLAYERS]; 00046 enum { 00047 CHOOSING_HUMAN_CHARACTER, 00048 CHOOSING_CPU_CHARACTER, 00049 FINISHED_CHOOSING 00050 } m_SelectionRow[NUM_PLAYERS]; 00051 PlayerNumber GetAffectedPlayerNumber( PlayerNumber pn ); // returns the number of the player that pn is selecting for 00052 00053 Sprite m_sprTitle[NUM_PLAYERS]; 00054 00055 Banner m_sprIcons[NUM_PLAYERS][MAX_CHAR_ICONS_TO_SHOW]; 00056 00057 Sprite m_sprCard[NUM_PLAYERS]; 00058 Sprite m_sprCardArrows[NUM_PLAYERS]; 00059 00060 Sprite m_sprAttackFrame[NUM_PLAYERS]; 00061 OptionIcon m_AttackIcons[NUM_PLAYERS][NUM_ATTACK_LEVELS][NUM_ATTACKS_PER_LEVEL]; 00062 00063 Sprite m_sprExplanation; 00064 00065 RandomSample m_soundChange; 00066 }; 00067 00068 #endif 00069 00070 /* 00071 * (c) 2003-2004 Chris Danford 00072 * All rights reserved. 00073 * 00074 * Permission is hereby granted, free of charge, to any person obtaining a 00075 * copy of this software and associated documentation files (the 00076 * "Software"), to deal in the Software without restriction, including 00077 * without limitation the rights to use, copy, modify, merge, publish, 00078 * distribute, and/or sell copies of the Software, and to permit persons to 00079 * whom the Software is furnished to do so, provided that the above 00080 * copyright notice(s) and this permission notice appear in all copies of 00081 * the Software and that both the above copyright notice(s) and this 00082 * permission notice appear in supporting documentation. 00083 * 00084 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00085 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00086 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00087 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00088 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00089 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00090 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00091 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00092 * PERFORMANCE OF THIS SOFTWARE. 00093 */