mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Add command-line options to force-enable/disable color
`-forcecolor` will force color to be on. `-nocolor` will force color to be off. And just because I'm a nice person, I've also added British versions of those flags. As a treat.
This commit is contained in:
parent
ac85f57441
commit
c68a274c4f
3 changed files with 15 additions and 0 deletions
|
@ -47,6 +47,11 @@ void vlog_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
void vlog_toggle_color(const int enable_color)
|
||||
{
|
||||
color_enabled = enable_color;
|
||||
}
|
||||
|
||||
int vlog_info(const char* text, ...)
|
||||
{
|
||||
va_list list;
|
||||
|
|
|
@ -8,6 +8,8 @@ extern "C"
|
|||
|
||||
void vlog_init(void);
|
||||
|
||||
void vlog_toggle_color(int enable_color);
|
||||
|
||||
int vlog_info(const char* text, ...);
|
||||
|
||||
int vlog_warn(const char* text, ...);
|
||||
|
|
|
@ -432,6 +432,14 @@ int main(int argc, char *argv[])
|
|||
playassets = "levels/" + std::string(argv[i]) + ".vvvvvv";
|
||||
})
|
||||
}
|
||||
else if (ARG("-forcecolor") || ARG("-forcecolour"))
|
||||
{
|
||||
vlog_toggle_color(1);
|
||||
}
|
||||
else if (ARG("-nocolor") || ARG("-nocolour"))
|
||||
{
|
||||
vlog_toggle_color(0);
|
||||
}
|
||||
#undef ARG_INNER
|
||||
#undef ARG
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue