Commit Graph
215 Commits
Author SHA1 Message Date
Torbjörn Andersson 2867f9715b SCUMM: Minor Indy 3 Mac GUI cleanups from bluegr's review
I take it as a good sign that this is the only feedback so far. :-)
2023-10-16 17:40:29 +02:00
Torbjörn Andersson c6d1a256ef SCUMM: Moved Mac Indy 3 GUI into its own class
This is still just a mock-up, and a bad one at that. It will all be for
nought unless I can figure out how to wire up these buttons to the SCUMM
verbs.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson babcb19088 SCUMM: Update Indy 3 verb drawing for the latest Mac font changes 2023-10-16 17:40:29 +02:00
Torbjörn Andersson 73101d6aab SCUMM: Draw Indy 3 Mac outline font filled, and closer together 2023-10-16 17:40:29 +02:00
Torbjörn Andersson 1d154df781 SCUMM: Use Geneva for Indy 3 Mac GUI
Font rendering is broken at the moment. I have to figure out if it's a
problem with my code, or with the Mac Font class.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 70d15976fe SCUMM: Convert CharsetRendererMac to use MacFontManager
This will make it much easier to use the system fonts with bold and/or
outline, which Last Crusade will need.
2023-10-16 17:40:29 +02:00
Vladimir Serbinenko b06893a692 SCUMM: Support extracting resources from macbinary 2023-05-10 22:44:04 +02:00
Vladimir Serbinenko 95bddb7e5b SCUMM: Add negative spacing for Japanese mac atlantis
This is like what the original does
2023-05-10 13:18:20 +02:00
Vladimir Serbinenko 008ffc4eca SCUMM: Fix Mojibake in Japanese Macintosh Atlantis
Resulting rendering still uses wrong spacing but at least it's now readable
2023-05-10 13:18:20 +02:00
Vladimir Serbinenko 61c9683c70 SCUMM: Rename bytesPerPixel to bitsPerPixel in font
Its values make no sense for bytes per pixel but do for bits per pixel
The actual code is unchanged, it's a pure rename
2023-05-10 13:18:20 +02:00
AndywinXp 182ce944a5 SCUMM: MI1 (Sega CD): Implement correct text centering routine
...this was painful to research. Check the comment on string.cpp for a detailed
explaination on how text centering supposedly works on this particular version.
This fixes the biggest issue of #10447, but there are still things left to do about it.
2023-02-19 20:23:07 +01:00
AndywinXp 0ca53d1a05 SCUMM: MI1 (SegaCD): Fix a part of bug #10447
This gives the JAP text a black background, like the original, and corrects the
line spacing when string wrapping occurs. The only thing remaining should be
fixing the string wrapping method, which seems to be different from the v5 one.
2023-02-11 11:36:01 +01:00
AndywinXp 81cee05840 SCUMM: Fix missable termination condition on strings parsing 2022-11-28 23:21:45 +01:00
Torbjörn Andersson bf0ecd47ff SCUMM: Implement message boxes for Mac Loom and Last Crusade
I'm committing this as is, while leaving final integration to someone
else. Note that this doesn't really replicate the original Mac GUI (e.g.
the quit dialog is nothing like the original), but at least the pause
dialog looks right. And that's what matters to me.
2022-11-28 23:21:45 +01:00
athrxx 64a93af9ab SCUMM: fix bug no. 13935
("FT: buffer-overflow during ending credits")
2022-11-18 01:09:43 +01:00
sluicebox 2775987cba MACGUI: Expose font families in MacFontManager
MacFontManager didn't have a mechanism to report which fonts it loaded
from an external resource. It also requires that any fonts that aren't
built-in be explicitly registered by name by the client before they can
be used. This combination meant that a client couldn't load fonts from
an external file and use them by their properties (id / size / style).

SCI contains Mac fonts in its executable along with a table that maps
each SCI font id to a Mac font id and size. The font name isn't a part
of this since the Classic Mac Toolbox API took id / size / style as
input when drawing text.

