#ifndef DEFINES_H
#define DEFINES_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"

#define ERROR_BOX(msg1, msg2) { \
    QString str; \
    if ( msg2.isNull() ) str = msg1; \
    else str = i18n("%1 : %2").arg(msg1).arg(msg2); \
   KMessageBox::error(this, str); \
}
#define R_ERROR_BOX(msg1, msg2) { ERROR_BOX(msg1, msg2); return; }

#define XOR(a, b) ( !((a) && (b)) && ((a) || (b)) )

#endif // DEFINES_H
