diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-15 22:18:34 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-15 22:18:34 +0000 |
commit | 1c3415a86cc3ad2e3ab9af953dce5e38ec347d78 (patch) | |
tree | 7e7b1b4d25f9b32b488e2f6665f8205469a84c3d /crawl-ref/source/stuff.cc | |
parent | 2a497a24d4c25cb26930fbda6ce3177042a8ed20 (diff) | |
download | crawl-ref-1c3415a86cc3ad2e3ab9af953dce5e38ec347d78.tar.gz crawl-ref-1c3415a86cc3ad2e3ab9af953dce5e38ec347d78.zip |
Fix warning.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9096 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r-- | crawl-ref/source/stuff.cc | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index a89e46192d..97a910bed6 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -1297,36 +1297,6 @@ coord_def random_in_bounds() random_range(MAPGEN_BORDER, GYM - MAPGEN_BORDER - 1)); } -// Returns a random location in (x_pos, y_pos)... the grid will be -// DNGN_FLOOR if clear, and NON_MONSTER if empty. Exclusive tells -// if we're using in_bounds() or map_bounds() restriction. -void random_in_bounds(int &x_pos, int &y_pos, int terr, - bool empty, bool excl) -{ - bool done = false; - - do - { - x_pos = X_BOUND_1 + random2(X_WIDTH - 2 * excl) + 1 * excl; - y_pos = Y_BOUND_1 + random2(Y_WIDTH - 2 * excl) + 1 * excl; - - if (terr == DNGN_RANDOM) - done = true; - else if (terr == grd[x_pos][y_pos]) - done = true; - else if (terr == DNGN_DEEP_WATER - && grd[x_pos][y_pos] == DNGN_SHALLOW_WATER) - done = true; - else if (empty - && mgrd[x_pos][y_pos] != NON_MONSTER - && (coord_def(x_pos, y_pos) != you.pos())) - { - done = true; - } - } - while (!done); -} - unsigned char random_colour(void) { return (1 + random2(15)); |