Skip to content
Snippets Groups Projects
Commit 38814c47 authored by DarkGod's avatar DarkGod
Browse files

Merge branch 'colored_strings' into 'master'

Many a fix to colored string rendering.

Problems found and obliterated:
* drawColorString and drawColorStringBlended were the same. Now they correctly alias one another instead of being letter-to-letter copies. (And they were, I swear.)
* drawColorString used LPEG and Font.size, which also used LPEG. This resulted in extreme double LPEGging of every word. See below.
* drawColorString was word-to-word tstring.drawOnSurface except less powerful and with return value. So I expressed the former in terms of the latter. This also fixed aforementioned problem with using Font.size.
* the same LPEG expressions were used in drawColorString, Font.size, and string.toTString. Now everything uses tstrings.
* TStrings now cache results parsed from strings, so functions that accept fancy strings don't choke parsing them every time. Let me say, this helps.
Results: tremendously improved performance on low-end machines.
parents 887a26e8 a2b52e8c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment