1.1 --- a/src/events/SDL_gesture.c Mon Oct 31 03:06:32 2011 -0400
1.2 +++ b/src/events/SDL_gesture.c Mon Oct 31 05:56:58 2011 -0400
1.3 @@ -103,7 +103,7 @@
1.4 return (touchId < 0);
1.5 }
1.6
1.7 -unsigned long SDL_HashDollar(SDL_FloatPoint* points) {
1.8 +static unsigned long SDL_HashDollar(SDL_FloatPoint* points) {
1.9 unsigned long hash = 5381;
1.10 int i;
1.11 for(i = 0;i < DOLLARNPOINTS; i++) {
1.12 @@ -242,7 +242,7 @@
1.13 }
1.14
1.15
1.16 -float dollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ,float ang) {
1.17 +static float dollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ,float ang) {
1.18 // SDL_FloatPoint p[DOLLARNPOINTS];
1.19 float dist = 0;
1.20 SDL_FloatPoint p;
1.21 @@ -257,7 +257,7 @@
1.22
1.23 }
1.24
1.25 -float bestDollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ) {
1.26 +static float bestDollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ) {
1.27 //------------BEGIN DOLLAR BLACKBOX----------------//
1.28 //-TRANSLATED DIRECTLY FROM PSUDEO-CODE AVAILABLE AT-//
1.29 //-"http://depts.washington.edu/aimgroup/proj/dollar/"-//
1.30 @@ -294,7 +294,7 @@
1.31 }
1.32
1.33 //DollarPath contains raw points, plus (possibly) the calculated length
1.34 -int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points) {
1.35 +static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points) {
1.36 int i;
1.37 float interval;
1.38 float dist;
1.39 @@ -387,7 +387,7 @@
1.40 return numPoints;
1.41 }
1.42
1.43 -float dollarRecognize(const SDL_DollarPath *path,int *bestTempl,SDL_GestureTouch* touch) {
1.44 +static float dollarRecognize(const SDL_DollarPath *path,int *bestTempl,SDL_GestureTouch* touch) {
1.45
1.46 SDL_FloatPoint points[DOLLARNPOINTS];
1.47 int i;
1.48 @@ -431,20 +431,7 @@
1.49 return 0;
1.50 }
1.51
1.52 -int SDL_GestureRemoveTouch(SDL_TouchID id) {
1.53 - int i;
1.54 - for (i = 0; i < SDL_numGestureTouches; i++) {
1.55 - if (SDL_gestureTouch[i].id == id) {
1.56 - SDL_numGestureTouches--;
1.57 - SDL_memcpy(&SDL_gestureTouch[i], &SDL_gestureTouch[SDL_numGestureTouches], sizeof(SDL_gestureTouch[i]));
1.58 - return 1;
1.59 - }
1.60 - }
1.61 - return -1;
1.62 -}
1.63 -
1.64 -
1.65 -SDL_GestureTouch * SDL_GetGestureTouch(SDL_TouchID id) {
1.66 +static SDL_GestureTouch * SDL_GetGestureTouch(SDL_TouchID id) {
1.67 int i;
1.68 for(i = 0;i < SDL_numGestureTouches; i++) {
1.69 //printf("%i ?= %i\n",SDL_gestureTouch[i].id,id);
1.70 @@ -453,7 +440,7 @@
1.71 return NULL;
1.72 }
1.73
1.74 -int SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist) {
1.75 +static int SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist) {
1.76 SDL_Event event;
1.77 event.mgesture.type = SDL_MULTIGESTURE;
1.78 event.mgesture.touchId = touch->id;
1.79 @@ -465,7 +452,7 @@
1.80 return SDL_PushEvent(&event) > 0;
1.81 }
1.82
1.83 -int SDL_SendGestureDollar(SDL_GestureTouch* touch,
1.84 +static int SDL_SendGestureDollar(SDL_GestureTouch* touch,
1.85 SDL_GestureID gestureId,float error) {
1.86 SDL_Event event;
1.87 event.dgesture.type = SDL_DOLLARGESTURE;
1.88 @@ -483,7 +470,7 @@
1.89 }
1.90
1.91
1.92 -int SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId) {
1.93 +static int SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId) {
1.94 SDL_Event event;
1.95 event.dgesture.type = SDL_DOLLARRECORD;
1.96 event.dgesture.touchId = touch->id;