Commit Graph
199 Commits
Author SHA1 Message Date
AndywinXp d1b73e1ffe SCUMM: GUI: Add functional main GUI banners for v5-6-7 2022-09-08 19:10:42 +02:00
athrxx 3d39d206ee SCUMM: replace strcpy calls with Common::strlcpy
This replaces every single strcpy call in the engine with
Common::strlcpy.

Some of these might cases seem a bit pointless, but it is
supposed to discourage future use of strcpy. If people don't
see a single occasion of it they might think twice before they
use it...
2022-08-27 13:08:38 +03:00
athrxx c6e8f6494b SCUMM: (v1-3) - improve pause/restart/quit string handling
The recent PR 4204 made me aware of some things I had kind of tried to ignore when I updated these dialogs for CJK font support.

Currently, the language for the pause/restart/quit messages is tied to the GUI/launcher language and the translation manager is used to translate the. E. g., if you start the French version of MM or ZAK and have a launcher language setting of English, you will get the English pause/restart/quit messages. If you set the launcher language to French you will get it the French ones. Also, the encodings from the translation manager aren't compatible with the game string encodings (mostly solved by PR 4204, though).

This commit now gets rid of any translation manager use here. Instead, we tie the translations for these messages to the game language.

I have included all strings for the v1/v2 language variants I found in the detection table.

I am interested in having the exact original messages here. However, I have only inserted them from the English interpreters, since those are all I have. For the other languages, for the time being, I have just used the texts from the translation manager and reencoded those with codepage 850. So, if anyone has access to an original v1/v2 interpreter in French, Italian, German, Spanish, Russian or Swedish, he/she might want to extract and replace the strings here with the correct ones...
2022-08-18 02:17:42 +02:00
Donovan Watteau 9e01a7dd21 SCUMM: Use CP850 (or Windows-1252) in dialogs for some European languages
Not 100% correct, since LEC used an incomplete, tweaked and variable
internal code page that's just based on CP850, but it should still be
an improvement.
2022-08-17 19:04:04 +02:00
BLooperZ 2af18f7a91 SCUMM: MONKEY2: align library cards to the right 2022-08-14 22:41:50 +03:00
BLooperZ 20813133ab SCUMM: MONKEY2: fix BiDi in multi-line dialogue interpolation 2022-08-14 22:16:15 +03:00
athrxx 692685bb40 SCUMM: extend fix 36a5571 to all v4 targets
(the code for the calculation of the y pos seems to be exactly the same)
2022-08-07 18:57:04 +02:00
athrxx 36a5571170 SCUMM: (MI1 - EGA/VGA) - fix bug no. 13762 (Inaccurate text position)
This concerns only the vertical positioning, not the wrapping. Currently, I have limited it to MI1 EGA and VGA.
2022-08-07 18:22:52 +02:00
Orgad Shaneh 5809c34120 SCUMM: Fix past-buffer read on fakeBidiString
fakeBidiString accepts an argument named ignoreVerb. When it is set, we do
not reverse the current section at this point (only these 2 characters are
swapped, so that they'll be swapped back when reversing everything at once
afterwards).

But the condition above covers also end of string *current == 0 along with
the control characters, so on this case, the function still looked for the
newline character past the string buffer. On some cases, a previous string
that was written on the same buffer (the buffer is reused for every string
in the engine), can have newline exactly at this point, and we applied the
same logic, and swapped the newline with 0, which eventually resulted with
some garbled text from the previous buffer.

Fix by excluding end of buffer for this condition.
2022-07-28 11:51:58 +03:00
Orgad Shaneh 864b467046 SCUMM: Fix RTL display for verbs with indirection on MI2
For example: 07 FF 07 21 00

The first 07 is the skull, then ff 07 21 appends the verb referenced in
variable 33. If this verb contains control characters, the result is
something like "07 FF 0A 0F 29 ... Some text".

