Commit graph

35 commits

Author SHA1 Message Date
athrxx
69c7559bf0 SCUMM: fix bug no. 13965
("Crash with Japanese version of The Dig")
2022-12-10 18:07:55 +01:00
AndywinXp
2fa3484f5e SCUMM: FT: Fix string rendering for tall characters
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.
2022-11-11 17:15:13 +01:00
AndywinXp
c4a317f616 SCUMM: COMI: Fix crash caused by a regression in string_v7.cpp 2022-09-28 23:10:15 +02:00
AndywinXp
72463db407 SCUMM: COMI: Fix texts rarely not clearing up after overrides
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.
2022-09-27 00:09:46 +02:00
BLooperZ
99e213be1f SCUMM: GUI: remove forced alignment 2022-09-18 22:06:41 +02:00
athrxx
71f73fd8ae SCUMM: (GUI) - modify dialogs for CJK font support
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.
2022-09-08 19:10:42 +02:00
athrxx
fc3845a593 SCUMM: (COMI/CJK) - fix font glitch
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.
2022-08-07 22:39:39 +02:00
AndywinXp
2c9d7fd2ee SCUMM: COMI: Change how blastObject rects are restored for v8
This fixes the last remaining graphical glitches pertaining the original GUI
2022-08-06 13:33:56 +02:00
AndywinXp
ced78b19d5 SCUMM: COMI: Fix some more text/GUI rendering glitches 2022-08-06 13:33:56 +02:00
AndywinXp
7fea664d20 SCUMM: COMI: Fix screen restoring in some edge cases 2022-08-06 13:33:56 +02:00
AndywinXp
fabaeb4b83 SCUMM: COMI: Implement original GUI 2022-08-06 13:33:56 +02:00
AndywinXp
8fffd48ed1 SCUMM: v7-8: Apply e94d467 only for non-_newStyle text rendering 2022-07-17 14:57:57 +02:00
AndywinXp
e94d467c5b SCUMM: v7-8: Make blastText rect taller by one pixel
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).
2022-07-17 14:39:24 +02:00
Eugene Sandulenko
b49a5d8866
SCUMM: Fix clashing overridden methods 2022-05-29 17:22:47 +02:00
Andrea Boscarino
755ba94486 SCUMM: Remove no-op statements 2022-04-08 19:53:44 +02:00
Andrea Boscarino
bab5ff89b4 SCUMM: Remove empty line 2022-04-08 19:53:44 +02:00
Andrea Boscarino
1408d6f7e3 SCUMM: FT: Fix missing _talkDelay setup 2022-04-08 19:53:44 +02:00
Andrea Boscarino
47270487b6 SCUMM: Implement correct behavior for old style text overflow 2022-04-08 19:53:44 +02:00
Andrea Boscarino
bd21f18d0c SCUMM: DIG (demo): Improve text accuracy
This is done just by adapting everything FT does to DIG demo, since they share the same exact code
2022-04-08 19:53:44 +02:00
Andrea Boscarino
9468d24958 SCUMM: FT/DIG: Fix line spacing accuracy 2022-04-08 19:53:44 +02:00
Andrea Boscarino
9f2e0f6d45 SCUMM: Clean up test assertions 2022-04-08 19:53:44 +02:00
Andrea Boscarino
31fca3be6d SCUMM: FT: Fix crash related to text handling 2022-04-08 19:53:44 +02:00
Andrea Boscarino
ede23b4a5e SCUMM: DIG (demo): Fix crash caused by unhandled escape codes 2022-04-08 19:53:44 +02:00
Andrea Boscarino
5963241222 SCUMM: FT: Fix text bugs 2022-04-08 19:53:44 +02:00
Andrea Boscarino
ba0cbd2dc8 SCUMM: add support for FT with the new text handling 2022-04-08 19:53:44 +02:00
athrxx
2e249f1d00 SCUMM: (SCUMM7/8) - reduce deprecated code
- remove version7/8 clauses from code parts that these versions no longer use
- also fix typo/bug (semicolon after if clause)
2022-04-08 19:53:44 +02:00
athrxx
acb665c109 SCUMM: (SCUMM7/8) - cleanup (text) verb drawing and Hebrew right-to-left drawing
(SCUMM7/8 only)
2022-04-08 19:53:44 +02:00
athrxx
d9ca128863 SCUMM: (SCUMM7/8) - implement right alignment flag for text
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...
2022-04-08 19:53:44 +02:00
athrxx
de4513cdff SCUMM: (SCUMM7/8) - implement original text formatting flags for more flexibility 2022-04-08 19:53:44 +02:00
athrxx
997e2c4b05 SCUMM: (SCUMM7/8) - cleanup
- remove outdated code
- move things from V6 to V7
2022-04-08 19:53:44 +02:00
athrxx
78835f0318 SCUMM: (SCUMM7/8) - start cleaning up text verb drawing
(this commit actually makes more of a mess than it cleans up anything and it also kills Hebrew, but it's easier for me not to squash this)
2022-04-08 19:53:44 +02:00
athrxx
f5f49d1b3f SCUMM: (SCUMM7/8) - improve ingame text wrapping and positioning for DIG and COMI
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...
2022-04-08 19:53:44 +02:00
athrxx
37e58e8420 SCUMM: (SCUMM7/8) - minor fix to string escape code handling
(the old values do not get restored)
2022-04-08 19:53:44 +02:00
athrxx
0256e92c25 SCUMM: (SCUMM7/8) - reorganize font rendering - second part
- 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.
2022-04-08 19:53:44 +02:00
athrxx
1f56132725 SCUMM: (SCUMM7/8) - reorganize font rendering - first part
(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...
2022-04-08 19:53:44 +02:00