pub.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #pragma once
  2. #ifndef _pub_h__
  3. #define _pub_h__
  4. #include <iostream>
  5. #include <math.h>
  6. #include <stdlib.h>
  7. #include <vector>
  8. using namespace std;
  9. #define LEFT_FOOT 1
  10. #define RIGHT_FOOT 2
  11. //#define DANCING_THRESH 5
  12. #define DANCING_THRESH 0
  13. #define CIRCLE_CENTER 22
  14. #define ORIGINTRAJ 0
  15. #define RUNGAME 1
  16. #define DANCEGAME 2
  17. #define H5GAME 3
  18. #define MONSTER 4
  19. #define RSSI_LIMIT
  20. #define PI 3.141592653
  21. #define DANCEGAME_MIN_RSSI 26
  22. #define PRESS_MIN 41000
  23. #define GAME_VERSION "0.3.10"
  24. enum CMD_MOTION
  25. {
  26. MOTION_STOP = 0,
  27. MOTION_RUN, // ��
  28. MOTION_JUMP, // ��
  29. MOTION_DOWN, // ��
  30. MOTION_LEFT, // ����
  31. MOTION_RIGHT, // ����
  32. MOTION_FRONT, // ��ǰ
  33. MOTION_BACK, // ����
  34. MOTION_LEFT_UP, // ���-����
  35. MOTION_LEFT_DOWN, // ���-����
  36. MOTION_RIGHT_UP, // ���-����
  37. MOTION_RIGHT_DOWN, // ���-����
  38. MOTION_STEP, // ���-ԭ�ز�
  39. NUMBERS_OF_MOTION,
  40. MOTION_CANCEL = 0x0100,
  41. };
  42. enum CMD_INTERATION
  43. {
  44. NONE_INTERATION = 0,
  45. FRONT_LEFT,
  46. FRONT_RIGHT,
  47. BACK_LEFT,
  48. BACK_RIGHT,
  49. ENTER_KEY,
  50. CANCLE_KEY,
  51. };
  52. struct posData
  53. {
  54. float pos_x;
  55. float pos_y;
  56. float rssi;
  57. };
  58. #endif