QTfrontend/game.h
changeset 180 ea83b9e9057f
parent 178 efdc2a63be8e
child 183 57c2ef19f719
equal deleted inserted replaced
179:06e472d3f9f8 180:ea83b9e9057f
    33 
    33 
    34 #ifndef GAME_H
    34 #ifndef GAME_H
    35 #define GAME_H
    35 #define GAME_H
    36 
    36 
    37 #include <QObject>
    37 #include <QObject>
    38 #include <QTcpServer>
       
    39 #include <QTcpSocket>
       
    40 #include <QByteArray>
    38 #include <QByteArray>
    41 #include <QString>
    39 #include <QString>
    42 #include <QDir>
       
    43 #include <QProcess>
       
    44 #include "team.h"
    40 #include "team.h"
    45 
    41 
    46 #include <map>
    42 #include <map>
    47 
    43 
    48 #include "tcpBase.h"
    44 #include "tcpBase.h"
    49 
       
    50 #define MAXMSGCHARS 255
       
    51 #define SENDIPC(a) SendIPC(a, sizeof(a) - 1)
       
    52 
    45 
    53 class GameUIConfig;
    46 class GameUIConfig;
    54 class GameCFGWidget;
    47 class GameCFGWidget;
    55 
    48 
    56 class HWGame : public TCPBase
    49 class HWGame : public TCPBase
    87 	char msgbuf[MAXMSGCHARS];
    80 	char msgbuf[MAXMSGCHARS];
    88 	QString teams[5];
    81 	QString teams[5];
    89 	std::map<QString, unsigned char> hdNum;
    82 	std::map<QString, unsigned char> hdNum;
    90 	QString seed;
    83 	QString seed;
    91 	int TeamCount;
    84 	int TeamCount;
    92 	QByteArray * demo;
       
    93 	QByteArray toSendBuf;
       
    94 	GameUIConfig * config;
    85 	GameUIConfig * config;
    95 	GameCFGWidget * gamecfg;
    86 	GameCFGWidget * gamecfg;
    96 	GameType gameType;
    87 	GameType gameType;
    97 
    88 
    98 	void SendConfig();
    89 	void SendConfig();
    99 	void SendQuickConfig();
    90 	void SendQuickConfig();
   100 	void SendTeamConfig(int index);
    91 	void SendTeamConfig(int index);
   101 	void ParseMessage(const QByteArray & msg);
    92 	void ParseMessage(const QByteArray & msg);
   102 	void SendIPC(const char * msg, quint8 len);
       
   103 	void SendIPC(const QByteArray & buf);
       
   104 	void SendIPC(const QString & buf);
       
   105 	void RawSendIPC(const QByteArray & buf);
       
   106 	void SaveDemo(const QString & filename);
    93 	void SaveDemo(const QString & filename);
   107 };
    94 };
   108 
    95 
   109 #endif
    96 #endif