Now MacFontManager exposes the font families it has loaded along with
their names. This allows a client to see which fonts were loaded,
register them by name, and proceed to use them with the existing API.
2022-11-06 23:05:20 -08:00
Le Philousophe 137b51d7ac SCUMM: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Donovan Watteau 0e81058cc7 SCUMM: Don't print unprintable chars in warnings and errors 2022-10-16 22:27:58 +03:00
athrxx 221f9c955f SCUMM: cleanup b4185bdf
Extend change to the versions to which it applies and update comment.
2022-08-15 23:11:54 +02:00
athrxx b4185bdf60 SCUMM: (LOOM/EGA) - fix bug 13763 (Inaccurate text position)
I am going to clean this up a bit after confirming the behavior of the other v1-3 games. I bet that it it is the same thing (only that it probably doesn't matter, due to the text display being restricted to the top of the screen and the verb screen).
2022-08-15 01:06:19 +02:00
athrxx 4248e22cbf SCUMM: (MI1/FM-TOWNS) - fix bug no. 13735
("Inaccurate verb rendering in Monkey 1 FM-TOWNS)"

Actually, this is rather an emulation of an original bug than a fix...

I have also included a fix in the charset renderer that I noticed, but I don't think that one actually matters anywhere.

I haven't added a fix for exisiting saves. It would require another version bump and it is really not important enough.
2022-08-03 17:03:25 +02:00
athrxx 33c2631290 SCUMM: (V2) - improve CGA and Hercules modes
Should be pixel-perfect now.
This change is only about SCUMM2 (ZAK/MM).
2022-07-15 15:40:16 +02:00
athrxx 97fbe867cb SCUMM: (MMv1/ZAKv1) - add support for CGA, CGA Composite and Hercules modes
This does not improve anything about these modes for v2 and v3, except:
- brighter CGA colors
- v2 will also get the more accurate Hercules mouse cursor

I will do improve v2/v3 as separate tasks. v3 seems to be mostly fine, anyway, except for the actors (we dither them just like the backgrounds, but that looks different in DOSBox).
2022-07-10 01:04:38 +02:00
Eugene Sandulenko b49a5d8866 SCUMM: Fix clashing overridden methods 2022-05-29 17:22:47 +02:00
Orgad Shaneh 4034ab2335 SCUMM: Use true/false for bool member 2022-05-15 13:11:47 +03:00
Andrea Boscarino 47270487b6 SCUMM: Implement correct behavior for old style text overflow 2022-04-08 19:53:44 +02:00
Andrea Boscarino 5963241222 SCUMM: FT: Fix text bugs 2022-04-08 19:53:44 +02:00
athrxx dcae67025e SCUMM: fix build 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 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 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 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
athrxx 7fe7b30459 SCUMM: (SCUMM5/FM-Towns) - minor cleanup 2022-04-08 19:53:44 +02:00
Andrea Boscarino 51394cc7bb SCUMM: COMI: Clean up code and separate SCUMM v7-8 code from v6 2022-04-08 19:53:44 +02:00
Andrea Boscarino 359a9718e7 SCUMM: COMI: Fix string wrapping when wrap flag is active 2022-04-08 19:53:44 +02:00
Torbjörn Andersson b66e84d57a SCUMM: Change "Use correct font spacing" to a game-specific enhancement
It doesn't make much sense to keep this as a separate option, when
fixing the font spacing is an enhancement specifically for the Mac
version of Indiana Jones and the Last Crusade.
2022-03-23 15:23:10 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh ed5489929c SCUMM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
trembyle 6e1135ee8a ENGINES: Revise language constants to ISO standards
* Use ISO-3166 country codes and ISO-639 language codes
2021-11-11 12:06:15 +01:00
Alexandre Detiste 6044504762 JANITORIAL: typos
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
Torbjörn Andersson 63a83d7eaa SCUMM: Warn on unhandled escape sequences in Mac font renderer
This should, of course, never happen.
2021-10-19 19:24:31 +02:00
Torbjörn Andersson 11bf8833df SCUMM: Add setting for correct font spacing in Indy 3 Mac
For all the purists out there (I know there is at least one), the
default behavior is to try and emulate the original's slightly broken
font spacing. Even though I prefer correct spacing myself.
2021-10-19 19:24:31 +02:00
Torbjörn Andersson a67958a71f SCUMM: Implement the incorrect character spacing used in Indy 3 Mac
This is more guesswork, but seems to match the original for where I've
tried it. Next step is to implement an option to use the correct spacing
instead since it arguably looks better.
2021-10-19 19:24:31 +02:00
Torbjörn Andersson e81a016699 SCUMM: Move COMI getStringWidth() to CharsetRendererNut
As far as I know, that's the only game that uses the Nut charset
renderer.
2021-10-19 19:24:31 +02:00
Torbjörn Andersson c3ce996275 SCUMM: Add braces to empty loop
It's mandatory in our code formatting conventions.
2021-10-19 19:24:31 +02:00
Torbjörn Andersson 4cf42c6dac SCUMM: Center text better in Mac Loom (bug #12984)
Measure the whole string before dividing the length by 2 to get the
low-res width of the string. Before, each character width was divided
which led to rounding errors. The result is better, but not pixel
perfect. I'm not sure what I'm still getting wrong.
2021-10-19 19:24:31 +02:00
Torbjörn Andersson c2354dc862 SCUMM: Position text better in Indy 3 Mac (bug #12983)
The text positioning seemed to be correct in all cases I checked (which
admittedly weren't all of them). The original spaces characters
differently, but I would say that the original does it wrong. I typed
the same text in ResEdit, and it came out the way ScummVM draws it.

I see no reason for being that bug compatible with the original.
2021-10-13 08:16:08 +02:00
Torbjörn Andersson d3de644b62 SCUMM: Space lines in Indy 3 text boxes like the original (bug #12983)
I didn't think anyone would notice that the lines of the Indy 3 text
boxes were spaced slightly differently in ScummVM than in the original.
I realized it wouldn't be as tricky as first thought to fix that, though
I may clean it up a bit later.

This fixes a tiny part of bug #12983.
2021-10-12 20:14:08 +02:00
athrxx bfd8c8ed8c SCUMM: whitespace 2021-08-16 18:29:47 +02:00