summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libgui.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-26 10:39:39 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-26 10:39:39 +0000
commit61cae4a761c2f72cda44ae269c7007b37a0c14a7 (patch)
treefec8ec71ca7ca6eebd9d48881bc5ee3fe27d04c1 /crawl-ref/source/libgui.cc
parentd4acdf4a6a4b73607d58714a66efd372674adb56 (diff)
downloadcrawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.tar.gz
crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.zip
Misc. minor cleanups. (Yes, a huge amount of them but still...)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libgui.cc')
-rw-r--r--crawl-ref/source/libgui.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc
index b39b8ca26b..8b5ae1db7f 100644
--- a/crawl-ref/source/libgui.cc
+++ b/crawl-ref/source/libgui.cc
@@ -1225,7 +1225,7 @@ static bool _can_use_item(item_def item, bool equipped)
{
// Misc. items/rods can always be evoked, cursed or not.
if (item.base_type == OBJ_MISCELLANY || item_is_rod(item))
- return true;
+ return (true);
// You can't unwield/fire a wielded cursed weapon/staff
// but cursed armour and rings can be unwielded without problems.
@@ -1237,7 +1237,7 @@ static bool _can_use_item(item_def item, bool equipped)
return (item.base_type != OBJ_POTIONS && item.base_type != OBJ_FOOD);
// In all other cases you can use the item in some way.
- return true;
+ return (true);
}
static int _handle_mouse_motion(int mouse_x, int mouse_y, bool init)
@@ -2349,15 +2349,21 @@ bool is_smart_cursor_enabled()
void set_cursor_enabled(bool enabled)
{
- if (gui_smart_cursor) return;
- if (enabled) TextRegionClass::_setcursortype(1);
- else TextRegionClass::_setcursortype(0);
+ if (gui_smart_cursor)
+ return;
+
+ if (enabled)
+ TextRegionClass::_setcursortype(1);
+ else
+ TextRegionClass::_setcursortype(0);
}
bool is_cursor_enabled()
{
- if (TextRegionClass::cursor_flag) return true;
- return false;
+ if (TextRegionClass::cursor_flag)
+ return (true);
+
+ return (false);
}
int wherex()