Commit Graph
147 Commits
Author SHA1 Message Date
Torbjörn Andersson 5bc34ba177 SCUMM: MACGUI: Disable Maniac Mansion Mac GUI while paused
We do this by setting the _messageBannerActive flag. It's not really a
banner, I guess, but close enough. Also simplified the check a bit. Back
when it was just Loom and Indy 3, we checked if their custom banner
window had been created. But the message banner flag actually covers
that as well.
2025-03-03 11:29:05 +02:00
Cameron Cawley 8f8e830780 SCUMM: Make more static data read only 2024-11-25 22:54:31 +02:00
Torbjörn Andersson b4f7341808 SCUMM: Initialize _bannerColors
This silences Valgrind warnings in COMI when saving.
2024-11-16 18:40:51 +02:00
AndywinXp a9ea849d8a SCUMM: v7: Fix canWriteGame() routine for savegames
It erroneously referred to the previous savestate in the list.
2024-11-08 21:57:58 +01:00
Torbjörn Andersson 53c41d591d SCUMM: Disable some keysmaps while writing some savegame names
The userWriteLabelRoutine() seems to be used by several, but far from
all, of the SCUMM games when using the original GUI. Disable the
engine-default keymap while it's running, so that it won't clash with
text input.
2024-11-04 21:00:56 +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
AndywinXp 67b0440ad0 SCUMM: MI1 (Mac): Implement EPX scaling and a stub for the menu 2024-10-28 08:24:59 +01:00
AndywinXp 0b704202e1 SCUMM: Never show autosaves on original GUI
...so users can't overwrite them.

This commit includes a small self-correction routine,
which moves all savegames down a slot, if the savestate
at slot 0 is non-empty and is not an autosave.

Now we instate a convention: on the original menus we
don't show the autosaves, ever. If an user wants to
use an autosave they will have to use the GMM.

Why? Because games with script based menus (v0-3, v8)
already exhibit this behavior, and I want consistency across
all SCUMM versions.

Naturally this commit excludes all HE games, since they
can't use anything other than the GMM, to save and load.
2024-09-19 08:09:25 +03:00
AndywinXp 99545af5c8 SCUMM: GUI: Fix text disappearing during banner on room 0
This should fix the "Meanwhile..." text disappearing during pause
on Monkey Island 1
2024-09-18 23:51:40 +02:00
AndywinXp 8d5aa3a14b SCUMM: GUI: Improve quit dialog override consistency
No more cases of SCUMM quit dialogs followed by frontend
quit dialogs, and no more cases of versions not having an
override quitting without confirmation (ignoring the frontend
setting).
2024-09-01 12:34:54 +02:00
AndywinXp 960851544a SCUMM: IMUSE/GUI: Comment clarification 2024-08-27 11:49:41 +02:00
AndywinXp 5bbd7aaaac SCUMM: IMUSE: Implement music volume reduction during speech
Algorithm taken from SAMNMAX disassembly.

INDY4 and DOTT share another earlier algorithm, but I couldn't
understand the code enough to know if the resulting effect
is different or not.
2024-08-27 11:49:41 +02:00
AndywinXp a467ab6f3e SCUMM: MANIAC (Apple IIgs): Implement correct cursor and color for texts
Everything is white now :-) The C64-like cursor and text colors
are now available via the "Visual changes" enhancement.
2024-08-12 20:52:24 +02:00
AndywinXp 0f87863c7b SCUMM: MANIAC/ZAK (C64): Make screen layout pixel-perfect
This closes and fixes #11971:
"SCUMM: MANIAC/ZAK C64: GUI & dialog text are incorrectly
positioned on screen, and cursor is improperly layered"

The ticket also mentions improperly layered cursor:
"the pointer cursors pass *behind* the various character sprites
on screen", but there's really nothing we can do about it,
our cursor handling is way too different to function like the original
(and anyway, it looks like a severe C64 hardware limitation quirk...)
2024-08-11 00:09:33 +02:00
AndywinXp b0abcd0461 SCUMM: MANIAC (Apple IIgs): Fix all known gfx regressions
Poor Apple II version, it has been broken for at least a couple
of years :-)

