summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/coord.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-08-17 17:26:32 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-08-17 19:44:57 +0200
commit934cc1d96b9af44bdc3c37c930b79abc519b97bf (patch)
treed677ff9d7a85f5bc0a3d1eb3352a4458be43ecab /crawl-ref/source/coord.cc
parent865ad7c97e5620b1af0b0fbde37646a81b57b295 (diff)
downloadcrawl-ref-934cc1d96b9af44bdc3c37c930b79abc519b97bf.tar.gz
crawl-ref-934cc1d96b9af44bdc3c37c930b79abc519b97bf.zip
Make a bunch of functions static or non-existant.
Diffstat (limited to 'crawl-ref/source/coord.cc')
-rw-r--r--crawl-ref/source/coord.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/crawl-ref/source/coord.cc b/crawl-ref/source/coord.cc
index 0507ab6732..f9537a6213 100644
--- a/crawl-ref/source/coord.cc
+++ b/crawl-ref/source/coord.cc
@@ -41,17 +41,7 @@ bool in_bounds_y(int y)
// Returns true if inside the area the player can move and dig (ie exclusive).
bool in_bounds(int x, int y)
{
- return (in_bounds_x(x) && in_bounds_y(y));
-}
-
-bool map_bounds_x(int x)
-{
- return (x >= X_BOUND_1 && x <= X_BOUND_2);
-}
-
-bool map_bounds_y(int y)
-{
- return (y >= Y_BOUND_1 && y <= Y_BOUND_2);
+ return (x > X_BOUND_1 && x < X_BOUND_2 && y > Y_BOUND_1 && y < Y_BOUND_2);
}
// Returns true if inside the area the player can map (ie inclusive).
@@ -59,7 +49,7 @@ bool map_bounds_y(int y)
// ring of rock to frame the level.
bool map_bounds(int x, int y)
{
- return (map_bounds_x(x) && map_bounds_y(y));
+ return (x >= X_BOUND_1 && x <= X_BOUND_2 && y >= Y_BOUND_1 && y <= Y_BOUND_2);
}
bool map_bounds_with_margin(coord_def p, int margin)