Commit Graph
240 Commits
Author SHA1 Message Date
Torbjörn Andersson aa35d449a6 SCUMM: Eliminate need to expose MacDialogWindow outside of MacGui
The plan is to eventually hide as much of the MacGui implementation as
possible from the rest of the engine, and only provide a minimal
macgui.h for it to use.
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
Torbjörn Andersson 737e5ef7ec SCUMM: Minor Mac Loom drafts inventory cleanup 2023-12-06 18:13:30 +01:00
Torbjörn Andersson 78c4d97f81 SCUMM: Make Mac Indy 3 verb gui independent of position
The GUI is now drawn on a sub-surface of the screen, and everything
inside it is positioned relative to that surface. This removes some of
the need to adjust things by _screenDrawOffset.
2023-12-05 07:27:12 +01:00
Torbjörn Andersson df9fc52c05 SCUMM: Simplify Mac Indy 3 verb button and inventory initialization
Now the _screenDrawOffset is added in the two constructors instead.
2023-12-03 21:03:59 +01:00
Torbjörn Andersson 2768e8d551 SCUMM: Really fix Mac dialog position
In an attempt to split up my previous commits, I accidentally applied
the position correction twice. Now it's only done once, and that means
that the banner window doesn't need a special case after all.
2023-12-03 21:03:59 +01:00
AndywinXp 826fe9661f SCUMM: MACGUI: Fix pause banner position 2023-12-03 21:03:59 +01:00
Torbjörn Andersson a0da4e12c6 SCUMM: Adjust Mac Loom practice box coordinates and dragging
A rare regression from the 640x400 -> 640x480 transition.
2023-12-03 21:03:59 +01:00
Torbjörn Andersson 078bbe94bb SCUMM: Adjust Mac dialog coordinates for 640x480 pixels
I do realize that it's a bit silly that we also adjust the coordinates
for 640x400 pixels earlier on, but if we want to keep support for that
resolution later that may not be a bad thing.
2023-12-03 21:03:59 +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 9909165a67 SCUMM: Draw decorative line in Mac Loom save/load dialog as shaded
This matches what I see in emulation. Should this also be applied to the
Indy 3 dialog? The color version seems to draw a solid line, but the
black and white version is dotted. I don't have the time to look where
that is done at the moment.
2023-12-01 07:55:25 +01:00
Torbjörn Andersson 9e7849a30c SCUMM: Generate Unicode to Mac Roman conversion table
Instead of hard-coding it. I still have my own conversion function, but
at least it's less error prone this way. I did it this way because I
couldn't find a readily available function for converting single
characters, only complete strings.
2023-11-30 19:35:59 +01:00
Torbjörn Andersson bc44c81037 SCUMM: Handle non-ASCII characters in savegame names 2023-11-29 19:11:24 +01:00
Torbjörn Andersson b2cb32202e SCUMM: Make Mac Loom Drafts Inventory menu item an enhancement too
But to make sure we keep the same menu item IDs, we only disable it. We
don't remove it completely.
2023-11-28 18:38:08 +01:00
Torbjörn Andersson a9929f0aa6 SCUMM: Fix Mac Loom/Indy3 crash when running without original GUI 2023-11-28 18:35:21 +01:00
AndywinXp 882691dd50 SCUMM: MACGUI: Skip autosave slot when selecting target save slot 2023-11-28 08:53:02 +01:00
Torbjörn Andersson 1c8088ec9a SCUMM: Move Mac Loom drafts inventory into MacLoomGui 2023-11-27 18:12:06 +01:00
AndywinXp 2fd005b001 SCUMM: MACGUI: Update Loom conditions for disabling menu items 2023-11-24 12:47:39 +01:00
Torbjörn Andersson 7c1bd75174 SCUMM: Fix Mac Indy 3 text box header color in black and white mode 2023-11-23 15:08:20 +01:00
Torbjörn Andersson 86070f0033 SCUMM: Update widget list comments for open/save dialogs 2023-11-23 09:04:09 +01:00
AndywinXp 02ad8494d0 SCUMM: MACGUI: Improve enabling/disabling save and load menus
The Indy3 code now matches the disasm, thanks to athrxx.
2023-11-22 23:28:22 +01:00
AndywinXp 3af9526fff SCUMM: MACGUI: Implement automatic disabling of menus for Indy3
I can't find what triggers the same thing on Loom, so for now that's
always set to true...
2023-11-22 14:40:46 +01:00
Torbjörn Andersson 3800f8f33f SCUMM: Simplify launching of Mac Loom drafts inventory
It's now the Mac dialog class that's responsible for saving/restoring
the screen shaking. (They were already responsible for pausing and
unpausing.) There are some other minor cleanups along the way, and the
drafts inventory can now be launched from the Apple menu.
2023-11-21 18:58:24 +01:00
D G Turner 4f72261d89 SCUMM: Fix Various GCC Compiler Warnings in Mac Graphics Code 2023-11-21 05:46:29 +00:00
Torbjörn Andersson e4d5676002 SCUMM: Handle up/down arrow in Mac edit text widget
I decided to add Home/End as alternatives. That may be an enhancement,
but I'm not sure.
2023-11-20 19:48:08 +01:00
Torbjörn Andersson 387b8da53b SCUMM: Implement up/down arrow in Mac list box widget 2023-11-20 19:41:32 +01:00
AndywinXp b599b254f5 SCUMM: MACGUI: Implement Loom's Drafts inventory using a MacDialogWindow 2023-11-20 14:39:17 +01:00
Torbjörn Andersson 4c15793976 SCUMM: Draw outer border correctly on disabled Mac default button 2023-11-20 06:47:41 +01:00
AndywinXp dc487e34b4 SCUMM: MACGUI: Force the menu bar to be visible after selecting an item 2023-11-19 23:47:42 +01:00
AndywinXp fd632752e2 SCUMM: MACGUI: Make Indy3 Save dialog EditText widget pixel accurate 2023-11-19 19:19:23 +01:00
AndywinXp ca73d4352e SCUMM: MACGUI: Update engine mouse coordinates while in MacGui
This fixes the mouse cursor being elsewhere when loading
a savestate from the MacGui.
2023-11-19 18:57:14 +01:00
Torbjörn Andersson cdcb69eda4 SCUMM: Implement double-clicking on Mac Indy3/Loom save slots 2023-11-19 16:06:42 +01:00
Torbjörn Andersson a38ae354af SCUMM: Require Mac widgets to return true/false from handleMouseUp()
Returning true means runDialog() returns so that the function that calls
it can act. Also, it's the "Open" button's responsibility to figure out
which save slot to use, not the list box. We may not have clicked on a
save slot yet. (I hope I understood this correctly.)
2023-11-19 15:45:39 +01:00
Torbjörn Andersson 19036610c9 SCUMM: Make MacDialogWindow responsible for handling double clicks
Before, individual Mac widgets were responsible.
2023-11-19 15:15:38 +01:00
Torbjörn Andersson ac19f6dc54 SCUMM: Limit length of Mac editable text
We use it for save game names, so it doesn't need to be more than 31
characters. We can always make this configurable later, if needed.
2023-11-19 11:03:44 +01:00
Torbjörn Andersson 453aaa5522 SCUMM: Fix glitch in Mac picture slider
When dragging the handle, even if the calculated value doesn't change we
still need to reposition the handle, or it may be left sitting between
two values. This is particularly noticeable for the music quality
slider, which only has three possible values.
2023-11-19 10:04:47 +01:00
Torbjörn Andersson ba501a628e SCUMM: Use Font's built-in word-wrapper for Mac GUI strings
I didn't realize this existed. Once I found the one in base-str.cpp and
decided I couldn't use it, I wrote my own. But you should never get so
attached to any code you write that you can't bear to throw it away when
a better solution presents itself.
2023-11-18 22:44:11 +01:00
AndywinXp 83c94305ec SCUMM: MACGUI: Add deferred widgets handling & disable Save button on empty editText string
This prevents users from ever saving games with empty names, like
in the original and also removes my previous ugly hack for fetching
the savegame name string.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson a9a6ec592b SCUMM: Make word-wrapping optional in Mac static text widgets
Word-wrapping is used for message dialogs, but not e.g. for strings in
the save/load dialogs.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson ed61b52180 SCUMM: Make listbox strings disabled for save dialog
This means we won't have to set their color, and that clicking on them
automatically does nothing. (I hope I didn't accidentally disable
anything else in the process.)
2023-11-18 18:47:39 +01:00
AndywinXp 59d5a24b1a SCUMM: MACGUI: Clear IQ points in a more accurate way 2023-11-18 18:47:39 +01:00
AndywinXp 761f2946fc SCUMM: MACGUI: Handle and clear IQ points for Indy3 2023-11-18 18:47:39 +01:00
Torbjörn Andersson 4efb72ebc1 SCUMM: Fix list box scrolling in Loom save dialog 2023-11-18 18:47:39 +01:00
Torbjörn Andersson 64b678b86b SCUMM: Make Loom save dialog list box a bit taller
This avoids glitches when scrolling (once scrolling is fixed).
2023-11-18 18:47:39 +01:00
AndywinXp 6bbc39d92d SCUMM: MACGUI: Implement saving and loading for Indy3 2023-11-18 18:47:39 +01:00
AndywinXp c4ed2b61c0 SCUMM: MACGUI: Hardcode save and open menu for Indy3 2023-11-18 18:47:39 +01:00
Torbjörn Andersson bd485e25d0 SCUMM: Fix bugs in Mac list box and slider widgets
The worst one was that the scroll wheel could crash ScummVM. The rest is
mostly cosmetical.
2023-11-18 18:47:39 +01:00
AndywinXp 35acda4e34 SCUMM: MACGUI: Cleanup 2023-11-18 18:47:39 +01:00
AndywinXp 1eccfc4381 SCUMM: MACGUI: Implement saving and loading for Loom 2023-11-18 18:47:39 +01:00
AndywinXp f57f2b3af5 SCUMM: MACGUI: Add MacListBox and add test code for Open Dialog
MacListBox code, courtesy by eriktorbjorn!
2023-11-18 18:47:39 +01:00