All regressions were a byproduct of basically forgetting this
version existed when making changes which should have
(or should not have) targeted C64 games, which use the
same rendering routines and palettes as this one.

Fixes and closes #14765:
"SCUMM V0: MANIAC: APPLE II: Palette is incorrect."
2024-08-10 21:52:36 +02:00
AndywinXp be8170e124 SCUMM: v0-2: Fix subtitle disappearing after pause 2024-08-09 00:47:02 +02:00
AndywinXp d86ef1c35b SCUMM: GUI: Fix GUI edges glitching during SMUSH movies
Whenever _screenTop is non-zero the edges of GUI elements
will glitch during SMUSH movies. This happens on the originals
as well (the ending movies for DIG and COMI), but to a less extent.
2024-07-02 23:57:11 +02:00
athrxx ecb03f2e7c SCUMM: (V3/FM-Towns) - fix bug no. 15027
("INDY3 (FMTowns): Map lines are drawn incorrectly, plus more
issues when leaving Germany")

The bug with the wrong colors is caused by the shadow palette, which
gets set with the colors for the modified country borders, but gets
reset immediately after drawing the background. So when the map
travel marker makes an area dirty, it would be restored with the wrong
color. Now, the original V3 FM-Towns interpreter can draw on layer 2
directly, without declaring anything dirty, effectively bypassing the
normal SCUMM drawing. This avoids any change to the background.
This happens for drawBox, but also when displaying or hiding the pause
banner.

In SCUMM5 drawBox works the way we had it implemented, drawing
on the text surface (MI1: also on the vs buffer) and then making that
rect dirty.
2024-05-04 16:43:06 +02:00
athrxx b868dab4c5 SCUMM: (V3/FM-Towns) - partial fix for bug no. 15027
(INDY3 (FMTowns): Map lines are drawn incorrectly)

This fix addresses the part concerning the line width of the travel
marker. Turns out that SCUMM3 FM-Towns draws all boxes one
pixel wider and higher on virtual screens other than 1. This also
allows removal of a hack in ScummEngine_v5::o5_drawBox().

I also fixed the old style pause/restart banners, since they incorrectly
used drawBox() for line drawing (which would be glitchy with the now
verdrawing drawBox(). The positive outcome is that we no have original
looking FM-Towns banners (only in Japanese, though, since - unlike the
original - we don't run the English version in 640x480).

The changed method of drawing and removing the banner also fixes
the removal of the black country borders on the map. But it will still
be removed below the pause banner and in the spots where the travel
marker passes the border. So that has to be addressed separately.
2024-04-30 23:29:53 +02:00
AndywinXp 8fe0f93630 SCUMM: Rename CHARSET_1() to displayDialog()
We are now using a name which respects the coding
guidelines and also reflects how the actual function was
named.
2024-04-28 19:59:30 +02:00
AndywinXp 74d5d2c81b SCUMM: COMI: Fix erratic quit confirmation behavior 2023-11-25 12:25:08 +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
AndywinXp fb86877ec1 SCUMM: MACGUI: Wire up some more callbacks
I wired up almost every Indy3 option (except for audio, which
might need some special handling), and I implemented the
scrollable text list in the save menu.
2023-11-18 18:47:39 +01:00
AndywinXp 8ddd8da773 SCUMM: GUI: Fix confirmation on exit behavior on script quit commands
We now quit without confirmation when the scripts tell the
interpreter to quit. Except in COMI main menu, when pressing
on the "Quit" option. In that case we must ALWAYS show the
confirmation dialog box.
2023-11-13 22:33:18 +01:00
AndywinXp cdabda2477 SCUMM: GFX: Set correct fadeout transition when restarting game 2023-11-13 20:37:13 +01:00
AndywinXp e4232b95b1 SCUMM: GUI: Implement accurate menus for Jap Indy4 (DOS/Mac) 2023-11-12 18:59:18 +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 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
sluicebox bc7dcc0366 SCUMM: Fix out of bounds array access
ScummEngine::runScript expects an array of size NUM_SCRIPT_LOCAL.

Coverity CID 1501555
2023-11-02 09:28:19 -07:00
sluicebox 58bb4f81e4 SCUMM: Remove unused dummyArgs. PVS-Studio V597
The intent was to pass zero arguments using dummyArgs, but that would
have caused out of bounds reads because runScript expects an array of
size NUM_SCRIPT_LOCAL (25). Passing `args` worked because it was
already zeroed out, but runScript also accepts null for this purpose.

See: 19b45e2a50
2023-10-31 14:20:25 -07:00
Eugene Sandulenko 727caebc85 SCUMM: Marked Russian a long language in drafts inventory, restored cropped draft names 2023-10-29 21:08:28 +01:00
Eugene Sandulenko 71abdfce08 SCUMM: Added Russian draft names to Lomm drafts inventory 2023-10-29 20:58:13 +01:00
AndywinXp ff3c922b8d SCUMM: LOOM/GUI: Mask currently unknown drafts titles 2023-10-29 20:22:52 +01:00
AndywinXp d97fe2034d SCUMM: LOOM/GUI: Fix text colors inversion for Hebrew 2023-10-29 20:22:52 +01:00
AndywinXp 3a590f203e SCUMM: LOOM/GUI: Fix FM-Towns widget not disappearing 2023-10-29 20:22:52 +01:00
AndywinXp dce87d8bda SCUMM: LOOM/GUI: Fix occasional wrong text height being fetched
Also, clean-up.
2023-10-29 20:22:52 +01:00
AndywinXp 353e5102c5 SCUMM: LOOM/GUI: Fix Hebrew layout and add more comments 2023-10-29 20:22:52 +01:00
AndywinXp 8d469f430f SCUMM: LOOM/GUI: Clean up and fix drafts menu for French strings
French strings are a little bit too long for this menu :)
2023-10-29 20:22:52 +01:00
AndywinXp a3f7899ca2 SCUMM: LOOM/GUI: Remove stray ":" in Jap Drafts title 2023-10-29 20:22:52 +01:00
AndywinXp 0777b3b013 SCUMM: LOOM: Insert French and Spanish translations for Draft menu 2023-10-29 20:22:52 +01:00
AndywinXp c62e4c5829 SCUMM: LOOM: Begin work on Drafts Inventory enhancement 2023-10-29 20:22:52 +01:00
AndywinXp e949b1ed47 SCUMM: GUI: Restore previous _saveSound at the end of menu
Fixes the main part of ticket #14618.
Fix suggested by eriktorbjorn.
2023-09-14 15:17:54 +02:00
athrxx 0201155544 SCUMM: (MI2) - fix assert triggering when pressing F5
This happens on screeens with an xstart offset (= a screen
that is wider than 320 pixels, after some scrolling) but only
when there is dialogue text on screen when pressing F5.
Can be tested right at the start on the bridge. Just right-
click the sign, then press F5...
2023-08-19 22:19:41 +02:00
AndywinXp f484ad6545 SCUMM: SAMNMAX: Fix bug #14467
This was caused by the fact that the pre and post save screen scripts
were not being called, and this messed up the cursor state with savegames
created as quicksaves.

Also, renamed the variables containing said scripts numbers, so that
they are a little bit more meaningful now.
2023-05-21 21:17:36 +02:00
AndywinXp 9926908983 SCUMM: SAMNMAX: Fix bug #14468
I really have no idea why I wrote the code in such a way that
it attempted to load stuff that was never saved in the first place,
and I guess we'll never know. Findings by athrxx!
2023-05-21 20:16:14 +02:00
AndywinXp e28b3f09b1 SCUMM: GUI: Use correct heap message for some v6 games 2023-03-19 19:26:15 +01:00
AndywinXp e494b2527b SCUMM: DOTT: Fix quit prompt appearing when using the PC in Ed's room
This only affects the original GUI mode, and leaves the other mode as it has always been; also,
the issue only appeared when the global configuration parameter "confirm_exit" was set to true.
2023-01-28 10:14:42 +01:00
AndywinXp d9777bf512 SCUMM: GUI: Correctly save the shake screen flag 2023-01-23 16:14:45 +01:00
AndywinXp cc2b4de6ec SCUMM: DOTT/GUI: Fix cursor not reappearing when loading a savegame 2023-01-22 23:11:25 +01:00