diff options
Diffstat (limited to 'libkdegames/kgame/kgamemessage.cpp')
-rw-r--r-- | libkdegames/kgame/kgamemessage.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libkdegames/kgame/kgamemessage.cpp b/libkdegames/kgame/kgamemessage.cpp index 228708e9..9f5e4694 100644 --- a/libkdegames/kgame/kgamemessage.cpp +++ b/libkdegames/kgame/kgamemessage.cpp @@ -27,7 +27,7 @@ #define MESSAGE_VERSION 2 -Q_UINT32 KGameMessage::createPlayerId(int oldplayerid,Q_UINT32 gameid) +TQ_UINT32 KGameMessage::createPlayerId(int oldplayerid,TQ_UINT32 gameid) { int p; p = oldplayerid & 0x3ff; // remove game id @@ -35,17 +35,17 @@ Q_UINT32 KGameMessage::createPlayerId(int oldplayerid,Q_UINT32 gameid) return p; } -int KGameMessage::rawPlayerId(Q_UINT32 playerid) +int KGameMessage::rawPlayerId(TQ_UINT32 playerid) { return playerid & 0x03ff; } -Q_UINT32 KGameMessage::rawGameId(Q_UINT32 playerid) +TQ_UINT32 KGameMessage::rawGameId(TQ_UINT32 playerid) { return (playerid & 0xfc00) >> 10; } -bool KGameMessage::isPlayer(Q_UINT32 msgid) +bool KGameMessage::isPlayer(TQ_UINT32 msgid) { if (msgid & 0xfc00) { return true; @@ -54,32 +54,32 @@ bool KGameMessage::isPlayer(Q_UINT32 msgid) } } -bool KGameMessage::isGame(Q_UINT32 msgid) +bool KGameMessage::isGame(TQ_UINT32 msgid) { return !isPlayer(msgid); } -void KGameMessage::createHeader(TQDataStream &msg,Q_UINT32 sender,Q_UINT32 receiver,int msgid) +void KGameMessage::createHeader(TQDataStream &msg,TQ_UINT32 sender,TQ_UINT32 receiver,int msgid) { - msg << (Q_INT16)sender << (Q_INT16)receiver << (Q_INT16)msgid; + msg << (TQ_INT16)sender << (TQ_INT16)receiver << (TQ_INT16)msgid; } -void KGameMessage::extractHeader(TQDataStream &msg,Q_UINT32 &sender,Q_UINT32 &receiver,int &msgid) +void KGameMessage::extractHeader(TQDataStream &msg,TQ_UINT32 &sender,TQ_UINT32 &receiver,int &msgid) { - Q_INT16 d3,d4,d5; + TQ_INT16 d3,d4,d5; msg >> d3 >> d4 >> d5; sender=d3;receiver=d4;msgid=d5; } void KGameMessage::createPropertyHeader(TQDataStream &msg,int id) { - msg << (Q_INT16)id; + msg << (TQ_INT16)id; } void KGameMessage::extractPropertyHeader(TQDataStream &msg,int &id) { - Q_INT16 d1; + TQ_INT16 d1; msg >> d1; id=d1; } @@ -87,14 +87,14 @@ void KGameMessage::extractPropertyHeader(TQDataStream &msg,int &id) void KGameMessage::createPropertyCommand(TQDataStream &msg,int cmdid,int pid,int cmd) { createPropertyHeader(msg,cmdid); - msg << (Q_INT16)pid ; - msg << (Q_INT8)cmd ; + msg << (TQ_INT16)pid ; + msg << (TQ_INT8)cmd ; } void KGameMessage::extractPropertyCommand(TQDataStream &msg,int &pid,int &cmd) { - Q_INT16 d1; - Q_INT8 d2; + TQ_INT16 d1; + TQ_INT8 d2; msg >> d1 >> d2; pid=d1; cmd=d2; @@ -151,6 +151,6 @@ TQString KGameMessage::messageId2Text(int msgid) return i18n("Player ID"); case KGameMessage::IdUser: // IdUser must be unknown for use, too! default: - return TQString::null; + return TQString(); } } |