sets the font for text
| 385 | |
| 386 | // sets the font for text |
| 387 | void grtext_SetFont(int font_handle) { |
| 388 | struct { |
| 389 | char op; |
| 390 | int handle; |
| 391 | } cmd; |
| 392 | |
| 393 | ASSERT((Grtext_ptr + sizeof(cmd)) < GRTEXT_BUFLEN); |
| 394 | cmd.op = GRTEXTOP_SETFONT; |
| 395 | cmd.handle = font_handle; |
| 396 | Grtext_font = cmd.handle; |
| 397 | Grtext_spacing = 1 + grfont_GetTracking(Grtext_font); |
| 398 | |
| 399 | memcpy(&Grtext_buffer[Grtext_ptr], &cmd, sizeof(cmd)); |
| 400 | Grtext_ptr += sizeof(cmd); |
| 401 | } |
| 402 | |
| 403 | // puts a formatted string in the text buffer |
| 404 | void grtext_Printf(int x, int y, const char *fmt, ...) { |
no test coverage detected