Commit Graph
35 Commits
Author SHA1 Message Date
Le Philousophe d77cf892c6 SCUMM: Don't use deprecated primitives 2025-01-24 12:11:17 +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 d3a61d71b2 SCUMM: MACGUI: Add drawRoundRect() method to Mac dialog window
It will still trigger warnings about using a deprecated method, but now
it's clearly documented that this should be replaced with something that
matches QuickDraw's rounded rects.
2025-01-06 08:55:19 +01: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 281c2bacbc SCUMM: MACGUI: Combine MacIcon and MacPicture into a single widget 2025-01-01 14:41:20 +02:00
Torbjörn Andersson 25c304f892 SCUMM: MACGUI: Fix bugs in icon loader, plus early v6-7 options dialog
This isn't really ready for use, but I want to commit because I embark
on another experiment.
2025-01-01 14:41:20 +02:00
Torbjörn Andersson 840e59c402 SCUMM: MACGUI: Fall back on using no Mac GUI for unrecognized versions
Rather than crashing, allow the user to continue playing the
unrecognized Mac version, albeit without the Mac GUI. Certain other Mac
aspects may still survive.
2024-11-14 21:30:54 +02:00
Torbjörn Andersson 95ad13f678 SCUMM: MACGUI: Eliminate more hard-coded widget IDs
Instead of referring to widgets by their ID (really just an index into
an array), now we ask the dialog for the Nth instance of a widget of a
particular type. So we still need to know in which order buttons and
such are defined, but it should still be a lot easier to read and a lot
less prone to error.
2024-10-28 08:24:59 +01:00
Torbjörn Andersson b48c875817 SCUMM: MACGUI: Minor cosmetic fixes for the menu
When pausing the game from the menu, remove the menu before displaying
the pause message. When opening the Loom drafts inventory from the Apple
menu, use the Apple menu style for it.
2024-10-28 08:24:59 +01:00
Torbjörn Andersson 261b4019d5 SCUMM: MACGUI: Scribble on the fake Mac menu bar when opening dialogs
On a real Mac, the menu bar remains interactive while dialogs are shown.
This is only useful for the Edit menu during the Save dialog, and we
don't implement the Edit menu anyway. Ours is just decorative, but now
it looks a bit more like the original: Menus are grayed out or, for
About dialogs, the Apple menu is still highlighted.
2024-10-28 08:24:59 +01:00
Torbjörn Andersson 1c3d41edf7 SCUMM: MACGUI: Move default save/load into macgui_impl.cpp
Plus some other minor cleanups. As far as I can tell, Last Crusade is
the only one of the games that doesn't use the system save/load dialogs,
so it makes sense to me to let the base GUI implement it.
2024-10-28 08:24:59 +01:00
Torbjörn Andersson 823942358c SCUMM: MACGUI: Improve the rendering of "Monkey Island 2"
I think this is the correct rendering: Italics + Bold + Outline drawn
twice, once pixel apart. But ScummVM spaces the letters too closely
together. It could perhaps be fixed by adding Extended, but when I
mocked it up in a Mac emulator I didn't have to use that.
2024-10-28 08:24:59 +01:00
AndywinXp ae795675fe SCUMM: Rework Mac STRS handling 2024-10-28 08:24:59 +01:00
athrxx 70ca4bd346 SCUMM: (Loom/Mac) - make sound toggle widget use ConfMan settings
(and other fixes to make this work properly)
2024-10-28 08:24:59 +01:00
Torbjörn Andersson 8cf49f4efd SCUMM: MACGUI: Move 16 color constants to its own header file
This should help ensure that we don't accidentally use them in code
common to both 16 and 256 color games.
2024-10-28 08:24:59 +01:00
AndywinXp 9f319cdd86 SCUMM: Add Mac screen implementation for remaining LEC games
This adds optional EPX scaling and 640x480 resolution for
LucasArts Macintosh games other than Indy3 and Loom.

This includes:
* Monkey Island 1
* Monkey Island 2
* Indy4
* Day of the Tentacle
* Sam&Max
* Full Throttle
* The Dig

