fixed mapconvert issue that eliminated horizontal and vertical lines

Former-commit-id: 88370ea8c775bc7b7cc03aae6193776df6783061
This commit is contained in:
nathan 2020-06-11 22:55:59 -07:00
parent def7ee20e1
commit b8dd741165
2 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ void Input::getInput()
//this finger number is always 1 for down and 0 for up an rpi+hyperpixel?? //this finger number is always 1 for down and 0 for up an rpi+hyperpixel??
if(SDL_GetNumTouchFingers(event.tfinger.touchId) == 1) { if(SDL_GetNumTouchFingers(event.tfinger.touchId) <= 1) {
touchDownTime = now(); touchDownTime = now();
} }
break; break;

View file

@ -40,7 +40,7 @@ for i in tqdm(range(len(polys))):
currentPoints[2 * i + 0] = float(int(resolution * float(currentPoints[2 * i + 0]))) / resolution currentPoints[2 * i + 0] = float(int(resolution * float(currentPoints[2 * i + 0]))) / resolution
currentPoints[2 * i + 1] = float(int(resolution * float(currentPoints[2 * i + 1]))) / resolution currentPoints[2 * i + 1] = float(int(resolution * float(currentPoints[2 * i + 1]))) / resolution
if(currentPoints[2 * i + 0] != prevx and currentPoints[2 * i + 1] != prevy): if(currentPoints[2 * i + 0] != prevx or currentPoints[2 * i + 1] != prevy):
temp.extend([currentPoints[2 * i + 0],currentPoints[2 * i + 1]]) temp.extend([currentPoints[2 * i + 0],currentPoints[2 * i + 1]])
prevx = currentPoints[2 * i + 0] prevx = currentPoints[2 * i + 0]
@ -48,7 +48,7 @@ for i in tqdm(range(len(polys))):
if(len(currentPoints) > 6): #must be at least a triangle if(len(currentPoints) > 6): #must be at least a triangle
outlist.extend(temp) outlist.extend(temp)
outlist.extend([temp[0],temp[1]]) #outlist.extend([temp[0],temp[1]])
outlist.extend(["0","0"]) outlist.extend(["0","0"])