From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/sys/consoleinterface.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/sys/consoleinterface.cc') diff --git a/src/sys/consoleinterface.cc b/src/sys/consoleinterface.cc index 438a8de..45f678d 100644 --- a/src/sys/consoleinterface.cc +++ b/src/sys/consoleinterface.cc @@ -34,20 +34,20 @@ void fallback_print(const std::string &text) bool is_color_code = false; int ansi_bold = 0; int ansi_color = 39; - + const char *c = text.c_str(); while (*c) { - + if ((*c) == '\n') { std::cout << std::endl; - + } else if ((*c) == '^') { - + is_color_code = true; ansi_bold = 0; ansi_color = 39; - - switch (*(c+1)) { + + switch (*(c + 1)) { case '0': // black ansi_color = 0; ansi_bold = 1; @@ -75,7 +75,7 @@ void fallback_print(const std::string &text) ansi_bold = 1; ansi_color = 39; break; - + case 'N': // normal ansi_bold = 0; ansi_color = 39; @@ -103,7 +103,7 @@ void fallback_print(const std::string &text) default: is_color_code = false; } - + if (is_color_code) { if (con_ansicolor) std::cout << "\033[" << ansi_bold << ";" << ansi_color << "m"; @@ -111,11 +111,11 @@ void fallback_print(const std::string &text) } else { std::cout << *c; } - + } else { std::cout << *c; } - + c++; } } @@ -126,7 +126,7 @@ int ConsoleBuffer::overflow(int c) { if (c == Traits::eof()) return Traits::not_eof(c); - + if (c == '\n') { if (ConsoleInterface::instance()) { ConsoleInterface::instance()->event_text(con_buffer); @@ -168,7 +168,7 @@ ConsoleInterface::ConsoleInterface() std::cerr << "multiple sys::ConsoleInterface instances!" << std::endl; sys::quit(2); } - + consoleinterface_rcon = false; consoleinterface_instance = this; consoleinterface_logsize = DEFAULT_LOGSIZE; @@ -203,7 +203,7 @@ void ConsoleInterface::event_text(const std::string & text) while (consoleinterface_log.size() >= consoleinterface_logsize) { consoleinterface_log.pop_front(); } - + consoleinterface_log.push_back(text); print(text); } -- cgit v1.2.3