Changed parameter name for gesture template save functions from "src" to "dst".

This commit is contained in:
Philipp Wiesemann 2013-11-02 12:07:21 +01:00
parent 97dba3380d
commit 0bc9aaf406
4 changed files with 19 additions and 20 deletions

View file

@ -116,15 +116,14 @@ static unsigned long SDL_HashDollar(SDL_FloatPoint* points)
}
static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops * src)
static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst)
{
if (src == NULL) return 0;
if (dst == NULL) return 0;
/* No Longer storing the Hash, rehash on load */
/* if(SDL_RWops.write(src,&(templ->hash),sizeof(templ->hash),1) != 1) return 0; */
/* if (SDL_RWops.write(dst, &(templ->hash), sizeof(templ->hash), 1) != 1) return 0; */
if (SDL_RWwrite(src,templ->path,
if (SDL_RWwrite(dst, templ->path,
sizeof(templ->path[0]),DOLLARNPOINTS) != DOLLARNPOINTS)
return 0;
@ -132,26 +131,26 @@ static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops * src)
}
int SDL_SaveAllDollarTemplates(SDL_RWops *src)
int SDL_SaveAllDollarTemplates(SDL_RWops *dst)
{
int i,j,rtrn = 0;
for (i = 0; i < SDL_numGestureTouches; i++) {
SDL_GestureTouch* touch = &SDL_gestureTouch[i];
for (j = 0; j < touch->numDollarTemplates; j++) {
rtrn += SaveTemplate(&touch->dollarTemplate[i],src);
rtrn += SaveTemplate(&touch->dollarTemplate[i], dst);
}
}
return rtrn;
}
int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *src)
int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *dst)
{
int i,j;
for (i = 0; i < SDL_numGestureTouches; i++) {
SDL_GestureTouch* touch = &SDL_gestureTouch[i];
for (j = 0; j < touch->numDollarTemplates; j++) {
if (touch->dollarTemplate[i].hash == gestureId) {
return SaveTemplate(&touch->dollarTemplate[i],src);
return SaveTemplate(&touch->dollarTemplate[i], dst);
}
}
}