Define ColorCap instead of hardcoding 100

master
C. McEnroe 2020-02-11 17:43:36 -05:00
parent af87b4e68d
commit 2771863299
2 changed files with 2 additions and 1 deletions

1
chat.h
View File

@ -34,6 +34,7 @@ enum Color {
White, Black, Blue, Green, Red, Brown, Magenta, Orange, White, Black, Blue, Green, Red, Brown, Magenta, Orange,
Yellow, LightGreen, Cyan, LightCyan, LightBlue, Pink, Gray, LightGray, Yellow, LightGreen, Cyan, LightCyan, LightBlue, Pink, Gray, LightGray,
Default = 99, Default = 99,
ColorCap,
}; };
enum { None, Debug, Network, IDCap = 256 }; enum { None, Debug, Network, IDCap = 256 };

2
ui.c
View File

@ -314,7 +314,7 @@ struct Style {
}; };
static const struct Style Reset = { A_NORMAL, Default, Default }; static const struct Style Reset = { A_NORMAL, Default, Default };
static const short Colors[100] = { static const short Colors[ColorCap] = {
[Default] = -1, [Default] = -1,
[White] = 8 + COLOR_WHITE, [White] = 8 + COLOR_WHITE,
[Black] = 0 + COLOR_BLACK, [Black] = 0 + COLOR_BLACK,