Now, the bidi algorithm *doesn't* skip all the initial control characters
(they are skipped later in the loop), and it only reverses the text, but
the 07 remains in the beginning. The result is 07 FF 0A 0F 29 ... txet emoS

Use a similar technique like was done for INDY4 - Skip the initial 07
character, then append it in the end, and replace the original one with a
space. This gives 32 FF 0A 0F 29 ... txet emoS 07.
2022-07-27 00:25:47 +03:00
Donovan Watteau be6252396e SCUMM: Fix some misattributed lines when speaking to Evelyn Morrison in Sam & Max
In some versions of Sam & Max, such as the French and German releases,
talking to Evelyn Morrison while wearing the bigfoot costume will
attach some lines to Max even though Sam's voice is used there.
2022-07-26 21:18:22 +03:00
Orgad Shaneh edb3fdfca5 SCUMM: Fix RTL indentation for charset 4 on Monkey Island 2 2022-07-25 22:24:39 +03:00
ShaharAriel fe642720d8 SCUMM: Add RTL support for MM
This add MM to existing fixes of RTL support
2022-05-15 16:26:04 +03:00
Orgad Shaneh 0e2ddd6899 SCUMM: Centralize RTL support condition
Store it in a member instead of duplicating the condition.
2022-05-15 02:48:46 +03:00
Torbjörn Andersson 6d8eba977d SCUMM: Adjust timings for Italian Sam & Max Floppy intro.
This version uses English speech, and doesn't need the workaround for
the fight animation speeds. But several lines still had to be re-timed.
2022-04-21 11:22:26 +02:00
Torbjörn Andersson 5280abc4d7 SCUMM: Adjust timings for French Sam & Max Floppy intro
These timings were provided by dwatteau, and not a moment too soon. I'm
getting thoroughly sick and tired of watching the intro over and over!
2022-04-21 11:22:26 +02:00
Torbjörn Andersson 8cedcb3901 SCUMM: Adjust timings for German Sam & Max Floppy intro. (Bug #13378)
The floppy intro uses different actors for Sam and Max themselves. There
is no need to slow down Sam's animation while Max beats up the
scientist, and the timing adjustments had to be re-done. The rest of the
workarounds from the CD version still apply.
2022-04-21 11:22:26 +02:00
Torbjörn Andersson b1c8ca11be SCUMM: Adjust timings for Spanish Sam & Max intro. 2022-04-21 11:22:26 +02:00
Torbjörn Andersson aeb1a9c339 SCUMM: Adjust timings for English Sam & Max intro. 2022-04-21 11:22:26 +02:00
Torbjörn Andersson 8ec3b93160 SCUMM: Adjust timings for French Sam & Max CD intro.
The Floppy version uses different actors.
2022-04-21 11:22:26 +02:00
Torbjörn Andersson 127976b510 SCUMM: Adjust timings for Italian Sam & Max intro. 2022-04-21 11:22:26 +02:00
Torbjörn Andersson 54fd5caac8 SCUMM: Adjust timings for German Sam & Max intro. (Bug #13378) 2022-04-21 11:22:26 +02:00
Andrea Boscarino c312cf8e7e SCUMM: FT (demo): Handle escape sequence 3 properly 2022-04-08 19:53:44 +02:00
Andrea Boscarino 69022c5060 SCUMM: DIG (demo): Fix escape code 3 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 997e2c4b05 SCUMM: (SCUMM7/8) - cleanup
- remove outdated code
- move things from V6 to V7
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 05980ff294 SCUMM: remove unneeded function 2022-04-08 19:53:44 +02:00
Andrea Boscarino d1764b52d0 SCUMM: COMI: Fix an oversight in enqueueText() 2022-04-08 19:53:44 +02:00
Andrea Boscarino addf810b9d SCUMM: Use getStringHeight() in v7-8 CHARSET_1() for pixel-perfect wrapping 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 cb561f462e SCUMM: Read the "enable_enhancements" setting only once
I can't change during gameplay, it's shorter to type, and we won't
accidentally involve the config manater in some tight loop.
2022-03-23 15:23:10 +01:00
Torbjörn Andersson 20f9997300 SCUMM: Make MI2 Guybrush dialog when getting Rapp's map optional 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 206e96bad8 SCUMM: Fix RTL indentation for multiline verbs 2021-12-14 22:15:45 +02:00
Andrea Boscarino f731cfd648 SCUMM: DiMUSE: New Digital iMUSE Engine (#3368)
SCUMM: DiMUSE: Add new implementation of the engine
2021-11-16 00:05:18 +01:00
Orgad Shaneh ed5489929c SCUMM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
trembyle c740f96f63 COMMON: Normalize and document language maintenance
* Add documentation to add or maintain language values
* Fix and reorder existing entries to match ISO standards
2021-11-11 12:06:15 +01:00
Ben Castricum d4cef0e3ad SCUMM: Use correct variable for current room 2021-10-24 19:49:19 +03:00
Ben Castricum c8dadd413d SCUMM: SAMNMAX - Add missing actor animation in German floppy version too 2021-10-24 16:14:05 +03:00
Ben Castricum dc5a8de28a SCUMM: SAMNMAX - Add Missing actor animation in German CD version, fixes bug #12249
for details, see bugreport.

I tested all the other CD versions from GOG as well, but the German version
seems to be to only one missing the animation.
2021-10-24 00:01:24 +03:00
athrxx 48fb15812d SCUMM: (DIG) - fix workaround for Russian version so as not to write outside the expected scope
I experienced weird string modifications while trying to improve the text code. Turns out that this workaround will kick in even for 0 length strings and will lead to values being written to "negative" (before the original dst ptr argument) offsets.
2021-09-10 18:21:41 +02:00
athrxx c1bc192abf SCUMM: (COMI) - fix vertical position of object descriptions
This is just a small hack to address bug no. 12796 ("SCUMM: COMI: Object label line printed on the wrong spot"). It tries to apply the correct fix that we already have in SmushFont::drawStringWrap() to "normal" (non-Smush) blast strings.
2021-08-15 15:48:32 +02:00
Torbjörn Andersson 81f26dd9e4 SCUMM: Workaround for bug #12734
In Monkey Island 2, after Rapp gives you his map piece it calls
script-109 to print a message about which map piece you just found.
But as soon as that message is displayed, it's erased by printing a
single space.

This wouldn't normally be much of a problem, but apparently in the
"ultimate talkie" version you will still hear the spoken line. This is
my attempt at bypassing the erasing.

I don't dare to patch the script itself, because I'm guessing all the
messages are hard-coded so it would have to recognize every
localization. Instead, it checks if a single space is printed from the
appropriate script, while there is a message pending and you are
carrying Rapp's map piece. I hope that's specific enough.
2021-07-27 20:55:05 +02:00
Orgad Shaneh 2602d0fe8e SCUMM: Fix encoding for Hebrew dialogs
Like Pause dialog.
2021-07-22 00:06:25 +03:00
Torbjörn Andersson 49b58ae946 SCUMM: Clarify Indy 3 Mac text position hack
The text positions for the books in Indy 3 Mac only need to be adjusted
when using the low-resolution font. When using the Mac font, it works as
intended without changes.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson 61dbbb2d72 SCUMM: Disable text position corrections for Indy 3 Mac in hi-res mode
The text rendering isn't pixel perfect compared to the original, but I
actually think ScummVM looks better. Maybe the original draws one
character at a time without compensating for when the character width
isn't even? That might account for text being slightly wider in the
original.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson 81ad3a9cf9 SCUMM: Honor the _keepText flag when creating the Indy 3 Mac text box
Sometimes more than one piece of text is drawn to the same box, and we
don't want to clear the old text then.
2021-06-30 14:59:55 +02:00