Commit Graph
234 Commits
Author SHA1 Message Date
Torbjörn Andersson fb2bd1166d SCUMM: Split up gfx_mac.cpp into new macgui directory
The Mac GUI code is getting unwieldy, and this is an attempt at breaking
it up into more manageable chunks.
2023-12-22 15:09:06 +01:00
AndywinXp bd22763cdc SCUMM: MACGUI: Implement correct video size for Mac v3 games
This commit brings games to 640x480 (from 640x400).
All old savegames are compatible and are brought up to date in
real time.
2023-12-03 21:03:59 +01:00
Torbjörn Andersson 6848116b9c SCUMM: Remove unnecessary calls to mac_drawIndy3TextBox() 2023-11-23 15:23:20 +01:00
Torbjörn Andersson 2935f247c3 SCUMM: Add Mac GUI slider widget
This is the first, and so far only, widget that doesn't correspond
directly to a single dialog item. Instead, it combines two picture
widgets (which are made invisible to keep them out of the way), neatly
solving my problem with keeping track of the background under the slider
handle.

Also rewrote the Mac dialog event loop for better accuracy (it is now
possible to click and hold down the mouse over a widget, move the mouse
out of it, and then move it back it again), and - hopefully - improved
flexibility.

Plus some other minor cleanups along the way.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson 5f51200454 SCUMM: Move Indy 3 Mac text box drawing into MacIndy3Gui 2023-11-18 18:47:39 +01:00
Torbjörn Andersson ec1ab82283 SCUMM: Initial work on a common MacGui class that handles Mac menus etc.
This will be used for Last Crusade and Loom. Loom is currently the more
broken of the two, though.
2023-11-18 18:47:39 +01:00
AndywinXp ad2542a922 SCUMM: INDY4 (DOS/Mac Jap): Implement horizontal scrolling bar for long strings in dialog choices
This should be the last thing missing for our complete support of this version.
2023-11-12 21:00:12 +01:00
AndywinXp a7cf349bf8 SCUMM: MI1 (SegaCD JAP)/INDY4 (DOS/Mac Jap): Fix multline text rendering
My intuition for MI1 Jap was correct, but the code had to be moved elsewhere.
This as a bonus finally yields pixel perfect positioning for text for INDY4 as well.
2023-11-12 15:57:19 +01:00
AndywinXp 82818aa260 SCUMM: HE: Fix trailing spaces behavior in savegame strings
Taken from disasm.
2023-11-12 11:25:36 +01:00
AndywinXp 7758097918 SCUMM: Fix Japanese strings handling for all platforms
This fixes some nasty text rendering issues in MI1 SegaCD and
INDY4 DOS/Mac Japanese versions, in which 2-byte characters
treated as separate one byte characters, and therefore any '@'
character would be treated as an escape char.
2023-11-11 21:35:43 +01:00
AndywinXp 8461f25218 SCUMM: Rename enhancementClassActive to enhancementEnabled 2023-11-08 11:46:06 +01:00
AndywinXp d5fa7aeb90 SCUMM: Mark all enhancements with their respective classes 2023-11-08 11:46:06 +01:00
Torbjörn Andersson 44b7558756 SCUMM: Remove Indy 3 Mac hacks that are no longer needed 2023-10-16 17:40:29 +02:00
AndywinXp 6da4114418 SCUMM: HE (Sound): Fix subtitles behaviour 2023-08-18 22:20:45 +02:00
AndywinXp d6812afea7 SCUMM: HE: Remove leftover comment 2023-08-18 22:20:45 +02:00
AndywinXp 26b6a9d6ef SCUMM: HE (Sound): Reimplement support for Lokalizator.big files 2023-08-18 22:20:45 +02:00
AndywinXp 815e280da4 SCUMM: HE (Sound): Implement software mixer for all the other games
Sound now appears to play correctly for all HE games.
2023-08-18 22:20:45 +02:00
AndywinXp 9f89e3e823 SCUMM: HE (Sound): Finish wiring up high level functions
Everything is wired up... except the mixer, hence no sound.
2023-08-18 22:20:45 +02:00
AndywinXp f4455e773e SCUMM: Relabel part of the general sound code
Albeit not 100% necessary for rewriting the HE sound engine,
I decided to make this change in order to:
- Give proper meaning to magic numbers and variables
  which were given temporary names 20 years ago;
- Avoid going insane when making comparison with HE code
  and ours, when rewriting the sound code.
2023-08-18 22:20:45 +02:00
Vladimir Serbinenko b06893a692 SCUMM: Support extracting resources from macbinary 2023-05-10 22:44:04 +02:00
AndywinXp ac506478d9 SCUMM: Fix string wrapping regression caused by Sega CD changes 2023-02-26 15:11:01 +01: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 cb411b2086 SCUMM: MI1 (Sega CD): Fix calculation of dialog line height for JAP version 2023-02-13 00:47:51 +01:00
AndywinXp 1f66e31f3a SCUMM: MI1 (Sega CD): Implement correct dialog text clipping
The text has to be clipped not only from the left, but also from the right.
2023-02-13 00:16:12 +01:00
AndywinXp 3aed077c74 SCUMM: MI1 (Sega CD): Fix text clipping for ENG version
The Jap version still has several quirks which I have to implement.
Still a good start though :)
2023-02-11 17:23:05 +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
Donovan Watteau c131f1241c SCUMM: Make German Sam & Max WORKAROUND for Trac#12249 an enhancement
This comes from an original script error in this release, and so its fix
qualifies as an enhancement.
2023-01-17 19:37:17 +01:00
AndywinXp 81cee05840 SCUMM: Fix missable termination condition on strings parsing 2022-11-28 23:21:45 +01:00
AndywinXp 13e7c9d4d9 SCUMM: Implement basic support for v0-3 GUI 2022-11-28 23:21:45 +01:00
Le Philousophe 137b51d7ac SCUMM: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Le Philousophe f564ffc12f SCUMM: Don't use unsafe strcat and strcpy 2022-10-23 22:46:19 +02:00
BLooperZ 11ec68fda5 SCUMM: HE: support BiDi in hebrew fan translations 2022-09-29 20:46:55 +02:00
AndywinXp 58fb91e1bd SCUMM: COMI: Fix mishandling of control characters
This fixes the appearence of the debug message "Machine rating is "
2022-09-14 22:27:31 +02:00
AndywinXp 880c78b023 SCUMM: GUI: Implement v4 GUI and menu 2022-09-08 19:10:42 +02:00
AndywinXp 2417448791 SCUMM: Change _defaultTalkDelay to _defaultTextSpeed
From now on we're reasoning in terms of text speed, just like the interpreter does,
which means: delay == 9 - speed.
This allows us to sync the internal GUI and the ScummVM GUI more easily, and
allows for a better correspondence to the original interpreters.
2022-09-08 19:10:42 +02:00
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