You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.0 KiB
50 lines
1.0 KiB
#ifndef MP_SIMPLE_INTERFACE_H
|
|
#define MP_SIMPLE_INTERFACE_H
|
|
|
|
#include "mp_interface.h"
|
|
#include "mp_simple_types.h"
|
|
|
|
class MPSimpleInterface : public MPInterface
|
|
{
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
MPSimpleInterface(const MPGameInfo &gi,
|
|
uint nbActions, const ActionData *data,
|
|
TQWidget *parent = 0, const char *name = 0);
|
|
|
|
bool isPaused() const { return state==SS_Pause; }
|
|
|
|
public slots:
|
|
void start();
|
|
void pause();
|
|
void addKeys(KKeyDialog &);
|
|
|
|
protected:
|
|
virtual void _init() = 0;
|
|
virtual void _readGameOverData(TQDataStream &s) = 0;
|
|
virtual void _sendGameOverData(TQDataStream &s) = 0;
|
|
virtual void _showGameOverData() = 0;
|
|
virtual void _firstInit() = 0;
|
|
virtual void _treatInit() = 0;
|
|
virtual bool _readPlayData() = 0;
|
|
virtual void _sendPlayData() = 0;
|
|
|
|
private:
|
|
ServerState state;
|
|
bool first_init;
|
|
|
|
void treatData();
|
|
void treatInit();
|
|
void treatPlay();
|
|
void treatPause(bool pause);
|
|
void treatStop();
|
|
|
|
void init();
|
|
void stop();
|
|
void dataFromServer(TQDataStream &);
|
|
};
|
|
|
|
#endif // MP_SIMPLE_INTERFACE_H
|