sets the color for text
| 296 | |
| 297 | // sets the color for text |
| 298 | void grtext_SetColor(ddgr_color col) { |
| 299 | struct { |
| 300 | char op; |
| 301 | ddgr_color col; |
| 302 | } cmd; |
| 303 | |
| 304 | ASSERT((Grtext_ptr + sizeof(cmd)) < GRTEXT_BUFLEN); |
| 305 | |
| 306 | cmd.op = GRTEXTOP_SETCOLOR; |
| 307 | cmd.col = col; |
| 308 | |
| 309 | memcpy(&Grtext_buffer[Grtext_ptr], &cmd, sizeof(cmd)); |
| 310 | Grtext_ptr += sizeof(cmd); |
| 311 | Grtext_color = col; |
| 312 | } |
| 313 | |
| 314 | // returns color set by grtext_SetColor (does not count intra-string color changes) |
| 315 | ddgr_color grtext_GetColor() { return Grtext_color; } |
no outgoing calls
no test coverage detected