changed \027 to \033 because char constants are octal
This commit is contained in:
parent
dc9107e1c0
commit
1d05eb170c
3 changed files with 4 additions and 4 deletions
|
@ -596,7 +596,7 @@ std::string::const_iterator parse_markup(std::string::const_iterator i1, std::st
|
|||
case NULL_MARKUP:
|
||||
return i1+1;
|
||||
// semi ANSI colour escape sequences at the start of the line for now only
|
||||
case '\027':
|
||||
case '\033':
|
||||
if(i2 - i1 >= 4) {
|
||||
++i1;
|
||||
if(*i1 == '[') {
|
||||
|
|
|
@ -70,7 +70,7 @@ void level_to_gamestate(config& level, game_state& state)
|
|||
|
||||
std::string get_colour_string(int id)
|
||||
{
|
||||
std::string prefix("\027[3 m");
|
||||
std::string prefix("\033[3 m");
|
||||
prefix[3] = lexical_cast<char, int>(id + 1);
|
||||
|
||||
switch(id) {
|
||||
|
|
|
@ -1809,9 +1809,9 @@ void turn_info::status_table()
|
|||
//cause it to be displayed in the correct colour
|
||||
if(leader != units_.end()) {
|
||||
str << IMAGE_PREFIX << leader->second.type().image() << COLUMN_SEPARATOR
|
||||
<< "\027[3" << lexical_cast<char, size_t>(n+1) << 'm' << leader->second.description() << COLUMN_SEPARATOR;
|
||||
<< "\033[3" << lexical_cast<char, size_t>(n+1) << 'm' << leader->second.description() << COLUMN_SEPARATOR;
|
||||
} else {
|
||||
str << ' ' << COLUMN_SEPARATOR << "\027[3" << lexical_cast<char, size_t>(n+1) << "m-" << COLUMN_SEPARATOR;
|
||||
str << ' ' << COLUMN_SEPARATOR << "\033[3" << lexical_cast<char, size_t>(n+1) << "m-" << COLUMN_SEPARATOR;
|
||||
}
|
||||
|
||||
if(enemy) {
|
||||
|
|
Loading…
Add table
Reference in a new issue