Untitled
public python v1 · immutabledef get_map_pos(offset, pos): x,y = pos pos = (float(x - offset[0]), float(y - offset[1])) retx = pos[1]/TILEHEIGHT + pos[0]/TILEWIDTH - 0.5 rety = -pos[0]/TILEWIDTH + pos[1]/TILEHEIGHT + 0.5 return (retx, rety)