Commit Graph
68 Commits
Author SHA1 Message Date
Scott Percival 1d3c6271b2 GRAPHICS: Move Mac gamma curve to header 2025-03-25 12:17:34 +08:00
Torbjörn Andersson 2fb626a897 SCUMM: MACGUI: Add note about Maniac Mansion GUI 2025-02-05 21:23:25 +01:00
Torbjörn Andersson 33b065bfc5 SCUMM: Add option for gamma correction
This is currently only used for Macintosh games, but I kept the name of
the setting anonymous in case we ever need gamma correction for
something else.
2025-01-23 21:42:25 +02:00
Torbjörn Andersson 4149e3da21 SCUMM: MACGUI: Eliminate some code duplication 2025-01-10 22:18:39 +01:00
Torbjörn Andersson b9ad81692c SCUMM: MACGUI: Move menu updating (disabling save etc) into subclasses
The only thing that remains in MacGuiImpl is the simplest form of
save/load disabling. Neither Loom nor Last Crusade use that, as they
have additional conditions imposed on them.
2025-01-10 07:02:38 +01:00
Torbjörn Andersson 7f5da62d58 SCUMM: MACGUI: Disable appropriate menus for v6-7 and Maniac Mansion
Unlike earlier games, these games disable the entire Edit menu rather
than just the individual items. Maniac Mansion additionally disables the
Sound menu.
2025-01-09 07:13:36 +01:00
Torbjörn Andersson 898ea4cf6e SCUMM: MACGUI: Allow playing Maniac Mansion without the Mac GUI 2025-01-08 21:45:57 +01:00
Torbjörn Andersson 08e675ce6e SCUMM: MACGUI: Disable "About" screen for Maniac Mansion.
There wasn't one in the original. Apparently Aaron Giles never made one.
2025-01-08 07:50:21 +01:00
Torbjörn Andersson c192b98799 SCUMM: MACGUI: Disable permanently disabled menu items just once
There is no need to disable menu items that are meant to stay disabled
more than once. This also adds disabling of some Maniac Mansion-specific
stuff.

Maniac Mansion seems to be running fairly well (user friendlyness issues
aside), though we need to figure out how to suppress the Mac GUI while
the game is paused. I also had it hang on me once on quit. No idea why.
2025-01-05 17:33:57 +01:00
Torbjörn Andersson 2d6e00bc37 SCUMM: MACGUI: Add support for Day of the Tentacle demo
It's non-interactive, like the DOS version, but still has menus and an
About dialog.
2025-01-02 18:00:50 +01:00
athrxx 4f31b1e4ff SCUMM: (v6/7/Mac) - sync mute setting between GMM and Mac gui
The GMM has a "mute all" checkbox, the Mac gui allows muting sfx
and music separately. This commit aims at getting these options in
sync.
2025-01-02 17:37:32 +01:00
Torbjörn Andersson 19e707ce19 GRAPHICS: Add ColorQuantizer class
This simply moves the new ColorQuantizer class out of the SCUMM engine
and into the Graphics namespace where I think it belongs. It reduces a
potentially large number of colors into a reasonable palette of the
desired size.

The SCUMM engine uses this so that the Mac versions can present the
thumbnail image (which is at least 16 bpp) stored in savegames.
2025-01-02 00:54:58 +02:00
Torbjörn Andersson 30b6acf9aa SCUMM: MACGUI: Adapted better color quantizer from Dr. Dobb's
This should be in graphics, not engines/scumm/macgui but I'm keeping it
here for now to avoid conflict, because there's been some activity in
graphics lately.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson b999d69ef4 SCUMM: MACGUI: Fix v6-7 slider widgets that don't start at 0 2025-01-01 14:41:20 +02:00
Torbjörn Andersson 16fa744d9a SCUMM: MACGUI: Implement "Resume Game"
That was easy! bringing up the Mac menu pauses the game, and "to resume
playing again, choose Resume Game from he Game menu, or simply click the
mouse somewhere away from the menubar."

