From 996744d7ec6d620a0b3028d9be9ce3e5fa1d72b1 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 11 Feb 2023 05:10:32 +0000 Subject: [PATCH] Resolved #59 --- Repl.vcxproj | 3 ++- Toy.vcxproj | 3 ++- source/toy_common.h | 2 +- source/toy_console_colors.h | 38 +++++++++++++++++++++++++++++++++++-- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/Repl.vcxproj b/Repl.vcxproj index 30f15c3..381b18b 100644 --- a/Repl.vcxproj +++ b/Repl.vcxproj @@ -71,7 +71,8 @@ false - $(SolutionDir)out\$(Configuration) + $(SolutionDir)out\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ diff --git a/Toy.vcxproj b/Toy.vcxproj index cc7a6f6..8381fbe 100644 --- a/Toy.vcxproj +++ b/Toy.vcxproj @@ -70,7 +70,8 @@ true - $(SolutionDir)out\$(Configuration) + $(SolutionDir)out\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ diff --git a/source/toy_common.h b/source/toy_common.h index bd6d352..f2ce327 100644 --- a/source/toy_common.h +++ b/source/toy_common.h @@ -9,7 +9,7 @@ #define TOY_VERSION_PATCH 3 #define TOY_VERSION_BUILD __DATE__ " " __TIME__ -//platform/compiler-specific specifications +//platform/compiler-specific instructions #if defined(__linux__) #define TOY_API extern diff --git a/source/toy_console_colors.h b/source/toy_console_colors.h index 400934a..9671002 100644 --- a/source/toy_console_colors.h +++ b/source/toy_console_colors.h @@ -2,6 +2,9 @@ //NOTE: you need both font AND background for these to work +//platform/compiler-specific instructions +#if defined(__linux__) || defined(__MINGW32__) + //fonts color #define TOY_CC_FONT_BLACK "\033[30;" #define TOY_CC_FONT_RED "\033[31;" @@ -25,6 +28,37 @@ //useful #define TOY_CC_NOTICE TOY_CC_FONT_GREEN TOY_CC_BACK_BLACK -#define TOY_CC_WARN TOY_CC_FONT_YELLOW TOY_CC_BACK_BLACK -#define TOY_CC_ERROR TOY_CC_FONT_RED TOY_CC_BACK_BLACK +#define TOY_CC_WARN TOY_CC_FONT_YELLOW TOY_CC_BACK_BLACK +#define TOY_CC_ERROR TOY_CC_FONT_RED TOY_CC_BACK_BLACK #define TOY_CC_RESET "\033[0m" + +#else + +//fonts color +#define TOY_CC_FONT_BLACK +#define TOY_CC_FONT_RED +#define TOY_CC_FONT_GREEN +#define TOY_CC_FONT_YELLOW +#define TOY_CC_FONT_BLUE +#define TOY_CC_FONT_PURPLE +#define TOY_CC_FONT_DGREEN +#define TOY_CC_FONT_WHITE +#define TOY_CC_FONT_CYAN + +//background color +#define TOY_CC_BACK_BLACK +#define TOY_CC_BACK_RED +#define TOY_CC_BACK_GREEN +#define TOY_CC_BACK_YELLOW +#define TOY_CC_BACK_BLUE +#define TOY_CC_BACK_PURPLE +#define TOY_CC_BACK_DGREEN +#define TOY_CC_BACK_WHITE + +//useful +#define TOY_CC_NOTICE TOY_CC_FONT_GREEN TOY_CC_BACK_BLACK +#define TOY_CC_WARN TOY_CC_FONT_YELLOW TOY_CC_BACK_BLACK +#define TOY_CC_ERROR TOY_CC_FONT_RED TOY_CC_BACK_BLACK +#define TOY_CC_RESET + +#endif