summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-06 16:03:52 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-06 16:03:52 +0000
commit24be3228d463d6b2501cbca9368e14e91ab42182 (patch)
tree5fd30f60a43e1e69188bce4e30646c3e89e288b2 /crawl-ref/source/libutil.cc
parentf878a03c781fd57fea8447caaecee847ab576d8b (diff)
downloadcrawl-ref-24be3228d463d6b2501cbca9368e14e91ab42182.tar.gz
crawl-ref-24be3228d463d6b2501cbca9368e14e91ab42182.zip
Tutorial (JPEG) and some formatting cleanup.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@924 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libutil.cc')
-rw-r--r--crawl-ref/source/libutil.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index 0a7caaaaa4..d380b92419 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -88,16 +88,20 @@ int unmangle_direction_keys(int keyin, int km)
/* FIXME haranp - hackiness */
const char DOSidiocy[10] = { "OPQKSMGHI" };
const char DOSunidiocy[10] = { "bjnh.lyku" };
- const int DOScontrolidiocy[9] = {
+ const int DOScontrolidiocy[9] =
+ {
117, 145, 118, 115, 76, 116, 119, 141, 132
};
keyin = getchm(keymap);
- for (int j = 0; j < 9; ++j ) {
- if (keyin == DOSidiocy[j]) {
+ for (int j = 0; j < 9; ++j )
+ {
+ if (keyin == DOSidiocy[j])
+ {
keyin = DOSunidiocy[j];
break;
}
- if (keyin == DOScontrolidiocy[j]) {
+ if (keyin == DOScontrolidiocy[j])
+ {
keyin = CONTROL(toupper(DOSunidiocy[j]));
break;
}