QTfrontend/game.h
changeset 140 50ccde437ea1
parent 128 223522298250
child 141 ac3680be1f4b
equal deleted inserted replaced
139:340ded7cc336 140:50ccde437ea1
    41 #include <QString>
    41 #include <QString>
    42 #include <QDir>
    42 #include <QDir>
    43 #include <QProcess>
    43 #include <QProcess>
    44 #include "team.h"
    44 #include "team.h"
    45 
    45 
       
    46 #include <map>
       
    47 
    46 #define IPC_PORT 46631
    48 #define IPC_PORT 46631
    47 #define MAXMSGCHARS 255
    49 #define MAXMSGCHARS 255
    48 #define SENDIPC(a) SendIPC(a, sizeof(a) - 1)
    50 #define SENDIPC(a) SendIPC(a, sizeof(a) - 1)
    49 
    51 
    50 class GameUIConfig;
    52 class GameUIConfig;
    53 class HWGame : public QObject
    55 class HWGame : public QObject
    54 {
    56 {
    55 	Q_OBJECT
    57 	Q_OBJECT
    56 public:
    58 public:
    57 	HWGame(GameUIConfig * config, GameCFGWidget * gamecfg);
    59 	HWGame(GameUIConfig * config, GameCFGWidget * gamecfg);
    58 	void AddTeam(const QString & team);
    60 	void AddTeam(const QString & team, unsigned char numHedgedogs);
    59 	void PlayDemo(const QString & demofilename);
    61 	void PlayDemo(const QString & demofilename);
    60 	void StartLocal();
    62 	void StartLocal();
    61 	void StartQuick();
    63 	void StartQuick();
    62 	void StartNet();
    64 	void StartNet();
    63 
    65 
    78     QTcpServer * IPCServer;
    80     QTcpServer * IPCServer;
    79 	QTcpSocket * IPCSocket;
    81 	QTcpSocket * IPCSocket;
    80 	char msgbuf[MAXMSGCHARS];
    82 	char msgbuf[MAXMSGCHARS];
    81 	QByteArray readbuffer;
    83 	QByteArray readbuffer;
    82 	QString teams[5];
    84 	QString teams[5];
       
    85 	std::map<QString, unsigned char> hdNum;
    83 	QString seed;
    86 	QString seed;
    84 	int TeamCount;
    87 	int TeamCount;
    85 	QByteArray * demo;
    88 	QByteArray * demo;
    86 	QByteArray toSendBuf;
    89 	QByteArray toSendBuf;
    87 	GameUIConfig * config;
    90 	GameUIConfig * config;