1234567891011121314151617181920212223242526272829303132333435 |
- #include <stdint.h>
- #include "Game.h"
- extern "C" {
- Game game[] = {Game(0), Game(0)};
- void gameInit(int gameType, int count) {
- for (int i = 0; i < count; i++) {
- game[i] = Game(gameType);
- }
- }
- void gameProcessBuf(
- int id,
- uint8_t *buf,
- int len,
- int *result) {
- game[id].GameProcess(buf, len);
- game[id].getGameResult(result);
- }
- void getGameResult(
- int id,
- int *result) {
- game[id].getGameResult(result);
- }
- int getInteractionCMD() {
- return game[0].getInteractionCMD();
- }
- void getGameVersion(char* version) {
- std::string v = GAME_VERSION;
- strcpy(version,v.c_str());
- }
- }
|