diff --git a/cocos2dx/platform/android/jni/TouchesJni.cpp b/cocos2dx/platform/android/jni/TouchesJni.cpp index ecbce4c7fc..7242532874 100644 --- a/cocos2dx/platform/android/jni/TouchesJni.cpp +++ b/cocos2dx/platform/android/jni/TouchesJni.cpp @@ -59,7 +59,7 @@ static CCTouch *s_pTouches[MAX_TOUCHES] = { NULL }; LOGD("Beginning touches with id: %d, x=%f, y=%f", id, x, y); pTouch = new CCTouch(); - pTouch->SetTouchInfo((x - rcRect.origin.x) / fScreenScaleFactor, (y - rcRect.origin.y) / fScreenScaleFactor, id); + pTouch->SetTouchInfo((x - rcRect.origin.x) / fScreenScaleFactor, (y - rcRect.origin.y) / fScreenScaleFactor); s_pTouches[id] = pTouch; set.addObject(pTouch); @@ -83,7 +83,7 @@ static CCTouch *s_pTouches[MAX_TOUCHES] = { NULL }; { LOGD("Ending touches with id: %d, x=%f, y=%f", id, x, y); - pTouch->SetTouchInfo((x - rcRect.origin.x) / fScreenScaleFactor , (y - rcRect.origin.y) / fScreenScaleFactor, id); + pTouch->SetTouchInfo((x - rcRect.origin.x) / fScreenScaleFactor , (y - rcRect.origin.y) / fScreenScaleFactor); set.addObject(pTouch); // release the object @@ -116,7 +116,7 @@ static CCTouch *s_pTouches[MAX_TOUCHES] = { NULL }; if (pTouch) { pTouch->SetTouchInfo((x[i] - rcRect.origin.x) / fScreenScaleFactor , - (y[i] - rcRect.origin.y) / fScreenScaleFactor, id[i]); + (y[i] - rcRect.origin.y) / fScreenScaleFactor); set.addObject(pTouch); } else @@ -149,7 +149,7 @@ static CCTouch *s_pTouches[MAX_TOUCHES] = { NULL }; if (pTouch) { pTouch->SetTouchInfo((x[i] - rcRect.origin.x) / fScreenScaleFactor , - (y[i] - rcRect.origin.y) / fScreenScaleFactor, id[i]); + (y[i] - rcRect.origin.y) / fScreenScaleFactor); set.addObject(pTouch); s_pTouches[id[i]] = NULL; pTouch->release(); diff --git a/cocos2dx/platform/bada/CCEGLView_bada.cpp b/cocos2dx/platform/bada/CCEGLView_bada.cpp index af7c257ebb..052eb58133 100644 --- a/cocos2dx/platform/bada/CCEGLView_bada.cpp +++ b/cocos2dx/platform/bada/CCEGLView_bada.cpp @@ -421,7 +421,7 @@ void CCEGLView::onTouchesBegin(int id[], float x[], float y[], int pointerNumber { pTouch = new CCTouch(); pTouch->SetTouchInfo((x[i] - m_rcViewPort.origin.x) / m_fScreenScaleFactor, - (y[i] - m_rcViewPort.origin.y) / m_fScreenScaleFactor, id[i]); + (y[i] - m_rcViewPort.origin.y) / m_fScreenScaleFactor); s_mapTouches.Add(id[i], pTouch); set.addObject(pTouch); m_pDelegate->touchesBegan(&set, NULL); @@ -445,7 +445,7 @@ void CCEGLView::onTouchesMove(int id[], float x[], float y[], int pointerNumber) if (E_SUCCESS == r && pTouch != NULL) { pTouch->SetTouchInfo((x[i] - m_rcViewPort.origin.x) / m_fScreenScaleFactor, - (y[i] - m_rcViewPort.origin.y) / m_fScreenScaleFactor, id[i]); + (y[i] - m_rcViewPort.origin.y) / m_fScreenScaleFactor); set.addObject(pTouch); } else @@ -469,7 +469,7 @@ void CCEGLView::onTouchesEnd(int id[], float x[], float y[], int pointerNumber) if (E_SUCCESS == r && pTouch != NULL) { pTouch->SetTouchInfo((x[i] - m_rcViewPort.origin.x) / m_fScreenScaleFactor, - (y[i] - m_rcViewPort.origin.y) / m_fScreenScaleFactor, id[i]); + (y[i] - m_rcViewPort.origin.y) / m_fScreenScaleFactor); set.addObject(pTouch); s_mapTouches.Remove(id[i]); pTouch->release(); diff --git a/cocos2dx/platform/ios/EAGLView.mm b/cocos2dx/platform/ios/EAGLView.mm index 8151ff8b72..c0aabb21b7 100755 --- a/cocos2dx/platform/ios/EAGLView.mm +++ b/cocos2dx/platform/ios/EAGLView.mm @@ -413,7 +413,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES]; pTouch = s_pTouches[unUsedIndex] = new cocos2d::CCTouch(); float x = [touch locationInView: [touch view]].x; float y = [touch locationInView: [touch view]].y; - pTouch->SetTouchInfo(x, y, unUsedIndex); + pTouch->SetTouchInfo(x, y); CFDictionaryAddValue(touchesIntergerDict, touch, [NSNumber numberWithInt:unUsedIndex]); @@ -446,7 +446,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES]; float x = [touch locationInView: [touch view]].x; float y = [touch locationInView: [touch view]].y; - pTouch->SetTouchInfo(x, y, pTouch->id()); + pTouch->SetTouchInfo(x, y); set.addObject(pTouch); } @@ -472,7 +472,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES]; float x = [touch locationInView: [touch view]].x; float y = [touch locationInView: [touch view]].y; - pTouch->SetTouchInfo(x, y, pTouch->id()); + pTouch->SetTouchInfo(x, y); set.addObject(pTouch); CFDictionaryRemoveValue(touchesIntergerDict, touch); @@ -502,7 +502,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES]; float x = [touch locationInView: [touch view]].x; float y = [touch locationInView: [touch view]].y; - pTouch->SetTouchInfo(x, y, pTouch->id()); + pTouch->SetTouchInfo(x, y); set.addObject(pTouch); CFDictionaryRemoveValue(touchesIntergerDict, touch);