ControllerPacket.h 500 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef CONTROLLER_PACKET_H
  2. #define CONTROLLER_PACKET_H
  3. #include "network/Packet.h"
  4. class ControllerPacket {
  5. uint32 flags;
  6. public:
  7. enum Type {
  8. LEFT,
  9. RIGHT,
  10. UP,
  11. DOWN,
  12. JUMP,
  13. SNEAK,
  14. CAM_LEFT,
  15. CAM_RIGHT,
  16. CAM_UP,
  17. CAM_DOWN
  18. };
  19. ControllerPacket();
  20. void set(Type type);
  21. bool has(Type type) const;
  22. void write(OutPacket& out) const;
  23. bool read(InPacket& in);
  24. static int getSize();
  25. };
  26. #endif