blob: a6728a38b3efc1aaf1fbd25078108b84819968fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef DEFINES_H
#define DEFINES_H
#include <kmessagebox.h>
#include <kextsock.h>
// constants
#define TALKER_MAX_LENGTH 35
#define NAME_MAX_LENGTH 15
// config keys
#define MP_GROUP "Multi-Players"
#define MP_GAMETYPE "Game type"
#define MP_PLAYER_NAME "Player name #%1"
#define MP_PLAYER_TYPE "Player type #%1"
#define MP_SERVER_ADDRESS "Server address"
#define MP_PORT "Port"
void errorBox(const TQString &msg1, const TQString &msg2, TQWidget *parent);
TQString socketError(const KExtendedSocket *socket);
bool checkSocket(int res, const KExtendedSocket *,
const TQString &msg, TQWidget *parent);
#define R_ERROR_BOX(msg1, msg2) { \
errorBox(msg1, msg2, this); \
return; \
}
template <class Type>
bool XOR(Type a, Type b)
{
return ( (!a && b) || (a && !b) );
}
#endif // DEFINES_H
|