QTfrontend/game.h
changeset 8901 505307b9735d
parent 8472 da6b569ac930
child 9080 9b42757d7e71
equal deleted inserted replaced
8899:7493dde4ef51 8901:505307b9735d
    27 
    27 
    28 class GameUIConfig;
    28 class GameUIConfig;
    29 class GameCFGWidget;
    29 class GameCFGWidget;
    30 class TeamSelWidget;
    30 class TeamSelWidget;
    31 
    31 
       
    32 enum GameType
       
    33 {
       
    34     gtNone     = 0,
       
    35     gtLocal    = 1,
       
    36     gtQLocal   = 2,
       
    37     gtDemo     = 3,
       
    38     gtNet      = 4,
       
    39     gtTraining = 5,
       
    40     gtCampaign = 6,
       
    41     gtSave     = 7,
       
    42 };
       
    43 
    32 enum GameState
    44 enum GameState
    33 {
    45 {
    34     gsNotStarted = 0,
    46     gsNotStarted = 0,
    35     gsStarted  = 1,
    47     gsStarted  = 1,
    36     gsInterrupted = 2,
    48     gsInterrupted = 2,
    46     rtSave,
    58     rtSave,
    47     rtNeither,
    59     rtNeither,
    48 };
    60 };
    49 
    61 
    50 bool checkForDir(const QString & dir);
    62 bool checkForDir(const QString & dir);
       
    63 
       
    64 // last game info
       
    65 extern QList<QVariant> lastGameStartArgs;
       
    66 extern GameType lastGameType;
       
    67 extern GameCFGWidget * lastGameCfg;
       
    68 extern QString lastGameAmmo;
       
    69 extern TeamSelWidget * lastGameTeamSel;
    51 
    70 
    52 class HWGame : public TCPBase
    71 class HWGame : public TCPBase
    53 {
    72 {
    54         Q_OBJECT
    73         Q_OBJECT
    55     public:
    74     public:
    84     public slots:
   103     public slots:
    85         void FromNet(const QByteArray & msg);
   104         void FromNet(const QByteArray & msg);
    86         void FromNetChat(const QString & msg);
   105         void FromNetChat(const QString & msg);
    87 
   106 
    88     private:
   107     private:
    89         enum GameType
       
    90         {
       
    91             gtLocal    = 1,
       
    92             gtQLocal   = 2,
       
    93             gtDemo     = 3,
       
    94             gtNet      = 4,
       
    95             gtTraining = 5,
       
    96             gtCampaign = 6,
       
    97             gtSave     = 7,
       
    98         };
       
    99         char msgbuf[MAXMSGCHARS];
   108         char msgbuf[MAXMSGCHARS];
   100         QString ammostr;
   109         QString ammostr;
   101         GameUIConfig * config;
   110         GameUIConfig * config;
   102         GameCFGWidget * gamecfg;
   111         GameCFGWidget * gamecfg;
   103         TeamSelWidget* m_pTeamSelWidget;
   112         TeamSelWidget* m_pTeamSelWidget;