Well, we don't do the latter. But doing the former is just a matter of
doing... well, nothing.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 8189e25520 SCUMM: MACGUI: Save v6-7 subtitle/voice settings from options dialog 2025-01-01 14:41:20 +02:00
Torbjörn Andersson ba6b348cf5 SCUMM: MACGUI: Word wrap static text widgets by default
This simplifies support for translated versions of v6-7 games where
apparently they sometimes kept the English texts and just added another
text on top of it.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson e848d6b3a7 SCUMM: MACGUI: Fix interval for text speed sliders
With the exception of Maniac Mansion, the Mac version apparently uses
1-9 instead of 0-9 as the text speed interval.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson e88c6fbfba SCUMM: MACGUI: Don't crash on restart if there is no restart dialog
Full Throttle and The Dig don't have one, for one thing. At the moment,
we just restart without asking. Let's see how annoying that becomes.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 10e76ae3e6 SCUMM: MACGUI: Fix Digital iMUSE volume setting. 2025-01-01 14:41:20 +02:00
Torbjörn Andersson e0b5cd8ebe SCUMM: Fix build when v7 and v8 aren't enabled 2025-01-01 14:41:20 +02:00
Torbjörn Andersson 060c751878 SCUMM: MACGUI: Add very untested code for saving most v6-7 options
We have visitors, so I'm not going to turn up the volume to verify that
the volume sliders work correctly!
2025-01-01 14:41:20 +02:00
athrxx 9c6d67b6a1 SCUMM: (SCUMM6/7/Mac) - implement sound mute menu option 2025-01-01 14:41:20 +02:00
Torbjörn Andersson 4e20519d20 SCUMM: MACGUI: Options dialog cleanup
The "spool music" checkbox for Full Throttle is disabled for now. When
implemented, it should probably be tied to the "music_mute" setting, but
that's only used for earlier games at the moment.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 5b3fc0cdf9 SCUMM: MACGUI: Use ConfMan to retrieve volume settings
I was using some mindless cut-and-paste from COMI, which uses Digital
iMUSE. That's not a guarantee here.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 528c1899d0 SCUMM: MACGUI: Populate the options dialogs with the actual settings
They are still not saved, however.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson c474edcf97 SCUMM: MACGUI: Simplify word wrapping in demo About dialogs
Now that we use \n instead of \r, the word wrapper should be able to
handle the strings just fine.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 84dc3e883d SCUMM: MACGUI: Fix About dialog for Full Throttle demo
Turns out that it has the exact same dimensions as The Dig demo.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 84f4010eba SCUMM: MACGUI: Slightly better color quantization for v6-7 thumbnails
I'm not going to go with any clever algorithm to get representative
colors, I'm just going to go with the 246 most common ones. (The
remaining 10 are reserved for the Mac GUI.)
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 8c86e4547c SCUMM: MACGUI: Fix thumbnail color quantization a bit
It's still very bad. We could do better.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson e199e1c9e5 SCUMM: MACGUI: Add thumbnail support to V6-7 open dialog. Kind of.
I mean, the color quantization is so broken it's not even funny, but it
is updating the thumbnail when the selection changes, and that's a
direct result of yesterday's dialog event loop restructuring. So I count
this as a win. Let's commit it before I break anything even worse.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 2c7b998cec SCUMM: MACGUI: Rework the dialog window event loop
Each dialog now has an event queue. The runDialog() method consumes all
ScummVM events and transforms them into dialog events. This should make
it easier to have widgets depend on each other, e.g. I want the v6-7
Open dialog to update the thumbnail picture.

This may have caused regressions, but initial tests seemed promising.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson cb5a60a791 SCUMM: MACGUI: Clarify comment a bit 2025-01-01 14:41:20 +02:00
Torbjörn Andersson c45ea28c5d SCUMM: MACGUI: Read menu IDs from MBAR resource where available
This should get rid of the last hard-coded English text for v6-7 games.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 3e56e56ee7 SCUMM: MACGUI: Generate pop-up menus from the DITL resource
This way we no longer hard-code English texts.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson ac9e6adef9 SCUMM: MACGUI: Renamed the drop down list to pop-up menu
For consistency with Inside Machintosh.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson a26f5c1853 SCUMM: MACGUI: Fix major oops when dealing with "user items" in dialogs
I had forgotten to skip the data for the user item when parsing the DITL
resource. For most games this made no difference because the size was 0.
But for Day of the Tentacle, that was not the case. It turns out that a
lot of stuff that I was drawing manually was there all along!
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 9aa269edf7 SCUMM: MACGUI: Add support for Sam & Max demo
This used to be hosted on the LucasArts FTP server.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 16380da1f7 SCUMM: MACGUI: Add support for The Dig Mac demo
This one uses a regular dialog for About. Unfortunately, our Sam & Max
and Full Throttle Mac demos don't have any resource fork, and our Fate
of Atlantis Mac demo has an unrecognized string table.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson d4b243bb67 SCUMM: MACGUI: Add "snap while dragging" for MacImageSlider
Used for v6-7 sliders. It's probably a bit off, but not enough to be
noticeable.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson e718203314 SCUMM: MACGUI: Add mechanism to override the calculated slider stops
Useful for the v6-7 sliders, which have to line up with the markings.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson d940e901de SCUMM: MACGUI: The slider widgets sort of work 2025-01-01 14:41:20 +02:00
Torbjörn Andersson 96067ff55a SCUMM: MACGUI: Preliminary work on image slider to support V6-7 sliders
I'm committing this while I consider how to get transparency to work for
the slider handle.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson c6b5fb6876 SCUMM: MACGUI: Work in progress on the drop down list widget 2025-01-01 14:41:20 +02:00
Torbjörn Andersson 75a54c3298 SCUMM: MACGUI: Add missing static graphics to Maniac Mansion options 2025-01-01 14:41:20 +02:00
Torbjörn Andersson acaf166943 SCUMM: MACGUI: Add missing static graphics to Full Throttle options
And The Dig, but that turned out to be identical to Sam & Max.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 2d1ad751b0 SCUMM: MACGUI: Add missing static graphics to Sam & Max options dialog 2025-01-01 14:41:20 +02:00
Torbjörn Andersson 7380767714 SCUMM: MACGUI: Add missing static graphics to DOTT options dialog
Also fixed some palette issues along the way.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 645e0297fc SCUMM: MACGUI: Make OK the default button in v6-7 options dialogs 2025-01-01 14:41:20 +02:00
Torbjörn Andersson e5b964a24c SCUMM: MACGUI: Complete rework of v6-7 window palettes
When a dialog window is created now, all palettes from the individual
widgets (icons and pictures) are collected and combined into a single
palette. The widget palettes are remapped to this. The icon decoder is
now a proper image decoder, which makes icons and pictures very similar
to handle.
2025-01-01 14:41:20 +02:00