123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- #pragma once
- #ifndef _Game_H_
- #define _Game_H_
- #include "pub.h"
- #include "RunGame.h"
- #include "InertialTrajProcess.h"
- #include "DanceGame.h"
- #include "FootStep.h"
- #include "Interaction.h"
- #include "MonsterH5.h"
- #include "OriginTraj.h"
- #include "RuinsExplore.h"
- #include "Tricycle.h"
- #include "BigFoot.h"
- #include "publicMotion.h"
- #include "testGame.h"
- #include "H5.h"
- #include <fstream>
- #include <time.h>
- #include <sstream>
- class Game
- {
- public:
- Game(int gametype);
- void GameProcess(int timeStamp, int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
- int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
- int jump, int down, int rssi, int girl_shoes);
- void GameProcessBuf(uint8_t* buf, int len);
- void RunGameProcess(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
- int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
- int jump, int down, int girl_shoes);
- void getGameResult(int* matrix);
- void getFootAtt(int* left_att, int* right_att);
- string getGameDataStr();
- int getStepStatus(int left_or_right);
- int getStepFreq(int left_or_right);
- int getStepCount(int left_or_right);
- float getGamePos(int left_or_right, int index);
- string getVersion();
- void start(string path_root);
- void end();
- void isBingo();
- int getInteractionCMD();
- void processCalorieData(int down, int jump);
- int getGameDownCount();
- int getGameJumpCount();
- int onlineDownEstimate();
- void setGameDataStr();
- private:
- int GameType;
- RunGame rungame;
- DanceGame dancegame;
- InertialTrajProcess rotateTrajLeft;
- InertialTrajProcess rotateTrajRight;
- MonsterH5 monsterH5;
- Interaction interaction;
- FootStep leftFootStep;
- FootStep rightFootStep;
- OriginTraj originTraj;
- RuinsExplore ruinsExplore;
- Tricycle tricycle;
- BigFoot bigfoot;
- publicMotion publicmotion;
- testGame testgame;
- H5 h5;
- int leftStepRate;
- int rightStepRate;
-
- int leftRate;
- int rightRate;
- int resultMatrix[4];
- float rotateMatrix[4];
- float leftRotate[4];
-
- float rightRotate[4];
- fstream foot_data_file;
- int bingo = 0;
- int InteractionCMD;
- int right_pos_data[3];
- int right_att_data[3];
- int left_pos_data[3];
- int left_att_data[3];
- int left_acc_data[3];
- int right_acc_data[3];
- int girl_shoes;
- int s_zupt;
- int h_zupt;
- int down;
- int jump;
- int rssi;
- int posTimeStamp;
- int attTimeStamp;
- uint32_t gameTime = 0;
- int lastTimeStamp = -1;
- uint16_t right_front_mag;
- uint16_t right_back_mag;
- uint16_t left_front_mag;
- uint16_t left_back_mag;
- uint32_t right_step;
- uint32_t left_step;
- int down_count;
- int jump_count;
-
- int last_down;
- int last_jump;
- int down_wait;
- int avoid_down_between_jump;
- uint32_t last_left_step;
- uint32_t last_right_step;
- string data_str;
- int shoes_down;
- };
- #endif
|