In doing this, I reverted the ugly code which previously offset
the game screen 20 pixels below (to create an internal 320x240
buffer, instead of 320x200). Instead of just offsetting mouse
coordinates and the final screen texture, I used to offset the
in-engine graphics elements. Ew.

This ensures flawless savegame compatibility between old and
new, without touching anything.
2024-10-28 08:24:59 +01:00
Torbjörn Andersson b8224c5652 SCUMM: MACGUI: Fix comment typo 2024-10-10 22:04:49 +02:00
AndywinXp a3820a5374 SCUMM: INDY3/LOOM (Mac): Fix saving/loading from Mac menu 2024-10-08 18:40:00 +02:00
AndywinXp 918e349040 SCUMM: INDY3/LOOM (Mac): Draw fake widgets in open/save windows
These are fake widgets because we won't ever have,
within ScummVM, an use for the real ones.

Now the dialogs are more accurate and prettier. :-)
2024-10-04 20:52:32 +02:00
AndywinXp 95c9d089d5 SCUMM: LOOM (Mac): Parse MacGui strings from STRS resource 2024-10-04 14:27:55 +02:00
AndywinXp fdbf3d22a8 SCUMM: MACGUI: Improve pixel accuracy of Loom menus 2024-10-03 20:29:55 +02:00
athrxx e5bc749858 SCUMM: (v3/5/Mac) - remove old music player code 2024-03-16 15:01:19 +01:00
Torbjörn Andersson ed883f7957 SCUMM: Don't handle Mac GUI events while the game is paused
At least for Indy 3, it led to strange effects with verb buttons being
depressed but not popping back out. For Loom, it made it possible to
move the practice box while the game was paused. While that's not
necessarily bad, I really don't want to have to worry about what else
may happen.
2024-03-05 07:42:45 +01:00
athrxx c52bfe4f27 SCUMM: (Loom/Mac) - add music quality slider widget 2024-02-28 21:31:50 +01:00
athrxx aee2bf53bb SCUMM: (Loom/Mac) - add new sound player
This  should provide more accurate and feature complete
sound than the existing player (which is still there, just
disabled). I haven't implemented a proper quality selection
method yet.
2024-02-28 21:01:41 +01:00
athrxx 06a5114294 SCUMM: (LOOM/MAC) - sync launcher and menu settings for music quality
The Mac menu will now have the setting from the launcher and vice versa.
2024-02-10 14:51:42 +01:00
Le Philousophe 17f09bb48c SCUMM: Migrate engine to Path 2023-12-24 13:19:25 +01:00
Torbjörn Andersson 6ee8212c37 SCUMM: Add enum for Mac GUI delay() return values
This should hopefully make it clearer what's intended. The delay can
either run its normal course, be interrupted (by clicking), or be
aborted (by quitting).
2023-12-24 08:31:20 +01:00
Torbjörn Andersson 54b27b02a2 SCUMM: Clean up Mac Loom "About" dialog a bit
There was a lot of unnecessary code duplication, and I had already
started to forget how I meant it to work. This should make things a bit
clearer.
2023-12-24 08:30:50 +01:00
Torbjörn Andersson ae53a2afb3 SCUMM: Remove dead code from Mac Loom "About" dialog 2023-12-23 17:51:13 +01:00
Torbjörn Andersson 81c02542c0 SCUMM: Remove unnecessary FontId qualifier from Mac GUI 2023-12-22 15:09:06 +01:00
Torbjörn Andersson 1226b9ca3f SCUMM: Clean up some includes 2023-12-22 15:09:06 +01:00
Torbjörn Andersson 96247123ba SCUMM: Give Loom and Indy 3 their own Mac GUI header files 2023-12-22 15:09:06 +01:00
Torbjörn Andersson c7ab59293f SCUMM: Split MacGui into MacGui and MacGuiImpl
The idea here is to expose a much smaller part of the MacGui headers to
the SCUMM engine, but introducing a new class that simply relays calls
to the actual Mac GUI. I hope this will allow me to further untangle
things.
2023-12-22 15:09:06 +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