summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 04:23:58 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 04:23:58 +0000
commit38e827333b1b54e7388162ba5f9db5ef308fb96c (patch)
tree631c1c0c9e95762fdd30308bb9f52cb69d67336c /crawl-ref/source/libutil.cc
parent340d13659bcd11ee831c7a238958118944e8e1d5 (diff)
downloadcrawl-ref-38e827333b1b54e7388162ba5f9db5ef308fb96c.tar.gz
crawl-ref-38e827333b1b54e7388162ba5f9db5ef308fb96c.zip
Monster list fixes:
* get_visible_monsters() now just silently returns descriptions * _mpr_monsters() now handles all printing of information * monster list is now written to a separate monster region (GOTO_MLIST) * added asserts to libutil that will catch behavior that breaks tile version * turned off monster list for tile version (until implemented) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3851 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libutil.cc')
-rw-r--r--crawl-ref/source/libutil.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index 542bbbc162..1599ff1411 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -576,12 +576,23 @@ int snprintf( char *str, size_t size, const char *format, ... )
#ifndef USE_TILE
void cgotoxy(int x, int y, int region)
{
+ ASSERT(x >= 1);
+ ASSERT(y >= 1);
switch(region)
{
+ case GOTO_MLIST:
+ ASSERT(x <= crawl_view.mlistsz.x);
+ ASSERT(y <= crawl_view.mlistsz.y);
+ gotoxy_sys(x + crawl_view.mlistp.x - 1, y + crawl_view.mlistp.y - 1);
+ break;
case GOTO_STAT:
+ ASSERT(x <= crawl_view.hudsz.x);
+ ASSERT(y <= crawl_view.hudsz.y);
gotoxy_sys(x + crawl_view.hudp.x - 1, y + crawl_view.hudp.y - 1);
break;
case GOTO_MSG:
+ ASSERT(x <= crawl_view.msgsz.x);
+ ASSERT(y <= crawl_view.msgsz.y);
gotoxy_sys(x + crawl_view.msgp.x - 1, y + crawl_view.msgp.y - 1);
break;
case GOTO_CRT: