summaryrefslogtreecommitdiffstats
path: root/crawl-ref
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
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')
-rw-r--r--crawl-ref/source/libgui.cc30
-rw-r--r--crawl-ref/source/libgui.h5
-rw-r--r--crawl-ref/source/output.cc2
-rw-r--r--crawl-ref/source/view.cc2
4 files changed, 27 insertions, 12 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)
diff --git a/crawl-ref/source/libgui.h b/crawl-ref/source/libgui.h
index b3a9769f39..49cf753940 100644
--- a/crawl-ref/source/libgui.h
+++ b/crawl-ref/source/libgui.h
@@ -69,10 +69,9 @@ private:
};
struct coord_def;
+struct crawl_view_geometry;
-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);
// If mouse on dungeon map, returns true and sets gc.
// Otherwise, it just returns false.
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 4979ad8d98..7e0e6ba585 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -112,7 +112,7 @@ class colour_bar
if (cx < disp)
textcolor(BLACK + m_default * 16);
- else if (/*old_val > val &&*/ old_disp > disp && cx < old_disp)
+ else if (old_disp > disp && cx < old_disp)
textcolor(BLACK + m_change_neg * 16);
putch(' ');
#else
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 3ee14ec83d..3da15684e8 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -5223,7 +5223,7 @@ void crawl_view_geometry::init_geometry()
#ifdef USE_TILE
// libgui may redefine these based on its own settings
- gui_init_view_params(termsz, viewsz, msgp, msgsz, hudp, hudsz);
+ gui_init_view_params(*this);
#endif
viewhalfsz = viewsz / 2;