Attached Files |
0001-Add-new-option-show_newturn_mark-which-can-disable-t.patch [^] (3,027 bytes) 2011-05-11 18:33 [Show Content] [Hide Content]From f9654efdda09c87b29b09578068441739180a30c Mon Sep 17 00:00:00 2001
From: Chris Hamons <chris.hamons@gmail.com>
Date: Wed, 11 May 2011 07:16:29 -0500
Subject: [PATCH] Add new option, show_newturn_mark, which can disable the leading character in the message log related to new turns.
---
crawl-ref/settings/init.txt | 2 +-
crawl-ref/source/initfile.cc | 2 ++
crawl-ref/source/message.cc | 6 +++---
crawl-ref/source/options.h | 1 +
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index 1049d0a..167f096 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -242,7 +242,7 @@ sort_menus = inv: true : equipped, freshness, charged
# mlist_targetting = true
# show_gold_turns = true
# show_game_turns = true
-
+# show_newturn_mark = false
# clear_messages = true
# small_more = true
# show_more = false
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 5a20a52..794a0b5 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -738,6 +738,7 @@ void game_options::reset_options()
autopickup_on = 1;
default_friendly_pickup = FRIENDLY_PICKUP_FRIEND;
+ show_newturn_mark = true;
show_gold_turns = false;
#ifdef EUCLIDEAN
show_game_turns = true;
@@ -2446,6 +2447,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
morgue_dir = field;
#endif
#endif
+ else BOOL_OPTION(show_newturn_mark);
else BOOL_OPTION(show_gold_turns);
else BOOL_OPTION(show_game_turns);
#ifndef USE_TILE
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index ed73565..fb25e64 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -250,16 +250,16 @@ glyph prefix_glyph(prefix_type p)
switch (p)
{
case P_TURN_START:
- g.ch = '-';
+ g.ch = Options.show_newturn_mark ? '-' : ' ';
g.col = LIGHTGRAY;
break;
case P_TURN_END:
case P_NEW_TURN:
- g.ch = '_';
+ g.ch = Options.show_newturn_mark ? '_' : ' ';
g.col = LIGHTGRAY;
break;
case P_NEW_CMD:
- g.ch = '_';
+ g.ch = Options.show_newturn_mark ? '_' : ' ';
g.col = DARKGRAY;
break;
case P_FULL_MORE:
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 7495ce1..b14f629 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -93,6 +93,7 @@ public:
int autopickup_on;
int default_friendly_pickup;
+ bool show_newturn_mark;// Show underscore prefix in messages for new turn
bool show_gold_turns; // Show gold and turns in HUD.
bool show_game_turns; // Show game turns instead of player turns.
bool show_beam; // Show targeting beam by default.
--
1.7.4.msysgit.0
|