The disasm shows that the rendering rect for a printed blastText should be 4 pixel taller in total:
2 on top, and 2 on the bottom. This fixes issues in which taller characters (like accented letters)
triggered almost invisible graphical glitches.
This is a fix for a regression which unfortunately went unnoticed during the GUI implementation.
Since we moved stuff around in the main loop at that time, we also missed on something:
if Guybrush speaks at a certain camera position, and then ESC is pressed triggering an override,
if the override changes the camera position, the blastText rectangles will have to be updated, otherwise
we'd end up with an uncleared text on the screen. To reproduce the issue fixed here, start Part 2 and
press ESC as soon as Guybrush speaks.
This replaces the fixed vertical coordinates with coordinates based on the font
height (taken from the original CJK DIG interpreter).
It also influences the appearance of the non-CJK dialog, but not necessarily for
the worse (and the one we had is again different from the one in the original
7.3.5/7.5.0 interpreters, so there really is not one definite dialog).
There is more in this commit, like:
- clippint the save names at the end of the line
- getting rid of all sprintfs and similiar cleanup to be better in line with our
coding conventions.
It seems to affect only the GUI (but that may be random). We need to extend the string rect by 1 pixel for the left side shadow of the first character.
This solves an issue where some fonts would go out of rect and the screen update
would leak those extraneous pixels (e.g. commas of the small font during the FT credits).
The original has it, although it isn't used. It is not meant for right to left languages, it just right-aligns left-to-right texts. Since I'll only use it for Hebrew I have to upgrade it a bit...
This fixes a couple of regressions (mostly camera related). For DIG it seems that the older version of the interpreter uses CharsetRenderClassic type text display while the newer version uses COMI style. I stick with the COMI style, but with the necessary tweeks to make it pixel perfect for all versions.
COMI (I've tested English and Chinese) seemed to be pixel perfect without having to do much, same for DIG Chinese (new interpreter version). Even the verbs seem to be fine, although I haven't changed anything there yet (applies to COMI only afaik, I think DIG doesn't have text verbs).
DIG English (old interpreter version) is another matter. That one wraps text quite differently. Our version looked quite different from the original. But now it also seems to be fine. I even fixed a weirdo problem with the character width (It seems that the fonts have some kerning data; if we use that like we did the 'a' character gets displayed too narrow by 1 pixel. So all lines containing 'a' characters were slightly off). I have examined several strings in several camera settings for pixel perfect drawing in DIG and all seems good now...
FT: I'll do that separately. I haven't even checked if it needs any fixing. Maybe it is fine already. But it sure would be nice to get rid of any redundancies...
- Attach actor talk texts to the appropriate text renderer and get rid of redundant code.
- Cleanup subtitle text handling.
- Fix handling of ^codes.
- Fix more regressions from last commit.
- Correct some x/y positioning.
(inspired by PR 3276 - this here has the desired effect, but actually allows the removal of hacks, workarounds and redundancy code instead of adding more of that sort)
The purpose is to have the same accurate font rendering that we already have in the Smush code also for the ingame texts. The original interpreters draw the text like that, so this is not a weirdo invention of mine.
This is still broken. The main purpose was to get as much code done as necessary to have it at least compile again and correctly run the Smush texts.
The rest still needs quite some work...