summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-20 19:03:18 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-20 19:03:18 +0000
commit5295af15b91c7bf88b9005e3b381ce587bcd2e11 (patch)
tree52ee6f3244f69ce625b10e11e839119d9eb31d6a /crawl-ref
parentd9dd888a10a3087d3ec5cf82364cfd6495abd3e4 (diff)
downloadcrawl-ref-5295af15b91c7bf88b9005e3b381ce587bcd2e11.tar.gz
crawl-ref-5295af15b91c7bf88b9005e3b381ce587bcd2e11.zip
Fix my overzealous replacements with rectangle_iterator.
Note to self: Checking for x < GXM - 1 does not equal GXM-1 in the bottom right corner. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9670 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/debug.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index ea72367ba2..10ff399047 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -1148,7 +1148,7 @@ static bool _book_from_spell(const char* specs, item_def &item)
return (false);
for (int i = 0; i < NUM_FIXED_BOOKS; ++i)
- for (int j = 0; j < 8; j++)
+ for (int j = 0; j < 8; ++j)
if (which_spell_in_book(i, j) == type)
{
item.sub_type = i;
@@ -2507,7 +2507,8 @@ void wizard_list_items()
mpr(EOL);
mpr("Floor items (stacks only show top item):");
- for (rectangle_iterator ri(1); ri; ++ri)
+ const coord_def start(1,1), end(GXM-1, GYM-1);
+ for (rectangle_iterator ri(start, end); ri; ++ri)
{
int item = igrd(*ri);
if (item != NON_ITEM)
@@ -6349,7 +6350,9 @@ static void _debug_marker_scan()
i, (int) type, marker->pos.x, marker->pos.y);
}
- for (rectangle_iterator ri(MAPGEN_BORDER); ri; ++ri)
+ const coord_def start(MAPGEN_BORDER, MAPGEN_BORDER);
+ const coord_def end(GXM - MAPGEN_BORDER - 2, GYM - MAPGEN_BORDER - 2);
+ for (rectangle_iterator ri(start, end); ri; ++ri)
{
std::vector<map_marker*> at_pos = env.markers.get_markers_at(*ri);