main.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "asj_pe_standingjump_warpper.h"
  2. int main()
  3. {
  4. StandingJump_ST standingjump_t;
  5. standingjump_t.padLength = 3600 - 420;
  6. standingjump_t.padWidth = 900;
  7. standingjump_t.padPoint[0].x = 194;
  8. standingjump_t.padPoint[0].y = 349;
  9. standingjump_t.padPoint[1].x = 805;
  10. standingjump_t.padPoint[1].y = 344;
  11. standingjump_t.padPoint[2].x = 897;
  12. standingjump_t.padPoint[2].y = 417;
  13. standingjump_t.padPoint[3].x = 132;
  14. standingjump_t.padPoint[3].y = 430;
  15. void* standingjump = standingjump_create();
  16. int init_ret = standingjump_examInit(standingjump, standingjump_t);
  17. printf("[%s Line:%d] ------init_ret:%d\n", __FUNCTION__, __LINE__, init_ret);
  18. {
  19. StandingJumpResult_ST *result;
  20. result = (StandingJumpResult_ST*)malloc(sizeof(StandingJumpResult_ST));
  21. sampleRunJoint_RESULT_S *mResult;
  22. mResult = (sampleRunJoint_RESULT_S*)malloc(sizeof(sampleRunJoint_RESULT_S));
  23. mResult->nObjectSize = 0;
  24. for(int i = 0;i < 10;i++)
  25. {
  26. int processExam_ret = standingjump_processExam(standingjump, mResult, result);
  27. printf("[%s Line:%d] ------processExam_ret:%d\n", __FUNCTION__, __LINE__, processExam_ret);
  28. printf("[%s Line:%d] ------score:%d illegal_flag:%d\n", __FUNCTION__, __LINE__, result->score, result->standingjump_illegal_flag);
  29. }
  30. }
  31. printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, StandingJumpExamCode2String(STANDINGJUMP_EXAM_OUTLINE));
  32. printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, StandingJumpExamCode2String(STANDINGJUMP_EXAM_OUTSIDE));
  33. return 0;
  34. }