All pastes #381843 Raw Edit

Untitled

public python v1 · immutable
·published 2007-03-05 03:10 UTC
rendered paste body
def 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)