equal
deleted
inserted
replaced
1919 gp->old_tile = v->tile; |
1919 gp->old_tile = v->tile; |
1920 gp->new_tile = TileVirtXY(x, y); |
1920 gp->new_tile = TileVirtXY(x, y); |
1921 return gp->old_tile == gp->new_tile; |
1921 return gp->old_tile == gp->new_tile; |
1922 } |
1922 } |
1923 |
1923 |
1924 static const byte _new_direction_table[9] = { |
1924 static const Direction _new_direction_table[] = { |
1925 0, 7, 6, |
1925 DIR_N , DIR_NW, DIR_W , |
1926 1, 3, 5, |
1926 DIR_NE, DIR_SE, DIR_SW, |
1927 2, 3, 4, |
1927 DIR_E , DIR_SE, DIR_S |
1928 }; |
1928 }; |
1929 |
1929 |
1930 byte GetDirectionTowards(const Vehicle *v, int x, int y) |
1930 Direction GetDirectionTowards(const Vehicle* v, int x, int y) |
1931 { |
1931 { |
1932 byte dirdiff, dir; |
1932 Direction dir; |
|
1933 byte dirdiff; |
1933 int i = 0; |
1934 int i = 0; |
1934 |
1935 |
1935 if (y >= v->y_pos) { |
1936 if (y >= v->y_pos) { |
1936 if (y != v->y_pos) i+=3; |
1937 if (y != v->y_pos) i+=3; |
1937 i+=3; |
1938 i+=3; |