version 1.2 | | version 1.3 |
---|
| | |
* Graphical routines for drawing fonts. | | * Graphical routines for drawing fonts. |
* | | * |
* $Log$ | | * $Log$ |
| | * Revision 1.3 1999/08/31 21:22:07 donut |
| | * added variable colorization level, and colorization for kill/join/quit messages |
| | * |
* Revision 1.2 1999/08/31 10:43:13 donut | | * Revision 1.2 1999/08/31 10:43:13 donut |
* added colorization to multiplayer names in user messages | | * added colorization to multiplayer names in user messages |
* | | * |
| | |
//note we subtract one from color, since 255 is "transparent" so it'll never be used, and 0 would otherwise end the string. | | //note we subtract one from color, since 255 is "transparent" so it'll never be used, and 0 would otherwise end the string. |
//function must already have orig_color var set (or they could be passed as args...) | | //function must already have orig_color var set (or they could be passed as args...) |
//perhaps some sort of recursive orig_color type thing would be better, but that would be way too much trouble for little gain | | //perhaps some sort of recursive orig_color type thing would be better, but that would be way too much trouble for little gain |
#define CHECK_EMBEDDED_COLORS() if (*text_ptr==0x01){ \ | | int gr_message_color_level=1; |
| | #define CHECK_EMBEDDED_COLORS() if ((*text_ptr >= 0x01) && (*text_ptr <= 0x03)) { \ |
text_ptr++; \ | | text_ptr++; \ |
if (*text_ptr){ \ | | if (*text_ptr){ \ |
| | if (gr_message_color_level >= *(text_ptr-1)) \ |
FG_COLOR=*text_ptr-1; \ | | FG_COLOR=*text_ptr-1; \ |
text_ptr++; \ | | text_ptr++; \ |
} \ | | } \ |
} \ | | } \ |
else if (*text_ptr==0x02){ \ | | else if ((*text_ptr >= 0x04) && (*text_ptr <= 0x06)){ \ |
| | if (gr_message_color_level >= *text_ptr - 3) \ |
FG_COLOR=orig_color; \ | | FG_COLOR=orig_color; \ |
text_ptr++; \ | | text_ptr++; \ |
} | | } |
| | |
| | |
| | |
int gr_internal_string0(int x, int y, char *s ) | | int gr_internal_string0(int x, int y, char *s ) |