OpenDream
OpenDream copied to clipboard
Fixes several bugs with string macros, implements all pronoun/article ones

Summary
This is a big fat redesign of how we handle string formatting.
Previously, we used to do formatting by sending two UTF16 characters, a 0x00FF and then another one to indicate the use of the interpolated value.
This has been refactored and replaced with StringFormatEncoder and its various helper procs and enums. We now (in parity with DM, at least for the first byte) emit 0xFFxx, with the bottom byte denoting the use of the format byte.
Doing this allowed me to implement \the, \The, \A, \an, \himself, and a bunch of other articles and pronouns.
Changelog
- All of the article and pronoun text macros (\He, \the, \himself, etc. ) are now implemented.
- The Compiler now correctly throws if text macros are missing an interpolated value to depend on.
- The Compiler now gives a descriptive error if the user attempts to use the (ambiguous) \her or \Her text macros.
- The Compiler now is lenient in some cases towards accidental capitalization of lowercase text macros.
- Added explicit unimplemented warning for \th and \s text macros.
- Fixed, probably, several bugs with string formatting.