diff options
-rw-r--r-- | crawl-ref/source/libgui.cc | 30 | ||||
-rw-r--r-- | crawl-ref/source/libgui.h | 5 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 2 |
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; |