| 3 | namespace dvl { |
| 4 | |
| 5 | std::size_t GetArtStrWidth(const char *str, std::size_t size) |
| 6 | { |
| 7 | int strWidth = 0; |
| 8 | |
| 9 | for (size_t i = 0, n = strlen(str); i < n; i++) { |
| 10 | BYTE w = FontTables[size][*(BYTE *)&str[i] + 2]; |
| 11 | if (w) |
| 12 | strWidth += w; |
| 13 | else |
| 14 | strWidth += FontTables[size][0]; |
| 15 | } |
| 16 | |
| 17 | return strWidth; |
| 18 | } |
| 19 | |
| 20 | void WordWrapArtStr(char *text, std::size_t width) |
| 21 | { |
no outgoing calls
no test coverage detected