Commit Graph
237 Commits
Author SHA1 Message Date
Le Philousophe 17f09bb48c SCUMM: Migrate engine to Path 2023-12-24 13:19:25 +01:00
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
AndywinXp 98df6023f5 SCUMM: Update support for Korean FM-Towns fan translations
From british-choi ScummVM fork
2023-12-02 11:17:44 +01:00
Torbjörn Andersson 956f24294b SCUMM: Remove redundant checks, pointed out by sluicebox 2023-11-23 08:44:45 +01:00
Torbjörn Andersson 3cad2d6af3 SCUMM: Guard against bad font IDs in Mac charset renderer
I don't know if this can happen with savegames from any released version
of ScummVM, or if it's just my savegames while working on the Mac GUI.
But let's err on the side of caution and remap bad font IDs to the
sensible default font.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson 26b5c50195 SCUMM: Clean up Mac GUI things, and plug a few memory leaks
I've also added hard-coded button corners for the smaller buttons. It's
still a hack, but a useful one.
2023-11-18 18:47:39 +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 077b331a8a SCUMM: Fix crash in Macintosh black-and-white mode
It was trying to figure out the size of the largest glyph, but there is
now only one font to consider.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson 3a7593a8c7 SCUMM: Mac GUI restructuring
My goal right now is to move all font drawing that isn't explicitly
handled by scripts into the Mac GUI. The Indy 3 speech boxes will
probably be moved into the Mac GUI as well, since they're a bit special.
This means the charset class will only have to keep track of the game
font, which will remove some odd special cases.
2023-11-18 18:47:39 +01:00
AndywinXp 1b40a6c932 SCUMM: MI1 (SegaCD Jap): Fix remaining text rendering issues
These include:
- Stray "-" characters (actually, "_") in dialogues
- Graphical glitches when scrolling dialog choices horizontally

With this commit we finally close issue #10447
2023-11-13 10:17:55 +01:00
AndywinXp 6341222419 SCUMM: INDY4 (DOS/Mac Jap): Disable drawing for hidden character 2023-11-12 20:03:58 +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 003be954ea SCUMM: INDY4 (DOS/Mac Jap): Fix verb text height, kerning and banner text positioning 2023-11-12 14:39:46 +01:00
AndywinXp 9505e3b905 SCUMM: INDY4 (DOS/Mac Jap): Fix fontHeight for Jap charset
Taken from disasm.
2023-11-12 11:26:19 +01:00
AndywinXp c128cf9848 SCUMM: INDY4 (DOS/Mac Jap): Implement accurate Jap horizontal font kerning
As usual, taken from disasm. There is also vertical kerning to be
considered, but I will tackle that at a later date.
2023-11-10 18:42:38 +01:00
AndywinXp 73988683f2 SCUMM: INDY4 (DOS/Mac Jap): Implement accurate character shading
This is taken from disasm.
2023-11-10 16:34:33 +01:00
AndywinXp 8461f25218 SCUMM: Rename enhancementClassActive to enhancementEnabled 2023-11-08 11:46:06 +01:00
AndywinXp e7f4f25881 SCUMM: Clean-up and explain enhancement classes 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
AndywinXp 4e081dde81 SCUMM: INDY4 (DOS/V): Fix crashes related to charset rendering
The text is still not accurate, but at least it doesn't crash...
2023-11-08 00:21:32 +01:00
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