2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 14:27:42 +00:00

windows ANSI console support

This commit is contained in:
Jack Andersen
2015-09-02 12:00:05 -10:00
parent 1091f93536
commit 4780960161
6 changed files with 39 additions and 71 deletions

View File

@@ -159,38 +159,26 @@ public:
void printBold(const HECL::SystemChar* str)
{
#if _WIN32
HECL::FPrintf(m_sout, _S("%s"), str);
#else
if (XTERM_COLOR)
HECL::FPrintf(m_sout, _S("" BOLD "%s" NORMAL ""), str);
else
HECL::FPrintf(m_sout, _S("%s"), str);
#endif
}
void secHead(const HECL::SystemChar* headName)
{
#if _WIN32
HECL::FPrintf(m_sout, _S("%s\n"), headName);
#else
if (XTERM_COLOR)
HECL::FPrintf(m_sout, _S("" BOLD "%s" NORMAL "\n"), headName);
else
HECL::FPrintf(m_sout, _S("%s\n"), headName);
#endif
}
void optionHead(const HECL::SystemChar* flag, const HECL::SystemChar* synopsis)
{
#if _WIN32
HECL::FPrintf(m_sout, _S("%s (%s)\n"), flag, synopsis);
#else
if (XTERM_COLOR)
HECL::FPrintf(m_sout, _S("" BOLD "%s" NORMAL " (%s)\n"), flag, synopsis);
else
HECL::FPrintf(m_sout, _S("%s (%s)\n"), flag, synopsis);
#endif
}
void beginWrap()
@@ -205,15 +193,11 @@ public:
void wrapBold(const HECL::SystemChar* str)
{
#if _WIN32
m_wrapBuffer += str;
#else
if (XTERM_COLOR)
m_wrapBuffer += _S("" BOLD "");
m_wrapBuffer += str;
if (XTERM_COLOR)
m_wrapBuffer += _S("" NORMAL "");
#endif
}
void endWrap()