pub.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #include <string>
  9. using namespace std;
  10. #define LEFT_FOOT 1
  11. #define RIGHT_FOOT 2
  12. //#define DANCING_THRESH 5
  13. #define DANCING_THRESH 0
  14. #define CIRCLE_CENTER 22
  15. #define ORIGINTRAJ 0
  16. #define RUNGAME 1
  17. #define DANCEGAME 2
  18. #define H5GAME 8
  19. #define MONSTER 4
  20. #define RUINS 5
  21. #define CYCLE 6
  22. #define BIGFOOT 7
  23. #define TESTGAME 100
  24. #define RSSI_LIMIT
  25. #define PI 3.141592653
  26. #define DANCEGAME_MIN_RSSI 26
  27. #define PRESS_MIN 41000
  28. #define GAME_VERSION "0.3.66"
  29. enum CMD_MOTION
  30. {
  31. MOTION_STOP = 0,
  32. MOTION_RUN, // 跑
  33. MOTION_JUMP, // 跳
  34. MOTION_DOWN, // 蹲
  35. MOTION_LEFT, // 滑左
  36. MOTION_RIGHT, // 滑右
  37. MOTION_FRONT, // 滑前
  38. MOTION_BACK, // 滑后
  39. MOTION_LEFT_UP, // 点击-左上
  40. MOTION_LEFT_DOWN, // 点击-左下
  41. MOTION_RIGHT_UP, // 点击-右上
  42. MOTION_RIGHT_DOWN, // 点击-右下
  43. MOTION_STEP, // 点击-原地踩
  44. MOTION_JUMP_OC, // 开合跳
  45. MOTION_JUMP_VERTICAL, // 垂直跳
  46. NUMBERS_OF_MOTION,
  47. MOTION_CANCEL = 0x0100,
  48. };
  49. enum CMD_INTERATION
  50. {
  51. NONE_INTERATION = 0,
  52. FRONT_LEFT,//左上键
  53. FRONT_RIGHT,//右上键
  54. BACK_LEFT,//左下键
  55. BACK_RIGHT,//右下键
  56. ENTER_KEY,//确认键
  57. CANCLE_KEY,//取消键
  58. };
  59. struct posData
  60. {
  61. float pos_x;
  62. float pos_y;
  63. float rssi;
  64. };
  65. struct FootActionState {
  66. int FootState;
  67. int StateCount;
  68. uint32_t Triggering_time;
  69. };
  70. #endif