summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libgui.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 17:58:26 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 17:58:26 +0000
commit6b43ac0d8bbf3dadc5c08d6b5a124ceb7460719c (patch)
treeebe664168ea2bb8244f0c0ba990c478487da930c /crawl-ref/source/libgui.cc
parenta0176994016902b36af4a7f80abebabc45d4bb9f (diff)
downloadcrawl-ref-6b43ac0d8bbf3dadc5c08d6b5a124ceb7460719c.tar.gz
crawl-ref-6b43ac0d8bbf3dadc5c08d6b5a124ceb7460719c.zip
Fixing assert problem due to wherex() inconsistency between tile and console versions.
Removed jpeg's commented out code in the health bar drawing routine, as the reamining code is correct. (Thanks!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4339 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libgui.cc')
-rw-r--r--crawl-ref/source/libgui.cc30
1 files changed, 23 insertions, 7 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc
index 6b005cb167..75f71a3e21 100644
--- a/crawl-ref/source/libgui.cc
+++ b/crawl-ref/source/libgui.cc
@@ -2015,15 +2015,31 @@ int mouse_get_mode()
return mouse_mode;
}
-void gui_init_view_params(coord_def &termsz, coord_def &viewsz,
- coord_def &msgp, coord_def &msgsz,
- coord_def &hudp, const coord_def &hudsz)
+void gui_init_view_params(crawl_view_geometry &geom)
{
- msgsz.x = msg_x;
- msgsz.y = msg_y;
+ // The tile version handles its own layout on a pixel-by-pixel basis.
+ // Pretend that all of the regions start at character location (1,1).
- viewsz.x = tile_dngn_x;
- viewsz.y = tile_dngn_y;
+ geom.termp.x = 1;
+ geom.termp.y = 1;
+
+ geom.viewp.x = 1;
+ geom.viewp.y = 1;
+ geom.viewsz.x = tile_dngn_x;
+ geom.viewsz.y = tile_dngn_y;
+
+ geom.hudp.x = 1;
+ geom.hudp.y = 1;
+
+ geom.msgp.x = 1;
+ geom.msgp.y = 1;
+ geom.msgsz.x = msg_x;
+ geom.msgsz.y = msg_y;
+
+ geom.mlistp.x = 1;
+ geom.mlistp.y = 1;
+ geom.mlistsz.x = 0;
+ geom.mlistsz.y = 0;
}
void lock_region(int r)