QTfrontend/netclient.h
changeset 84 0f6669da2fcb
parent 36 a803a00a3272
child 85 44d9045b26ff
equal deleted inserted replaced
83:207c85fbef51 84:0f6669da2fcb
    48 {
    48 {
    49 	QString nick;
    49 	QString nick;
    50 	QStringList hhs;
    50 	QStringList hhs;
    51 };
    51 };
    52 
    52 
       
    53 class GameConfig;
       
    54 
    53 class HWNet : public QObject
    55 class HWNet : public QObject
    54 {
    56 {
    55 	Q_OBJECT
    57 	Q_OBJECT
    56 
    58 
    57 public:
    59 public:
    58     HWNet(int Resolution, bool Fullscreen);
    60     HWNet(GameConfig * config);
    59 	void Connect(const QString & hostName, quint16 port, const QString & nick);
    61 	void Connect(const QString & hostName, quint16 port, const QString & nick);
    60 	void Disconnect();
    62 	void Disconnect();
    61 	void JoinGame(const QString & game);
    63 	void JoinGame(const QString & game);
    62 	void AddTeam(const HWTeam & team);
    64 	void AddTeam(const HWTeam & team);
    63 	void StartGame();
    65 	void StartGame();
    97 	QString channel;
    99 	QString channel;
    98 	bool isOp;
   100 	bool isOp;
    99 	quint32 opCount;
   101 	quint32 opCount;
   100 	netTeam teams[5];
   102 	netTeam teams[5];
   101 	quint8 teamsCount;
   103 	quint8 teamsCount;
   102 	int gameResolution;
       
   103 	bool gameFullscreen;
       
   104 	RNDStr seedgen;
   104 	RNDStr seedgen;
   105 	int playerscnt;
   105 	int playerscnt;
   106 	int configasks;
   106 	int configasks;
   107 	QByteArray NetBuffer;
   107 	QByteArray NetBuffer;
   108 	QTimer * TimerFlusher;
   108 	QTimer * TimerFlusher;
       
   109 	GameConfig * config;
   109 
   110 
   110 	void RawSendNet(const QString & buf);
   111 	void RawSendNet(const QString & buf);
   111 	void RawSendNet(const QByteArray & buf);
   112 	void RawSendNet(const QByteArray & buf);
   112 
   113 
   113 	void ParseLine(const QString & msg);
   114 	void ParseLine(const QString & msg);