Lines Matching refs:dir
463 int dir = 0; in DoGetDirection() local
469 dir = E | SE | S; in DoGetDirection()
471 dir = N | NE | E; in DoGetDirection()
473 dir = W | NW | N; in DoGetDirection()
475 dir = W | SW | S; in DoGetDirection()
478 dir = NE | E | SE; in DoGetDirection()
480 dir = NW | W | SW; in DoGetDirection()
482 dir = SE | S | SW; in DoGetDirection()
484 dir = NE | N | NW; in DoGetDirection()
486 dir = UNDEFINED; /* shouldn't happen */ in DoGetDirection()
510 dir = UNDEFINED; /* shouldn't happen */ in DoGetDirection()
512 dir = (1 << i1 | 1 << i2); in DoGetDirection()
514 return dir; in DoGetDirection()
531 int dir; in GetDirection() local
535 dir = cache[DIRECTION_CACHE_RANGE + dx][DIRECTION_CACHE_RANGE + dy]; in GetDirection()
536 if (dir == 0) { in GetDirection()
537 dir = DoGetDirection(dx, dy); in GetDirection()
538 cache[DIRECTION_CACHE_RANGE + dx][DIRECTION_CACHE_RANGE + dy] = dir; in GetDirection()
543 dir = DoGetDirection(dx, dy); in GetDirection()
546 return dir; in GetDirection()
573 vel->tracker[n].dir = GetDirection(dx, dy); in FeedTrackers()
575 dx, dy, vel->tracker[n].dir, in FeedTrackers()
607 int offset, dir = UNDEFINED, used_offset = -1, age_ms; in QueryTrackers() local
633 dir &= tracker->dir; in QueryTrackers()
634 if (dir == 0) { /* we've changed octant of movement (e.g. NE → NW) */ in QueryTrackers()