diff options
| author | totycro <totycro@unknown-horizons.org> | 2011-04-10 00:55:13 +0200 |
|---|---|---|
| committer | totycro <totycro@unknown-horizons.org> | 2011-04-10 00:55:13 +0200 |
| commit | da481762bded855ffd709114ee3a16ec4dbaaeb6 (patch) | |
| tree | 10f323140f11280f5185c19666a8412199613e0e /pacman-c++/util.h | |
| parent | 5b4ddc78484448886135e031bee3d423e2fd3b83 (diff) | |
| download | foop-da481762bded855ffd709114ee3a16ec4dbaaeb6.tar.gz foop-da481762bded855ffd709114ee3a16ec4dbaaeb6.tar.bz2 foop-da481762bded855ffd709114ee3a16ec4dbaaeb6.zip | |
Tell player about their color
minor cleanup
Diffstat (limited to 'pacman-c++/util.h')
| -rw-r--r-- | pacman-c++/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pacman-c++/util.h b/pacman-c++/util.h index 8bd03bc..4c0ccb0 100644 --- a/pacman-c++/util.h +++ b/pacman-c++/util.h | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | #include "constants.h" | 4 | #include "constants.h" |
| 5 | #include "actor.h" | 5 | #include "actor.h" |
| 6 | #include "pacman.pb.h" | ||
| 7 | |||
| 8 | class QTcpSocket; | ||
| 6 | 9 | ||
| 7 | namespace Util { | 10 | namespace Util { |
| 8 | Transmission::map_t createUninitialisedMap(); | 11 | Transmission::map_t createUninitialisedMap(); |
| @@ -16,5 +19,11 @@ namespace Util { | |||
| 16 | Transmission::field_t def = -1); | 19 | Transmission::field_t def = -1); |
| 17 | Actor::Movement transmissionMovementToActor(Transmission::field_t field, | 20 | Actor::Movement transmissionMovementToActor(Transmission::field_t field, |
| 18 | Actor::Movement def = Actor::Movement(-1)); | 21 | Actor::Movement def = Actor::Movement(-1)); |
| 22 | |||
| 23 | void QByteArrayToStdString(const QByteArray& arr, std::string& str); | ||
| 24 | |||
| 25 | // send packet with error check and flush | ||
| 26 | void sendPacket(const ::google::protobuf::Message& packet, QTcpSocket *socket); | ||
| 27 | void sendPacket(const char *data, unsigned int length, QTcpSocket *socket); | ||
| 19 | } | 28 | } |
| 20 | #endif // UTIL_H | 29 | #endif // UTIL_H |
