OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

PlayerSelectController.h

Go to the documentation of this file.
00001 #ifndef PLAYERSELECTCONTROLLER_H
00002 #define PLAYERSELECTCONTROLLER_H
00003 
00004 #include "SDL.h"
00005 #include "FighterEnum.h"
00006 #include "common.h"
00007 
00008 class CPlayerSelectView;
00009 
00015 class CPlayerSelectController
00016 {
00017 public:
00018     CPlayerSelectController( bool a_bNetworkGame );
00019     ~CPlayerSelectController();
00020 
00021     void                DoPlayerSelect();
00022 
00023 protected:
00024     void                HandleEvents();
00025     void                HandleKey( int a_iPlayer, int a_iKey );
00026     bool                HandleChatKey( SDL_Event& a_roEvent );
00027     void                HandleNetwork();
00028     void                GetThisTick();
00029     void                MarkFighters();
00030 
00031     void                SetPlayerActive( int a_iPlayer, bool a_bActive );
00032     void                ActivateNextPlayer( int a_iCurrentPlayer );
00033     int                 GetTeamSize( int a_iPlayer );
00034 
00035     bool                IsFighterSelectable( FighterEnum a_enFighter );
00036 
00037 
00038 protected:
00039     CPlayerSelectView*  m_poView;
00040     bool                m_bNetworkGame;
00041     bool                m_bTeamMode;
00042     bool                m_bChatActive;
00043     char                m_acChatMsg[256];
00044     int                 m_iNumberOfSelectableFighters;
00045 
00046     bool                m_abPlayerActive[MAXPLAYERS];
00047 
00048     int                 m_iGameSpeed;
00049     int                 m_iThisTick;
00050     int                 m_iLastTick;
00051 };
00052 
00053 
00054 #endif // PLAYERSELECTCONTROLLER_H