diff options
Diffstat (limited to 'pacman-c++/util.h')
| -rw-r--r-- | pacman-c++/util.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/pacman-c++/util.h b/pacman-c++/util.h deleted file mode 100644 index d20eaa5..0000000 --- a/pacman-c++/util.h +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | #ifndef UTIL_H | ||
| 2 | #define UTIL_H | ||
| 3 | |||
| 4 | #include "constants.h" | ||
| 5 | #include "actor.h" | ||
| 6 | #include "pacman.pb.h" | ||
| 7 | |||
| 8 | class QTcpSocket; | ||
| 9 | |||
| 10 | namespace Util | ||
| 11 | { | ||
| 12 | Transmission::map_t createUninitialisedMap(); | ||
| 13 | Transmission::map_t createDemoMap(); | ||
| 14 | void placeActors(Transmission::map_t map, unsigned int players, const Color::Color *colors); | ||
| 15 | void fillPoints(Transmission::map_t map, Transmission::field_t type = Transmission::point); | ||
| 16 | Transmission::map_t createEmptyMap(); | ||
| 17 | void deleteMap(Transmission::map_t map); | ||
| 18 | |||
| 19 | Transmission::field_t actorMovementToTransmission(Actor::Movement mov, | ||
| 20 | Transmission::field_t def = Transmission::none); | ||
| 21 | Actor::Movement transmissionMovementToActor(Transmission::field_t field, | ||
| 22 | Actor::Movement def = Actor::None); | ||
| 23 | const QString colorToString(Color::Color color); | ||
| 24 | |||
| 25 | /* send packet with error check and flush */ | ||
| 26 | QSharedPointer<QByteArray> createPacket(const ::google::protobuf::MessageLite& packet); | ||
| 27 | bool sendPacket(QByteArray *data, QTcpSocket *socket); | ||
| 28 | bool sendPacket(const ::google::protobuf::MessageLite& packet, QTcpSocket *socket); | ||
| 29 | QSharedPointer<QByteArray> receivePacket(QTcpSocket *socket); | ||
| 30 | |||
| 31 | int floorLog2(unsigned int n); | ||
| 32 | |||
| 33 | #if 0 | ||
| 34 | void hexdump(void *pAddressIn, long lSize); | ||
| 35 | #endif | ||
| 36 | } | ||
| 37 | #endif // UTIL_H | ||
